/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Roboto', system-ui, sans-serif;
  background: #f8fafc;
  transition: background .2s;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body.dark           { background: #0d1117; }
body.theme-light    { background: #f0f4ff; }
body.theme-dark     { background: #0d1117; }
body.theme-midnight { background: #0e0b1e; }
body.theme-forest   { background: #071c12; }
body.theme-sand     { background: #fef9f0; }
body.theme-ocean    { background: #030f1c; }
body.theme-sunset   { background: #fff7f0; }
body.theme-steel    { background: #111318; }
body.theme-rosegold { background: #fff5f7; }
body.theme-cyberpunk{ background: #04000a; }
body.theme-lemon    { background: #fefce8; }

/* Scrollbars per dark theme */
body.theme-dark     ::-webkit-scrollbar-track { background: #161b22; }
body.theme-dark     ::-webkit-scrollbar-thumb { background: #30363d; }
body.theme-midnight ::-webkit-scrollbar-track { background: #17122e; }
body.theme-midnight ::-webkit-scrollbar-thumb { background: #2d2650; }
body.theme-forest   ::-webkit-scrollbar-track { background: #0d2b1b; }
body.theme-forest   ::-webkit-scrollbar-thumb { background: #1a3f28; }
body.theme-ocean    ::-webkit-scrollbar-track { background: #071e35; }
body.theme-ocean    ::-webkit-scrollbar-thumb { background: #0e3358; }
body.theme-steel    ::-webkit-scrollbar-track { background: #1a1d24; }
body.theme-steel    ::-webkit-scrollbar-thumb { background: #2a2f3e; }
body.theme-cyberpunk::-webkit-scrollbar-track { background: #0a0018; }
body.theme-cyberpunk::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#ff00ff,#00ffff); }
input, select, textarea, button { font-family: inherit; }

/* ── Scrollbars ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
body.dark ::-webkit-scrollbar-track { background: #1e293b; }
body.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* ── Sidebar overlay ──────────────────────────────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 19; }
.sidebar-overlay.open { display: block; }

/* ══════════════════════════════════════════════════════
   DESKTOP  (> 768 px)
══════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .main-content          { margin-left: 260px; padding: 28px; }
  .stat-grid             { grid-template-columns: repeat(4, 1fr) !important; }
  .analytics-grid        { grid-template-columns: 1fr 1fr !important; }
  .form-grid             { grid-template-columns: 1fr 1fr !important; }
  /* hide mobile-only elements */
  .m-header              { display: none !important; }
  .m-bottom-nav          { display: none !important; }
  .m-fab                 { display: none !important; }
  .m-cards               { display: none !important; }
  .m-search-bar          { display: none !important; }
  .m-pagination          { display: none !important; }
  /* always show desktop elements */
  .d-only                { display: flex !important; }
  .d-table-wrap          { display: block !important; }
}

/* ══════════════════════════════════════════════════════
   MOBILE  (≤ 768 px)
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Root layout ── */
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    padding-bottom: 68px !important; /* room for bottom nav */
  }

  /* ── Sidebar slides in ── */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 20 !important;
  }
  .sidebar.open { transform: translateX(0); }

  /* ── Hide desktop-only UI ── */
  .d-only         { display: none !important; }
  .d-table-wrap   { display: none !important; }

  /* ── Grids ── */
  .stat-grid      { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .analytics-grid { grid-template-columns: 1fr !important; }
  .form-grid      { grid-template-columns: 1fr !important; }

  /* ════════════════════════════════════
     STICKY TOP HEADER
  ════════════════════════════════════ */
  .m-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    height: 56px;
    background: #0f172a;
    box-shadow: 0 2px 16px rgba(0,0,0,.35);
    flex-shrink: 0;
  }
  .m-header-left  { display: flex; align-items: center; gap: 10px; }
  .m-header-brand { line-height: 1.15; }
  .m-header-brand-name { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
  .m-header-brand-sub  { font-size: 9px; font-weight: 700; color: #6366f1; letter-spacing: .1em; text-transform: uppercase; }
  .m-header-right { display: flex; align-items: center; gap: 6px; }

  .m-icon-btn {
    width: 36px; height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,.09);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s;
  }
  .m-icon-btn:active { background: rgba(255,255,255,.18); }
  .m-icon-btn img { width: 18px; height: 18px; }

  .m-menu-btn {
    width: 36px; height: 36px;
    border: none; border-radius: 10px;
    background: rgba(255,255,255,.09);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-menu-btn span {
    display: block; width: 16px; height: 2px;
    background: #fff; border-radius: 2px;
  }

  /* company pill in header */
  .m-company-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(99,102,241,.25);
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-company-pill select {
    background: transparent;
    border: none;
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23a5b4fc'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0px center;
  }

  /* ════════════════════════════════════
     SEARCH BAR (below header)
  ════════════════════════════════════ */
  .m-search-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px 6px;
  }
  .m-search-bar input {
    width: 100%;
    font-size: 14px !important;
    padding: 11px 14px !important;
    border-radius: 12px !important;
  }
  .m-filters-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .m-filters-row::-webkit-scrollbar { display: none; }
  .m-filters-row select {
    flex-shrink: 0;
    font-size: 11px !important;
    padding: 7px 10px !important;
    border-radius: 20px !important;
    white-space: nowrap;
  }

  /* ════════════════════════════════════
     STAT CARDS
  ════════════════════════════════════ */
  .stat-grid {
    padding: 10px 14px !important;
    margin-bottom: 0 !important;
  }

  /* ════════════════════════════════════
     INVOICE CARDS
  ════════════════════════════════════ */
  .m-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px 4px;
  }

  .m-inv-card {
    border-radius: 16px;
    padding: 14px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.09);
    border-left: 4px solid #eab308;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s;
    overflow: hidden;
    position: relative;
  }
  .m-inv-card:active { transform: scale(.982); }

  .m-inv-card-r1 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
  }
  .m-inv-num {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-inv-amount {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: #6366f1;
    flex-shrink: 0;
  }
  .m-inv-supplier {
    font-size: 12px;
    font-weight: 500;
    opacity: .6;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-inv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 11px;
  }
  .m-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
    line-height: 1.4;
  }
  .m-inv-actions {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.07);
  }
  body.dark .m-inv-actions { border-top-color: rgba(255,255,255,.07); }

  .m-act-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 10px;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-act-btn img { width: 14px; height: 14px; }

  /* ════════════════════════════════════
     PAGINATION
  ════════════════════════════════════ */
  .m-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 4px;
    gap: 8px;
  }
  .m-page-btn {
    padding: 9px 18px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-page-info {
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
  }

  /* ════════════════════════════════════
     BOTTOM NAV BAR
  ════════════════════════════════════ */
  .m-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 15;
    display: flex;
    align-items: stretch;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 -4px 20px rgba(0,0,0,.35);
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .m-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #475569;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 8px 2px 6px;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s;
  }
  .m-nav-btn.active { color: #6366f1; }
  .m-nav-btn img { width: 20px; height: 20px; opacity: .4; transition: opacity .15s; }
  .m-nav-btn.active img { opacity: 1; }

  /* ════════════════════════════════════
     FAB
  ════════════════════════════════════ */
  .m-fab {
    position: fixed;
    bottom: calc(68px + env(safe-area-inset-bottom));
    right: 18px;
    z-index: 16;
    width: 52px; height: 52px;
    border-radius: 16px;
    background: #6366f1;
    border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 22px rgba(99,102,241,.55);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s;
  }
  .m-fab:active { transform: scale(.9); }
  .m-fab img { width: 24px; height: 24px; filter: brightness(0) invert(1); }

  /* ════════════════════════════════════
     TOAST above bottom nav
  ════════════════════════════════════ */
  .m-toast-fix {
    bottom: 70px !important;
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    text-align: center;
    border-radius: 14px !important;
    font-size: 13px !important;
  }

  /* ════════════════════════════════════
     MODAL as bottom sheet
  ════════════════════════════════════ */
  .m-modal-wrap  { align-items: flex-end !important; }
  .m-modal-inner {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 92vh !important;
  }

  /* history / suppliers inner padding */
  .inner-pad { padding: 14px !important; }
}

/* ══════════════════════════════════════════════════════
   VERY SMALL PHONES  (≤ 380 px)
══════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .m-inv-num    { font-size: 13px; }
  .m-inv-amount { font-size: 12px; }
  .m-nav-btn    { font-size: 8px; }
}

.row-has-comment {
  background-color: rgba(99, 102, 241, 0.05) !important; /* Very light indigo */
}



/* Style for a small comment indicator icon/dot */
.comment-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #6366f1;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

@font-face {
  font-family: 'Orbitron';
  src: url('/static/public/fonts/Orbitron-VariableFont_wght.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;   /* ← important for good loading feel */
}

@font-face {
  font-family: 'Ryzes';
  src: url('/static/public/fonts/Ryzes.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;   /* ← important for good loading feel */
}


@font-face {
  font-family: 'Audiowide';
  src: url('/static/public/fonts/Audiowide-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;   /* ← important for good loading feel */
}

/* ── Cyberpunk: force Orbitron on ALL text including inline-styled elements ── */
body.theme-cyberpunk,
body.theme-cyberpunk * {
  font-family: 'Audiowide', monospace !important;
  letter-spacing: 0.03em;
}

/* ── Cyberpunk: GlobalFlow title uses Orbitron — override Audiowide blanket ── */
body.theme-cyberpunk [style*="Ryzes"] {
  font-family: 'Ryzes', monospace !important;
}

/* ══════════════════════════════════════════════════════
   CYBERPUNK THEME — Full neon overhaul
══════════════════════════════════════════════════════ */

/* ── Animated scanline overlay on body ── */
body.theme-cyberpunk::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.015) 2px,
    rgba(0, 255, 255, 0.015) 4px
  );
}

/* ── Animated neon background ── */
body.theme-cyberpunk {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(102,0,170,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,255,255,0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 80%, rgba(255,0,255,0.08) 0%, transparent 40%),
    #04000a !important;
}

/* ── Cards — neon border glow ── */
body.theme-cyberpunk .sidebar,
body.theme-cyberpunk [style*="background:#0d0020"],
body.theme-cyberpunk [style*="background: #0d0020"] {
  border: 1px solid rgba(102, 0, 170, 0.4);
}

/* ── Table header — animated neon gradient ── */
body.theme-cyberpunk thead tr,
body.theme-cyberpunk [style*="background:#12002a"],
body.theme-cyberpunk [style*="background: #12002a"] {
  background: linear-gradient(90deg, #0d0020, #1a003a, #0a001a) !important;
  border-bottom: 2px solid #00ffff !important;
}

/* ── Table rows — neon left accent on hover ── */
body.theme-cyberpunk tbody tr:hover td {
  background: #1a003a !important;
  border-left: 2px solid #ff00ff;
}

/* ── Scrollbars — neon ── */
body.theme-cyberpunk ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff00ff, #00ffff) !important;
  border-radius: 3px;
}

/* ── Input fields — neon border glow ── */
body.theme-cyberpunk input,
body.theme-cyberpunk select,
body.theme-cyberpunk textarea {
  border-color: #6600aa !important;
  box-shadow: 0 0 6px rgba(102, 0, 170, 0.4) !important;
  caret-color: #00ffff;
}
body.theme-cyberpunk input:focus,
body.theme-cyberpunk select:focus,
body.theme-cyberpunk textarea:focus {
  border-color: #00ffff !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.5) !important;
  outline: none !important;
}

/* ── Buttons — neon ── */
body.theme-cyberpunk button {
  border-color: #6600aa !important;
  box-shadow: 0 0 8px rgba(102, 0, 170, 0.3);
  transition: all 0.15s !important;
}
body.theme-cyberpunk button:hover {
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.5) !important;
  border-color: #00ffff !important;
}

/* ── Primary indigo buttons → neon magenta ── */
body.theme-cyberpunk button[style*="background:#6366f1"],
body.theme-cyberpunk button[style*="background: #6366f1"] {
  background: linear-gradient(135deg, #cc00ff, #6600aa) !important;
  border: 1px solid #ff00ff !important;
  box-shadow: 0 0 14px rgba(255, 0, 255, 0.5) !important;
  color: #fff !important;
}

/* ── Stat cards ── */
body.theme-cyberpunk .stat-grid > div,
body.theme-cyberpunk [style*="border-radius:16px"],
body.theme-cyberpunk [style*="border-radius: 16px"] {
  border: 1px solid rgba(102, 0, 170, 0.5) !important;
  box-shadow: 0 0 20px rgba(102, 0, 170, 0.2), inset 0 0 20px rgba(0,0,0,0.3) !important;
}

/* ── Sidebar nav items ── */
body.theme-cyberpunk .sidebar div[style*="rgba(255,255,255,.08)"] {
  background: rgba(0, 255, 255, 0.08) !important;
  border-left: 2px solid #00ffff;
}

/* ── Modal/card overlays ── */
body.theme-cyberpunk [style*="position:'fixed'"],
body.theme-cyberpunk [style*="position: fixed"] {
  backdrop-filter: blur(4px) !important;
}

/* ── Monospace numbers — neon cyan ── */
body.theme-cyberpunk [style*="Roboto Mono"],
body.theme-cyberpunk [style*="'Roboto Mono'"] {
  color: #00ffff !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* ── Active nav items ── */
body.theme-cyberpunk .m-nav-btn.active {
  color: #00ffff !important;
  text-shadow: 0 0 8px #00ffff;
}
body.theme-cyberpunk .m-nav-btn.active img {
  filter: drop-shadow(0 0 4px #00ffff);
}

/* ── Theme swatch active ── */
body.theme-cyberpunk button[style*="border: theme===k"] {
  box-shadow: 0 0 10px #ff00ff;
}

@font-face {
  font-family: 'Grow West';
  src: url('/static/public/fonts/GrowWestRegular-vm1qA.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ══════════════════════════════════════════════════════
   FOREST THEME — immersive canopy overhaul
══════════════════════════════════════════════════════ */

body.theme-forest { background: #050e07; }

/* Subtle forest canopy overlay — light filtering through leaves */
body.theme-forest::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 10%, rgba(74,222,128,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 5%,  rgba(34,197,94,0.03) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 0%,  rgba(163,230,53,0.03) 0%, transparent 60%);
}

/* Table headers — dark bark texture feel */
body.theme-forest thead tr {
  background: linear-gradient(90deg, #0a1a0d, #0d2410, #091507) !important;
  border-bottom: 2px solid #1a4d22 !important;
}

/* Row hover — dappled light effect */
body.theme-forest tbody tr:hover td {
  background: #122b16 !important;
  border-left: 3px solid #4ade80;
}

/* Scrollbars — mossy green */
body.theme-forest ::-webkit-scrollbar-track { background: #060d07 !important; }
body.theme-forest ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2d7a3e, #4ade80) !important;
  border-radius: 3px;
}

/* Inputs — forest floor */
body.theme-forest input,
body.theme-forest select,
body.theme-forest textarea {
  border-color: #1a4d22 !important;
  box-shadow: 0 0 6px rgba(74,222,128,0.1) !important;
}
body.theme-forest input:focus,
body.theme-forest select:focus,
body.theme-forest textarea:focus {
  border-color: #4ade80 !important;
  box-shadow: 0 0 12px rgba(74,222,128,0.3) !important;
}

/* Primary buttons → forest green */
body.theme-forest button[style*="background:#6366f1"],
body.theme-forest button[style*="background: #6366f1"] {
  background: linear-gradient(135deg, #166534, #15803d) !important;
  border: 1px solid #4ade80 !important;
  box-shadow: 0 0 10px rgba(74,222,128,0.2) !important;
  color: #d4f1bc !important;
}

/* Cards — dark moss */
body.theme-forest [style*="border-radius:16px"],
body.theme-forest [style*="border-radius: 16px"] {
  border: 1px solid rgba(26,77,34,0.6) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(74,222,128,0.05) !important;
}

/* Monospace numbers — leaf green */
body.theme-forest [style*="Roboto Mono"],
body.theme-forest [style*="'Roboto Mono'"] {
  color: #86efac !important;
}


body.theme-forest [style*="Grow West"] {
  font-family: 'Grow West', serif !important;
}

@font-face {
  font-family: 'Lost Fish';
  src: url('/static/public/fonts/LostFish.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ══════════════════════════════════════════════════════
   OCEAN THEME — deep sea immersion
══════════════════════════════════════════════════════ */

body.theme-ocean { background: #010d18; }

/* Bioluminescent depth overlay */
body.theme-ocean::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(6,182,212,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(14,165,233,0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(34,211,238,0.04) 0%, transparent 40%);
}

/* Table headers — deep trench */
body.theme-ocean thead tr {
  background: linear-gradient(90deg, #021828, #031e30, #011220) !important;
  border-bottom: 2px solid #0e4d7a !important;
}

/* Row hover — surface light */
body.theme-ocean tbody tr:hover td {
  background: #062840 !important;
  border-left: 3px solid #38bdf8;
}

/* Scrollbars — ocean current */
body.theme-ocean ::-webkit-scrollbar-track { background: #010d18 !important; }
body.theme-ocean ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0284c7, #22d3ee) !important;
  border-radius: 3px;
}

/* Inputs — underwater glow */
body.theme-ocean input,
body.theme-ocean select,
body.theme-ocean textarea {
  border-color: #0e4d7a !important;
  box-shadow: 0 0 6px rgba(14,165,233,0.15) !important;
}
body.theme-ocean input:focus,
body.theme-ocean select:focus,
body.theme-ocean textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56,189,248,0.35) !important;
}

/* Primary buttons → ocean blue */
body.theme-ocean button[style*="background:#6366f1"],
body.theme-ocean button[style*="background: #6366f1"] {
  background: linear-gradient(135deg, #0369a1, #0284c7) !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56,189,248,0.25) !important;
  color: #e0f7ff !important;
}

/* Cards */
body.theme-ocean [style*="border-radius:16px"],
body.theme-ocean [style*="border-radius: 16px"] {
  border: 1px solid rgba(14,77,122,0.5) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(56,189,248,0.05) !important;
}

/* Monospace numbers — seafoam */
body.theme-ocean [style*="Roboto Mono"],
body.theme-ocean [style*="'Roboto Mono'"] {
  color: #7dd3fc !important;
}

/* Ocean font title override */
body.theme-ocean [style*="Lost Fish"] {
  font-family: 'Lost Fish', serif !important;
}

@font-face {
  font-family: 'Fruit Loose';
  src: url('/static/public/fonts/Fruitloose.ttf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ══════════════════════════════════════════════════════
   SABLE/LEMON THEME — psychedelic citrus trip
══════════════════════════════════════════════════════ */

body.theme-sand { background: #e8d800; }

/* Psychedelic radial burst overlay */
body.theme-sand::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(45,110,0,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 90%, rgba(45,90,0,0.10) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(255,237,0,0.15) 0%, transparent 60%);
}

/* Table headers */
body.theme-sand thead tr {
  background: linear-gradient(90deg, #c4b800, #a8a000, #b5aa00) !important;
  border-bottom: 3px solid #2d6e00 !important;
}

/* Row hover */
body.theme-sand tbody tr:hover td {
  background: #ffed30 !important;
  border-left: 4px solid #2d6e00;
}

/* Scrollbars */
body.theme-sand ::-webkit-scrollbar-track { background: #d4ca00 !important; }
body.theme-sand ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2d6e00, #5a8a00) !important;
  border-radius: 3px;
}

/* Inputs */
body.theme-sand input,
body.theme-sand select,
body.theme-sand textarea {
  border-color: #8faa00 !important;
  background: #f5e800 !important;
  color: #1a3300 !important;
  box-shadow: 2px 2px 0 #2d6e00 !important;
}
body.theme-sand input:focus,
body.theme-sand select:focus,
body.theme-sand textarea:focus {
  border-color: #2d6e00 !important;
  box-shadow: 3px 3px 0 #1a4400 !important;
}

/* Primary buttons → psychedelic green */
body.theme-sand button[style*="background:#6366f1"],
body.theme-sand button[style*="background: #6366f1"] {
  background: #2d6e00 !important;
  border: 2px solid #1a4400 !important;
  box-shadow: 3px 3px 0 #1a4400 !important;
  color: #f9e000 !important;
}
body.theme-sand button[style*="background:#6366f1"]:hover,
body.theme-sand button[style*="background: #6366f1"]:hover {
  background: #3d8a00 !important;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #1a4400 !important;
}

/* Cards — bold flat shadow like 70s design */
body.theme-sand [style*="border-radius:16px"],
body.theme-sand [style*="border-radius: 16px"] {
  border: 2px solid #8faa00 !important;
  box-shadow: 4px 4px 0 #8faa00 !important;
}

/* Monospace numbers */
body.theme-sand [style*="Roboto Mono"],
body.theme-sand [style*="'Roboto Mono'"] {
  color: #1a3300 !important;
  font-weight: 700 !important;
}

/* LemonPopsicle title override */
body.theme-sand [style*="Fruit Loose"] {
  font-family: 'Fruit Loose', cursive !important;
}

/* ── Citron (lemon key) — same psychedelic treatment as sand ── */
body.theme-lemon { background: #e8d800; }
body.theme-lemon::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(45,110,0,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 90%, rgba(45,90,0,0.10) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(255,237,0,0.15) 0%, transparent 60%);
}
body.theme-lemon thead tr {
  background: linear-gradient(90deg, #c4b800, #a8a000, #b5aa00) !important;
  border-bottom: 3px solid #2d6e00 !important;
}
body.theme-lemon tbody tr:hover td {
  background: #ffed30 !important;
  border-left: 4px solid #2d6e00;
}
body.theme-lemon ::-webkit-scrollbar-track { background: #d4ca00 !important; }
body.theme-lemon ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2d6e00, #5a8a00) !important;
  border-radius: 3px;
}
body.theme-lemon input,
body.theme-lemon select,
body.theme-lemon textarea {
  border-color: #8faa00 !important;
  background: #f5e800 !important;
  color: #1a3300 !important;
  box-shadow: 2px 2px 0 #2d6e00 !important;
}
body.theme-lemon input:focus,
body.theme-lemon select:focus,
body.theme-lemon textarea:focus {
  border-color: #2d6e00 !important;
  box-shadow: 3px 3px 0 #1a4400 !important;
}
body.theme-lemon button[style*="background:#6366f1"],
body.theme-lemon button[style*="background: #6366f1"] {
  background: #2d6e00 !important;
  border: 2px solid #1a4400 !important;
  box-shadow: 3px 3px 0 #1a4400 !important;
  color: #f9e000 !important;
}
body.theme-lemon [style*="border-radius:16px"],
body.theme-lemon [style*="border-radius: 16px"] {
  border: 2px solid #8faa00 !important;
  box-shadow: 4px 4px 0 #8faa00 !important;
}
body.theme-lemon [style*="Roboto Mono"],
body.theme-lemon [style*="'Roboto Mono'"] {
  color: #1a3300 !important;
  font-weight: 700 !important;
}
body.theme-lemon #sheet-header [style*="Roboto Mono"],
body.theme-lemon #sheet-header [style*="'Roboto Mono'"],
body.theme-lemon #sidebar-total [style*="Roboto Mono"],
body.theme-lemon #sidebar-total [style*="'Roboto Mono'"] {
  color: #7fff00 !important;
}
body.theme-lemon [style*="Lemon Popsicle"] {
  font-family: 'Lemon Popsicle', cursive !important;
}
