/* ====================================================================
   Lyrinox Market — Application Stylesheet
   Dark marketplace aesthetic with violet/purple accents
   ==================================================================== */

/* ── Custom properties ──────────────────────────────────────────────── */
:root {
  --bg-base:      #0b0b12;
  --bg-surface:   #13131f;
  --bg-card:      #1a1a2e;
  --bg-card-hover:#1f1f38;
  --bg-input:     #111120;
  --bg-nav:       rgba(11, 11, 18, 0.95);

  --accent:       #7c3aed;
  --accent-light: #9f67ff;
  --accent-dark:  #5b21b6;
  --accent-glow:  rgba(124, 58, 237, 0.35);

  --text-primary:   #f0f0f8;
  --text-secondary: #9898b8;
  --text-muted:     #5a5a7a;

  --border:       #2a2a45;
  --border-focus: #7c3aed;

  --green:  #22c55e;
  --yellow: #eab308;
  --red:    #ef4444;
  --blue:   #3b82f6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 24px var(--accent-glow);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --nav-height: 98px;
  --container-max: 1100px;
  --transition: 150ms ease;
}

/* ── Reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  touch-action: manipulation;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

main { flex: 1; }

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

a, button, [role="button"], label, select, summary {
  touch-action: manipulation;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--text-primary); }
p { color: var(--text-secondary); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(124,58,237,0.12);
  color: var(--accent-light);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

/* ── Container ──────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

/* ── Navigation ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: linear-gradient(180deg, rgba(8, 8, 18, 0.96) 0%, rgba(11, 11, 18, 0.94) 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  transform: translateY(1px);
}

.nav-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-brand-tagline {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brand-icon { color: var(--accent-light); font-size: 1rem; }
.brand-accent { color: var(--accent-light); }

.nav-logo {
  height: 78px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.2));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.25rem;
}
.nav-link:hover { color: var(--text-primary); }

.nav-link--accent {
  color: var(--accent-light);
  font-weight: 600;
}
.nav-link--accent:hover { color: #fff; }

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  line-height: 1;
}

.nav-logout-form { display: inline; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--accent-light);
  color: #fff;
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--accent);
}

.btn--danger {
  background: var(--red);
  color: #fff;
}
.btn--danger:hover { background: #dc2626; color: #fff; }

.btn--danger-ghost {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn--danger-ghost:hover { background: rgba(239,68,68,0.1); }

.btn--success {
  background: var(--green);
  color: #fff;
}
.btn--success:hover { background: #16a34a; color: #fff; }

.btn--lg  { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn--sm  { padding: 0.4rem 0.9rem;   font-size: 0.82rem; }
.btn--xs  { padding: 0.25rem 0.65rem; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn--full { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Flash messages ─────────────────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.flash--success { background: rgba(34,197,94,0.12);  color: #86efac; border-bottom: 1px solid rgba(34,197,94,0.2); }
.flash--error   { background: rgba(239,68,68,0.12);  color: #fca5a5; border-bottom: 1px solid rgba(239,68,68,0.2); }
.flash--info    { background: rgba(59,130,246,0.12); color: #93c5fd; border-bottom: 1px solid rgba(59,130,246,0.2); }

.flash-icon { font-size: 1rem; flex-shrink: 0; }
.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 0 0.25rem;
}
.flash-close:hover { opacity: 1; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239898b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-select option { background: var(--bg-card); color: var(--text-primary); }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.form-hint--ok  { color: var(--green); }
.form-hint--err { color: var(--red); }

.password-meter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.password-meter__track {
  height: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.password-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
  transition: width 180ms ease;
}

.password-meter__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.password-meter[data-strength="weak"] .password-meter__fill { background: var(--red); }
.password-meter[data-strength="fair"] .password-meter__fill { background: var(--yellow); }
.password-meter[data-strength="good"] .password-meter__fill { background: linear-gradient(90deg, var(--yellow), #84cc16); }
.password-meter[data-strength="strong"] .password-meter__fill { background: linear-gradient(90deg, #84cc16, var(--green)); }

/* ── Auth pages (login / signup) ────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--nav-height) - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-light) !important;
  margin-bottom: 1.25rem;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-link { color: var(--accent-light); font-weight: 600; }
.auth-link:hover { color: #fff; }

/* ── Modern Hero ────────────────────────────────────────────────────── */
.modern-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge-wrapper {
  margin-bottom: 2rem;
}

.hero-badge-new {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-light);
  backdrop-filter: blur(10px);
}

.modern-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.title-highlight {
  display: block;
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 50%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modern-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-modern--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-modern--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  color: #fff;
}

.btn-modern--outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-modern--outline:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.btn-modern--white {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.btn-modern--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
  color: var(--accent);
}

.hero-stats-modern {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
}

.stat-modern {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-modern-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-modern-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: float 6s ease-in-out infinite;
}

.floating-card-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-card-2 {
  top: 50%;
  right: 10%;
  animation-delay: 2s;
}

.floating-card-3 {
  bottom: 10%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.card-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Features Modern */
.features-modern {
  padding: 8rem 0;
  background: var(--bg-surface);
}

.section-header-modern {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.section-title-modern {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-subtitle-modern {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.features-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card-modern {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.feature-card-modern:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.2);
}

.feature-icon-modern {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.feature-card-modern h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-card-modern p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Categories Modern */
.categories-modern {
  padding: 8rem 0;
}

.categories-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.category-card-modern {
  position: relative;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  text-decoration: none;
  overflow: hidden;
}

.category-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card-modern:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.2);
}

.category-card-modern:hover::before {
  opacity: 1;
}

.category-icon-modern {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.category-card-modern h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.category-card-modern p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.category-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 50%;
  color: var(--accent-light);
  transition: all 0.3s ease;
}

.category-card-modern:hover .category-arrow {
  background: var(--accent);
  color: #fff;
  transform: translateX(4px);
}

/* CTA Modern */
.cta-modern {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  position: relative;
  overflow: hidden;
}

.cta-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 60 0 L 0 0 0 60' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.cta-content-modern {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.cta-text-modern h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 1rem;
}

.cta-text-modern p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-visual {
    height: 400px;
  }
  
  .cta-content-modern {
    flex-direction: column;
    text-align: center;
  }
  
  .cta-text-modern p {
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .modern-hero {
    padding: 4rem 0 3rem;
  }
  
  .hero-cta-group {
    flex-direction: column;
  }
  
  .btn-modern {
    width: 100%;
    justify-content: center;
  }
  
  .hero-stats-modern {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  
  .stat-divider {
    display: none;
  }
  
  .hero-visual {
    display: none;
  }
  
  .features-grid-modern,
  .categories-grid-modern {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard ───────────────────────────────────────────────────────── */
.dashboard-page { padding: 2.5rem 0 6rem; }

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.dash-title    { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.25rem; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.dash-card-title { font-size: 1.05rem; font-weight: 700; }

/* ── Product grid ────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.product-image {
  width: 100%;
  height: 180px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.product-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.product-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; flex: 1; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.product-price { font-size: 1.25rem; font-weight: 800; color: var(--accent-light); }

/* ── Status badges ───────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.status-badge--green  { background: rgba(34,197,94,0.15);  color: var(--green); }
.status-badge--yellow { background: rgba(234,179,8,0.15);  color: var(--yellow); }
.status-badge--red    { background: rgba(239,68,68,0.15);  color: var(--red); }
.status-badge--blue   { background: rgba(59,130,246,0.15); color: var(--blue); }
.status-badge--gray   { background: rgba(156,163,175,0.15);color: #9ca3af; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-secondary);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card-hover); }

.action-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.empty-state { padding: 2rem; text-align: center; color: var(--text-muted); }

/* ── Error page ──────────────────────────────────────────────────────── */
.error-page {
  min-height: calc(100vh - var(--nav-height) - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}
.error-card {
  text-align: center;
  max-width: 480px;
}
.error-code {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.error-title { font-size: 1.75rem; margin-bottom: 0.75rem; }
.error-message { color: var(--text-muted); margin-bottom: 2rem; }
.error-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  margin-top: auto;
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.footer-brand { font-weight: 700; color: var(--accent-light); text-decoration: none; }
.footer-logo  { height: 64px; width: auto; display: block; opacity: 0.85; transition: opacity 0.2s; }
.footer-brand:hover .footer-logo { opacity: 1; }
.footer-copy  { color: var(--text-muted); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-light); }

/* ── Mobile nav ──────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.45rem 0.5rem;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: border-color 0.2s, color 0.2s;
}
.nav-hamburger:hover { color: var(--text-primary); border-color: var(--accent); }
.nav-hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav--open .nav-hamburger { color: var(--accent-light); border-color: var(--accent); }
.nav--open .nav-hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav-hamburger-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav--open .nav-hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-logo { height: 62px; }
  .nav-brand-text { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 0.5rem 0 1rem;
    gap: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }

  .nav--open .nav-links { display: flex; }

  .nav-link, .nav-link--accent {
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    display: block;
    color: var(--text-secondary);
  }
  .nav-link:hover, .nav-link--accent:hover {
    background: var(--bg-card);
    color: var(--text-primary);
  }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.1rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
}

/* ── Advanced Search & Filters ──────────────────────────────────────── */
.advanced-search-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.search-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
  flex: 1;
}

.search-input-group .form-input {
  flex: 1;
}

.advanced-filters {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-select {
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all var(--transition);
  cursor: pointer;
}

.form-select:hover {
  border-color: var(--accent);
}

.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.filter-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Image Lazy Loading & Optimization */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

.product-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Lazy load placeholder with skeleton animation */
.product-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-image.loaded::before {
  display: none;
}

@media (max-width: 768px) {
  .search-row {
    flex-direction: column;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-actions .btn {
    width: 100%;
  }
}

/* ── OAuth Authentication Styles ────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 1rem;
}

.oauth-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn--oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn--oauth:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn--github:hover {
  background: #24292e;
  border-color: #24292e;
}

.btn--google:hover {
  background: #4285f4;
  border-color: #4285f4;
}

.btn--oauth i {
  font-size: 1.125rem;
}

@media (max-width: 480px) {
  .oauth-buttons {
    grid-template-columns: 1fr;
  }
  .nav-logo { height: 48px; }
  .footer-logo { height: 48px; }
}

/* ── Seller Registration Form ─────────────────────────────────────────── */
.seller-terms {
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.seller-terms .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.seller-terms .checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  cursor: pointer;
}

.seller-terms .checkbox-label span {
  font-weight: 500;
  color: var(--text-primary);
}

.seller-terms .text-muted {
  font-size: 0.875rem;
  margin: 0;
  padding-left: 2rem;
}

.seller-benefits {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.seller-benefits h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.seller-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.seller-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.seller-benefits li:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.seller-benefits li i {
  color: var(--accent);
  font-size: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.seller-benefits li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── CTA Cards & Feedback Forms ───────────────────────────────────────── */
.cta-card {
  text-align: center;
  padding: 2rem !important;
}

.cta-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 50%;
  font-size: 1.75rem;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.cta-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.cta-card .text-muted {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.cta-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-form .form-group {
  margin: 0;
}

@media (max-width: 640px) {
  .cta-actions {
    flex-direction: column;
  }
  
  .cta-actions .btn {
    width: 100%;
  }
}
