/* ========== BAOBOSS DIM SUM CRM — Forest Green / Cream / Gold-Tan ========== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root, [data-theme="light"] {
  /* Brand — extracted from Baoboss Dim Sum logo v2 (forest green + cream + gold-tan) */
  --crimson: #1F3A1C;          /* primary forest — AA-safe on cream */
  --crimson-bright: #2D4A2A;
  --crimson-glow: #4A7942;
  --fire: #6B5419;             /* deep bronze — readable on cream */
  --fire-glow: #8B6F26;
  --gold: #6B5419;             /* darkened gold for text on cream */
  --gold-soft: #E0C57A;        /* bright cream-gold — for dark-panel use only */
  --gold-bright: #B8923D;      /* decorative bright tan-gold */

  /* Higher-contrast cream palette (lighter page bg, deeper card surface) */
  --bg: #FBF3DE;
  --surface: #F0E2BF;
  --surface-2: #E5D49E;
  --surface-3: #2D4A2A;        /* dark forest panel */
  --border: rgba(45,74,42,0.20);
  --border-hover: rgba(45,74,42,0.42);
  --text: #1F2F1C;
  --text-secondary: #3F4F35;
  --text-muted: #6A7A60;

  /* Functional */
  --green: #16A34A;
  --red: #B91C1C;
  --blue: #2563EB;
  --orange: #C2680C;
  --purple: #7E22CE;

  /* Layout */
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(45,74,42,0.12), 0 1px 2px rgba(45,74,42,0.08);
  --shadow-lg: 0 10px 40px rgba(45,74,42,0.18);
  --glow-red: 0 0 30px rgba(45,74,42,0.18);

  --chart-grid: rgba(45,74,42,0.08);
  --chart-tick: #6A7A60;
  --logo-brightness: 1;
  --input-bg: #FBF5E5;
  --auth-card-bg: rgba(248,239,216,0.94);
  --auth-orb-opacity: 0.22;
  --table-hover: rgba(45,74,42,0.04);
  --badge-border-alpha: 0.20;
}

/* Dark mode disabled — CRM is locked to cream-based light theme.
   Kept selector so legacy data-theme="dark" attribute resolves to cream values. */
[data-theme="dark"] { /* intentionally empty — inherits :root cream tokens */ }

/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--crimson-glow); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--fire-glow); }
::selection { background: rgba(45,74,42,0.4); }

/* ========== LAYOUT ========== */
.app-container { display: flex; min-height: 100vh; }

/* ========== SIDEBAR (deep forest panel against cream content) ========== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #F8EFD6 0%, #F0E2BF 100%);
  border-right: 1px solid rgba(184, 146, 61, 0.30);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(45, 74, 42, 0.08);
}
.sidebar::-webkit-scrollbar { width: 0; }

.sidebar-brand {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(184, 146, 61, 0.25);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(184, 146, 61, 0.10) 0%, transparent 100%);
  position: relative;
}
.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(184, 146, 61, 0.60) 50%,
    transparent 100%);
}
.sidebar-brand img {
  width: 110px;
  height: auto;
  border-radius: var(--radius);
  object-fit: contain;
  border: 2px solid rgba(184, 146, 61, 0.45);
  box-shadow: 0 6px 18px rgba(45, 74, 42, 0.18);
  transition: filter 0.3s, transform 0.3s;
}
.sidebar-brand img:hover {
  transform: scale(1.04);
}
.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 800;
  color: #1F2F1C;
  letter-spacing: 4px;
  margin-top: 12px;
  text-transform: uppercase;
}
.sidebar-brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8B6F26;
  font-weight: 700;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}
.sidebar-section {
  padding: 20px 20px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8B6F26;
  font-weight: 800;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  color: #3F4F35;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.sidebar-nav a:hover {
  background: rgba(184, 146, 61, 0.14);
  color: #1F3A1C;
  border-color: rgba(184, 146, 61, 0.25);
}
.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(45, 74, 42, 0.12), rgba(184, 146, 61, 0.10));
  color: #1F3A1C;
  border-color: rgba(45, 74, 42, 0.30);
  box-shadow: 0 2px 6px rgba(45, 74, 42, 0.08);
}
.sidebar-nav a .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  opacity: 0.65;
  color: #6B5419;
}
.sidebar-nav a.active .icon,
.sidebar-nav a:hover .icon { opacity: 1; color: #8B6F26; }

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(184, 146, 61, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: rgba(184, 146, 61, 0.06);
}
.sidebar-user .user-info {
  font-size: 13px;
  font-weight: 700;
  color: #1F2F1C;
}
.sidebar-user .user-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8B6F26;
  font-weight: 700;
  margin-top: 1px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ========== STAT CARDS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  position: relative;
}
.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--glow-red);
}
.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.stat-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========== TABLES ========== */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  background: var(--surface-2);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: var(--table-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.4;
}
.badge-gold { background: rgba(184,146,61,0.12); color: var(--gold); border: 1px solid rgba(184,146,61,0.22); }
.badge-green { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.badge-red { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }
.badge-blue { background: rgba(59,130,246,0.1); color: var(--blue); border: 1px solid rgba(59,130,246,0.15); }
.badge-orange { background: rgba(249,115,22,0.1); color: var(--orange); border: 1px solid rgba(249,115,22,0.15); }
.badge-gray { background: rgba(113,113,122,0.1); color: var(--text-muted); border: 1px solid rgba(113,113,122,0.15); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.btn-gold {
  background: var(--crimson-bright);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-gold:hover {
  background: var(--crimson-glow);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(198,40,40,0.25);
}
.btn-outline {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  color: var(--text);
}
.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.15);
}
.btn-danger:hover { background: rgba(239,68,68,0.18); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ========== FORMS ========== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 680px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(45,74,42,0.1);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ========== ALERTS ========== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success {
  background: rgba(34,197,94,0.08);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.15);
}
.alert-error {
  background: rgba(239,68,68,0.08);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.15);
}

/* ========== DETAIL CARDS ========== */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.detail-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.2px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-item .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
.detail-item .value {
  font-size: 15px;
  color: var(--text);
  margin-top: 3px;
  font-weight: 500;
}

/* ========== ROI CALCULATOR ========== */
.roi-result {
  background: var(--surface);
  border: 1px solid var(--crimson);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
  box-shadow: var(--glow-red);
}
.roi-result h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.roi-item {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.roi-item .number {
  font-size: 22px;
  font-weight: 800;
  color: var(--fire-glow);
  letter-spacing: -0.5px;
}
.roi-item .desc {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 6px; font-size: 16px; }

/* ========== LOW STOCK ========== */
.alert-bar {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 500;
}

/* ========== 404 ========== */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.page-404 h1 {
  font-size: 80px;
  font-weight: 800;
  color: var(--surface-3);
  letter-spacing: -2px;
}

/* ============================================================
   AUTH PAGES — Deep forest page, cream card floating on top
   Locked to this palette regardless of dashboard theme
   ============================================================ */
.auth-stack {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.auth-stack .auth-card { width: 100%; max-width: 100%; }
.auth-alerts:empty { display: none; }
.auth-alerts .alert {
  margin: 0;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);
}
.auth-alerts .alert-error {
  background: rgba(220, 80, 80, 0.92);
  color: #FFF;
  border-color: rgba(255, 200, 200, 0.40);
}
.auth-alerts .alert-success {
  background: rgba(74, 121, 66, 0.92);
  color: #E0C57A;
  border-color: rgba(216, 184, 112, 0.40);
}
/* ============================================================
   AUTH PAGE — modern, brand-aligned (cream + forest + bronze)
   Matches baobossdimsum.com palette
   ============================================================ */
.auth-page {
  min-height: 100vh;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(201, 161, 74, 0.22), transparent 55%),
    radial-gradient(ellipse at 82% 78%, rgba(63, 107, 58, 0.28), transparent 55%),
    linear-gradient(180deg, #FBF3DE 0%, #F0E2BF 100%);
  position: relative;
  overflow: hidden;
  color: #1F2F1C;
}
/* Top-right bronze bloom */
.auth-page::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  top: -140px; right: -160px;
  background: radial-gradient(circle, rgba(139, 111, 61, 0.32), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
/* Bottom-left forest bloom */
.auth-page::after {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  bottom: -160px; left: -140px;
  background: radial-gradient(circle, rgba(45, 74, 42, 0.32), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Animated brand mesh — gold + forest + bronze drifting blobs */
.auth-steam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.auth-steam span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  opacity: 0.55;
}
.auth-steam span:nth-child(1) {
  width: 620px; height: 620px;
  top: -120px; left: 10%;
  background: radial-gradient(circle, #B8923D 0%, rgba(184,146,61,0.35) 40%, transparent 72%);
  animation: auth-mesh-a 24s ease-in-out infinite alternate;
}
.auth-steam span:nth-child(2) {
  width: 680px; height: 680px;
  top: 35%; right: -180px;
  background: radial-gradient(circle, #2D4A2A 0%, rgba(45,74,42,0.45) 35%, transparent 72%);
  animation: auth-mesh-b 28s ease-in-out infinite alternate;
}
.auth-steam span:nth-child(3) {
  width: 540px; height: 540px;
  bottom: -140px; left: 22%;
  background: radial-gradient(circle, #8B6F26 0%, rgba(139,111,61,0.35) 40%, transparent 72%);
  animation: auth-mesh-c 32s ease-in-out infinite alternate;
}
.auth-steam span:nth-child(4) {
  width: 460px; height: 460px;
  top: 12%; right: 18%;
  background: radial-gradient(circle, #4A7942 0%, rgba(74,121,66,0.30) 40%, transparent 72%);
  opacity: 0.40;
  animation: auth-mesh-d 20s ease-in-out infinite alternate;
}

@keyframes auth-mesh-a {
  0%   { transform: translate(0, 0)        scale(1);   }
  100% { transform: translate(80px, 140px) scale(1.12);}
}
@keyframes auth-mesh-b {
  0%   { transform: translate(0, 0)          scale(1);   }
  100% { transform: translate(-120px, -100px) scale(1.18);}
}
@keyframes auth-mesh-c {
  0%   { transform: translate(0, 0)         scale(1);   }
  100% { transform: translate(140px, -80px) scale(1.20);}
}
@keyframes auth-mesh-d {
  0%   { transform: translate(0, 0)        scale(1);   opacity: 0.40; }
  100% { transform: translate(-100px, 60px) scale(1.25); opacity: 0.55; }
}

/* Lift card above the mesh */
.auth-page .auth-stack { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .auth-steam span { animation: none; }
}

.auth-card {
  background:
    linear-gradient(180deg, rgba(255, 251, 240, 0.96) 0%, rgba(248, 239, 216, 0.94) 100%);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(216, 184, 112, 0.50);
  border-radius: 24px;
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow:
    0 40px 80px -20px rgba(45, 74, 42, 0.35),
    0 12px 32px -8px rgba(139, 111, 61, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.50) inset,
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  overflow: hidden;
}
/* Top hairline gold accent */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(184, 146, 61, 0.20) 15%,
    rgba(184, 146, 61, 0.85) 50%,
    rgba(184, 146, 61, 0.20) 85%,
    transparent 100%);
  border-radius: 2px;
}
/* Subtle bottom glow */
.auth-card::after {
  content: '';
  position: absolute;
  bottom: -50%; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 200px;
  background: radial-gradient(ellipse at top, rgba(184, 146, 61, 0.12), transparent 70%);
  pointer-events: none;
}

.auth-card img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  margin: 4px auto 18px;
  border: 1.5px solid rgba(184, 146, 61, 0.55);
  box-shadow:
    0 12px 30px rgba(45, 74, 42, 0.20),
    0 0 0 6px rgba(251, 243, 222, 0.85),
    0 0 0 7px rgba(184, 146, 61, 0.25);
  display: block;
  position: relative;
  z-index: 1;
}

.auth-card h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 6px;
  background: linear-gradient(135deg, #8B6F26 0%, #B8923D 45%, #6B5419 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.auth-card .subtitle {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(184, 146, 61, 0.12), rgba(139, 111, 61, 0.04));
  border: 1px solid rgba(184, 146, 61, 0.35);
  border-radius: 999px;
  color: #6B5419;
  font-size: 10px;
  letter-spacing: 0.25em;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 auto 28px !important;
  position: relative;
  z-index: 1;
}

.auth-card .form-group { margin-bottom: 16px; text-align: left; }
.auth-card .form-group label {
  display: block;
  color: #3F4F35;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.auth-card .form-group input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255, 251, 240, 0.85) !important;
  border: 1.5px solid rgba(45, 74, 42, 0.15) !important;
  border-radius: 12px !important;
  color: #1F2F1C !important;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-card .form-group input::placeholder {
  color: rgba(45, 74, 42, 0.38);
  font-weight: 400;
}
.auth-card .form-group input:hover {
  border-color: rgba(45, 74, 42, 0.30) !important;
  background: rgba(255, 251, 240, 0.95) !important;
}
.auth-card .form-group input:focus {
  border-color: rgba(184, 146, 61, 0.70) !important;
  background: #FFFBF0 !important;
  box-shadow: 0 0 0 4px rgba(184, 146, 61, 0.15);
  outline: none;
}

.auth-card .auth-footer {
  color: #3F4F35;
  font-size: 13px;
  margin-top: 22px !important;
  position: relative;
  z-index: 1;
}
.auth-card .auth-footer a {
  color: #6B5419;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  background: linear-gradient(135deg, #8B6F26, #B8923D);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-card .auth-footer a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(184, 146, 61, 0.85), transparent);
  transform: scaleX(0.6);
  transition: transform 0.2s;
}
.auth-card .auth-footer a:hover::after { transform: scaleX(1); }

/* SIGN IN button — forest green primary matching website .btn-primary */
.auth-card .btn-gold {
  background: linear-gradient(135deg, #1F3A1C 0%, #2D4A2A 50%, #3F6B3A 100%);
  color: #FBF3DE;
  border: 1.5px solid rgba(216, 184, 112, 0.45);
  box-shadow:
    0 10px 24px -6px rgba(45, 74, 42, 0.45),
    0 0 0 1px rgba(216, 184, 112, 0.20) inset,
    0 1px 0 rgba(216, 184, 112, 0.35) inset;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.20);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
/* Shine sweep on hover */
.auth-card .btn-gold::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(216, 184, 112, 0.25) 50%,
    transparent 100%);
  transition: left 0.7s ease;
  pointer-events: none;
}
.auth-card .btn-gold:hover {
  background: linear-gradient(135deg, #2D4A2A 0%, #3F6B3A 50%, #4A7942 100%);
  border-color: rgba(216, 184, 112, 0.75);
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px -6px rgba(45, 74, 42, 0.55),
    0 0 0 1px rgba(216, 184, 112, 0.40) inset,
    0 1px 0 rgba(216, 184, 112, 0.50) inset;
}
.auth-card .btn-gold:hover::before { left: 120%; }
.auth-card .btn-gold:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px -4px rgba(45, 74, 42, 0.40),
    0 0 0 1px rgba(216, 184, 112, 0.30) inset;
}
/* Force cream styling on inline-styled language picker + form selects */
.auth-card select {
  background: rgba(255, 251, 240, 0.90) !important;
  border: 1.5px solid rgba(45, 74, 42, 0.18) !important;
  border-radius: 10px !important;
  color: #1F2F1C !important;
}
.auth-card .btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 12px;
  margin-top: 8px;
}

/* ============================================================
   PORTAL — Member / Investor views
   ============================================================ */
.portal-welcome {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.portal-welcome::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(45,74,42,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.portal-welcome h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  position: relative;
}
.portal-welcome .role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(45,74,42,0.12);
  color: var(--crimson-glow);
  border: 1px solid rgba(45,74,42,0.2);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  position: relative;
}

.earnings-highlight {
  background: var(--surface);
  border: 1px solid var(--crimson);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--glow-red);
}
.earnings-highlight .amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--fire-glow);
  letter-spacing: -1px;
}
.earnings-highlight .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* Loyalty Card — modern glassmorphism */
.loyalty-display {
  background: linear-gradient(135deg, var(--crimson) 0%, #1a1a2e 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--text);
  position: relative;
  overflow: hidden;
  min-height: 190px;
  box-shadow: 0 8px 32px rgba(45,74,42,0.2);
}
.loyalty-display::before {
  content: '';
  position: absolute;
  top: -40%; right: -15%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.loyalty-display::after {
  content: '';
  position: absolute;
  bottom: -30%; left: 10%;
  width: 150px; height: 150px;
  background: rgba(255,143,0,0.08);
  border-radius: 50%;
}
.loyalty-display .card-number {
  font-family: 'Plus Jakarta Sans', monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-soft);
}
.loyalty-display .card-holder {
  font-size: 12px;
  margin-top: 10px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}
.loyalty-display .card-type {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.1);
}
.loyalty-display .card-points {
  position: absolute;
  bottom: 20px; right: 24px;
  text-align: right;
}
.loyalty-display .card-points .pts {
  font-size: 24px;
  font-weight: 800;
  color: var(--fire-glow);
}
.loyalty-display .card-points .pts-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/* ========== CHARTS ========== */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.chart-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}
.chart-container-sm {
  position: relative;
  width: 100%;
  height: 220px;
}
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.chart-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ========== IMAGE LIGHTBOX ========== */
.img-thumb {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: cover;
}
.img-thumb:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 20px;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== ENTITY ID BADGE ========== */
.entity-id {
  display: inline-flex;
  align-items: center;
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ========== AVATAR ========== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.pagination-controls {
  display: flex;
  gap: 4px;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  text-decoration: none;
}
.pagination-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
  color: var(--text);
}
.pagination-btn.active {
  background: var(--crimson-bright);
  border-color: var(--crimson-bright);
  color: #fff;
}

/* ========== MOBILE NAV TOGGLE ========== */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px; height: 40px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ========== TABLE RESPONSIVE ========== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .chart-row, .chart-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mobile-nav-toggle { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; padding-top: 56px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .auth-card { margin: 16px; padding: 28px 22px; }
  .auth-card img { width: 140px; margin-bottom: 16px; }
  .page-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .page-header h2 { font-size: 20px; }
  .page-header > a.btn,
  .page-header-actions > .btn { width: 100%; justify-content: center; }
  .page-header-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .chart-row, .chart-row-3 { grid-template-columns: 1fr; }
  .table-container { border-radius: var(--radius-sm); }
  table { font-size: 12px; }
  thead th, tbody td { padding: 10px 10px; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
  .pagination { flex-direction: column; align-items: center; }
  .sidebar-brand img { width: 72px; }
  .baoboss-highlights-grid { grid-template-columns: 1fr 1fr !important; }
  .baoboss-highlights-meta { grid-template-columns: 1fr !important; }
  .detail-card { padding: 18px 16px; }
  .form-section { padding: 16px; }
  /* Hide non-essential columns on wide tables */
  .wide-table .col-hide-md { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card img { width: 120px; }
  .auth-card { padding: 24px 18px; }
  .auth-card h1 { font-size: 18px; letter-spacing: 3px; }
  .stat-card .value { font-size: 22px; }
  .baoboss-highlights-grid { grid-template-columns: 1fr !important; }
  .wide-table .col-hide-sm { display: none; }
  .entity-id { font-size: 10px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
}

/* ============================================================
   REUSABLE COMPONENT CLASSES
   ============================================================ */

/* Baoboss Investment Model highlights band (dashboard) */
.baoboss-highlights {
  background: linear-gradient(135deg, rgba(184,146,61,0.08) 0%, rgba(45,74,42,0.06) 100%);
  border: 1px solid rgba(184,146,61,0.25);
  margin-bottom: 18px;
}
.baoboss-highlights-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.baoboss-highlights-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}
.baoboss-highlights-tagline {
  font-size: 16px;
  color: var(--gold-soft);
  font-weight: 600;
  margin-top: 2px;
}
.baoboss-highlights-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.baoboss-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.baoboss-metric {
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
}
.baoboss-metric.accent-crimson { border-left-color: var(--crimson-bright); }
.baoboss-metric-key {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.baoboss-metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-soft);
  margin-top: 4px;
}
.baoboss-highlights-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(184,146,61,0.15);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 18px;
  font-size: 12px;
  color: var(--text-secondary);
}
.baoboss-highlights-meta strong {
  display: block;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 10.5px;
  margin-bottom: 2px;
}
.baoboss-highlights-meta .accent-crimson { color: var(--crimson-glow); }

/* Form section wrappers (settings, forms) */
.form-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.form-section h4 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Page-header action grouping */
.page-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Cell tinting for financial values */
.profit-positive { color: var(--green); font-weight: 600; }
.profit-negative { color: var(--red); font-weight: 600; }

/* Low-stock row highlight (inventory) */
.low-stock-row { background: rgba(243,156,18,0.08); }
.low-stock-row td { color: var(--fire-glow); }

/* Truncating cell content */
.truncate { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }

/* Loyalty section grid (portal) */
.loyalty-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .loyalty-section { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */

/* Sidebar brand gold wash — softer on light */
[data-theme="light"] .sidebar-brand {
  background: linear-gradient(180deg, rgba(45,74,42,0.04) 0%, transparent 100%);
}
[data-theme="light"] .sidebar-brand img {
  filter: none;
  box-shadow: 0 2px 8px rgba(45,74,42,0.12);
}

/* Baoboss Investment Model band — brighter, readable on light bg */
[data-theme="light"] .baoboss-highlights {
  background: linear-gradient(135deg, #FFFBF0 0%, #FEF4F4 100%);
  border: 1px solid rgba(45,74,42,0.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
[data-theme="light"] .baoboss-highlights-eyebrow {
  color: var(--crimson);
}
[data-theme="light"] .baoboss-highlights-tagline {
  color: #1a1a1a;
  font-weight: 700;
}
[data-theme="light"] .baoboss-highlights-label {
  color: #6B5A20;
}

[data-theme="light"] .baoboss-metric {
  background: #FFFFFF;
  border-left-color: var(--fire);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
[data-theme="light"] .baoboss-metric.accent-crimson {
  border-left-color: var(--crimson);
}
[data-theme="light"] .baoboss-metric-key {
  color: #52525B;
}
[data-theme="light"] .baoboss-metric-value {
  color: var(--crimson);
}

[data-theme="light"] .baoboss-highlights-meta {
  border-top-color: rgba(45,74,42,0.12);
  color: #3F3F46;
}
[data-theme="light"] .baoboss-highlights-meta strong {
  color: var(--fire);
}
[data-theme="light"] .baoboss-highlights-meta .accent-crimson {
  color: var(--crimson);
}

/* Low-stock row — lighter on light theme */
[data-theme="light"] .low-stock-row {
  background: rgba(234,88,12,0.06);
}
[data-theme="light"] .low-stock-row td {
  color: #B45309;
}

/* Sidebar theme toggle contrast already handled via inline JS (gold pill on both themes) */

/* ============================================================
   AUTH DESIGN REFRESH — aligned with baoboss-website homepage
   ============================================================ */
:root, [data-theme="light"] {
  --crimson: #1F3A1C;
  --crimson-bright: #2D4A2A;
  --crimson-glow: #4A7942;
  --fire: #6B5419;
  --fire-glow: #8B6F26;
  --gold: #8B6F26;
  --gold-soft: #E0C57A;
  --gold-bright: #B8923D;
  --bg: #FBF3DE;
  --surface: #F6EBCB;
  --surface-2: #E6D49E;
  --border: rgba(45,74,42,0.16);
  --border-hover: rgba(45,74,42,0.30);
  --text: #1F2F1C;
  --text-secondary: #43543C;
  --text-muted: #718067;
}

.auth-page {
  padding: clamp(18px, 3vw, 36px);
  background:
    linear-gradient(rgba(45, 74, 42, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 74, 42, 0.018) 1px, transparent 1px),
    linear-gradient(115deg, rgba(251, 243, 222, 0.96) 0%, rgba(247, 235, 199, 0.88) 48%, rgba(219, 220, 188, 0.74) 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

.auth-page::before {
  inset: 0;
  width: auto;
  height: auto;
  top: 0;
  right: 0;
  background:
    linear-gradient(rgba(184, 146, 61, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 58, 28, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  filter: none;
  opacity: 0.45;
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
}

.auth-page::after { display: none; }

.auth-steam {
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 18%, rgba(184, 146, 61, 0.16), transparent 42%),
    radial-gradient(ellipse at 88% 82%, rgba(45, 74, 42, 0.16), transparent 42%);
}

.auth-steam span { display: none; }

.auth-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 0.82fr);
  border: 1px solid rgba(45, 74, 42, 0.15);
  border-radius: 26px;
  background: rgba(255, 251, 240, 0.68);
  box-shadow:
    0 36px 92px rgba(45, 74, 42, 0.18),
    0 1px 0 rgba(255,255,255,0.84) inset;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding: clamp(42px, 5vw, 72px);
  color: #FBF3DE;
  background: linear-gradient(145deg, #203B1D 0%, #182E18 58%, #102011 100%);
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(216, 184, 112, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 184, 112, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.68) 72%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.68) 72%, #000 100%);
  pointer-events: none;
}

.auth-brand-panel::after {
  content: '包';
  position: absolute;
  top: 5%;
  right: -4%;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(240px, 28vw, 420px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(216, 184, 112, 0.16);
  opacity: 0.9;
  pointer-events: none;
}

.auth-brand-panel > * {
  position: relative;
  z-index: 1;
}

.auth-brand-kicker {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid rgba(216, 184, 112, 0.42);
  border-radius: 999px;
  color: #E0C57A;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  background: rgba(255, 251, 240, 0.06);
}

.auth-brand-panel h2 {
  max-width: 520px;
  color: #FFF7E4;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.auth-brand-panel p {
  max-width: 430px;
  color: rgba(251, 243, 222, 0.78);
  font-size: 17px;
}

.auth-brand-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.auth-brand-proof span {
  padding: 9px 12px;
  border: 1px solid rgba(216, 184, 112, 0.26);
  border-radius: 10px;
  color: rgba(251, 243, 222, 0.88);
  background: rgba(255, 251, 240, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.auth-page .auth-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.auth-stack .auth-card {
  max-width: 500px;
  margin: 0 auto;
}

.auth-alerts {
  width: min(500px, 100%);
  margin: 0 auto 16px;
}

.auth-card {
  max-width: 500px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.auth-card::before,
.auth-card::after {
  display: none;
}

.auth-card img {
  width: 94px;
  height: 94px;
  margin: 0 auto 18px;
  border-radius: 20px;
  border: 1px solid rgba(184, 146, 61, 0.44);
  box-shadow:
    0 14px 34px rgba(45, 74, 42, 0.18),
    0 0 0 8px rgba(255, 251, 240, 0.70);
}

.auth-language {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-card select,
.auth-language select {
  min-height: 38px;
  padding: 7px 34px 7px 12px;
  background: rgba(255, 251, 240, 0.82) !important;
  border: 1px solid rgba(45, 74, 42, 0.18) !important;
  border-radius: 10px !important;
  color: #1F2F1C !important;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.auth-card h1 {
  color: #1F3A1C;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  font-size: 32px;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.auth-card .subtitle {
  border-color: rgba(184, 146, 61, 0.32);
  background: rgba(255, 251, 240, 0.56);
  color: #6B5419;
  letter-spacing: 0.10em;
  margin-bottom: 30px !important;
}

.auth-card .form-group label {
  color: #35492F;
  letter-spacing: 0.08em;
}

.auth-card .form-group input,
.auth-card .form-group select {
  min-height: 48px;
  background: rgba(255, 251, 240, 0.78) !important;
  border-color: rgba(45, 74, 42, 0.16) !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.75) inset;
}

.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  border-color: rgba(184, 146, 61, 0.72) !important;
  box-shadow:
    0 0 0 4px rgba(184, 146, 61, 0.14),
    0 1px 0 rgba(255,255,255,0.75) inset;
}

.auth-card .btn-gold {
  min-height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1F3A1C 0%, #2D4A2A 58%, #4A7942 100%);
  box-shadow: 0 14px 30px rgba(45, 74, 42, 0.24);
}

.auth-card .auth-footer {
  color: #506148;
  margin-top: 24px !important;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand-panel {
    min-height: 270px;
    padding: 34px;
    justify-content: flex-end;
  }

  .auth-brand-panel h2 {
    font-size: clamp(34px, 8vw, 54px);
  }
}

@media (max-width: 768px) {
  .auth-page {
    align-items: flex-start;
    padding: 14px 18px;
    overflow-x: hidden;
  }

  .auth-shell {
    width: calc(100vw - 36px);
    max-width: 100%;
    border-radius: 20px;
    overflow: hidden;
  }

  .auth-brand-panel {
    min-height: 230px;
    padding: 28px 22px;
  }

  .auth-brand-panel h2 {
    max-width: 100%;
    font-size: clamp(26px, 7.3vw, 30px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .auth-page .auth-stack {
    min-width: 0;
    padding: 28px 42px 32px 20px;
    overflow: hidden;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
  }

  .auth-card .form-group input,
  .auth-card .form-group select,
  .auth-card .btn-gold,
  .auth-card .btn {
    width: 100%;
    max-width: 100%;
  }

  .auth-card img {
    width: 86px;
    height: 86px;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .auth-brand-panel {
    min-height: 210px;
  }

  .auth-brand-proof {
    display: none;
  }

  .auth-card img {
    width: 76px;
    height: 76px;
  }

  .auth-card h1 {
    font-size: 24px;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 540px) {
  .auth-page {
    justify-content: flex-start;
  }

  .auth-shell {
    width: min(354px, calc(100vw - 36px));
  }

  .auth-page .auth-stack {
    padding: 28px 20px 32px;
  }
}

/* ============================================================
   WARMER PALETTE PASS — reduce green dominance
   ============================================================ */
:root, [data-theme="light"] {
  --crimson: #29261F;
  --crimson-bright: #3B3528;
  --crimson-glow: #746A50;
  --fire: #73561C;
  --fire-glow: #96712A;
  --gold: #96712A;
  --gold-soft: #E9CF8F;
  --gold-bright: #C39A42;
  --bg: #FBF2DC;
  --surface: #F3E5C3;
  --surface-2: #E7D09C;
  --surface-3: #29261F;
  --border: rgba(89,72,42,0.16);
  --border-hover: rgba(89,72,42,0.34);
  --text: #26231C;
  --text-secondary: #5F5747;
  --text-muted: #827660;
}

.auth-page {
  background:
    linear-gradient(rgba(117, 86, 28, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 86, 28, 0.018) 1px, transparent 1px),
    linear-gradient(115deg, rgba(251, 242, 220, 0.98) 0%, rgba(248, 234, 194, 0.90) 48%, rgba(229, 214, 171, 0.78) 100%);
}

.auth-page::before {
  background:
    linear-gradient(rgba(195, 154, 66, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 86, 28, 0.032) 1px, transparent 1px);
}

.auth-steam {
  background:
    radial-gradient(ellipse at 16% 18%, rgba(195, 154, 66, 0.16), transparent 42%),
    radial-gradient(ellipse at 88% 82%, rgba(123, 39, 31, 0.10), transparent 42%);
}

.auth-shell {
  border-color: rgba(117, 86, 28, 0.16);
  box-shadow:
    0 36px 92px rgba(117, 86, 28, 0.15),
    0 1px 0 rgba(255,255,255,0.84) inset;
}

.auth-brand-panel {
  background:
    radial-gradient(ellipse at 18% 18%, rgba(195, 154, 66, 0.14), transparent 52%),
    linear-gradient(145deg, #2A261F 0%, #1F1B16 58%, #15120F 100%);
}

.auth-brand-panel::before {
  background:
    linear-gradient(rgba(216, 184, 112, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 184, 112, 0.04) 1px, transparent 1px);
}

.auth-brand-kicker {
  border-color: rgba(195, 154, 66, 0.46);
  color: #E9CF8F;
}

.auth-card h1 {
  color: #29261F;
}

.auth-card .form-group label {
  color: #5A503D;
}

.auth-card select,
.auth-language select {
  color: #26231C !important;
  border-color: rgba(117, 86, 28, 0.18) !important;
}

.auth-card .form-group input,
.auth-card .form-group select {
  border-color: rgba(117, 86, 28, 0.18) !important;
}

.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  border-color: rgba(195, 154, 66, 0.76) !important;
  box-shadow:
    0 0 0 4px rgba(195, 154, 66, 0.14),
    0 1px 0 rgba(255,255,255,0.75) inset;
}

.auth-card .btn-gold {
  background: linear-gradient(135deg, #72551C 0%, #A97F2D 56%, #D2A84D 100%);
  color: #FFF9EA;
  box-shadow: 0 14px 30px rgba(117, 86, 28, 0.24);
}

.auth-card .btn-gold:hover {
  background: linear-gradient(135deg, #876720 0%, #B98E34 56%, #DDB65B 100%);
}

.auth-card .auth-footer {
  color: #675D49;
}

/* ============================================================
   EDITORIAL DIM-SUM AUTH — definitive design pass
   Wins via cascade order. Keeps existing class names so EJS
   markup keeps working; redesigns visual treatment top-to-bottom.
   ============================================================ */

:root {
  --bb-ink: #1A1812;
  --bb-ink-2: #2A2418;
  --bb-cream: #FBF2DC;
  --bb-cream-2: #F4E5BE;
  --bb-cream-3: #EAD49A;
  --bb-gold: #C39A42;
  --bb-gold-2: #A07A28;
  --bb-gold-3: #E5C879;
  --bb-leaf: #3E5C2A;
  --bb-leaf-2: #5A7B3E;
  --bb-rule: rgba(195, 154, 66, 0.32);
  --bb-text: #1F1B12;
  --bb-text-2: #5E5440;
  --bb-text-3: #8A7F62;
  --bb-serif: 'Cormorant Garamond', 'Playfair Display', 'Source Han Serif SC', serif;
  --bb-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* extra serif for editorial display */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&display=swap');

.auth-page {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(1100px 700px at 8% -10%, rgba(195,154,66,0.22), transparent 62%),
    radial-gradient(900px 600px at 105% 110%, rgba(62,92,42,0.16), transparent 60%),
    linear-gradient(180deg, #FBF2DC 0%, #F6E8C4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bb-sans);
}
.auth-page::before,
.auth-page::after { display: none; }
.auth-steam,
.auth-steam span { display: none; }

.auth-shell {
  width: min(1280px, 96vw);
  min-height: min(820px, 92vh);
  margin: 4vh auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: transparent;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 60px 120px rgba(60, 44, 18, 0.18),
    0 6px 18px rgba(60, 44, 18, 0.10);
}

/* ---------- LEFT: editorial dark panel ---------- */
.auth-brand-panel {
  position: relative;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 600px at 20% 12%, rgba(229, 200, 121, 0.18), transparent 62%),
    radial-gradient(700px 500px at 100% 100%, rgba(62, 92, 42, 0.28), transparent 60%),
    linear-gradient(150deg, #1F1A12 0%, #14110C 100%);
  color: var(--bb-cream);
  overflow: hidden;
  isolation: isolate;
}
.auth-brand-panel::before,
.auth-brand-panel::after { display: none; }

.auth-brand-panel .grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(0deg, rgba(229,200,121,0.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(229,200,121,0.03) 0 1px, transparent 1px 3px);
  z-index: 0;
}

.auth-brand-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(229, 200, 121, 0.78);
}
.auth-brand-top .bb-rule {
  flex: 1;
  height: 1px;
  margin: 0 16px;
  background: linear-gradient(90deg, transparent, rgba(229,200,121,0.5), transparent);
}

.auth-brand-art {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.auth-brand-art svg {
  width: min(420px, 80%);
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55));
}

.auth-brand-copy {
  position: relative;
  z-index: 2;
}
.auth-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(229, 200, 121, 0.4);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #E9D08C;
  margin-bottom: 22px;
  background: rgba(229, 200, 121, 0.06);
}
.auth-brand-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bb-gold-3);
  box-shadow: 0 0 12px rgba(229,200,121,0.8);
}
.auth-brand-display {
  font-family: var(--bb-serif);
  font-weight: 500;
  font-size: clamp(46px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #FBF2DC;
  margin: 0 0 6px;
}
.auth-brand-display em {
  font-style: italic;
  color: var(--bb-gold-3);
  font-weight: 500;
}
.auth-brand-display .cn {
  display: block;
  font-family: 'Source Han Serif SC', 'Noto Serif SC', var(--bb-serif);
  font-size: 0.5em;
  letter-spacing: 0.18em;
  margin-top: 14px;
  color: rgba(229, 200, 121, 0.85);
}
.auth-brand-tagline {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(251, 242, 220, 0.74);
  max-width: 42ch;
  margin: 22px 0 28px;
}

.auth-brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(229, 200, 121, 0.18);
}
.auth-brand-stat .num {
  font-family: var(--bb-serif);
  font-size: 28px;
  color: var(--bb-gold-3);
  line-height: 1;
  margin-bottom: 6px;
}
.auth-brand-stat .lbl {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251, 242, 220, 0.58);
}

/* hide the legacy proof chips */
.auth-brand-proof { display: none; }
.auth-brand-kicker { display: none; }
.auth-brand-panel > h2,
.auth-brand-panel > p { display: none; }

/* ---------- RIGHT: cream form column ---------- */
.auth-page .auth-stack {
  position: relative;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(195,154,66,0.10), transparent 60%),
    linear-gradient(180deg, #FBF5E2 0%, #F3E4BE 100%);
  padding: 56px clamp(36px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;
}

.auth-alerts { width: 100%; max-width: 460px; margin: 0 auto 14px; }

.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: left;
}
.auth-card::before,
.auth-card::after { display: none !important; }

/* Logo — full aspect-ratio, never crop, generous max-height */
.auth-card img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 220px;
  max-height: 220px;
  margin: 0 auto 18px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(195, 154, 66, 0.28) !important;
  background: #FBF5E2;
  padding: 10px;
  box-shadow:
    0 18px 36px rgba(60, 44, 18, 0.14),
    0 0 0 6px rgba(255, 255, 255, 0.65) !important;
  object-fit: contain;
}

.auth-language {
  display: flex;
  justify-content: center;
  margin: 0 0 22px;
}
.auth-language select,
.auth-card select {
  min-height: 34px;
  padding: 5px 30px 5px 12px !important;
  background: rgba(255, 250, 232, 0.85) !important;
  border: 1px solid rgba(195, 154, 66, 0.30) !important;
  border-radius: 999px !important;
  color: var(--bb-text) !important;
  font-size: 11.5px !important;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-card h1 {
  font-family: var(--bb-serif);
  font-weight: 600;
  font-size: 38px !important;
  letter-spacing: 0.02em !important;
  color: var(--bb-ink) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  margin: 0 0 6px !important;
  text-align: center;
}
.auth-card h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--bb-gold), transparent);
}

.auth-card .subtitle {
  display: block;
  text-align: center;
  font-size: 11px !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase;
  color: var(--bb-gold-2) !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 8px auto 34px !important;
}

.auth-card .form-group { margin-bottom: 18px; }
.auth-card .form-group label {
  display: block;
  font-size: 10.5px !important;
  letter-spacing: 0.24em !important;
  text-transform: uppercase;
  color: var(--bb-text-2) !important;
  margin-bottom: 8px;
  font-weight: 700;
}
.auth-card .form-group input,
.auth-card .form-group select {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px !important;
  background: rgba(255, 252, 240, 0.92) !important;
  border: 1px solid rgba(122, 96, 38, 0.18) !important;
  border-radius: 10px !important;
  color: var(--bb-text) !important;
  font-size: 14.5px;
  font-family: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 0 0 999px transparent;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-card .form-group input::placeholder {
  color: var(--bb-text-3);
  opacity: 0.85;
}
.auth-card .form-group input:hover,
.auth-card .form-group select:hover {
  border-color: rgba(122, 96, 38, 0.34) !important;
}
.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  outline: none;
  border-color: var(--bb-gold) !important;
  background: #FFFCEE !important;
  box-shadow:
    0 0 0 4px rgba(195, 154, 66, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-card .btn-gold {
  width: 100%;
  margin-top: 6px;
  min-height: 54px !important;
  border-radius: 12px !important;
  border: 0 !important;
  font-family: var(--bb-sans);
  font-size: 12.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.32em !important;
  text-transform: uppercase;
  color: #FBF2DC !important;
  background: linear-gradient(135deg, #1F1A12 0%, #2A2418 50%, #1F1A12 100%) !important;
  box-shadow:
    0 14px 30px rgba(60, 44, 18, 0.30),
    inset 0 1px 0 rgba(229, 200, 121, 0.20) !important;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}
.auth-card .btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(229,200,121,0.18) 50%, transparent 60%);
  transform: translateX(-110%);
  transition: transform .9s ease;
}
.auth-card .btn-gold:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(60, 44, 18, 0.36),
    inset 0 1px 0 rgba(229, 200, 121, 0.28) !important;
}
.auth-card .btn-gold:hover::after { transform: translateX(110%); }
.auth-card .btn-gold:active { transform: translateY(0); }

.auth-card .auth-footer {
  margin-top: 28px !important;
  text-align: center;
  font-size: 13px;
  color: var(--bb-text-2) !important;
}
.auth-card .auth-footer a {
  color: var(--bb-gold-2);
  font-weight: 700;
  text-decoration: none;
  position: relative;
  letter-spacing: 0.04em;
}
.auth-card .auth-footer a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--bb-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.auth-card .auth-footer a:hover::after { transform: scaleX(1); }

/* steam keyframes for SVG */
@keyframes bb-steam {
  0%   { transform: translateY(8px) scale(0.96); opacity: 0; }
  35%  { opacity: 0.85; }
  100% { transform: translateY(-30px) scale(1.06); opacity: 0; }
}
.auth-brand-art .steam path {
  animation: bb-steam 4.6s ease-in-out infinite;
  transform-origin: center bottom;
}
.auth-brand-art .steam path:nth-child(2) { animation-delay: 1.1s; }
.auth-brand-art .steam path:nth-child(3) { animation-delay: 2.2s; }

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(560px, 94vw);
    min-height: auto;
    margin: 24px auto;
    border-radius: 22px;
  }
  .auth-brand-panel {
    padding: 40px 32px 32px;
    min-height: 360px;
  }
  .auth-brand-display { font-size: clamp(38px, 9vw, 56px); }
  .auth-brand-art svg { width: 220px; }
  .auth-page .auth-stack { padding: 40px 28px; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card img { max-width: 160px; max-height: 160px; }
}

/* ============================================================
   SIDEBAR ALIGNMENT — match editorial auth concept
   ============================================================ */
.sidebar-brand {
  padding: 26px 20px 22px;
  text-align: center;
}
.sidebar-brand img {
  width: auto !important;
  height: auto !important;
  max-width: 86px !important;
  max-height: 86px !important;
  border-radius: 16px !important;
  background: rgba(251, 242, 220, 0.06);
  padding: 6px;
  border: 1px solid rgba(229, 200, 121, 0.22);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}
.sidebar-brand h1 {
  font-family: var(--bb-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.10em;
  color: var(--bb-gold-3);
  margin-bottom: 4px;
}
.sidebar-brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(229, 200, 121, 0.55);
}

/* =================================================================
   CRM ↔ WEBSITE UNIFICATION PASS
   Brings the CRM admin surfaces in line with the marketing site:
   - Serif display (Cormorant Garamond) for h1/h2/page headers
   - Dark forest sidebar (matches website footer)
   - Dark forest pill CTA family with gold sweep
   - Editorial stat cards (serif numerals, gold accent)
   - Warm cream surfaces, gold rules, refined hover states
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&display=swap');

:root {
  --bb-serif: 'Cormorant Garamond', 'Playfair Display', serif;
  --bb-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --bb-ink: #1A1812;
  --bb-forest: #1F2F1C;
  --bb-forest-2: #2B3F26;
  --bb-forest-3: #3A5230;
  --bb-cream: #FBF2DC;
  --bb-cream-2: #F4E5BE;
  --bb-cream-3: #EAD49A;
  --bb-gold: #C39A42;
  --bb-gold-2: #A07A28;
  --bb-gold-3: #E5C879;
  --bb-text: #1F1B12;
  --bb-text-2: #5E5440;
  --bb-text-3: #8A7F62;
}

/* ---------- SIDEBAR: dark forest panel ---------- */
.sidebar {
  background: linear-gradient(180deg, #1F2F1C 0%, #15240F 100%) !important;
  border-right: 1px solid rgba(229, 200, 121, 0.16) !important;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.28) !important;
}
.sidebar::-webkit-scrollbar-thumb { background: rgba(229, 200, 121, 0.12); }

.sidebar-brand {
  padding: 22px 20px 20px !important;
  border-bottom: 1px solid rgba(229, 200, 121, 0.16) !important;
  background: linear-gradient(180deg, rgba(229, 200, 121, 0.06) 0%, transparent 100%) !important;
}
.sidebar-brand::after {
  background: linear-gradient(90deg, transparent, rgba(229, 200, 121, 0.45), transparent) !important;
}
.sidebar-brand img {
  width: 84px !important;
  max-width: 84px !important;
  max-height: 84px !important;
  height: auto !important;
  margin: 0 auto !important;
  display: block !important;
  border-radius: 14px !important;
  border: 1px solid rgba(229, 200, 121, 0.30) !important;
  background: rgba(251, 242, 220, 0.04);
  padding: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30) !important;
}
.sidebar-brand h1 {
  font-family: var(--bb-serif) !important;
  font-weight: 600 !important;
  font-size: 22px !important;
  letter-spacing: 0.10em !important;
  color: var(--bb-gold-3) !important;
  margin: 12px 0 4px !important;
  text-transform: none !important;
}
.sidebar-brand small {
  font-family: var(--bb-sans) !important;
  font-size: 10px !important;
  letter-spacing: 0.30em !important;
  color: rgba(229, 200, 121, 0.55) !important;
  text-transform: uppercase !important;
}

.sidebar-section {
  color: rgba(229, 200, 121, 0.55) !important;
  font-size: 10px !important;
  letter-spacing: 0.30em !important;
  padding: 22px 22px 8px !important;
}

.sidebar-nav a {
  color: rgba(253, 248, 236, 0.74) !important;
  font-family: var(--bb-sans);
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  margin: 2px 10px !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease !important;
}
.sidebar-nav a:hover {
  background: rgba(229, 200, 121, 0.10) !important;
  color: #FBF2DC !important;
  border-color: rgba(229, 200, 121, 0.22) !important;
}
.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(229, 200, 121, 0.18), rgba(229, 200, 121, 0.06)) !important;
  color: var(--bb-gold-3) !important;
  border-color: rgba(229, 200, 121, 0.42) !important;
  box-shadow: inset 0 1px 0 rgba(229, 200, 121, 0.20) !important;
}
.sidebar-nav a .icon { color: rgba(229, 200, 121, 0.50) !important; }
.sidebar-nav a.active .icon,
.sidebar-nav a:hover .icon { color: var(--bb-gold-3) !important; opacity: 1 !important; }

/* sidebar language switcher — dark surface override */
.sidebar > div[style*="border-bottom"] { border-bottom-color: rgba(229, 200, 121, 0.16) !important; }
.sidebar > div[style*="border-bottom"] select {
  background: rgba(229, 200, 121, 0.08) !important;
  border-color: rgba(229, 200, 121, 0.28) !important;
  color: var(--bb-gold-3) !important;
}

.sidebar-user {
  border-top: 1px solid rgba(229, 200, 121, 0.16) !important;
  background: rgba(0, 0, 0, 0.20) !important;
}
.sidebar-user .user-info { color: #FBF2DC !important; font-family: var(--bb-sans); }
.sidebar-user .user-role { color: var(--bb-gold-3) !important; }
.sidebar-user .btn-outline {
  background: transparent !important;
  border: 1px solid rgba(229, 200, 121, 0.40) !important;
  color: var(--bb-gold-3) !important;
}
.sidebar-user .btn-outline:hover {
  background: rgba(229, 200, 121, 0.14) !important;
  border-color: var(--bb-gold-3) !important;
}

/* hide the dark/light theme toggle — CRM is locked to cream theme */
.sidebar > div[style*="theme-dark-btn"],
.sidebar > div:has(#theme-dark-btn) { display: none !important; }

/* ---------- MAIN CONTENT: editorial page headers ---------- */
.main-content {
  background:
    radial-gradient(1100px 700px at 0% -10%, rgba(195,154,66,0.10), transparent 60%),
    linear-gradient(180deg, #FBF2DC 0%, #F6E8C4 100%) !important;
  padding: 26px 32px !important;
}

.page-header {
  margin-bottom: 22px !important;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(122, 96, 38, 0.18);
}
.page-header h2 {
  font-family: var(--bb-serif) !important;
  font-weight: 600 !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.01em !important;
  color: var(--bb-ink) !important;
  position: relative;
  padding-bottom: 8px;
}
.page-header h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--bb-gold), transparent);
}

/* ---------- BUTTONS: dark forest pill family with gold sweep ---------- */
.btn {
  font-family: var(--bb-sans) !important;
  letter-spacing: 0.04em;
  border-radius: 9px !important;
  font-size: 12px !important;
  padding: 8px 16px !important;
}
.btn-sm { padding: 5px 11px !important; font-size: 11px !important; }
.btn-gold {
  position: relative !important;
  background: linear-gradient(135deg, #1F2F1C 0%, #2B3F26 60%, #1F2F1C 100%) !important;
  color: #FBF2DC !important;
  border: 0 !important;
  font-weight: 700 !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase;
  font-size: 11.5px !important;
  padding: 9px 18px !important;
  overflow: hidden !important;
  box-shadow:
    0 8px 18px rgba(31, 47, 28, 0.24),
    inset 0 1px 0 rgba(229, 200, 121, 0.30),
    inset 0 0 0 1px rgba(229, 200, 121, 0.18) !important;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease !important;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(229,200,121,0.20) 50%, transparent 60%);
  transform: translateX(-110%);
  transition: transform .7s ease;
  pointer-events: none;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #2B3F26 0%, #3A5230 60%, #2B3F26 100%) !important;
  color: #FFF7E0 !important;
  transform: translateY(-1px) !important;
  box-shadow:
    0 14px 28px rgba(31, 47, 28, 0.34),
    inset 0 1px 0 rgba(229, 200, 121, 0.42),
    inset 0 0 0 1px rgba(229, 200, 121, 0.32) !important;
}
.btn-gold:hover::after { transform: translateX(110%); }

.btn-outline {
  background: rgba(255, 252, 240, 0.85) !important;
  border: 1px solid rgba(122, 96, 38, 0.28) !important;
  color: var(--bb-text) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
}
.btn-outline:hover {
  background: rgba(255, 252, 240, 1) !important;
  border-color: var(--bb-gold) !important;
  color: var(--bb-gold-2) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(122, 96, 38, 0.14);
}

.btn-danger {
  background: rgba(180, 58, 42, 0.12) !important;
  color: #8C2A1F !important;
  border: 1px solid rgba(180, 58, 42, 0.30) !important;
  font-weight: 700 !important;
}
.btn-danger:hover {
  background: #B43A2A !important;
  color: #FBF2DC !important;
  border-color: #B43A2A !important;
}

/* ---------- STAT CARDS: editorial, serif numerals, gold rule ---------- */
.stats-grid {
  gap: 14px !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}
.stat-card {
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.92), rgba(244, 229, 190, 0.88)) !important;
  border: 1px solid rgba(122, 96, 38, 0.18) !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px rgba(60, 44, 18, 0.05) !important;
  transition: transform .18s ease, box-shadow .25s ease, border-color .18s ease !important;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--bb-gold) 0%, transparent 80%);
}
.stat-card:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(195, 154, 66, 0.55) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 36px rgba(60, 44, 18, 0.10) !important;
}
.stat-card .label {
  font-family: var(--bb-sans);
  font-size: 9.5px !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase;
  color: var(--bb-text-2) !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}
.stat-card .value {
  font-family: var(--bb-serif) !important;
  font-weight: 600 !important;
  font-size: 28px !important;
  letter-spacing: -0.01em !important;
  color: var(--bb-ink) !important;
  line-height: 1 !important;
}
.stat-card .sub {
  font-family: var(--bb-sans);
  font-size: 11px !important;
  color: var(--bb-text-3) !important;
  margin-top: 6px !important;
}

/* ---------- TABLES: warmer surfaces, gold hover ---------- */
.table-container,
.form-card {
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.92), rgba(244, 229, 190, 0.88)) !important;
  border: 1px solid rgba(122, 96, 38, 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 26px rgba(60, 44, 18, 0.05);
}
thead th {
  background: rgba(229, 200, 121, 0.16) !important;
  color: var(--bb-text-2) !important;
  font-family: var(--bb-sans);
  font-size: 9.5px !important;
  letter-spacing: 0.20em !important;
  font-weight: 800 !important;
  border-bottom: 1px solid rgba(122, 96, 38, 0.24) !important;
  padding: 11px 14px !important;
}
tbody td {
  padding: 10px 12px !important;
  font-size: 12.5px !important;
  color: var(--bb-text) !important;
  border-bottom: 1px solid rgba(122, 96, 38, 0.10) !important;
  vertical-align: middle;
}
tbody tr:hover {
  background: rgba(229, 200, 121, 0.08) !important;
}
tbody tr:last-child td { border-bottom: 0 !important; }
thead th {
  padding: 10px 12px !important;
}

/* Data that shouldn't wrap: ID badges, phone, money, country, badges */
table .entity-id,
table .id-cell,
.entity-id,
.id-cell,
table td .badge,
table td.no-wrap,
table .num,
.col-id, .col-phone, .col-money, .col-country, .col-status, .col-actions {
  white-space: nowrap;
}

/* ID pill */
.entity-id {
  display: inline-block;
  padding: 4px 9px;
  background: rgba(122, 96, 38, 0.10);
  border: 1px solid rgba(122, 96, 38, 0.22);
  border-radius: 7px;
  font-family: 'Plus Jakarta Sans', monospace;
  font-size: 10.5px !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--bb-text-2);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--bb-sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-green {
  background: rgba(62, 92, 42, 0.12);
  color: #2F4A1A;
  border: 1px solid rgba(62, 92, 42, 0.28);
}
.badge-gold {
  background: rgba(195, 154, 66, 0.16);
  color: #8C6A1F;
  border: 1px solid rgba(195, 154, 66, 0.40);
}
.badge-gray {
  background: rgba(122, 96, 38, 0.08);
  color: var(--bb-text-3);
  border: 1px solid rgba(122, 96, 38, 0.22);
}

/* Phone, money cells — keep on one line; phones are short enough */
table tbody td:nth-child(4),   /* phone column on listings like investors */
table tbody td:nth-child(5),   /* country */
table tbody td:nth-last-child(3), /* numeric "investments" */
table tbody td:nth-last-child(2), /* total invested */
table tbody td:nth-last-child(1)  /* actions */
{
  white-space: nowrap;
}

/* Email/name can still wrap if very long, but use ellipsis as default */
table tbody td:nth-child(2),
table tbody td:nth-child(3) {
  max-width: 280px;
}

/* Edit button compact */
.btn.btn-sm {
  padding: 5px 12px !important;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
}

/* Slim sidebar; tighten its inner text so labels don't wrap awkwardly */
:root { --sidebar-w: 220px; }
.sidebar { width: 220px !important; }
.main-content { margin-left: 220px !important; }

/* Sidebar brand block: smaller logo and tagline, no wrap */
.sidebar-brand {
  padding: 18px 14px 14px !important;
}
.sidebar-brand img {
  width: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  padding: 4px !important;
  border-radius: 12px !important;
}
.sidebar-brand h1 {
  font-size: 18px !important;
  margin: 10px 0 2px !important;
  letter-spacing: 0.08em !important;
}
.sidebar-brand small {
  font-size: 9px !important;
  letter-spacing: 0.14em !important;
  line-height: 1.5 !important;
  /* allow wrap rather than truncate — full tagline must be readable */
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: block;
  padding: 0 4px;
  max-width: 100%;
}

/* Sidebar nav: tighter padding, ellipsis on overflow */
.sidebar-nav { padding: 8px 0 !important; }
.sidebar-nav a {
  padding: 8px 12px !important;
  margin: 1px 8px !important;
  font-size: 12.5px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav a .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  color: rgba(229, 200, 121, 0.55);
  transition: color .15s ease;
}
.sidebar-nav a .icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.sidebar-nav a:hover .icon,
.sidebar-nav a.active .icon { color: var(--bb-gold-3); opacity: 1; }
.sidebar-section {
  padding: 14px 14px 5px !important;
  font-size: 9px !important;
  letter-spacing: 0.24em !important;
}

/* Language dropdown smaller chip */
.lang-dropdown { padding: 8px 12px !important; }
.lang-dropdown-toggle {
  padding: 6px 12px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.18em !important;
}
.lang-dropdown-caret { width: 9px; height: 6px; }

/* User block tighter */
.sidebar-user {
  padding: 10px 12px !important;
  gap: 8px;
}
.sidebar-user .user-info { font-size: 12px !important; }
.sidebar-user .user-role { font-size: 9px !important; }

@media (max-width: 980px) {
  .sidebar { width: 260px !important; }
  .main-content { margin-left: 0 !important; }
}

/* ============================================================
   TABLE FLEX FIX — kill horizontal scroll
   Let email column flex and shrink; remove fixed nowraps on
   columns that the table can compress without losing info.
   ============================================================ */
.table-container { overflow-x: auto !important; }
table { table-layout: auto !important; min-width: 0 !important; }

/* Allow email & name cells to use ellipsis; they were max-width-bounded
   but still pushed the table wider than the viewport. */
table tbody td:nth-child(2),
table tbody td:nth-child(3) {
  max-width: 220px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Make sure nothing inside the page overflows the content area */
.main-content { min-width: 0; overflow-x: hidden; }
body { overflow-x: hidden; }

/* ---------- FORMS: rounded cream inputs, gold focus ring ---------- */
.form-card { padding: 22px !important; max-width: 640px !important; }
.form-group { margin-bottom: 14px !important; }
.form-group label {
  font-family: var(--bb-sans);
  font-size: 9.5px !important;
  letter-spacing: 0.22em !important;
  color: var(--bb-text-2) !important;
  font-weight: 700 !important;
  margin-bottom: 5px !important;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 252, 240, 0.92) !important;
  border: 1px solid rgba(122, 96, 38, 0.20) !important;
  border-radius: 9px !important;
  padding: 9px 12px !important;
  font-family: var(--bb-sans);
  font-size: 13px !important;
  color: var(--bb-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color .18s ease, box-shadow .25s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none !important;
  border-color: var(--bb-gold) !important;
  box-shadow:
    0 0 0 4px rgba(195, 154, 66, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  background: #FFFCEE !important;
}

/* ---------- GENERIC CARDS / PANELS ---------- */
.card,
.panel,
.section-card {
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.92), rgba(244, 229, 190, 0.88)) !important;
  border: 1px solid rgba(122, 96, 38, 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 32px rgba(60, 44, 18, 0.06);
}

/* ---------- HEADINGS inside content ---------- */
.main-content h1,
.main-content h2 {
  font-family: var(--bb-serif);
  color: var(--bb-ink);
  font-weight: 600;
}
.main-content h3,
.main-content h4 {
  font-family: var(--bb-sans);
  color: var(--bb-text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ---------- BADGES / PILLS (e.g. status chips) ---------- */
.badge,
.status-badge,
.pill {
  font-family: var(--bb-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- ALERTS ---------- */
.alert {
  border-radius: 12px !important;
  font-family: var(--bb-sans);
}
.alert-success {
  background: rgba(62, 92, 42, 0.10) !important;
  border: 1px solid rgba(62, 92, 42, 0.32) !important;
  color: #2F4A1A !important;
}
.alert-error {
  background: rgba(180, 58, 42, 0.10) !important;
  border: 1px solid rgba(180, 58, 42, 0.32) !important;
  color: #8C2A1F !important;
}

/* ---------- MOBILE: keep sidebar overlay variant readable ---------- */
@media (max-width: 980px) {
  .main-content { padding: 24px 20px !important; }
  .page-header h2 { font-size: 30px !important; }
  .stat-card .value { font-size: 30px !important; }
  .sidebar-brand img { width: 64px !important; max-width: 64px !important; max-height: 64px !important; }
}

/* ---------- Body font baseline ---------- */
body {
  font-family: var(--bb-sans);
  color: var(--bb-text);
}

/* ============================================================
   AUTH PAGES — compact, comfortable, scrollable
   ============================================================ */
html, body { height: auto !important; }
.auth-page {
  min-height: 100vh !important;
  height: auto !important;
  align-items: center !important;
  overflow-y: auto !important;
  padding: clamp(10px, 2vh, 20px) 0 !important;
}

/* Shrink the shell — was 1280px / 820px min */
.auth-shell {
  width: min(880px, 92vw) !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  height: auto !important;
  grid-template-columns: 1fr 1fr !important;
  border-radius: 20px !important;
}

/* Left dark panel — tighter padding, scaled-down content */
.auth-brand-panel {
  padding: 28px 30px !important;
  min-height: 0 !important;
}
.auth-brand-art { padding: 4px 0 !important; }
.auth-brand-art svg {
  width: min(200px, 75%) !important;
  height: auto !important;
}
.auth-brand-display {
  font-size: clamp(26px, 2.9vw, 38px) !important;
  line-height: 1.0 !important;
  margin: 0 0 4px !important;
}
.auth-brand-display .cn {
  font-size: 0.40em !important;
  margin-top: 6px !important;
  letter-spacing: 0.16em !important;
}
.auth-brand-tagline {
  font-size: 12px !important;
  line-height: 1.45 !important;
  margin: 10px 0 14px !important;
  max-width: 34ch !important;
}
.auth-brand-eyebrow {
  padding: 4px 11px !important;
  font-size: 9px !important;
  margin-bottom: 12px !important;
}
.auth-brand-stats {
  padding-top: 12px !important;
  gap: 10px !important;
}
.auth-brand-stat .num {
  font-size: 19px !important;
}
.auth-brand-stat .lbl {
  font-size: 9px !important;
  letter-spacing: 0.18em !important;
}
.auth-brand-top {
  font-size: 9.5px !important;
  letter-spacing: 0.22em !important;
}

/* Right form column — tighter */
.auth-page .auth-stack {
  padding: 28px clamp(22px, 3.5vw, 36px) !important;
  min-height: 0 !important;
}

.auth-card { max-width: 340px !important; }

/* Logo box smaller */
.auth-card img {
  max-width: 96px !important;
  max-height: 96px !important;
  padding: 5px !important;
  border-radius: 12px !important;
  margin: 0 auto 10px !important;
  box-shadow:
    0 10px 20px rgba(60, 44, 18, 0.12),
    0 0 0 3px rgba(255, 255, 255, 0.55) !important;
}

.auth-language { margin: 0 0 10px !important; }
.auth-language select,
.auth-card select {
  min-height: 28px !important;
  font-size: 10px !important;
  padding: 3px 24px 3px 10px !important;
}

.auth-card h1 {
  font-size: 24px !important;
  margin: 0 0 2px !important;
}
.auth-card h1::after {
  width: 36px !important;
  height: 2px !important;
  margin: 8px auto 0 !important;
}
.auth-card .subtitle {
  font-size: 9.5px !important;
  letter-spacing: 0.22em !important;
  margin: 4px auto 16px !important;
}

.auth-card .form-group { margin-bottom: 10px !important; }
.auth-card .form-group label {
  font-size: 9.5px !important;
  letter-spacing: 0.20em !important;
  margin-bottom: 5px !important;
}
.auth-card .form-group input,
.auth-card .form-group select {
  min-height: 38px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

.auth-card .btn-gold {
  min-height: 42px !important;
  font-size: 11px !important;
  letter-spacing: 0.26em !important;
  margin-top: 2px !important;
  border-radius: 9px !important;
}

.auth-card .auth-footer {
  margin-top: 14px !important;
  font-size: 11.5px !important;
}

/* Mobile: single column */
@media (max-width: 880px) {
  .auth-shell {
    grid-template-columns: 1fr !important;
    width: min(480px, 94vw) !important;
  }
  .auth-brand-panel {
    padding: 28px 24px !important;
    min-height: 280px;
  }
  .auth-brand-art svg { width: 180px !important; }
  .auth-brand-display { font-size: clamp(28px, 6vw, 36px) !important; }
  .auth-page .auth-stack { padding: 32px 24px !important; }
  .auth-card { max-width: 100% !important; }
}

/* ============================================================
   SIDEBAR LANGUAGE DROPDOWN — compact, bottom-anchored
   (custom button + panel; replaces native <select>)
   ============================================================ */
/* Allow popups from inside the sidebar to escape its scroll clip */
.sidebar { overflow: visible !important; }
.sidebar-nav {
  overflow-y: auto;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* old Edge */
}
.sidebar-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }

.lang-dropdown {
  position: relative;
  padding: 8px 12px;
  border-top: 1px solid rgba(229, 200, 121, 0.12);
  z-index: 50;
  overflow: visible;
}
.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 10px;
  background: rgba(229, 200, 121, 0.06);
  border: 1px solid rgba(229, 200, 121, 0.20);
  border-radius: 8px;
  color: var(--bb-gold-3);
  font-family: var(--bb-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.lang-dropdown-toggle:hover {
  background: rgba(229, 200, 121, 0.12);
  border-color: rgba(229, 200, 121, 0.40);
  color: #FBF2DC;
}
.lang-dropdown-globe {
  width: 12px;
  height: 12px;
  color: var(--bb-gold-3);
  flex-shrink: 0;
  opacity: 0.85;
}
.lang-dropdown-current {
  flex: 1;
  line-height: 1;
  text-align: left;
}
.lang-dropdown-caret {
  width: 8px;
  height: 5px;
  color: var(--bb-gold-3);
  margin: 0;
  transition: transform .18s ease;
  flex-shrink: 0;
  opacity: 0.7;
}
.lang-dropdown.is-open .lang-dropdown-caret {
  transform: rotate(180deg);
}

/* Compact panel — opens upward when anchored to bottom */
.lang-dropdown-menu {
  position: absolute;
  left: 12px;
  right: 12px;
  margin: 0;
  padding: 2px;
  list-style: none;
  background: linear-gradient(180deg, #243A1F 0%, #18280F 100%);
  border: 1px solid rgba(229, 200, 121, 0.28);
  border-radius: 6px;
  box-shadow:
    0 -14px 28px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(0, 0, 0, 0.20);
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
  z-index: 200;
}
/* Default position (top-anchored use case) */
.lang-dropdown-menu {
  top: calc(100% + 2px);
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
}
/* Bottom-anchored variant: open upward */
.lang-dropdown--bottom .lang-dropdown-menu {
  top: auto;
  bottom: calc(100% + 4px);
  transform: translateY(4px) scale(0.98);
  transform-origin: bottom left;
  z-index: 2000;
}
.lang-dropdown.is-open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .12s ease, transform .12s ease, visibility 0s;
}
.lang-dropdown-menu li { margin: 0; padding: 0; }

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  background: transparent;
  border: 0;
  color: rgba(253, 248, 236, 0.78);
  font-family: var(--bb-sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  transition: background .12s ease, color .12s ease;
}
button.lang-dropdown-item { font: inherit; }
.lang-dropdown-item:hover {
  background: rgba(229, 200, 121, 0.14);
  color: #FBF2DC;
}
.lang-dropdown-item.is-selected {
  background: rgba(229, 200, 121, 0.10);
  color: var(--bb-gold-3);
  font-weight: 700;
}
.lang-dropdown-item svg {
  color: var(--bb-gold-3);
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

/* during the brief moment between POST and refresh, give feedback */
.lang-dropdown.is-changing .lang-dropdown-toggle {
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================================
   VIEW TRANSITION — smooth crossfade on language change
   Eliminates the jarring full-refresh flash in Chromium/Brave.
   ============================================================ */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(root) {
  animation-name: bb-fade-out;
}
::view-transition-new(root) {
  animation-name: bb-fade-in;
}
@keyframes bb-fade-out {
  to { opacity: 0; }
}
@keyframes bb-fade-in {
  from { opacity: 0; }
}
