/* ================================================================
   Comic Pre-Order System — Stylesheet
   Aesthetic: Dark editorial / comic shop atmosphere
   Fonts: Bebas Neue (display) + IBM Plex Sans (body)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0f0f0f;
  --bg-card:     #181818;
  --bg-elevated: #222222;
  --border:      #2e2e2e;
  --border-accent: #444;
  --text-primary:  #f0ece4;
  --text-secondary:#9a9390;
  --text-muted:    #5a5755;
  --accent:        #e8321c;
  --accent-hover:  #ff4a30;
  --accent-dim:    rgba(232,50,28,0.15);
  --lunar:         #3b82f6;
  --lunar-dim:     rgba(59,130,246,0.15);
  --prh:           #a855f7;
  --prh-dim:       rgba(168,85,247,0.15);
  --success:       #22c55e;
  --warning:       #f59e0b;
  --font-display:  'Bebas Neue', sans-serif;
  --font-body:     'IBM Plex Sans', sans-serif;
  --radius:        4px;
  --radius-lg:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --transition:    all 0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  background: rgba(15,15,15,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.nav-user strong { color: var(--text-secondary); }
.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  transition: var(--transition);
}
.btn-logout:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.page-header p { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(232,50,28,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.04) 0%, transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.login-logo {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  text-align: center;
}
.login-logo span { color: var(--accent); }
.login-tagline {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 32px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
}
.login-card h2 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group input::placeholder { color: var(--text-muted); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-accent); color: var(--text-primary); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-danger:hover { background: var(--accent); color: #fff; }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ── Toolbar / Filters ─────────────────────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}
.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 9px 14px 9px 38px;
  outline: none;
  transition: var(--transition);
}
.search-input:focus {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
}
.search-input::placeholder { color: var(--text-muted); }
.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 9px 14px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--border-accent); }

/* ── Catalog Grid ──────────────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.comic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.comic-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.comic-cover {
  aspect-ratio: 2/3;
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
}
.comic-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.comic-cover img.loaded {
  opacity: 1;
}
.comic-card:hover .comic-cover img { transform: scale(1.03); }
.comic-cover .no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 16px;
  line-height: 1.4;
}
/* Placeholder SVG covers show immediately, real covers fade in */
.comic-cover img[src^="data:image"] {
  opacity: 1 !important;
}
.distributor-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
}
.badge-lunar { background: var(--lunar-dim); color: var(--lunar); border: 1px solid rgba(59,130,246,0.3); }
.badge-prh   { background: var(--prh-dim);   color: var(--prh);   border: 1px solid rgba(168,85,247,0.3); }
.reserved-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
}
.comic-info {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.comic-title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comic-series {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comic-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.comic-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.comic-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.comic-actions { padding: 0 8px 8px; }
.btn-reserve {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: var(--transition);
}
.btn-reserve:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-reserve.reserved {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-reserve.reserved:hover {
  background: rgba(232,50,28,0.25);
}

/* ── Comic Modal / Detail ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.modal-cover {
  width: 120px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  aspect-ratio: 2/3;
}
.modal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-cover img.loaded { opacity: 1; }
.modal-cover img[src^="data:image"] { opacity: 1; }
.modal-title-block { flex: 1; }
.modal-title-block h2 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}
.modal-series { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 12px; }
.modal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid currentColor;
}
.badge-format { color: var(--text-muted); border-color: var(--border); }
.badge-variant { color: var(--warning); border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 8px;
}
.modal-price { font-size: 1.3rem; font-weight: 600; }
.modal-dates { font-size: 0.78rem; color: var(--text-muted); }
.modal-body { padding: 20px 24px; }
.modal-body h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.modal-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}
.modal-credits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-credit-item label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}
.modal-credit-item span { font-size: 0.85rem; color: var(--text-secondary); }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Stats / Summary Bar ───────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  line-height: 1;
}
.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* ── My List / Pre-order List ──────────────────────────────── */
.list-table {
  width: 100%;
  border-collapse: collapse;
}
.list-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.list-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(46,46,46,0.5);
  font-size: 0.85rem;
  vertical-align: middle;
}
.list-table tr:last-child td { border-bottom: none; }
.list-table tr:hover td { background: rgba(255,255,255,0.02); }
.list-table .td-cover { width: 44px; padding: 8px 8px 8px 14px; }
.list-table .td-cover img {
  width: 36px;
  height: 54px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bg-elevated);
}
.list-table .col-title { font-weight: 500; }
.list-table .col-sub { font-size: 0.75rem; color: var(--text-muted); }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.admin-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}
.admin-tab:hover { color: var(--text-secondary); }
.admin-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}
.admin-section { display: none; }
.admin-section.active { display: block; }
.customer-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.customer-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition);
}
.customer-group-header:hover { background: var(--bg-elevated); }
.customer-group-name { font-weight: 600; font-size: 0.9rem; }
.customer-group-meta { font-size: 0.78rem; color: var(--text-muted); }
.customer-group-body { display: none; border-top: 1px solid var(--border); }
.customer-group.open .customer-group-body { display: block; }
.export-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

/* ── Empty States ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 16px; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ── Toggle Switch ─────────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: var(--transition);
}
.toggle-slider:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-slider:before {
  background: var(--accent);
  transform: translateX(20px);
}

/* ── Quantity Stepper ──────────────────────────────────────── */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  animation: slideIn 0.2s ease;
  max-width: 300px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--accent); }
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Loading ───────────────────────────────────────────────── */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skeleton-cover {
  aspect-ratio: 2/3;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-body { padding: 12px; }
.skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 8px;
}
.skeleton-line.short { width: 60%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Alert ─────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.alert-error { background: rgba(232,50,28,0.1); border: 1px solid rgba(232,50,28,0.3); color: #ff8070; }
.alert-info  { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
}
.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--border-accent); color: var(--text-primary); }
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info { font-size: 0.82rem; color: var(--text-muted); padding: 0 8px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
@media (max-width: 640px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .modal-header { flex-direction: column; }
  .modal-cover { width: 80px; }
  .stats-bar { gap: 16px; }
  .toolbar { gap: 8px; }
}

/* ── Hamburger button ─────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }

  .nav-inner { flex-wrap: wrap; position: relative; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 0;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 10px 16px;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .nav-user {
    display: none;
  }
  .nav-user.open {
    display: flex;
    width: 100%;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
    justify-content: space-between;
    align-items: center;
  }
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  margin-top: 64px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
