/* ===== TurboText CRM — New Space Design Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f16;
  --surface: #121218;
  --surface-2: #17171f;
  --surface-3: #1c1c26;
  --border: #24242e;
  --border-2: #2e2e3a;
  --text: #f4f4f8;
  --text-2: #b5b5c2;
  --text-3: #7a7a88;
  --muted: #5a5a66;
  --accent: #e11d48;
  --accent-2: #f43f5e;
  --accent-soft: rgba(225,29,72,.12);
  --ring: rgba(225,29,72,.35);
  --good: #10b981;
  --good-soft: rgba(16,185,129,.14);
  --info: #3b82f6;
  --info-soft: rgba(59,130,246,.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245,158,11,.14);
}

html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* ===== Stars background ===== */
.stars-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.35), transparent 50%),
    radial-gradient(1px 1px at 22% 72%, rgba(255,255,255,.22), transparent 50%),
    radial-gradient(1.5px 1.5px at 38% 34%, rgba(255,255,255,.4), transparent 50%),
    radial-gradient(1px 1px at 51% 82%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(1px 1px at 67% 12%, rgba(255,255,255,.28), transparent 50%),
    radial-gradient(1.2px 1.2px at 78% 58%, rgba(255,255,255,.32), transparent 50%),
    radial-gradient(1px 1px at 88% 28%, rgba(255,255,255,.2), transparent 50%),
    radial-gradient(1px 1px at 6% 46%, rgba(255,255,255,.24), transparent 50%),
    radial-gradient(1px 1px at 45% 6%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(1px 1px at 94% 88%, rgba(255,255,255,.22), transparent 50%),
    radial-gradient(1.2px 1.2px at 30% 95%, rgba(255,255,255,.28), transparent 50%),
    radial-gradient(1px 1px at 60% 50%, rgba(255,255,255,.16), transparent 50%);
  background-repeat: no-repeat;
  opacity: .5;
}
.stars-layer::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 12% -10%, rgba(225,29,72,.07), transparent 60%),
    radial-gradient(700px 500px at 95% 110%, rgba(59,130,246,.04), transparent 60%);
}

/* ===== Login screen override ===== */
.login-screen {
  background: transparent !important;
  position: relative; z-index: 1;
}
.login-box {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04) !important;
  padding: 36px !important;
}
.login-box h2 { color: var(--text) !important; font-weight: 600; }
.login-logo {
  background: radial-gradient(120% 120% at 30% 20%, #ff4d72, var(--accent) 55%, #7a0f28) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 28px -10px rgba(225,29,72,.7) !important;
  margin: 0 auto 24px !important;
  display: block !important;
  width: fit-content !important;
}
.input-group label { color: var(--text-2) !important; font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.input-group input {
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 10px 12px !important;
}
.input-group input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  outline: none !important;
}
.login-btn {
  background: linear-gradient(180deg, var(--accent), #b3153a) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 22px -8px rgba(225,29,72,.8) !important;
  font-weight: 600 !important;
  border: none !important;
}
.login-btn:hover { filter: brightness(1.08) !important; }

/* ===== App layout ===== */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.app.layout-top {
  grid-template-columns: 1fr;
}
.app.layout-top .crm-sidebar { display: none; }
.app.layout-top .crm-topnav { display: flex; }
.app.layout-top .crm-page { padding-top: 22px; }

/* ===== Sidebar ===== */
.crm-sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #0d0d14 0%, #0a0a10 100%);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 18px;
  z-index: 20; overflow-y: auto; overflow-x: hidden;
  box-sizing: border-box;
}
.crm-sidebar::-webkit-scrollbar { width: 4px; }
.crm-sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* Brand */
.crm-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.crm-brand-mark {
  position: relative; width: 48px; height: 48px;
  display: grid; place-items: center; flex: none;
}
.crm-brand-mark .core {
  width: 36px; height: 36px; border-radius: 10px;
  background: radial-gradient(120% 120% at 30% 20%, #ff4d72, var(--accent) 55%, #7a0f28);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 28px -10px rgba(225,29,72,.7);
  position: relative; z-index: 2;
}
.crm-brand-mark .orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(225,29,72,.28);
  animation: crm-spin 18s linear infinite;
}
.crm-brand-mark .orbit.o2 {
  inset: 6px; border: 1px dotted rgba(255,255,255,.14);
  animation: crm-spin 11s linear infinite reverse;
}
.crm-brand-mark .orbit .sat {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #ffd6e0;
  box-shadow: 0 0 8px rgba(255,90,130,.9);
}
.crm-brand-mark .orbit.o2 .sat {
  width: 4px; height: 4px; background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,.9);
}
@keyframes crm-spin { to { transform: rotate(360deg); } }
.crm-brand-name { font-weight: 600; font-size: 15px; letter-spacing: .01em; color: var(--text); }
.crm-brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }

/* Nav groups */
.crm-nav-group-label {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 6px 10px; margin-top: 6px;
}
.crm-nav { display: flex; flex-direction: column; gap: 2px; }
.crm-sidebar .nav-tab {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px !important; border-radius: 10px !important;
  color: var(--text-2) !important; font-size: 13.5px !important; font-weight: 500 !important;
  cursor: pointer; position: relative;
  transition: background .15s, color .15s;
  background: transparent !important;
  border: none !important;
  width: 100%;
  text-align: left;
}
.crm-sidebar .nav-tab:hover { background: #15151d !important; color: var(--text) !important; }
.crm-sidebar .nav-tab.active {
  background: linear-gradient(180deg, rgba(225,29,72,.18), rgba(225,29,72,.08)) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(225,29,72,.25) !important;
}
.crm-sidebar .nav-tab.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.crm-sidebar .nav-tab svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; pointer-events: none; }
.crm-sidebar .nav-tab span { pointer-events: none; }
.crm-nav-badge {
  margin-left: auto; font-size: 11px; color: var(--text-3);
  background: #1a1a22; padding: 2px 7px; border-radius: 999px;
  pointer-events: none;
}

/* Sidebar footer */
.crm-side-footer {
  margin-top: auto; padding: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--text-3);
  flex-shrink: 0;
}
.crm-side-planet {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(120% 120% at 30% 25%, #ff8aa5, var(--accent) 60%, #5c0c20);
  box-shadow: 0 0 0 2px rgba(225,29,72,.12), 0 0 18px -2px rgba(225,29,72,.5);
  position: relative;
}
.crm-side-planet::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(225,29,72,.25); transform: rotate(-18deg) scaleY(.45);
}

/* ===== Mobile scrim ===== */
.sidebar-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 55; display: none;
}
.sidebar-scrim.on { display: block; }

/* ===== Main content area ===== */
.crm-main { min-width: 0; display: flex; flex-direction: column; }

/* ===== Topbar ===== */
.crm-topbar {
  height: 64px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,.75);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 15;
  min-width: 0;
}
.crm-burger {
  display: none; width: 36px; height: 36px; border-radius: 10px;
  background: #14141c; border: 1px solid var(--border); color: var(--text-2);
  align-items: center; justify-content: center; flex: none; cursor: pointer;
}
.crm-burger:hover { border-color: var(--border-2); color: var(--text); }
.crm-burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; pointer-events: none; }
.crm-crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; white-space: nowrap; }
.crm-crumbs b { color: var(--text); font-weight: 600; }
.crm-crumbs .sep { opacity: .5; }
.crm-search {
  display: flex; align-items: center; gap: 10px;
  background: #14141c; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; color: var(--text-3); font-size: 13px;
  flex: 1; max-width: 400px; min-width: 0; overflow: hidden; white-space: nowrap;
}
.crm-search svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.crm-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.crm-pill {
  height: 36px; padding: 0 12px; border-radius: 10px;
  background: #14141c; border: 1px solid var(--border);
  color: var(--text-2) !important; font-size: 13px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  cursor: pointer; transition: border-color .15s, color .15s;
  text-decoration: none;
}
.crm-pill:hover { border-color: var(--border-2); color: var(--text) !important; }
.crm-pill.primary {
  background: linear-gradient(180deg, var(--accent), #b3153a) !important;
  color: white !important; border-color: transparent !important;
  box-shadow: 0 6px 22px -8px rgba(225,29,72,.8);
}
.crm-pill.primary:hover { filter: brightness(1.05) !important; }
.crm-pill svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; pointer-events: none; }
.crm-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #2b2b3a, #1a1a22);
  border: 1px solid var(--border-2);
  display: grid; place-items: center; font-size: 12px; color: var(--text-2);
  flex: none;
}
.crm-layout-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: #14141c; border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer;
}
.crm-layout-toggle:hover { border-color: var(--border-2); color: var(--text); }
.crm-layout-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; pointer-events: none; }

/* Keep existing logout-btn style override */
.crm-topbar .logout-btn {
  height: 36px !important; padding: 0 12px !important;
  background: linear-gradient(180deg, var(--accent), #b3153a) !important;
  color: white !important; border: none !important; border-radius: 10px !important;
  font-size: 13px !important; font-weight: 600 !important; cursor: pointer !important;
  box-shadow: 0 6px 22px -8px rgba(225,29,72,.8) !important;
  transition: filter .15s !important; transform: none !important;
  white-space: nowrap;
}
.crm-topbar .logout-btn:hover { filter: brightness(1.05) !important; transform: none !important; box-shadow: none !important; }

/* Currency selector in topbar */
.crm-topbar .currency-selector {
  height: 36px; padding: 0 10px;
  background: #14141c !important; border: 1px solid var(--border) !important;
  border-radius: 10px !important; color: var(--text-2) !important; font-size: 13px;
  cursor: pointer;
}
.crm-topbar .current-datetime {
  background: transparent !important; padding: 0 !important;
  font-size: 12px !important; color: var(--text-3) !important; border-radius: 0 !important;
  white-space: nowrap;
}
.crm-topbar #currentUser {
  font-size: 12px; color: var(--text-2); white-space: nowrap;
}

/* ===== Top navigation (layout-top mode) ===== */
.crm-topnav {
  display: none;
  align-items: center; gap: 4px;
  padding: 0 24px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,.65);
  backdrop-filter: blur(8px);
  position: sticky; top: 64px; z-index: 14;
  overflow-x: auto; overflow-y: hidden;
  white-space: nowrap;
}
.crm-topnav::-webkit-scrollbar { height: 0; }
.crm-topnav-group {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 0 4px; position: relative;
}
.crm-topnav-group::after {
  content: ""; display: inline-block; width: 1px; height: 18px;
  background: var(--border); margin: 0 6px;
}
.crm-topnav-group:last-child::after { display: none; }
.crm-topnav .nav-tab {
  display: inline-flex !important; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px !important; border-radius: 8px !important;
  font-size: 13px !important; color: var(--text-2) !important; font-weight: 500 !important;
  cursor: pointer; position: relative;
  transition: background .15s, color .15s;
  background: transparent !important; border: none !important;
  white-space: nowrap;
}
.crm-topnav .nav-tab:hover { background: #14141c !important; color: var(--text) !important; }
.crm-topnav .nav-tab.active {
  color: #fff !important;
  background: linear-gradient(180deg, rgba(225,29,72,.2), rgba(225,29,72,.08)) !important;
  box-shadow: inset 0 0 0 1px rgba(225,29,72,.3) !important;
}
.crm-topnav .nav-tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -9px; height: 2px;
  background: var(--accent); border-radius: 2px 2px 0 0;
  box-shadow: 0 0 10px var(--accent);
}
.crm-topnav .nav-tab svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; pointer-events: none; }
.crm-topnav .nav-tab span { pointer-events: none; }

/* ===== Page content area ===== */
.crm-page {
  padding: 28px 32px 56px;
  min-width: 0;
}
/* Old container stays with its padding but we override via crm-page parent */
.crm-page .container {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* Hide old nav-tabs bar */
.crm-page .nav-tabs {
  display: none !important;
}

/* ===== Override old header ===== */
.header { display: none !important; }

/* ===== Cards dark override ===== */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
}
.card h2, .card h3 { color: var(--text) !important; }

/* Stats grid cards — planet KPI style */
.stat-card {
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  position: relative !important;
  overflow: hidden !important;
  padding: 20px !important;
  min-height: 140px !important;
  background: var(--surface) !important;
}
.stat-card > *:not(.kpi-orbit) { position: relative; z-index: 1; }
.stat-card .stat-label {
  font-size: 11px !important; letter-spacing: .14em !important;
  text-transform: uppercase !important; color: var(--text-3) !important;
  font-weight: 600 !important; padding-right: 68px !important;
}
.stat-card .stat-icon { display: none !important; }
.stat-card .stat-value {
  font-size: 26px !important; font-weight: 700 !important;
  letter-spacing: -.02em !important; margin-top: 10px !important;
  color: var(--text) !important; font-variant-numeric: tabular-nums !important;
}
.stat-card .stat-delta {
  margin-top: 8px !important; display: inline-flex !important;
  align-items: center !important; gap: 6px !important;
  font-size: 12px !important; color: var(--good) !important;
  background: var(--good-soft) !important;
  padding: 4px 8px !important; border-radius: 999px !important;
}
.stat-card .kpi-progress-note {
  font-size: 11px !important; color: var(--text-3) !important; margin-top: 12px !important;
}
/* tonal border */
.stat-card.income { border-color: rgba(225,29,72,.3) !important; }
.stat-card.margin { border-color: rgba(16,185,129,.3) !important; }
.stat-card.expenses { border-color: rgba(245,158,11,.3) !important; }
.stat-card.employees { border-color: rgba(59,130,246,.3) !important; }
.stat-card.forecast { border-color: rgba(139,92,246,.3) !important; }

/* ===== KPI planet orbit ring ===== */
.kpi-orbit {
  position: absolute !important; right: 16px; top: 16px;
  width: 58px; height: 58px;
  pointer-events: none;
}
.kpi-orbit .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.08);
}
.kpi-orbit .ring.progress {
  border: 0;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
          mask: radial-gradient(circle, transparent 58%, black 60%);
  filter: drop-shadow(0 0 8px rgba(225,29,72,.4));
}
.kpi-orbit .kpi-planet {
  position: absolute; inset: 10px; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 25%, #2b2b3a, #13131b 70%);
  display: grid; place-items: center; color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.kpi-orbit .kpi-planet svg {
  width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6;
}
/* color variants */
.kpi-orbit.income .ring.progress { background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), transparent 0); filter: drop-shadow(0 0 8px rgba(225,29,72,.4)); }
.kpi-orbit.margin .ring.progress { background: conic-gradient(var(--good) calc(var(--p, 0) * 1%), transparent 0); filter: drop-shadow(0 0 8px rgba(16,185,129,.4)); }
.kpi-orbit.expenses .ring.progress { background: conic-gradient(var(--warn) calc(var(--p, 0) * 1%), transparent 0); filter: drop-shadow(0 0 8px rgba(245,158,11,.4)); }
.kpi-orbit.employees .ring.progress { background: conic-gradient(var(--info) calc(var(--p, 0) * 1%), transparent 0); filter: drop-shadow(0 0 8px rgba(59,130,246,.4)); }
.kpi-orbit.forecast .ring.progress { background: conic-gradient(#8b5cf6 calc(var(--p, 0) * 1%), transparent 0); filter: drop-shadow(0 0 8px rgba(139,92,246,.4)); }

/* Tables */
table thead th {
  background: var(--surface-3) !important;
  color: var(--text-3) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 11px !important; letter-spacing: .08em !important; text-transform: uppercase !important;
}
table tbody tr { background: transparent !important; }
table tbody tr:hover td { background: rgba(255,255,255,.03) !important; }
table tbody td {
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
  background: transparent !important;
}
table tbody tr:last-child td { border-bottom: 0 !important; }

/* Forms */
.form-group label { color: var(--text-2) !important; font-size: 12px !important; }
.form-group input,
.form-group select,
.form-group textarea,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="month"],
input[type="date"],
select, textarea {
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-family: inherit !important;
}
input::placeholder, textarea::placeholder { color: var(--text-3) !important; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  outline: none !important;
}
select option { background: var(--surface-2) !important; color: var(--text) !important; }

/* Buttons */
.btn {
  background: linear-gradient(180deg, var(--accent), #b3153a) !important;
  border: none !important; border-radius: 8px !important;
  color: white !important; font-family: inherit !important;
  box-shadow: 0 4px 14px -4px rgba(225,29,72,.6) !important;
  transition: filter .15s !important;
}
.btn:hover { filter: brightness(1.08) !important; background: linear-gradient(180deg, var(--accent), #b3153a) !important; }
.btn-edit {
  background: linear-gradient(180deg, #10b981, #059669) !important;
  box-shadow: 0 4px 14px -4px rgba(16,185,129,.5) !important;
}
.btn-edit:hover { filter: brightness(1.08) !important; background: linear-gradient(180deg, #10b981, #059669) !important; }
.btn-small { padding: 6px 12px !important; font-size: 12px !important; }

/* Modals */
.modal { background: rgba(0,0,0,.7) !important; }
.modal-content {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7) !important;
}
.modal-content h2 { color: var(--text) !important; }
.modal-content .close { color: var(--text-3) !important; }
.modal-content .close:hover { color: var(--text) !important; }

/* Progress bars */
.progress-bar { background: var(--surface-3) !important; border-radius: 999px !important; }
.progress-fill { border-radius: 999px !important; }

/* Goals section */
.goals-section { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 16px !important; }
.goals-section h3 { color: var(--text) !important; }
.goal-item { background: var(--surface-3) !important; border: 1px solid var(--border) !important; border-radius: 12px !important; }

/* CEO notes */
.ceo-notes { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 16px !important; }
.ceo-notes h3 { color: var(--text) !important; }
.ceo-notes-content { color: var(--text-2) !important; }

/* Error/success messages */
.error-message { color: var(--accent-2) !important; }
.success-message { color: var(--good) !important; }

/* Chart containers */
.chart-container { background: transparent !important; }

/* AI period/group buttons */
.ai-period-btn, .ai-group-btn {
  background: var(--surface-3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-2) !important;
  border-radius: 8px !important;
}
.ai-period-btn.active, .ai-group-btn.active {
  background: var(--accent-soft) !important;
  border-color: rgba(225,29,72,.4) !important;
  color: #fff !important;
}

/* Date filter buttons */
.date-filter-btn {
  background: var(--surface-3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-2) !important;
  border-radius: 8px !important;
}
.date-filter-btn.active {
  background: var(--accent-soft) !important;
  border-color: rgba(225,29,72,.4) !important;
  color: #fff !important;
}

/* Chart filter selects */
.chart-filter-select {
  background: var(--surface-3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-2) !important;
  border-radius: 8px !important;
}

/* Card headers */
.card-header { border-bottom: 1px solid var(--border) !important; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== Mobile responsive ===== */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr !important; }
  .crm-sidebar {
    position: fixed !important; left: 0; top: 0; height: 100vh; width: 280px;
    transform: translateX(-100%); transition: transform .25s ease;
    z-index: 60 !important; box-shadow: 0 20px 60px -10px rgba(0,0,0,.7);
  }
  .crm-sidebar.open { transform: translateX(0); }
  .crm-burger { display: inline-flex !important; }
  .crm-topbar { padding: 0 14px !important; gap: 10px !important; height: 58px !important; }
  .crm-search { display: none !important; }
  .crm-topbar .current-datetime { display: none !important; }
  .crm-layout-toggle { display: none !important; }
  .crm-page { padding: 16px 14px 48px !important; }
  .app.layout-top .crm-topnav { display: none !important; }
}
@media (max-width: 520px) {
  .crm-crumbs span:first-child, .crm-crumbs .sep { display: none; }
  .stats-grid { grid-template-columns: 1fr !important; }
}
