:root {
  --orange: #e8871e;
  --orange-light: #f5a623;
  --gold: #f0c040;
  --cyan: #38bdf8;
  --cyan-deep: #0ea5e9;
  --cyan-muted: #7dd3fc;
  --bg-primary: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2236;
  --bg-elevated: #162033;
  --bg-input: #0f1729;
  --border: #1e293b;
  --border-light: #2a3a52;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.1);
  --red: #f87171;
  --purple: #a78bfa;
  --purple-bg: rgba(167,139,250,0.1);
  --brand-gradient: linear-gradient(135deg, var(--orange) 0%, var(--gold) 40%, var(--cyan) 100%);
  --brand-gradient-text: linear-gradient(90deg, var(--orange) 0%, var(--gold) 35%, var(--cyan) 70%, var(--cyan-deep) 100%);
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --font-body: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--cyan-muted); }
img { max-width: 100%; display: block; }
::selection { background: rgba(56,189,248,0.3); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* HEADER */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(10,14,23,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo .ear { color: var(--orange); }
.logo .marked { color: var(--cyan); }

nav { display: flex; gap: 32px; align-items: center; }
nav a { color: var(--orange); font-size: 0.92rem; font-weight: 500; letter-spacing: 0.01em; transition: color 0.15s; }
nav a:hover { color: var(--orange-light); }
nav a.active { color: var(--orange-light); }

/* HERO */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(232,135,30,0.08) 0%, rgba(56,189,248,0.05) 40%, transparent 70%);
  pointer-events: none;
}

.hero-logo { width: 340px; margin: 0 auto 28px; }

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.hero-tagline .gradient-text {
  background: var(--brand-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.55;
  font-weight: 400;
}

/* SEARCH */
.search-wrap { max-width: 580px; margin: 0 auto; position: relative; }

.search-wrap input {
  width: 100%;
  padding: 18px 58px 18px 22px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--bg-input);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--cyan-deep);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(14,165,233,0.15);
}

.search-wrap input::placeholder { color: var(--text-muted); }

.search-wrap button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  background: var(--brand-gradient);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(232,135,30,0.3);
  overflow: hidden;
  padding: 6px;
}

.search-wrap button:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 16px rgba(232,135,30,0.4);
}

.search-wrap button img { width: 100%; height: 100%; object-fit: contain; }

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 56px 0 48px;
}

.feature-card {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  background: rgba(56,189,248,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.feature-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; }

/* SECTION TITLES */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; letter-spacing: -0.02em; }

/* BOOK GRID */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 20px;
  padding-bottom: 48px;
}

.book-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.book-card-cover {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.book-card-cover .no-cover {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.book-card-info { padding: 12px 14px 16px; }

.book-card-info h3 {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-info .author { font-size: 0.78rem; color: var(--text-muted); }

.book-card-info .price-tag {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
}

/* SEARCH RESULTS */
.results-page { padding: 32px 0 48px; }
.results-header { margin-bottom: 24px; }
.results-header h2 { font-size: 1.3rem; font-weight: 700; }

.source-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 6px;
  margin-left: 10px;
  vertical-align: middle;
}

.source-badge.local { background: var(--green-bg); color: var(--green); }
.source-badge.open-library { background: rgba(56,189,248,0.1); color: var(--cyan); }

.result-list { display: flex; flex-direction: column; gap: 10px; }

.result-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  align-items: flex-start;
}

.result-item:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
}

.result-item img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.result-item .info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.result-item .info .meta { font-size: 0.85rem; color: var(--text-muted); }

.result-item .index-btn {
  margin-left: auto;
  padding: 10px 20px;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(232,135,30,0.2);
}

.result-item .index-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(232,135,30,0.35);
}

.result-item .index-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* BOOK DETAIL */
.book-detail { padding: 40px 0 60px; }

.book-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  margin-bottom: 44px;
  align-items: start;
}

.book-hero-cover {
  width: 200px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--bg-elevated);
}

.book-hero-cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

.book-hero-meta h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.book-hero-meta .subtitle { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 12px; }
.book-hero-meta .author-line { font-size: 1rem; margin-bottom: 20px; color: var(--text-secondary); }
.book-hero-meta .author-line strong { color: var(--cyan); }

.book-meta-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.book-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 600px;
}

/* BADGES */
.badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 44px;
}

.badge {
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.15s;
}

.badge:hover { transform: translateY(-3px); }
.badge-icon { font-size: 1.6rem; margin-bottom: 8px; }

.badge-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.badge-label { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.badge-price { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; }
.badge-note { font-size: 0.73rem; margin-top: 4px; color: var(--text-muted); }

.badge.cheapest { background: rgba(52,211,153,0.06); border-color: rgba(52,211,153,0.2); }
.badge.cheapest .badge-category, .badge.cheapest .badge-price { color: var(--green); }
.badge.fastest { background: rgba(56,189,248,0.06); border-color: rgba(56,189,248,0.2); }
.badge.fastest .badge-category, .badge.fastest .badge-price { color: var(--cyan); }
.badge.best_deal { background: rgba(232,135,30,0.06); border-color: rgba(232,135,30,0.2); }
.badge.best_deal .badge-category, .badge.best_deal .badge-price { color: var(--orange); }
.badge.ownership { background: rgba(167,139,250,0.06); border-color: rgba(167,139,250,0.2); }
.badge.ownership .badge-category, .badge.ownership .badge-price { color: var(--purple); }
.badge.subscription { background: rgba(240,192,64,0.06); border-color: rgba(240,192,64,0.2); }
.badge.subscription .badge-category, .badge.subscription .badge-price { color: var(--gold); }

/* LISTINGS TABLE */
.listings-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

.listings-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.listings-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.listings-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.listings-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-secondary);
}

.listings-table tr:last-child td { border-bottom: none; }
.listings-table tr:hover td { background: rgba(56,189,248,0.03); }
.listings-table .service-name { font-weight: 600; color: var(--text-primary); }
.listings-table .price { font-family: var(--font-mono); font-weight: 500; }
.listings-table .price.sale { color: var(--green); font-weight: 700; }

.availability-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

.availability-badge.subscription_included { background: rgba(56,189,248,0.1); color: var(--cyan); }
.availability-badge.purchase { background: var(--green-bg); color: var(--green); }
.availability-badge.credit { background: rgba(232,135,30,0.1); color: var(--orange); }
.availability-badge.free { background: var(--purple-bg); color: var(--purple); }
.visit-link { font-size: 0.85rem; font-weight: 600; color: var(--cyan); }

/* ABOUT */
.about-page { padding: 56px 24px 60px; max-width: 700px; margin: 0 auto; }
.about-page h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.03em; }
.about-page .lead { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.55; }
.about-page h2 { font-size: 1.3rem; font-weight: 700; margin-top: 36px; margin-bottom: 12px; }
.about-page p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.about-page strong { color: var(--text-primary); }

/* DEALS */
.deals-page { padding: 40px 0 60px; }
.deals-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.deals-page .lead { color: var(--text-secondary); margin-bottom: 32px; }
.deals-empty { text-align: center; padding: 72px 20px; color: var(--text-muted); }
.deals-empty .icon { font-size: 3rem; margin-bottom: 12px; }
.deals-empty h3 { color: var(--text-secondary); margin-bottom: 6px; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; }
footer .container { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-muted); }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text-secondary); }

/* LOADING */
.loading { display: flex; align-items: center; justify-content: center; padding: 64px 20px; color: var(--text-muted); gap: 12px; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-muted); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 640px) {
  .book-hero { grid-template-columns: 120px 1fr; gap: 20px; }
  .book-hero-cover { width: 120px; }
  .book-hero-meta h1 { font-size: 1.4rem; }
  .badges { grid-template-columns: 1fr 1fr; }
  header .container { height: 56px; }
  .logo { font-size: 1.2rem; }
  nav { gap: 20px; }
  nav a { font-size: 0.84rem; }
  .hero { padding: 48px 0 40px; }
  .hero-logo { width: 240px; }
  .features { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   EARMARKED AUTH STYLES
   Field positions from pixel analysis of LOGIN_Earmarked.png (1024x1536):
     Email:    x=399-735 y=666-736  → left:39.0% top:43.4% w:32.8% h:4.6%
     Password: x=399-733 y=758-827  → left:39.0% top:49.3% w:32.6% h:4.5%
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Login Modal Overlay ──────────────────────────────────────── */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-card {
  position: relative;
  width: 560px;
  max-width: 92vw;
}

.login-ear-img {
  width: 100%;
  display: block;
  pointer-events: none;
}

/* ─── Input fields — absolute over the ear image ───────────────── */
.login-field {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(10, 14, 23, 0.8);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: center;
  outline: none;
  padding: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field:focus {
  border-color: var(--cyan-deep);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.login-field::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.login-field-email {
  left: 39.0%;
  top: 43.4%;
  width: 32.8%;
  height: 4.6%;
}

.login-field-password {
  left: 39.0%;
  top: 49.3%;
  width: 32.6%;
  height: 4.5%;
}

/* ─── Controls below the card ──────────────────────────────────── */
.login-controls {
  width: 560px;
  max-width: 92vw;
  text-align: center;
}

/* ─── Login Options (Remember me + Forgot password) ────────────── */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 8px;
  font-size: 0.78rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  accent-color: var(--cyan);
  width: 14px;
  height: 14px;
}

.forgot-link {
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: color 0.15s;
}

.forgot-link:hover {
  color: var(--cyan);
}

/* ─── Login Error ──────────────────────────────────────────────── */
.login-error {
  display: none;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  text-align: center;
}

/* ─── Login Buttons ────────────────────────────────────────────── */
.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(232, 135, 30, 0.3);
}

.login-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(232, 135, 30, 0.4);
}

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

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-btn-google {
  width: 100%;
  padding: 11px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.login-btn-google:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.login-toggle {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.login-toggle a {
  color: var(--cyan);
  font-weight: 600;
  margin-left: 4px;
}

/* ─── Header User Nav ──────────────────────────────────────────── */
.nav-signin {
  padding: 7px 18px;
  background: var(--brand-gradient);
  color: #fff !important;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-signin:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 12px rgba(232, 135, 30, 0.3);
}

#user-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ─── Token Badge ──────────────────────────────────────────────── */
.user-token-badge {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.user-token-badge #token-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--cyan);
}

/* ─── User Avatar ──────────────────────────────────────────────── */
.user-avatar-wrap {
  position: relative;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.user-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ─── User Dropdown ────────────────────────────────────────────── */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 0;
  z-index: 200;
}

.user-avatar-wrap:hover .user-dropdown {
  display: block;
}

.dropdown-email {
  padding: 0 16px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.dropdown-tier {
  padding: 0 16px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary) !important;
  transition: background 0.15s, color 0.15s;
}

.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary) !important;
}

/* ─── Responsive Auth ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .login-card { width: 420px; }
  .login-controls { width: 420px; }
  .login-field { font-size: 0.82rem; }
  .user-token-badge { font-size: 0.75rem; padding: 3px 8px; }
}
