/* ============================================================
   MGCDRP Streamboard — Design System
   Dark & Gold — Unified
   ============================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── Variables ── */
:root {
  /* Gold palette */
  --gold:         #c8a84b;
  --gold-light:   #e4c97a;
  --gold-dark:    #8b6914;
  --gold-glow:    rgba(200, 168, 75, 0.15);
  --gold-border:  rgba(200, 168, 75, 0.35);

  /* Backgrounds */
  --bg-base:      #0a0906;
  --bg-deep:      #0f0d0a;
  --bg-card:      #141210;
  --bg-card-alt:  #1a1714;
  --bg-hover:     #1f1c18;
  --bg-input:     #0f0d0a;

  /* Text */
  --text:         #e8e0d0;
  --text-muted:   #8a8070;
  --text-dim:     #5a5248;
  --text-gold:    var(--gold);

  /* Borders */
  --border:       rgba(200, 168, 75, 0.12);
  --border-strong: rgba(200, 168, 75, 0.3);
  --border-subtle: rgba(255, 255, 255, 0.06);

  /* Status */
  --success:      #4a9e6b;
  --success-bg:   rgba(74, 158, 107, 0.12);
  --danger:       #c0392b;
  --danger-bg:    rgba(192, 57, 43, 0.12);
  --warning:      #d4860a;
  --warning-bg:   rgba(212, 134, 10, 0.12);
  --info:         #2d7dd2;
  --info-bg:      rgba(45, 125, 210, 0.12);

  /* Twitch purple (kept for Twitch-specific buttons only) */
  --twitch:       #9146ff;

  /* Layout */
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;

  /* Typography */
  --font-display: 'Cinzel', 'Georgia', serif;
  --font-body:    'Crimson Pro', 'Georgia', serif;
  --font-ui:      'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows */
  --shadow-sm:    0 2px 8px rgba(0,0,0,.4);
  --shadow:       0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.6);
  --shadow-gold:  0 0 30px rgba(200,168,75,.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

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

/* Subtle grain texture on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.2;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p { color: var(--text); line-height: 1.7; }

a { color: var(--gold-light); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  color: var(--gold-light);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 6, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.nav-brand:hover { color: var(--gold-light); }

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

.nav-drp a, .nav-right a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color .15s, background .15s;
}
.nav-drp a:hover, .nav-right a:hover {
  color: var(--gold-light);
  background: var(--gold-glow);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.25rem;
}

.nav-user {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.3rem 0.5rem;
}
.nav-user-link { color: inherit; text-decoration: none; }
.nav-user-link:hover { color: var(--gold); }

.nav-logout {
  font-size: 0.78rem !important;
  color: var(--text-dim) !important;
  padding: 0.25rem 0.6rem !important;
}
.nav-logout:hover {
  color: var(--danger) !important;
  background: var(--danger-bg) !important;
}

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
}

@media (max-width: 768px) {
  .nav { padding: 0 1rem; flex-wrap: wrap; height: auto; padding-bottom: 0; }
  .nav-mobile-toggle { display: block; }
  .nav-drp, .nav-right {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 1rem;
    gap: 0.1rem;
  }
  .nav.open .nav-drp,
  .nav.open .nav-right { display: flex; }
  .nav-sep { display: none; }
  .nav-brand { padding: 0.75rem 0; }
}

/* ── Layout ── */
.main-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 56px - 60px);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 1.5rem;
  color: var(--gold-light);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  transition: border-color .2s;
}
.card:hover { border-color: var(--border-strong); }
.card-narrow { max-width: 460px; margin: 0 auto; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-header h3 { margin: 0; }

/* Gold accent card */
.card-gold {
  border-color: var(--gold-border);
  background: linear-gradient(135deg, var(--bg-card), rgba(200,168,75,.04));
  box-shadow: var(--shadow-gold);
}

/* Danger card */
.card-danger { border-color: rgba(192,57,43,.35); }

/* ── Stat Cards ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color .2s, transform .15s;
}
.stat-card:hover { border-color: var(--gold-border); transform: translateY(-1px); }

.stat-icon { font-size: 1.5rem; flex-shrink: 0; opacity: 0.8; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--gold-light); display: block; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-top: 0.2rem; }

/* ── Settings Cards ── */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.settings-card h3 {
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.settings-card.card-highlight {
  border-color: var(--gold-border);
  background: linear-gradient(135deg, var(--bg-card), rgba(200,168,75,.05));
}
.settings-card.card-danger { border-color: rgba(192,57,43,.35); }

/* ── Dashboard Layout ── */
.dashboard-page { padding: 2rem; }
.dash-container { max-width: 900px; margin: 0 auto; }
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.dash-header h1 { font-size: 1.5rem; color: var(--gold-light); }
.dash-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Grids ── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card-alt);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); color: var(--text); background: var(--bg-hover); }

.btn-primary {
  background: var(--gold-dark);
  border-color: var(--gold-border);
  color: var(--gold-light);
}
.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0906;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-muted);
}
.btn-secondary:hover { color: var(--text); }

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(192,57,43,.4);
  color: #e57368;
}
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding-left: 0;
}
.btn-ghost:hover { color: var(--gold-light); background: transparent; border-color: transparent; }

.btn-full { width: 100%; }
.btn-sm { font-size: 0.75rem; padding: 0.3rem 0.7rem; }

/* Platform buttons */
.btn-twitch { background: rgba(145,70,255,.15); border-color: rgba(145,70,255,.4); color: #b48fff; }
.btn-twitch:hover { background: #9146ff; color: #fff; border-color: #9146ff; }
.btn-steam { background: rgba(30,60,90,.3); border-color: rgba(100,150,200,.3); color: #8ab4d4; }
.btn-steam:hover { background: #1b2838; color: #fff; border-color: #2a475e; }
.btn-discord { background: rgba(88,101,242,.15); border-color: rgba(88,101,242,.4); color: #a5acff; }
.btn-discord:hover { background: #5865F2; color: #fff; border-color: #5865F2; }

/* Submit button (large) */
.btn-submit {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  background: var(--gold-dark);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  color: var(--gold-light);
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
}
.btn-submit:hover { background: var(--gold); color: #0a0906; border-color: var(--gold); }

/* Danger/outline small */
.btn-danger-sm { @extend .btn; @extend .btn-danger; @extend .btn-sm; }
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.btn-outline-sm:hover { border-color: var(--gold-border); color: var(--gold-light); }

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  background: var(--gold-dark);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  cursor: pointer;
  transition: all .15s;
  font-weight: 500;
}
.btn-primary-sm:hover { background: var(--gold); color: #0a0906; }

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

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-hint { font-size: 0.75rem; color: var(--text-dim); }

/* Settings fields */
.settings-field { margin-bottom: 1rem; }
.settings-field label {
  display: block;
  margin-bottom: 0.35rem;
}
.settings-field input,
.settings-field textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Copy field */
.copy-field { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }
.copy-field input { flex: 1; font-family: var(--font-mono); font-size: 0.82rem; }

.btn-icon {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.btn-icon:hover { border-color: var(--gold-border); color: var(--gold-light); }
.btn-copy-inline { background: none; border: none; cursor: pointer; color: var(--gold-light); font-size: 0.78rem; }

.key-hidden { -webkit-text-security: disc; }
.key-visible { -webkit-text-security: none; }

/* Filter form */
.filter-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.filter-form input { max-width: 300px; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table thead th {
  padding: 0.6rem 0.875rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.table tbody td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-hover); }
.table .actions { display: flex; gap: 0.35rem; align-items: center; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-card-alt);
  color: var(--text-muted);
}
.badge-success { background: var(--success-bg); border-color: rgba(74,158,107,.3); color: #6dba8a; }
.badge-danger  { background: var(--danger-bg);  border-color: rgba(192,57,43,.3);  color: #e57368; }
.badge-warning { background: var(--warning-bg); border-color: rgba(212,134,10,.3); color: #e8a840; }
.badge-info    { background: var(--info-bg);    border-color: rgba(45,125,210,.3); color: #6aabeb; }
.badge-gold    { background: var(--gold-glow);  border-color: var(--gold-border);  color: var(--gold-light); }

/* ── Alerts (flash messages) ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid;
}
.alert-error, .alert-danger {
  background: var(--danger-bg);
  border-color: rgba(192,57,43,.3);
  color: #e57368;
}
.alert-success {
  background: var(--success-bg);
  border-color: rgba(74,158,107,.3);
  color: #6dba8a;
}

/* ── Page center (auth/error pages) ── */
.page-center {
  min-height: calc(100vh - 56px - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── Hero ── */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(200,168,75,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  font-family: var(--font-body);
}
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── Features ── */
.features { padding: 3rem 2rem 4rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; color: var(--gold-light); margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--text-muted); }

/* ── Streamer Ticker ── */
.streamer-ticker-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 9, 6, 0.95);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  height: 34px;
  z-index: 50;
  overflow: hidden;
}
.streamer-ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border-right: 1px solid var(--border);
  font-family: var(--font-display);
}
.streamer-ticker { flex: 1; overflow: hidden; }
.streamer-ticker-inner {
  display: flex;
  gap: 2.5rem;
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
}
.streamer-ticker-wrap:hover .streamer-ticker-inner { animation-play-state: paused; }
.ticker-item { flex-shrink: 0; font-size: 0.75rem; color: var(--text-muted); text-decoration: none; white-space: nowrap; transition: color .15s; }
.ticker-item:hover { color: var(--gold-light); }
.ticker-live { color: var(--gold); font-size: 0.65rem; font-weight: 700; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  background: var(--bg-deep);
  position: relative;
  z-index: 1;
}
.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer p { font-size: 0.75rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: 0.75rem; color: var(--text-dim); transition: color .15s; }
.footer-links a:hover { color: var(--gold-light); }

/* ── Auth Pages (Login, Forgot PW, Register) ── */
.auth-wrap {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}
.auth-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 30%, rgba(200,168,75,.05) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.auth-logo span { color: var(--gold); }

.auth-logo-img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
}

.auth-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1rem 0;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-oauth { display: flex; flex-direction: column; gap: 0.5rem; }

.auth-links {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.auth-links a { color: var(--gold-light); }

/* ── Gate Animation ── */
.gate-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  pointer-events: none;
  z-index: 200;
}
.gate-left, .gate-right {
  width: 50%;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, #1a1208 0px, #1a1208 18px, #231808 18px, #231808 20px);
  border-top: 4px solid #8b6914;
  border-bottom: 4px solid #8b6914;
  position: relative;
}
.gate-left::before, .gate-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0px, transparent 58px, #111 58px, #111 62px);
}
.gate-left::after, .gate-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 5px at 14px 30px,  #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 90px,  #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 150px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 210px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 270px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 330px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 390px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 450px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 510px, #6b4a0e 60%, transparent 70%),
    radial-gradient(circle 5px at 14px 570px, #6b4a0e 60%, transparent 70%);
  background-repeat: no-repeat;
}

/* Login: gates open (slide out) */
.gate-open .gate-left  { animation: gateOpenLeft  1s cubic-bezier(.25,.46,.45,.94) .2s forwards; }
.gate-open .gate-right { animation: gateOpenRight 1s cubic-bezier(.25,.46,.45,.94) .2s forwards; }
@keyframes gateOpenLeft  { to { transform: translateX(-101%); } }
@keyframes gateOpenRight { to { transform: translateX(101%);  } }

/* Logout: gates close (slide in) */
.gate-close .gate-left  { transform: translateX(-101%); animation: gateCloseLeft  1s cubic-bezier(.25,.46,.45,.94) .4s forwards; }
.gate-close .gate-right { transform: translateX(101%);  animation: gateCloseRight 1s cubic-bezier(.25,.46,.45,.94) .4s forwards; }
@keyframes gateCloseLeft  { to { transform: translateX(0); } }
@keyframes gateCloseRight { to { transform: translateX(0); } }
.gate-wrap.slam .gate-left,
.gate-wrap.slam .gate-right { animation: gateShake .25s ease 0s 1; }
@keyframes gateShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

@media (prefers-reduced-motion: reduce) {
  .gate-open .gate-left  { animation: none; transform: translateX(-101%); }
  .gate-open .gate-right { animation: none; transform: translateX(101%); }
}

/* ── OBS Setup Card ── */
.obs-steps { color: var(--text-muted); padding-left: 1.25rem; line-height: 2.4; font-size: 0.875rem; }
.obs-tip {
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

/* ── Linked Accounts ── */
.linked-accounts { display: flex; flex-direction: column; gap: 0.6rem; }
.linked-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}
.linked-item:last-child { border-bottom: none; }
.linked-item span:first-child { flex: 1; color: var(--text-muted); }

/* ── Pagination ── */
.pagination { display: flex; gap: 0.35rem; justify-content: center; padding-top: 1.25rem; flex-wrap: wrap; }

/* ── Danger Zone ── */
.danger-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Streamer/Admin profile avatar ── */
.avatar-tiny {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.avatar-tiny-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-dark);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Stream key box ── */
.stream-key-box { display: flex; gap: 0.4rem; align-items: center; }
.stream-key-box input { flex: 1; }

/* ── Flash messages for auth pages ── */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.flash-ok  { background: var(--success-bg); border: 1px solid rgba(74,158,107,.3); color: #6dba8a; }
.flash-err { background: var(--danger-bg);  border: 1px solid rgba(192,57,43,.3);  color: #e57368; }

/* ── Pending page ── */
.pending-wrap {
  text-align: center;
  padding: 3rem 1.5rem;
}
.pending-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

/* ── Admin Shell (sidebar layout) ── */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 50;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color .2s;
}
.sidebar-brand:hover { color: var(--gold-light); }

.sidebar-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
}

.sidebar-section-label {
  display: block;
  padding: 0.8rem 1rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
  border-right: 2px solid transparent;
}
.sidebar-link:hover { color: var(--gold-light); background: var(--gold-glow); }
.sidebar-link.active { color: var(--gold-light); background: var(--gold-glow); border-right-color: var(--gold); }
.sidebar-link { justify-content: space-between; }
.sidebar-badge {
  font-size: 0.62rem; font-weight: 700;
  background: var(--warning, #e67e22); color: #fff;
  border-radius: 20px; padding: 1px 7px;
  min-width: 18px; text-align: center;
  flex-shrink: 0;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.admin-topbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  height: 48px;
  padding: 0 1.25rem;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-topbar-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.sidebar-mobile-open {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem;
}

.sidebar-mobile-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color .15s;
}
.sidebar-mobile-close:hover { color: var(--danger); }

/* Sidebar user footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-avatar {
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-username {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-role {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.sidebar-logout {
  color: var(--text-dim);
  font-size: 1rem;
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--danger); background: var(--danger-bg); }

/* Mobile sidebar */
@media (max-width: 860px) {
  .admin-topbar { display: flex; }
  .sidebar-mobile-close { display: block; }

  .admin-sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    height: 100%;
    width: 220px;
    transition: left .25s ease;
    box-shadow: var(--shadow-lg);
  }

  .admin-sidebar.open { left: 0; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: 0.8rem; }
.text-gold   { color: var(--gold-light); }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; }
