/* =============================================================
   QR Studio — Stylesheet
   Design: Clean SaaS (Stripe / Notion aesthetic)
   - White backgrounds, blue accents, gray borders
   - No dark theme, no gradients, no glow effects
   ============================================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  --color-bg:              #f9fafb;
  --color-surface:         #ffffff;
  --color-border:          #e5e7eb;
  --color-border-focus:    #2563eb;
  --color-text:            #111827;
  --color-text-muted:      #6b7280;
  --color-text-subtle:     #9ca3af;
  --color-accent:          #2563eb;
  --color-accent-hover:    #1d4ed8;
  --color-accent-light:    #eff6ff;
  --color-success:         #16a34a;
  --color-error:           #dc2626;
  --color-error-bg:        #fef2f2;
  --color-error-border:    #fecaca;
  --radius-sm:             6px;
  --radius:                8px;
  --radius-lg:             10px;
  --shadow-sm:             0 1px 2px rgba(0,0,0,0.05);
  --shadow:                0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --font:                  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition:            0.15s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  min-height: 100vh;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.navbar-logo {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.navbar-logo svg { width: 15px; height: 15px; color: #fff; }

.navbar-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.navbar-tagline {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Navbar Navigation Links (multi-page) ── */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.navbar-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.navbar-nav a:hover {
  color: var(--color-text);
  background: var(--color-bg);
}

.navbar-nav a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 600;
  background: var(--color-accent-light);
}

@media (max-width: 600px) {
  .navbar-nav {
    display: none;
  }
}

/* ============================================================
   PAGE
   ============================================================ */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.page-header { margin-bottom: 28px; }

.page-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

.page-header p {
  margin-top: 5px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* ============================================================
   PANELS
   ============================================================ */
.panel { display: none; pointer-events: none; }
.panel.active { display: block; pointer-events: auto; }

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 14px; }

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}

/* ============================================================
   FORM
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 5px; }
.field + .field { margin-top: 12px; }

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--color-text-subtle); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.field textarea { resize: vertical; min-height: 84px; }
.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] {
  width: 36px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 3px;
  cursor: pointer;
  flex-shrink: 0;
}
.color-field span { font-size: 0.8125rem; color: var(--color-text-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), opacity var(--transition);
  line-height: 1;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.btn-primary:active:not(:disabled) { background: #1e40af; }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) { background: var(--color-bg); }

.btn-danger {
  background: var(--color-surface);
  color: var(--color-error);
  border: 1px solid #fecaca;
}
.btn-danger:hover:not(:disabled) { background: var(--color-error-bg); }

.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }

.btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ============================================================
   CAMERA
   ============================================================ */
.camera-wrap {
  position: relative;
  background: #f3f4f6;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  width: 100%;
}

#camera-video { width: 100%; height: 100%; object-fit: cover; display: block; }
#camera-canvas { display: none; }

.camera-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 20px;
}
.camera-idle svg { width: 32px; height: 32px; color: var(--color-text-subtle); margin-bottom: 4px; }
.camera-idle p { font-size: 0.875rem; }
.camera-idle .hint { font-size: 0.8125rem; color: var(--color-text-subtle); }

.scan-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scan-overlay.active { display: flex; }

.scan-box {
  width: min(190px, 50%);
  height: min(190px, 50%);
  position: relative;
}
.scan-box::before, .scan-box::after,
.scan-box span::before, .scan-box span::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(37,99,235,0.8);
  border-style: solid;
}
.scan-box::before       { top: 0; left: 0;  border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.scan-box::after        { top: 0; right: 0; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.scan-box span::before  { bottom: 0; left: 0;  border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.scan-box span::after   { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(37,99,235,0.55);
  animation: sweep 2s ease-in-out infinite;
}
@keyframes sweep {
  0%   { top: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  position: relative;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  /* Establish a stacking context so the file input can't escape */
  isolation: isolate;
  overflow: hidden;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  /* Keep it inside the zone's stacking context */
  z-index: 1;
}
.upload-zone svg { width: 26px; height: 26px; color: var(--color-text-subtle); margin-bottom: 10px; }
.upload-title { font-size: 0.875rem; font-weight: 500; color: var(--color-text); margin-bottom: 3px; }
.upload-hint  { font-size: 0.8125rem; color: var(--color-text-muted); }

.upload-preview {
  display: none;
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  background: #fff;
}

/* ============================================================
   RESULT AREA
   ============================================================ */
.result-area {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--color-accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
}
.result-area.visible { display: block; }

.result-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 7px;
}
.result-label svg { width: 12px; height: 12px; }

.result-text {
  font-size: 0.9rem;
  color: var(--color-text);
  word-break: break-all;
  line-height: 1.55;
}
.result-text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.result-text a:hover { color: var(--color-accent-hover); }

/* ── Error ── */
.error-msg {
  display: none;
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-error);
}
.error-msg.visible { display: block; }

/* ── Loading row ── */
.loading-row {
  display: none;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.loading-row.visible { display: flex; }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
.spinner-blue {
  border-color: rgba(37,99,235,0.2);
  border-top-color: var(--color-accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider { height: 1px; background: var(--color-border); margin: 20px 0; }

/* ============================================================
   QR OUTPUT
   ============================================================ */
.qr-output { display: none; margin-top: 20px; text-align: center; }
.qr-output.visible { display: block; }

#qr-container {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   HISTORY
   ============================================================ */
.history-list {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--color-bg); }

.history-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.history-icon.scan     { background: #eff6ff; color: var(--color-accent); }
.history-icon.generate { background: #f0fdf4; color: var(--color-success); }
.history-icon svg { width: 13px; height: 13px; }

.history-meta { flex: 1; min-width: 0; }

.history-type {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: capitalize;
  margin-bottom: 2px;
}
.history-value {
  font-size: 0.875rem;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-time {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  flex-shrink: 0;
}

.empty-state {
  padding: 40px 24px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.empty-state svg { width: 28px; height: 28px; color: var(--color-text-subtle); margin-bottom: 10px; }
.empty-state p { font-size: 0.875rem; color: var(--color-text-muted); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1f2937;
  color: #fff;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #15803d; }
.toast.error   { background: #b91c1c; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .page { padding: 20px 16px 60px; }
  .navbar-inner { padding: 0 16px; }
  .navbar-tagline { display: none; }
  .tab-btn span { display: none; }
  .tab-btn svg { width: 16px; height: 16px; }
  .tab-btn { padding: 10px 14px; }
  .field-row { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { justify-content: center; }
}


/* ============================================================
   DESIGN TEMPLATES
   ============================================================ */

/* Grid: 4 columns on desktop, 2 on mobile */
.design-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .design-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
  .design-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Individual design card */
.design-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition),
              background var(--transition);
  text-align: center;
  outline: none;
  user-select: none;
}

.design-card:hover {
  border-color: #93c5fd;
  background: #f8faff;
}

.design-card:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Selected state */
.design-card.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

/* Mini QR preview box */
.design-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Subtle inner shadow to frame the QR */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.design-preview canvas,
.design-preview img {
  width: 80px !important;
  height: 80px !important;
  display: block;
  image-rendering: pixelated; /* keep QR modules crisp */
}

/* Name + badge row */
.design-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.design-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.design-badge {
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  /* color set inline per template */
}

/* Color swatch dots */
.design-swatches {
  display: flex;
  align-items: center;
  gap: 4px;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Checkmark overlay on selected card */
.design-card.selected .design-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(37,99,235,0.08);
  border-radius: 6px;
  pointer-events: none;
}
/* ============================================================
   AUTH STYLES
   ============================================================ */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.navbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.auth-overlay.visible { display: block; }
.auth-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  z-index: 201;
  width: min(420px, calc(100vw - 32px));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  animation: modalIn 0.2s ease;
}
.auth-modal.visible { display: block; }
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -48%); }
}
.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.auth-modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.auth-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--transition);
}
.auth-modal-close:hover { background: var(--color-bg); }
.auth-modal-close svg { width: 16px; height: 16px; }
.auth-modal-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
  padding: 10px;
  font-size: 0.9375rem;
}
.auth-error {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--color-error);
}
.auth-error.visible { display: block; }
.auth-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.auth-link {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover { color: var(--color-accent-hover); }
.history-guest {
  padding: 48px 24px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.history-guest svg {
  width: 36px;
  height: 36px;
  color: var(--color-text-subtle);
  margin-bottom: 12px;
}
.history-guest h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.history-guest p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}
@media (max-width: 560px) {
  .navbar-user-name { display: none; }
  .auth-modal { padding: 20px; }
}

/* ── Mobile Hamburger ── */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: transparent;
  border-radius: 6px;
  transition: background 0.15s;
}
.navbar-hamburger:hover { background: var(--color-bg); }
.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.navbar-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-hamburger.open span:nth-child(2) { opacity: 0; }
.navbar-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 99;
  padding: 12px 0;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.12s;
}
.mobile-menu a:hover { background: var(--color-bg); }
.mobile-menu a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 700;
  background: var(--color-accent-light);
}

@media (max-width: 600px) {
  .navbar-nav { display: none; }
  .navbar-hamburger { display: flex; }
  .navbar-tagline { display: none; }
}