/* ============================================================
 * DineroBook — shared design system
 *
 * Single source of truth for layout, color, and component styles
 * across both the admin app (base.html) and the owner portal
 * (base_owner.html). Edit here, not in template <style> blocks.
 * ============================================================ */

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Brand */
  --navy:   #0f1f3d;
  --blue:   #1a4080;
  --mid:    #2a5caa;
  --sky:    #3b82f6;
  --gold:   #c9973a;
  --gold2:  #f0c060;

  /* Surfaces */
  --cream:  #faf7f2;
  --paper:  #f3ede3;
  --white:  #ffffff;

  /* Neutrals */
  --gray1:  #f5f5f7;
  --gray2:  #e8e8ec;
  --gray3:  #b0b4c0;
  --gray4:  #6b7280;
  --dark:   #1a1a2e;

  /* Semantic */
  --green:        #16a34a;
  --green-dark:   #15803d;
  --green-bg:     #dcfce7;
  --green-border: #bbf7d0;

  --red:          #dc2626;
  --red-dark:     #7f1d1d;
  --red-bg:       #fee2e2;
  --red-border:   #fca5a5;

  --orange:       #ea580c;
  --yellow:       #ca8a04;
  --yellow-dark:  #713f12;
  --yellow-bg:    #fef9c3;
  --yellow-border:#fde047;

  --blue-dark:    #1d4ed8;
  --blue-bg:      #dbeafe;
  --blue-border:  #bfdbfe;

  /* ── Mode-aware semantic tokens ─────────────────────────
     Use these for ANY surface, text, or border that should
     respect the light/dark toggle. The fixed tokens above
     (--white, --gray1, --dark, …) stay light-mode values by
     design — only reach for them when you specifically want
     a color that does NOT flip. */
  --surface:        #ffffff;   /* card / box background */
  --surface-2:      #f5f5f7;   /* subtle inset — totals rows, read-only fields */
  --surface-sticky: rgba(250,247,242,0.96);  /* sticky save bars */
  --text:           #1a1a2e;
  --text-muted:     #6b7280;
  --border:         #e8e8ec;
  --border-strong:  #d1d5db;

  /* Layout */
  --sidebar-w: 240px;
}

/* Semantic tokens flip here; the light values above are the defaults. */
[data-theme="dark"] {
  --surface:        #1a1f2e;
  --surface-2:      #232838;
  --surface-sticky: rgba(15,18,32,0.95);
  --text:           #e5e7eb;
  --text-muted:     #9ca3af;
  --border:         #2a3044;
  --border-strong:  #3a4054;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--dark); }
html, body { overflow-x: hidden; max-width: 100%; }
/* Stop iOS Safari rubber-band overscroll so installed PWAs feel native. */
html, body { overscroll-behavior-y: none; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: var(--sidebar-w); background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh;
  z-index: 100; overflow-y: auto;
  /* Respect the iOS notch / home indicator inside the navy drawer. */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .brand {
  font-family: 'DM Serif Display', serif;
  font-size: 18px; color: var(--gold2);
  line-height: 1.2; letter-spacing: 0.3px;
}
.sidebar-logo .sub {
  font-size: 11px; color: rgba(255,255,255,0.4);
  margin-top: 3px; font-weight: 300; letter-spacing: 1px; text-transform: uppercase;
}
.sidebar-user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user .uname { font-size: 13px; font-weight: 600; color: var(--white); line-height: 1; }
.sidebar-user .urole {
  font-size: 11px; color: var(--gold); margin-top: 3px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section {
  font-size: 10px; color: rgba(255,255,255,0.3);
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 16px 20px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: rgba(255,255,255,0.65);
  text-decoration: none; font-size: 13.5px; font-weight: 400;
  transition: all 0.15s; border-left: 3px solid transparent;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--gold2); border-left-color: var(--gold); background: rgba(201,151,58,0.08); }
.nav-link .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer a {
  font-size: 12px; color: rgba(255,255,255,0.4);
  text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.sidebar-footer a:hover { color: rgba(255,255,255,0.7); }

/* ── MAIN ───────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w); flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  min-width: 0; background: var(--cream);
}
.topbar {
  background: var(--white); border-bottom: 1px solid var(--gray2);
  padding: 0 32px; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  /* iOS standalone PWA — push the topbar below the notch so it never
     gets hidden under the status bar. */
  padding-top: env(safe-area-inset-top);
  height: calc(58px + env(safe-area-inset-top));
}
.topbar-title { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 12px; color: var(--gray4); font-family: 'JetBrains Mono', monospace; }

.content { padding: 32px; flex: 1; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: 12px;
  border: 1px solid var(--gray2); overflow: hidden;
}
.card-header {
  padding: 18px 24px; border-bottom: 1px solid var(--gray2);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-weight: 600; font-size: 15px; color: var(--navy); }
.card-body { padding: 24px; }

/* ── QUICK-LINK CARDS (superadmin overview) ─────────────────
 * Grid of clickable mini-cards used for the Quick Links section. The
 * structure (icon left, title + description right) is intentionally
 * generic so any tab/page that needs a "pick where to go" landing
 * grid can reuse these classes. */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.quick-link-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.quick-link-card:hover {
  border-color: var(--blue);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,31,61,0.08);
}
.quick-link-icon {
  font-size: 22px;
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: 8px;
}
.quick-link-text { min-width: 0; }
.quick-link-title {
  font-weight: 600; font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}
.quick-link-desc {
  font-size: 12.5px; color: var(--text-muted);
  margin-top: 4px; line-height: 1.4;
}
[data-theme="dark"] .quick-link-card { background: #1a1f2e; border-color: #2a3044; }
[data-theme="dark"] .quick-link-card:hover {
  background: #232838; border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
[data-theme="dark"] .quick-link-icon { background: #232838; }

/* ── SECTION BOXES (report forms) ───────────────────────
 * Shared container for the Daily Book and Monthly P&L form
 * sections. Header color is set per-instance via
 * style="--sb-accent: var(--blue)" etc. on the header element.
 * Uses semantic tokens so both modes are handled automatically
 * — do NOT add local [data-theme="dark"] overrides that
 * duplicate these rules. */
.section-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  margin-bottom: 20px;
  /* Respect the grid item's track width. Without this, a wide table
     inside can drag the box past its allotted 50% column. */
  min-width: 0; max-width: 100%;
}
.section-box-header {
  padding: 12px 20px;
  font-weight: 700; font-size: 13px;
  color: #fff;  /* always-white on the colored accent band */
  letter-spacing: 0.5px;
  background: var(--sb-accent, var(--navy));
}
.sb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}
/* Kept as no-op class aliases because a handful of Monthly P&L rows
   still spell them out — keeps the markup tidy until the template
   migrates off. Do NOT add local overrides here; adjust .sb-row. */
.pl-row { }
.pl-total { padding: 10px 20px; }
.pl-auto { font-size: 11px; color: var(--sky); margin-left: 6px; }
.sb-row:last-child { border-bottom: none; }
.sb-label { flex: 1; font-size: 13px; color: var(--text); }
.sb-input { width: 160px; }
.sb-input input {
  text-align: right; padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; width: 100%;
}
.sb-input input[readonly] {
  background: var(--surface-2); cursor: not-allowed;
}
.sb-total {
  background: var(--surface-2);
  font-weight: 700;
}
.sb-auto-badge {
  font-size: 10px;
  background: var(--blue-bg); color: var(--blue-dark);
  padding: 2px 7px; border-radius: 4px;
  font-weight: 600; margin-left: 6px;
}
[data-theme="dark"] .sb-auto-badge { background: #0f1d3f; color: #93c5fd; }
.sb-summary-box {
  background: var(--surface-2);
  border-radius: 8px; padding: 14px;
}

/* Sticky save-action bar that sits below a long form. */
.sticky-save-bar {
  position: sticky; bottom: 0;
  background: var(--surface-sticky);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: flex; gap: 12px; align-items: center;
}
/* Primary button in the sticky bar — slightly larger on desktop without
   needing inline padding overrides at each call site. */
.sticky-save-bar .sticky-save-primary { font-size: 15px; padding: 12px 28px; }

/* Shared money-transfer table style used on the Daily Book. */
.mt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt-table th {
  padding: 8px 12px; background: var(--navy); color: #fff;
  font-size: 11px; text-align: right; font-weight: 600;
}
.mt-table th:first-child { text-align: left; }
.mt-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
.mt-table td input {
  text-align: right; width: 110px; padding: 5px 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
}
.mt-table tfoot td {
  background: var(--surface-2);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  color: var(--text);
}

/* On phones the 6-col MT table is unusable as a horizontal-scroll grid.
   Re-render each <tr> as a stacked card with label/value rows. The
   template tags every <td> with data-label="..." so the label can come
   from the (now-hidden) <thead>. */
@media (max-width: 600px) {
  .mt-table { display: block; min-width: 0; font-size: 13px; }
  .mt-table thead { display: none; }
  .mt-table tbody, .mt-table tr, .mt-table td { display: block; width: 100%; }
  .mt-table tbody tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    margin: 0 12px 12px;
    padding: 4px 12px;
  }
  .mt-table tbody tr:first-child { margin-top: 12px; }
  .mt-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; text-align: right;
  }
  .mt-table td:last-child { border-bottom: none; }
  .mt-table td::before {
    content: attr(data-label);
    flex: 1; min-width: 0;
    font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    font-weight: 600; text-align: left;
  }
  /* The "Company" cell is the card title — bigger, no label prefix. */
  .mt-table td.mt-company {
    justify-content: flex-start; font-size: 15px;
    border-bottom: 1px solid var(--border-strong); padding: 10px 0 8px;
  }
  .mt-table td.mt-company::before { content: none; }
  .mt-table td input {
    width: 130px; font-size: 16px; padding: 8px 10px; text-align: right;
  }
  .mt-table tfoot { display: block; padding: 0 12px 12px; }
  .mt-table tfoot tr {
    display: block;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface-2);
    padding: 4px 12px;
  }
  .mt-table tfoot td {
    text-align: right; padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  .mt-table tfoot td:last-child { border-bottom: none; }
  .mt-table tfoot td.mt-company {
    text-align: left; font-size: 13px;
    font-family: 'DM Sans', sans-serif;
  }
}

/* ── STAT CARDS ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border-radius: 12px;
  border: 1px solid var(--gray2); padding: 20px 22px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, var(--sky));
}
.stat-label { font-size: 11px; color: var(--gray4); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 500; }
.stat-value { font-family: 'DM Serif Display', serif; font-size: 30px; color: var(--navy); margin-top: 6px; line-height: 1; }
.stat-sub { font-size: 12px; color: var(--gray4); margin-top: 6px; }

/* ── TABLES ─────────────────────────────────────────────── */
/* max-width:100% guarantees the wrap stays within its container so
   overflow-x: auto creates horizontal scroll INSIDE the wrap instead
   of letting the table push the card / grid item wider. */
.table-wrap { overflow-x: auto; max-width: 100%; }

/* ── Amount cell hover-pill (Transfers + batch detail tables) ────
 * The Transfers table shows a single "Amount" column with the combined
 * send+fee+tax total, and a dark pill tooltip with the breakdown on
 * hover/focus. Kept in app.css so it's shared between /transfers and
 * the Batch detail transfers table. */
.tf-amount {
  position: relative;
  display: inline-block;
  cursor: help;
  outline: none;
}
.tf-amount-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(15,31,61,0.25);
  min-width: 150px;
  font-weight: 400;
}
.tf-amount-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--dark);
}
.tf-amount-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.tf-amount-tip-row + .tf-amount-tip-row {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.tf-amount-tip-row > span:first-child {
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  align-self: center;
}
.tf-amount-tip-row > span:last-child {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.tf-amount:hover .tf-amount-tip,
.tf-amount:focus .tf-amount-tip,
.tf-amount:focus-within .tf-amount-tip { display: block; }

/* Flip the tooltip BELOW the cell for the first row, so it doesn't get
   clipped above the table / under the card's search header. The caret
   also flips — we move it to the top of the pill and recolor it so it
   points up at the cell instead of down. */
tbody tr:first-child .tf-amount-tip {
  bottom: auto;
  top: calc(100% + 8px);
}
tbody tr:first-child .tf-amount-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--dark);
}

[data-theme="dark"] .tf-amount-tip {
  background: #0f1424;
  border: 1px solid #3a4054;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55);
}
[data-theme="dark"] .tf-amount-tip::after { border-top-color: #0f1424; }
[data-theme="dark"] tbody tr:first-child .tf-amount-tip::after {
  border-top-color: transparent;
  border-bottom-color: #0f1424;
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 600; color: var(--gray4);
  text-transform: uppercase; letter-spacing: 0.7px;
  background: var(--gray1); border-bottom: 1px solid var(--gray2);
}
tbody tr { border-bottom: 1px solid var(--gray2); transition: background 0.1s; }
tbody tr:hover { background: var(--gray1); }
tbody td { padding: 12px 16px; color: var(--dark); vertical-align: middle; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-green  { background: var(--green-bg);  color: var(--green-dark); }
.badge-red    { background: var(--red-bg);    color: #b91c1c; }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow-dark); }
.badge-orange { background: #ffedd5;          color: #c2410c; }
.badge-blue   { background: var(--blue-bg);   color: var(--blue-dark); }
.badge-gray   { background: var(--gray2);     color: var(--gray4); }
.badge-navy   { background: var(--navy);      color: var(--gold2); }

/* "Coming Soon" / promo pill — gold solid */
.coming-pill {
  background: var(--gold); color: var(--white);
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 8px; font-size: 13.5px;
  font-weight: 500; cursor: pointer; border: none; text-decoration: none;
  transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--mid); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold2); color: var(--navy); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: var(--red); color: var(--white); }

/* ── FORMS ──────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.form-grid.cols-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.form-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
label { font-size: 12px; font-weight: 600; color: var(--gray4); text-transform: uppercase; letter-spacing: 0.6px; }
input, select, textarea {
  padding: 10px 14px; border: 1.5px solid var(--gray2);
  border-radius: 8px; font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--dark); background: var(--white); transition: border-color 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
textarea { resize: vertical; min-height: 80px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }

/* Hide the browser's number-input spinner buttons globally. `type="number"`
   still gives us numeric keyboard on mobile and rejects non-digits, we just
   want the field to look like any other text input. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ── FLASH ──────────────────────────────────────────────── */
.flash { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.flash-success { background: var(--green-bg); color: var(--green-dark); border: 1px solid var(--green-border); }
.flash-error   { background: var(--red-bg);   color: #b91c1c;           border: 1px solid #fecaca; }
.flash-info    { background: var(--blue-bg);  color: var(--blue-dark);  border: 1px solid var(--blue-border); }

/* ── BANNERS (inline page-level alerts) ─────────────────── */
/* Use these instead of writing inline yellow/red boxes by hand. */
.banner {
  border-radius: 10px; padding: 12px 18px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent; flex-wrap: wrap;
}
.banner .banner-msg { flex: 1; min-width: 220px; line-height: 1.5; }
.banner .banner-cta {
  padding: 6px 14px; border-radius: 6px; font-size: 12px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.banner-warning {
  background: var(--yellow-bg); color: var(--yellow-dark);
  border-color: var(--yellow-border);
}
.banner-warning .banner-cta { background: var(--yellow); color: var(--white); }
.banner-error {
  background: var(--red-bg); color: var(--red-dark);
  border-color: var(--red-border);
}
.banner-error .banner-cta { background: var(--red); color: var(--white); }
.banner-info {
  background: var(--blue-bg); color: var(--blue-dark);
  border-color: var(--blue-border);
}
.banner-info .banner-cta { background: var(--blue); color: var(--white); }
.banner-success {
  background: var(--green-bg); color: var(--green-dark);
  border-color: var(--green-border);
}
.banner-success .banner-cta { background: var(--green); color: var(--white); }

/* ── INFO BOX (callout panel inside cards / modals) ─────── */
.info-box {
  background: var(--gray1); border-left: 3px solid var(--gold);
  border-radius: 6px; padding: 12px 14px; font-size: 13px;
  color: var(--dark); margin: 10px 0 18px;
}
.info-box strong { color: var(--navy); }

/* ── INFO ROW (key/value list inside cards) ─────────────── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--gray2);
  font-size: 13.5px; gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--gray4); }
.info-row .v { color: var(--dark); font-weight: 500; }
.info-row .v.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 24px;
  color: var(--gray4); font-size: 13.5px;
}
.empty-state .empty-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px; color: var(--navy); margin-bottom: 6px;
}

/* ── MODAL (centered card on dim backdrop) ──────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,31,61,0.55);
  z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--white); border-radius: 14px;
  width: 100%; max-width: 460px; padding: 28px;
  box-shadow: 0 20px 60px rgba(15,31,61,0.25);
}
.modal-card h3 {
  font-family: 'DM Serif Display', serif; font-size: 22px;
  color: var(--navy); margin-bottom: 8px;
}
.modal-card p {
  font-size: 13.5px; color: var(--dark); line-height: 1.6;
  margin-bottom: 12px;
}
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}

/* ── SECTION DIVIDER ────────────────────────────────────── */
.section-title {
  font-size: 11px; font-weight: 600; color: var(--gray4);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 28px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--gray2);
}

/* ── AMOUNT / COMPANY / VARIANCE TAGS ───────────────────── */
.amount-pos  { color: var(--green); font-weight: 600; }
.amount-neg  { color: var(--red);   font-weight: 600; }
.amount-zero { color: var(--green); font-weight: 600; }

.co-intermex { color: var(--blue-dark); font-weight: 600; }
.co-maxi     { color: #7c3aed;          font-weight: 600; }
.co-barri    { color: #0891b2;          font-weight: 600; }

.var-ok  { color: var(--green); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.var-bad { color: var(--red);   font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* ── LAYOUT UTILITIES ───────────────────────────────────── */
/* Using minmax(0, 1fr) instead of plain 1fr so a grid item with a wide
   child (e.g. the Money Transfers table on the Daily Book, whose input
   cells force ~720px of min-content) cannot expand its track past its
   proportional share. Without the minmax, the track blows out the whole
   grid past the viewport, body { overflow-x: hidden } silently clips
   everything, and the user sees the right column appear "cut off". */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
/* The tracks are capped, but grid ITEMS still default to min-width: auto,
   which lets them visually overflow their track when they contain wide
   content. Force every grid item to allow shrinking to 0. Without this,
   the Daily Book's right column (MT table, 6 inputs of 110px each)
   visibly spilled past its card edge even after the minmax fix. */
.grid-2 > *, .grid-3 > *, .form-grid > * { min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.justify-between { justify-content: space-between; } .ml-auto { margin-left: auto; }
.text-sm { font-size: 12px; } .text-muted { color: var(--gray4); } .text-right { text-align: right; }
.fw-600 { font-weight: 600; } .font-mono { font-family: 'JetBrains Mono', monospace; }

/* ── MOBILE NAV TOGGLE ──────────────────────────────────── */
.menu-toggle {
  display: none;
  background: transparent; border: none; cursor: pointer;
  padding: 8px; margin-right: 8px; border-radius: 6px;
  color: var(--navy);
}
.menu-toggle:hover { background: var(--gray1); }
.menu-toggle svg { display: block; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(15,31,61,0.5); z-index: 99;
}
.sidebar-close {
  display: none;
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: none; cursor: pointer;
  color: rgba(255,255,255,0.6); font-size: 24px; line-height: 1;
  padding: 4px 10px; border-radius: 6px;
}
.sidebar-close:hover { color: white; background: rgba(255,255,255,0.08); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  body.nav-open .sidebar-backdrop { display: block; }
  body.nav-open { overflow: hidden; }

  .main { margin-left: 0; width: 100%; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .topbar { padding: 0 16px; height: 56px; }
  .topbar-title { font-size: 17px; }
  .topbar-date { font-size: 11px; }
  .content { padding: 16px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 24px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; gap: 14px; }
  .field.span-2 { grid-column: span 1; }

  .card-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .card-body { padding: 16px; }

  thead th { padding: 10px 12px; font-size: 10px; }
  tbody td { padding: 10px 12px; font-size: 13px; }

  .btn { padding: 10px 16px; font-size: 13.5px; }
  .section-title { margin: 20px 0 10px; }

  /* Section-box rows (Daily Book / Monthly P&L) — switch to Grid so
     long labels can never push the input past the section-box edge
     (which is what kept clipping Daily Book inputs on phones). The
     minmax(0, 1fr) first track guarantees the label can shrink to 0
     without overflow, and the fixed second track locks the input
     width. Same rule applies at <=480px too (see 480 block below). */
  .sb-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
  }
  .sb-label { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
  .sb-input { width: 100%; min-width: 0; max-width: none; }
  .sb-input input {
    width: 100%; min-width: 0; max-width: 100%;
    font-size: 15px; padding: 8px 10px; text-align: right;
  }

  /* Money Transfer table — shrink inputs; the wrapping .table-wrap gives
     horizontal scroll for the full 6-column grid on narrow screens. */
  .mt-table { font-size: 12px; min-width: 560px; }
  .mt-table th, .mt-table td { padding: 6px 8px; }
  .mt-table td input { width: 80px; font-size: 14px; padding: 6px 7px; }

  /* Tab bar — horizontal scroll beats wrapping for a strip of pill links. */
  .tab-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-link { white-space: nowrap; flex: 0 0 auto; padding: 10px 14px; }

  /* Sticky save bar — allow the primary + cancel to stack / fill width. */
  .sticky-save-bar { flex-wrap: wrap; padding: 12px 0; }
  .sticky-save-bar .btn { flex: 1 1 140px; justify-content: center; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-date { display: none; }
  .topbar-title { font-size: 16px; }
  .content { padding: 12px; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .stat-value { font-size: 22px; }
  .btn { padding: 10px 14px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }

  /* Switch .sb-row from flex to CSS Grid on phones. Grid enforces the
     two track widths absolutely — unlike flex, the label can't push
     the input past the section-box right edge no matter how long the
     label text or how narrow the viewport. Daily Book was clipping the
     input with flex because <input type="number">'s browser-default
     intrinsic size + the label's min-content were fighting for space. */
  .sb-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }
  .sb-label {
    font-size: 13px; font-weight: 500;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .sb-input {
    width: 100%; min-width: 0; max-width: none;
  }
  .sb-input input {
    width: 100%; min-width: 0; max-width: 100%;
    text-align: right; padding: 9px 10px; font-size: 15px;
    border-width: 1.5px;
  }
  /* Totals row — bump the readout font so the day's total pops. */
  .sb-row.sb-total .sb-input { font-size: 15px; font-weight: 700; }

  /* Sticky save bar — stack the primary + secondary button so the
     "Save Daily Report" text never wraps mid-word next to a narrow
     Cancel. Full-width buttons also give thumb-friendly tap targets. */
  .sticky-save-bar {
    flex-direction: column; align-items: stretch;
    padding: 12px; gap: 10px;
    /* Honor iOS home-indicator safe area when pinned to the bottom. */
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    /* Bleed into the content padding so the bar spans edge-to-edge. */
    margin: 8px -12px 0;
  }
  .sticky-save-bar .btn {
    /* Reset the `flex: 1 1 140px` from the 900px rule — with
       flex-direction:column above, flex-grow would now stretch buttons
       VERTICALLY to fill the bar, producing gigantic tap targets. */
    flex: 0 0 auto;
    width: 100%; justify-content: center;
    padding: 14px 16px; font-size: 15px;
  }
}

/* Touch-friendly inputs (prevents iOS zoom on focus). */
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; padding: 11px 13px; }
}

/* ── THEME TOGGLE BUTTON ────────────────────────────────── */
.theme-toggle {
  background: transparent; border: 1px solid var(--gray2);
  color: var(--gray4); width: 34px; height: 34px;
  border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.theme-toggle:hover { color: var(--navy); border-color: var(--gray3); }
.theme-toggle svg { display: block; width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun  { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ── REFERRAL CROWN (topbar) ─────────────────────────────
   Only rendered when the context processor set my_referral_code —
   admin + paid plan. Shares .user-menu for the dropdown positioning so
   clicks outside close it using the same handler. */
.ref-crown {
  position: relative;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  color: var(--navy); border: 2px solid var(--gray2);
  border-radius: 999px; height: 36px; padding: 0 12px 0 8px;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 12px; letter-spacing: 0.4px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, transform 0.15s;
}
.ref-crown:hover { border-color: var(--gold); }
.ref-crown:active { transform: scale(0.97); }
.ref-crown .crown { width: 18px; height: 18px; display: block; }
.ref-crown .ref-badge { line-height: 1; }
[data-theme="dark"] .ref-crown { border-color: #2a3044; color: #0f1f3d; }
.ref-dropdown { min-width: 280px; }

/* Crown dropdown body — uses semantic tokens so the code stays visible
   in dark mode (the previous version hardcoded var(--navy), which is a
   fixed dark-blue and disappeared against the dark dropdown surface). */
.ref-info { padding: 14px 16px; }
.ref-info-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.ref-info-hint {
  font-size: 12px; color: var(--text-muted);
  margin-top: 8px; line-height: 1.5;
}
.ref-info-hint strong { color: var(--text); }
.ref-code-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}
.ref-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; letter-spacing: 2px;
  color: var(--text);
  flex: 1; min-width: 0;
  word-break: break-all;
}
/* Inline copy button — small icon-only square that sits next to the
   code instead of taking its own row in the dropdown. */
.ref-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.ref-copy:hover {
  color: var(--blue); border-color: var(--blue);
  background: var(--blue-bg);
}
.ref-copy.copied {
  color: var(--green-dark); border-color: var(--green);
  background: var(--green-bg);
}
[data-theme="dark"] .ref-copy { color: #c9d0dd; border-color: #3a4054; }
[data-theme="dark"] .ref-copy:hover {
  color: #93c5fd; border-color: #3b82f6; background: #0f1d3f;
}
[data-theme="dark"] .ref-copy.copied {
  color: #86efac; border-color: #15803d; background: #0f2e1f;
}

/* ── USER AVATAR + DROPDOWN ─────────────────────────────── */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  color: var(--navy); border: 2px solid var(--gray2);
  font-weight: 700; font-size: 12px; letter-spacing: 0.5px;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.user-avatar:hover { border-color: var(--gold); }
.user-avatar:active { transform: scale(0.96); }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px;
  background: var(--white); border: 1px solid var(--gray2);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(15,31,61,0.15);
  z-index: 200; overflow: hidden;
}
.user-dropdown[hidden] { display: none; }
.user-dropdown .user-info { padding: 14px 16px; border-bottom: 1px solid var(--gray2); }
.user-dropdown .user-info .nm {
  font-weight: 600; font-size: 14px; color: var(--navy);
  line-height: 1.2; word-break: break-word;
}
.user-dropdown .user-info .rl {
  font-size: 11px; color: var(--gold); margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
}
.user-dropdown .dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13.5px;
  color: var(--dark); text-decoration: none;
  transition: background 0.1s;
}
.user-dropdown .dropdown-item:hover { background: var(--gray1); color: var(--red); }
.user-dropdown .dropdown-item .icon { font-size: 15px; }

/* ============================================================
 * DARK MODE
 * Toggled via [data-theme="dark"] on <html>. All overrides live
 * here so adding a new component = one light rule + one dark rule.
 * ============================================================ */
[data-theme="dark"] html,
[data-theme="dark"] body { background: var(--db-bg); color: var(--db-gray-9); font-family: var(--db-font-body); }
[data-theme="dark"] .main { background: var(--db-bg); }
[data-theme="dark"] .topbar { background: var(--db-bg); border-bottom-color: var(--db-gray-2); }
[data-theme="dark"] .topbar-title { color: var(--db-gray-9); font-family: var(--db-font-display); font-weight: 600; letter-spacing: -0.02em; }
[data-theme="dark"] .topbar-date { color: var(--db-gray-6); font-family: var(--db-font-mono); }
[data-theme="dark"] .menu-toggle { color: var(--db-gray-7); border-color: var(--db-gray-2); background: var(--db-bg-input); }
[data-theme="dark"] .menu-toggle:hover { color: var(--db-gray-9); background: var(--db-bg-popover); }
[data-theme="dark"] .theme-toggle { border-color: var(--db-gray-3); color: var(--db-gray-7); }
[data-theme="dark"] .theme-toggle:hover { color: var(--db-neon); border-color: var(--db-neon); background: rgba(255,255,255,0.02); }

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card { background: var(--db-bg-elevated); border-color: var(--db-gray-3); }
[data-theme="dark"] .card-header { border-bottom-color: var(--db-gray-2); }
[data-theme="dark"] .card-title { color: var(--db-gray-9); font-family: var(--db-font-display); font-weight: 600; letter-spacing: -0.01em; }
[data-theme="dark"] .stat-value { color: var(--db-gray-9); font-family: var(--db-font-display); font-weight: 600; letter-spacing: -0.02em; }
[data-theme="dark"] .stat-label { color: var(--db-gray-6); font-family: var(--db-font-mono); text-transform: uppercase; letter-spacing: 1.2px; }
[data-theme="dark"] .stat-sub { color: var(--db-gray-6); }
[data-theme="dark"] .stat-card::before { display: none; } /* retire legacy gold top-stripe */

[data-theme="dark"] thead th { background: var(--db-bg-input); color: var(--db-gray-6); border-bottom-color: var(--db-gray-3); font-family: var(--db-font-mono); text-transform: uppercase; letter-spacing: 1.2px; }
[data-theme="dark"] tbody tr { border-bottom-color: var(--db-gray-2); }
[data-theme="dark"] tbody tr:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] tbody td { color: var(--db-gray-9); }

[data-theme="dark"] label { color: var(--db-gray-6); font-family: var(--db-font-mono); text-transform: uppercase; letter-spacing: 1.5px; font-size: 10.5px; font-weight: 500; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--db-bg-input);
  color: var(--db-gray-9);
  border-color: var(--db-gray-3);
  font-family: var(--db-font-body);
}
[data-theme="dark"] .sb-input input[readonly],
[data-theme="dark"] input[readonly] {
  background: var(--db-bg);
  color: var(--db-gray-7);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--db-gray-5); }
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus { border-color: var(--db-neon); box-shadow: 0 0 0 3px var(--db-neon-glow-15); }

[data-theme="dark"] .btn-outline { color: var(--db-gray-9); border-color: var(--db-gray-4); background: transparent; }
[data-theme="dark"] .btn-outline:hover { border-color: var(--db-neon); color: var(--db-neon); background: rgba(255,255,255,0.02); }

[data-theme="dark"] .section-title { color: var(--db-neon); border-bottom-color: var(--db-gray-2); font-family: var(--db-font-mono); text-transform: uppercase; letter-spacing: 1.5px; }
[data-theme="dark"] .text-muted { color: var(--db-gray-7); }

[data-theme="dark"] .badge-gray  { background: var(--db-bg-input); color: var(--db-gray-7); border: 1px solid var(--db-gray-3); }
[data-theme="dark"] .badge-green { background: rgba(63,255,0,0.10);  color: var(--db-neon);     border: 1px solid rgba(63,255,0,0.30); }
[data-theme="dark"] .badge-red   { background: rgba(255,77,109,0.10); color: var(--db-negative); border: 1px solid rgba(255,77,109,0.30); }
[data-theme="dark"] .badge-yellow{ background: rgba(255,176,32,0.10); color: var(--db-warning);  border: 1px solid rgba(255,176,32,0.30); }
[data-theme="dark"] .badge-orange{ background: rgba(255,176,32,0.10); color: var(--db-warning);  border: 1px solid rgba(255,176,32,0.30); }
[data-theme="dark"] .badge-blue  { background: rgba(94,169,255,0.10); color: var(--db-info);     border: 1px solid rgba(94,169,255,0.30); }
[data-theme="dark"] .badge-navy  { background: var(--db-bg-popover);  color: var(--db-neon);     border: 1px solid rgba(63,255,0,0.25); }

[data-theme="dark"] .flash-success { background: rgba(63,255,0,0.08);   color: var(--db-neon);    border-color: rgba(63,255,0,0.30); }
[data-theme="dark"] .flash-error   { background: rgba(255,77,109,0.08); color: var(--db-negative); border-color: rgba(255,77,109,0.30); }
[data-theme="dark"] .flash-info    { background: rgba(94,169,255,0.08); color: var(--db-info);    border-color: rgba(94,169,255,0.30); }

[data-theme="dark"] .banner-warning { background: rgba(255,176,32,0.08); color: var(--db-warning);  border-color: rgba(255,176,32,0.30); }
[data-theme="dark"] .banner-error   { background: rgba(255,77,109,0.08); color: var(--db-negative); border-color: rgba(255,77,109,0.30); }
[data-theme="dark"] .banner-info    { background: rgba(94,169,255,0.08); color: var(--db-info);    border-color: rgba(94,169,255,0.30); }
[data-theme="dark"] .banner-success { background: rgba(63,255,0,0.08);   color: var(--db-neon);    border-color: rgba(63,255,0,0.30); }

[data-theme="dark"] .info-box { background: var(--db-bg-input); color: var(--db-gray-9); border-color: var(--db-gray-3); }
[data-theme="dark"] .info-box strong { color: var(--db-gray-9); }
[data-theme="dark"] .info-row { border-bottom-color: var(--db-gray-2); }
[data-theme="dark"] .info-row .v { color: var(--db-gray-9); }
[data-theme="dark"] .empty-state { color: var(--db-gray-7); }
[data-theme="dark"] .empty-state .empty-title { color: var(--db-gray-9); font-family: var(--db-font-display); }
[data-theme="dark"] .modal-card { background: var(--db-bg-elevated); border: 1px solid var(--db-gray-3); }
[data-theme="dark"] .modal-card h3 { color: var(--db-gray-9); font-family: var(--db-font-display); }
[data-theme="dark"] .modal-card p  { color: var(--db-gray-8); }

[data-theme="dark"] .co-intermex { color: var(--db-co-intermex); }
[data-theme="dark"] .co-maxi     { color: var(--db-co-maxi); }
[data-theme="dark"] .co-barri    { color: var(--db-co-barri); }
[data-theme="dark"] .amount-pos,
[data-theme="dark"] .amount-zero { color: var(--db-neon); }
[data-theme="dark"] .amount-neg  { color: var(--db-negative); }
[data-theme="dark"] .var-ok  { color: var(--db-neon); font-family: var(--db-font-mono); }
[data-theme="dark"] .var-bad { color: var(--db-negative); font-family: var(--db-font-mono); }

[data-theme="dark"] .user-avatar { border: none; }
[data-theme="dark"] .user-avatar:hover { box-shadow: 0 0 0 1px var(--db-neon), 0 0 12px var(--db-neon-glow-25); }
[data-theme="dark"] .user-dropdown { background: var(--db-bg-popover); border-color: var(--db-gray-3); box-shadow: 0 12px 32px rgba(0,0,0,0.55); }
[data-theme="dark"] .user-dropdown .user-info { border-bottom-color: var(--db-gray-3); }
[data-theme="dark"] .user-dropdown .user-info .nm { color: var(--db-gray-9); }
[data-theme="dark"] .user-dropdown .dropdown-item { color: var(--db-gray-9); }
[data-theme="dark"] .user-dropdown .dropdown-item:hover { background: rgba(255,255,255,0.04); color: var(--db-neon); }
