/* =====================================================================
   Writerify Finance — Command Center
   Design system: tokens → base → layout → components → sections
   ===================================================================== */

:root,
html.theme-dark {
  color-scheme: dark;
  --bg: #090c14;
  --bg-glow-1: rgba(124, 108, 255, 0.16);
  --bg-glow-2: rgba(56, 189, 248, 0.08);
  --surface: rgba(17, 22, 36, 0.72);
  --surface-solid: #111624;
  --surface-2: #161c2f;
  --surface-3: #1c2440;
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #eef1f9;
  --text-2: #b6bfd6;
  --text-3: #7d88a6;
  --brand: #8272ff;
  --brand-strong: #6a59f5;
  --brand-soft: rgba(130, 114, 255, 0.15);
  --brand-line: rgba(130, 114, 255, 0.4);
  --good: #34d399;
  --good-soft: rgba(52, 211, 153, 0.13);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.13);
  --pink: #f472b6;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -14px rgba(0, 0, 0, 0.65);
  --shadow-pop: 0 24px 60px -12px rgba(0, 0, 0, 0.75);
  --track: rgba(148, 163, 184, 0.16);
  --input-bg: #0c1120;
  --row-hover: rgba(130, 114, 255, 0.06);
  --mq: #4f8cf0;
  --sz: #dc6a1a;
}

html.theme-light {
  color-scheme: light;
  --bg: #f3f5fb;
  --bg-glow-1: rgba(106, 89, 245, 0.1);
  --bg-glow-2: rgba(56, 189, 248, 0.08);
  --surface: #ffffffcc;
  --surface-solid: #ffffff;
  --surface-2: #f6f7fc;
  --surface-3: #eceffa;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.16);
  --text: #0e1426;
  --text-2: #4a556f;
  --text-3: #8591ad;
  --brand: #5b49f0;
  --brand-strong: #4a39dc;
  --brand-soft: rgba(91, 73, 240, 0.1);
  --brand-line: rgba(91, 73, 240, 0.35);
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.1);
  --bad: #e11d48;
  --bad-soft: rgba(225, 29, 72, 0.09);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.1);
  --pink: #db2777;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -14px rgba(15, 23, 42, 0.16);
  --shadow-pop: 0 24px 60px -12px rgba(15, 23, 42, 0.3);
  --track: rgba(15, 23, 42, 0.09);
  --input-bg: #ffffff;
  --row-hover: rgba(91, 73, 240, 0.045);
  --mq: #2f6fed;
  --sz: #e8590c;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% -8%, var(--bg-glow-1), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, var(--bg-glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex-shrink: 0; }
.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
::selection { background: var(--brand-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.xs { width: 13px; height: 13px; }
.ic.lg { width: 22px; height: 22px; }

.text-good { color: var(--good); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.text-info { color: var(--info); }
.text-brand { color: var(--brand); }
.text-muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.right { text-align: right; }
.center { text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 13px;
  background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop); transition: all 0.25s ease; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(52, 211, 153, 0.5); }
.toast.error { border-color: rgba(251, 113, 133, 0.6); color: var(--bad); }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; font-weight: 700; font-size: 13px;
  white-space: nowrap; transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 20px -8px var(--brand);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface-2); border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--brand-line); }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: rgba(251, 113, 133, 0.3); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-income { color: #fff; background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 8px 20px -8px #10b981; }
.btn-income:hover { filter: brightness(1.08); }

.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center;
  color: var(--text-3); transition: all 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }

.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px;
  background: var(--input-bg); border: 1px solid var(--line-strong); color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238591ad' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.select-sm { height: 32px; font-size: 12px; font-weight: 600; width: auto; padding-left: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
}
.search { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 34px; height: 36px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 60;
  display: flex; flex-direction: column; gap: 18px; padding: 18px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 94%, transparent), var(--surface-solid));
  border-right: 1px solid var(--line); overflow-y: auto;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.main { flex: 1; margin-left: 268px; min-width: 0; transition: margin 0.28s cubic-bezier(0.4, 0, 0.2, 1); }
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .main { margin-left: 0; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #8272ff, #c084fc 60%, #f472b6);
  box-shadow: 0 10px 24px -8px #8272ff;
}
.brand-text { flex: 1; min-width: 0; line-height: 1.15; }
.brand-text b { display: block; font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.brand-text span { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; white-space: nowrap; color: var(--brand); }

.month-card { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.month-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pill-btn { padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.pill-btn:hover { filter: brightness(1.15); }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.month-nav button:hover { color: var(--text); background: var(--brand-soft); }
.month-nav span { flex: 1; text-align: center; font-weight: 800; font-size: 14px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-3); padding: 0 10px 6px; text-transform: uppercase; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: all 0.15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--brand-line); }
.nav-item.active .ic { color: var(--brand); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.nav-item.active .nav-badge { background: var(--brand); color: #fff; }

.side-tools { display: flex; flex-direction: column; gap: 2px; }
.tool-btn { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-2); width: 100%; text-align: left; }
.tool-btn:hover { background: var(--surface-2); color: var(--text); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.live-pill { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; color: var(--good); background: var(--good-soft); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.theme-switch { display: flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.theme-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.theme-btn.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(135deg, #8272ff, #f472b6); flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; line-height: 1.25; }
.user-info b { display: block; font-size: 13px; }
.user-info span { font-size: 11px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(2, 6, 18, 0.6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.sidebar-backdrop.active { opacity: 1; pointer-events: auto; }

.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.top-title { flex: 1; min-width: 0; }
.top-title h1 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title p { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.month-pill { display: none; padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 12px; background: var(--brand-soft); color: var(--brand); }

.content { padding: 24px 28px 64px; max-width: 1440px; margin: 0 auto; }
.section { display: flex; flex-direction: column; gap: 18px; }
.section.enter { animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero (mission) ---------- */
.hero { position: relative; overflow: hidden; padding: 26px; border-radius: 22px; border: 1px solid var(--brand-line);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(130, 114, 255, 0.28), transparent 70%),
    radial-gradient(420px 240px at 100% 100%, rgba(244, 114, 182, 0.16), transparent 70%),
    var(--surface-solid);
  box-shadow: var(--shadow); }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
.hero h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 8px 0 6px; }
.hero h2 em { font-style: normal; background: linear-gradient(90deg, #a99bff, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); font-size: 13.5px; max-width: 520px; }
.hero-gauges { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px; flex: 1; min-width: min(100%, 480px); max-width: 640px; }
.gauge { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface-solid) 70%, transparent); border: 1px solid var(--line); }
.ring { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ring-track { stroke: var(--track); fill: none; stroke-width: 8; }
.ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.gauge-info { min-width: 0; }
.gauge-info .label { margin-bottom: 3px; display: block; }
.gauge-big { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.gauge-big small { font-size: 12px; font-weight: 600; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.gauge-delta { font-size: 12px; font-weight: 700; margin-top: 3px; }
.urgency { margin-top: 18px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, 0.28); color: var(--text); }
.urgency .ic { color: var(--warn); }
.urgency.win { background: var(--good-soft); border-color: rgba(52, 211, 153, 0.3); }
.urgency.win .ic { color: var(--good); }

/* ---------- Stat cards ---------- */
.stat { position: relative; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.stat-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.stat-ic.brand { background: var(--brand-soft); color: var(--brand); }
.stat-ic.good { background: var(--good-soft); color: var(--good); }
.stat-ic.bad { background: var(--bad-soft); color: var(--bad); }
.stat-ic.warn { background: var(--warn-soft); color: var(--warn); }
.stat-ic.info { background: var(--info-soft); color: var(--info); }
.stat-val { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; line-height: 1.1; }
.stat-foot { margin-top: 8px; padding-top: 9px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.stat.hl-good { background: linear-gradient(160deg, var(--good-soft), var(--surface)); border-color: rgba(52, 211, 153, 0.28); }
.stat.hl-bad { background: linear-gradient(160deg, var(--bad-soft), var(--surface)); border-color: rgba(251, 113, 133, 0.28); }
.stat.hl-warn { background: linear-gradient(160deg, var(--warn-soft), var(--surface)); border-color: rgba(251, 191, 36, 0.28); }

/* ---------- Chips / pills / badges ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { color: var(--text); border-color: var(--brand-line); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px var(--brand); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .count { font-size: 11px; opacity: 0.85; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,0.12); }
.chip:not(.active) .count { background: var(--surface-3); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.product-tag { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--pc) 15%, transparent); color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent); white-space: nowrap; }
.product-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }

/* ---------- Toolbar & period filter ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .spacer { flex: 1; }
.filter-bar { border-radius: 18px 18px 0 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row .grow { flex: 1; }
.period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.period .chips { max-width: 100%; }
.custom-range { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--brand-line); }
.custom-range span { font-size: 11px; font-weight: 800; color: var(--text-3); letter-spacing: 0.06em; }
.custom-range .input { height: 30px; width: 138px; font-size: 12px; padding: 0 8px; }
.range-note { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  position: sticky; top: 0; padding: 11px 12px; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--text); }
table.data th .sort { display: inline-flex; flex-direction: column; margin-left: 5px; vertical-align: middle; gap: 1px; opacity: 0.4; }
table.data th .sort i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
table.data th .sort i.up { border-bottom: 5px solid currentColor; }
table.data th .sort i.down { border-top: 5px solid currentColor; }
table.data th.sorted { color: var(--brand); }
table.data th.sorted .sort { opacity: 1; }
table.data th.sorted[data-dir="asc"] .sort i.down { opacity: 0.25; }
table.data th.sorted[data-dir="desc"] .sort i.up { opacity: 0.25; }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:hover { background: var(--row-hover); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.row-alert { background: var(--bad-soft); }
.cell-idx { color: var(--text-3); font-weight: 700; width: 48px; text-align: center; }
.cell-main { font-weight: 700; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.site-link:hover { color: var(--brand); }
.site-link .ic { color: var(--text-3); }
.cell-actions { display: flex; justify-content: flex-end; gap: 2px; }
.amount { font-weight: 800; letter-spacing: -0.01em; text-align: right; white-space: nowrap; }
.amount.in { color: var(--good); }
.amount.out { color: var(--bad); }
.cell-input {
  width: 84px; height: 32px; text-align: right; padding: 0 9px; border-radius: 8px; font-weight: 700;
  background: var(--input-bg); border: 1px solid var(--line); outline: none; transition: all 0.15s;
}
.cell-input:hover { border-color: var(--line-strong); }
.cell-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.status-select { height: 28px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid; background: transparent; cursor: pointer; outline: none; }
.status-select.running { color: var(--good); border-color: rgba(52, 211, 153, 0.4); background: var(--good-soft); }
.status-select.penalty { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: var(--warn-soft); }
.status-select.deleted { color: var(--bad); border-color: rgba(251, 113, 133, 0.4); background: var(--bad-soft); }
.status-select.sold { color: var(--text-2); border-color: var(--line-strong); background: var(--surface-3); }
.status-select option { color: #0e1426; background: #fff; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: flex-start; align-content: flex-start; }
.meta-chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); }
.meta-chip.warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.3); background: var(--warn-soft); }
.meta-chip.bad { color: var(--bad); border-color: rgba(251, 113, 133, 0.4); background: var(--bad-soft); font-weight: 800; }
.meta-chip.is-empty { color: var(--text-3); font-style: italic; font-weight: 500; }
.tfoot-total td { background: var(--surface-2); font-weight: 800; border-top: 1px solid var(--line-strong); }

.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty-ic { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty h4 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 13px; max-width: 360px; margin: 0 auto 14px; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 55%, transparent); border-radius: 0 0 18px 18px; }
.pager-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.pager-left label { display: inline-flex; align-items: center; gap: 8px; }
.pager-pages { display: flex; align-items: center; gap: 4px; }
.pg { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--text-2); display: inline-grid; place-items: center; border: 1px solid transparent; transition: all 0.12s; }
.pg:hover:not(:disabled):not(.active) { background: var(--surface-3); color: var(--text); }
.pg.active { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px var(--brand); }
.pg:disabled { opacity: 0.35; cursor: not-allowed; }
.pg.nav-pg { display: inline-flex; align-items: center; gap: 5px; border-color: var(--line-strong); background: var(--surface-2); }
.pg.dots { cursor: default; color: var(--text-3); }

/* ---------- Charts ---------- */
.chart-box { position: relative; width: 100%; }
.chart-box svg { width: 100%; height: auto; overflow: visible; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 10px 12px; border-radius: 11px; font-size: 12px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); transform: translate(-50%, -100%); white-space: nowrap; opacity: 0; transition: opacity 0.12s; }
.chart-tip.show { opacity: 1; }
.chart-tip b { display: block; margin-bottom: 4px; font-size: 12.5px; }
.chart-tip div { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.donut-wrap { display: grid; place-items: center; position: relative; margin: 6px 0 14px; }
.donut-wrap svg { width: 188px; height: 188px; transform: rotate(-90deg); }
.donut-center { position: absolute; text-align: center; pointer-events: none; }
.donut-center small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--text-3); text-transform: uppercase; }
.donut-center b { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.mix-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.mix-row .name { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 600; }
.mix-row .name i { width: 10px; height: 10px; border-radius: 3px; }
.mix-row b { font-weight: 800; }
.mix-row small { color: var(--text-3); font-weight: 600; margin-left: 6px; }

/* ---------- Product breakdown ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.product-card { position: relative; text-align: left; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s; overflow: hidden; }
.product-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pc); }
.product-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 55%, transparent); }
.product-card.active { border-color: var(--pc); box-shadow: 0 0 0 1px var(--pc), var(--shadow); }
.product-card .p-name { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 14px; }
.product-card .p-share { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); }
.product-card .p-total { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 10px; }
.bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--pc, var(--brand)); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.product-card .p-meta { display: flex; justify-content: space-between; margin-top: 11px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.product-card .p-meta b { color: var(--text); font-weight: 800; }

/* ---------- Rank list ---------- */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color 0.15s; }
.rank-row:hover { border-color: var(--brand-line); }
.rank-no { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.rank-row:nth-child(1) .rank-no { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #3b2300; }
.rank-row:nth-child(2) .rank-no { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #1e293b; }
.rank-row:nth-child(3) .rank-no { background: linear-gradient(135deg, #fdba74, #c2763a); color: #3b1d06; }
.rank-main { flex: 1; min-width: 0; }
.rank-main a { font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.rank-main a:hover { color: var(--brand); }
.rank-main a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-main small { display: block; font-size: 12px; color: var(--text-3); }
.rank-val { text-align: right; flex-shrink: 0; }
.rank-val b { display: block; font-weight: 800; color: var(--good); }
.rank-val small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

/* ---------- Notice / setup banner ---------- */
.notice { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, 0.35); }
.notice > .ic { color: var(--warn); margin-top: 2px; }
.notice h4 { font-size: 14px; margin-bottom: 3px; }
.notice p { font-size: 12.5px; color: var(--text-2); }
.notice pre { margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--input-bg); border: 1px solid var(--line-strong); font-size: 11.5px; line-height: 1.5; overflow: auto; max-height: 190px; color: var(--text-2); font-family: 'JetBrains Mono', monospace; }
.notice .btn { margin-top: 10px; }

/* ---------- Modals ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; background: rgba(2, 6, 18, 0.68); backdrop-filter: blur(5px); animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-box { width: 100%; max-width: 580px; padding: 22px; border-radius: 20px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.modal-box.sm { max-width: 420px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-head .m-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.modal-head h3 { flex: 1; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.modal-head small { display: block; font-size: 12px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.amount-field { position: relative; }
.amount-field span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--text-3); }
.amount-field .input { padding-left: 28px; font-weight: 800; font-size: 15px; height: 44px; }

/* ---------- Login ---------- */
.login-wrap { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; overflow-y: auto; background:
  radial-gradient(700px 420px at 15% 10%, rgba(130, 114, 255, 0.28), transparent 65%),
  radial-gradient(600px 400px at 90% 90%, rgba(244, 114, 182, 0.2), transparent 65%), var(--bg); }
.login-card { width: 100%; max-width: 420px; padding: 34px 30px 26px; border-radius: 24px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); text-align: center; }
.login-card .brand-logo { width: 62px; height: 62px; border-radius: 19px; margin: 0 auto 18px; }
.login-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.login-card .sub { color: var(--text-3); font-size: 13px; margin: 4px 0 24px; }
.login-card form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.login-error { display: flex; gap: 9px; align-items: center; padding: 10px 12px; margin-bottom: 14px; border-radius: 11px; font-size: 13px; font-weight: 600; background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(251, 113, 133, 0.3); text-align: left; }
.pw-field { position: relative; }
.pw-field .input { padding-right: 42px; height: 44px; }
.pw-field button { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.login-card .input { height: 44px; }
.login-card .btn { height: 46px; font-size: 14px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-pop); width: 288px; }
  .sidebar.open { transform: none; }
  .main, body.sidebar-collapsed .main { margin-left: 0; }
  .month-pill { display: inline-block; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 56px; }
  .g-3 { grid-template-columns: 1fr 1fr; }
  .g-even { grid-template-columns: 1fr; }
  .hero { padding: 20px; }
  .hero h2 { font-size: 24px; }
  .hero-gauges { max-width: none; }
}
@media (max-width: 640px) {
  .g-2, .g-3, .g-4, .hero-gauges, .form-grid { grid-template-columns: 1fr; }
  .g-4.keep2, .g-3.keep2 { grid-template-columns: 1fr 1fr; }
  .stat-val { font-size: 21px; }
  .btn .btn-label { display: none; }
  .top-title p { display: none; }
  #topAddCostBtn { display: none; }
  .month-pill { padding: 5px 9px; font-size: 11px; }
  .search { max-width: none; min-width: 100%; }
  .pager { justify-content: center; }
  .modal-box { padding: 18px; }
  .custom-range { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Sites table: one fact per column, never wrapped */
#sitesTable th, #sitesTable td { white-space: nowrap; padding-left: 7px; padding-right: 7px; }
.cell-plain { color: var(--text-2); }

/* Site Income split in the income modal */
.split-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.input[readonly] { background: var(--surface-2); cursor: default; }

/* First load with nothing cached: placeholders instead of zeros */
.has-session #loginScreen { display: none; }
body:not(.is-booting) .boot-skel { display: none; }
body.is-booting .section { display: none !important; }
.boot-skel { display: flex; flex-direction: column; gap: 18px; }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.sk { display: block; height: 120px; border-radius: 18px; background: linear-gradient(100deg, var(--surface-2) 40%, var(--line) 50%, var(--surface-2) 60%); background-size: 200% 100%; animation: skShine 1.2s linear infinite; }
.sk-tall { height: 300px; }
.sk-wide { height: 180px; }
@keyframes skShine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Pricing block in the income modal */
.pricing-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rate-hint { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 10px; border-radius: 99px; }
.plan-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); vertical-align: middle; }
.plan-badge.starter { background: var(--info-soft); color: var(--info); }
.plan-badge.growth { background: var(--good-soft); color: var(--good); }
.plan-badge.max { background: var(--warn-soft); color: var(--warn); }
.amount .bdt { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-3); }

/* Newly saved row */
table.data tr.row-flash td { animation: flash 2.2s ease-out; }
@keyframes flash { 0%, 40% { background: var(--good-soft); } 100% { background: transparent; } }

.plan-badge.monthly { background: var(--brand-soft); color: var(--brand); }

/* Partner accounting */
.partner-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.partner-pill i { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #8272ff, #f472b6); }
.partner-pill.sazzad i { background: linear-gradient(135deg, #f59e0b, #f97316); }
.partner-pill.mustaqeem i { background: linear-gradient(135deg, #0ea5e9, #6366f1); }

/* BDT is the main figure; USD is the small line under it */
.product-card .p-total small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 700; letter-spacing: 0; color: var(--text-3); }
.amount .bdt { font-size: 11.5px; }

/* Month filter inside a section */
.settle { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.settle b { font-weight: 800; }
.settle.owe { background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.35); }
.settle.even { background: var(--good-soft); border-color: rgba(52, 211, 153, 0.3); }
.settle small { display: block; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.settle b.num { font-weight: 800; }
.period-bar { padding: 10px 14px; }
.month-bar { display: flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Equity */
.eq-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
.eq-cash { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 24px; border-radius: 22px; border: 1px solid var(--brand-line); box-shadow: var(--shadow);
  background: radial-gradient(420px 240px at 0% 0%, rgba(130, 114, 255, 0.3), transparent 70%), radial-gradient(360px 220px at 100% 100%, rgba(244, 114, 182, 0.16), transparent 70%), var(--surface-solid); }
.eq-cash-val { font-size: 42px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-top: 12px; }
.eq-cash-sub { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.eq-flow { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.eq-flow-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--line); }
.eq-flow-item small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.eq-flow-item b { font-size: 14px; font-weight: 800; }
.eq-partners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.eq-partner { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.18s, border-color 0.18s; }
.eq-partner::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pc); }
.eq-partner:hover { transform: translateY(-3px); border-color: var(--pc); }
.eq-p-top { display: flex; align-items: center; gap: 10px; }
.eq-avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--pc); }
.eq-p-name { flex: 1; min-width: 0; line-height: 1.2; }
.eq-p-name b { display: block; font-size: 15px; font-weight: 800; }
.eq-p-name small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.eq-p-body { display: flex; align-items: center; gap: 14px; }
.eq-p-bal { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-top: 2px; }
.eq-p-body small { font-size: 11.5px; font-weight: 600; }
.eq-p-lines { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.eq-p-lines div { display: flex; justify-content: space-between; gap: 10px; padding-top: 5px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.eq-p-lines b { font-weight: 800; color: var(--text); }
.eq-arc { transition: opacity 0.15s; cursor: pointer; }
.eq-arc.dim { opacity: 0.25; }
.eq-bar { transform-box: fill-box; transform-origin: bottom; }
.section.enter .eq-bar { animation: eqGrow 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both; animation-delay: var(--d, 0ms); }
@keyframes eqGrow { from { transform: scaleY(0); } }
.eq-line { stroke-dasharray: 1; }
.section.enter .eq-line { animation: eqDraw 1s ease-out both; }
@keyframes eqDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.eq-statement-head { padding: 14px 16px 10px; }
#eqStatement td:first-child { font-weight: 600; color: var(--text-2); }
#eqStatement tr.eq-sub td { background: var(--surface-2); font-weight: 800; color: var(--text); }
#eqStatement tr.eq-total td { background: var(--brand-soft); font-weight: 800; color: var(--text); font-size: 14px; }
@media (max-width: 1100px) { .eq-hero { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .eq-partners { grid-template-columns: 1fr; } .eq-cash-val { font-size: 34px; } }

/* Audit log */
.audit-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.audit-pill.good { background: var(--good-soft); color: var(--good); }
.audit-pill.info { background: var(--info-soft, var(--brand-soft)); color: var(--info); }
.audit-pill.bad { background: var(--bad-soft); color: var(--bad); }
.audit-pill.warn { background: var(--warn-soft); color: var(--warn); }
.audit-pill.brand { background: var(--brand-soft); color: var(--brand); }
.audit-detail { min-width: 280px; line-height: 1.5; color: var(--text-1, inherit); }
