












/* Filled buttons need dark text on light accents, white on dark ones. */
:root[data-palette='aureus']  .btn.primary,
:root[data-palette='sunset']  .btn.primary,
:root[data-palette='forest']  .btn.primary,
:root[data-palette='ocean']   .btn.primary,
:root[data-palette='slate']   .btn.primary { color: #0a0d14;}
:root[data-palette='indigo']  .btn.primary,
:root[data-palette='royal']   .btn.primary,
:root[data-palette='crimson'] .btn.primary { color: #fff;}





/* ── Foundations ─────────────────────────────────────────────────────────── */
html, body { background: var(--bg); color: var(--fg);}

body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';}

/* The old blobby gradient is replaced by a fixed watermark — see below. */
#aurora { display: none !important;}

::selection { background: var(--brand-soft); color: var(--fg);}

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;}
*::-webkit-scrollbar { width: 10px; height: 10px;}
*::-webkit-scrollbar-track { background: transparent;}
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2.5px solid transparent; background-clip: content-box;}
*::-webkit-scrollbar-thumb:hover { background: var(--brand-2); background-clip: content-box;}

/* Every figure. Digits must form columns. */
.mono, .num, .tbl td, .tbl th, .stat .v, .stat .d, .kpi-val, .pager,
input, .chip, tfoot, .ei-lbl, .sb-build, .pal-hint {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'cv02', 'cv03';}
.mono { letter-spacing: -0.012em;}

h1, h2, h3, h4 { letter-spacing: -0.022em; font-weight: 650; margin: 0; color: var(--fg);}
h1 { font-size: 23px;} h2 { font-size: 16px;} h3 { font-size: 13.5px;}
.tiny { font-size: 11px; line-height: 1.55;}
.muted { color: var(--muted);}
a { color: var(--brand-1);}

/* ── Watermark ───────────────────────────────────────────────────────────────
   Behind every module, fixed so it does not scroll. Two layers: the wordmark
   ghosted at 2.5% and a fine grid. Kept under 3% opacity — a watermark that
   competes with the data is a mistake, and this one has to sit behind tables of
   figures without hurting legibility. */
body::before {
  content: 'AUREUS ONE';
  position: fixed;
  right: -2vw; bottom: -3vh;
  font-family: var(--font);
  font-size: clamp(90px, 15vw, 260px);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--fg);
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  user-select: none;}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--brand-1) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-1) 8%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);}
.shell, .topbar, .sidebar, .view { position: relative; z-index: 1;}

/* ── Animated wordmark ───────────────────────────────────────────────────────
   A gold sheen sweeps across the letters. The animation is on the gradient
   position, not on layout or opacity, so it costs nothing to composite and
   never causes reflow. */
.brand-word {
  font-weight: 300;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  background: linear-gradient(100deg,
    var(--brand-2) 0%, var(--brand-1) 32%, var(--brand-3) 50%,
    var(--brand-1) 68%, var(--brand-2) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: sheen 7s linear infinite;}
@keyframes sheen {
  0%   { background-position: 200% center; }
  100% { background-position: -20% center; }
}
.brand-word .tm {
  font-size: 0.42em; vertical-align: super; letter-spacing: 0;
  -webkit-text-fill-color: currentColor; color: var(--muted); opacity: 0.8;}

/* The big hero wordmark on the Dashboard. */
.hero {
  position: relative;
  padding: 26px 24px 24px;
  margin-bottom: 16px;
  border-radius: 14px;
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--brand-1) 13%, transparent), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  overflow: hidden;}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-1) 9%, transparent), transparent);
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: heroSweep 6.5s ease-in-out infinite;
  pointer-events: none;}
@keyframes heroSweep {
  0%   { background-position: -60% 0; }
  100% { background-position: 180% 0; }
}
.hero-name {
  font-size: clamp(30px, 5.2vw, 62px);
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.02;
  text-transform: uppercase;
  background: linear-gradient(100deg,
    var(--brand-2) 0%, var(--brand-1) 28%, var(--brand-3) 48%,
    var(--brand-1) 70%, var(--brand-2) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: sheen 7s linear infinite;
  position: relative; z-index: 1;}
.hero-name .tm { font-size: 0.3em; vertical-align: super; -webkit-text-fill-color: var(--muted);}
.hero-tag {
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 550;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
  position: relative; z-index: 1;}
.hero-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
  position: relative; z-index: 1;}
.hero-meta > div { min-width: 0;}
.hero-meta .hm-l {
  font-size: 9px; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--faint);}
.hero-meta .hm-v {
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--fg); margin-top: 3px;
  font-variant-numeric: tabular-nums;}
@media (prefers-reduced-motion: reduce) {
  .brand-word, .hero-name { animation: none;}
  .hero::after { display: none;}
}


.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));}
.sidebar::after { display: none !important;}
.sidebar::before { display: none !important;}
.sb-head { display: flex; align-items: center; border-bottom: 1px solid var(--line);}
.sb-mark { display: grid; place-items: center;
  border-radius: 8px; font-size: 14px;}
.sb-title { color: var(--fg);}
.sb-sub { letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px;}

.sb-group {
  display: flex; align-items: center; gap: 6px; width: 100%; text-transform: uppercase; background: none; border: 0; cursor: pointer;}
.gcount { margin-left: auto; opacity: 0.8;}

.sb-item {
  display: flex; align-items: center;
  text-decoration: none; position: relative;}
.sb-item .ic { text-align: center;}
.sb-item .cnt { margin-left: auto;}

.sb-foot { border-top: 1px solid var(--line); padding: 10px;}
.sb-user { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line);}
.avatar {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; font-size: 10.5px; font-weight: 750;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #0a0d14;}
.sb-user .nm { font-size: 12px; font-weight: 600; color: var(--fg);}
.sb-user .rl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;}

/* ── Taming the old shine effects ────────────────────────────────────────────
   styles.css layers white gradients over buttons, tabs, nav items and progress
   bars — up to 40% white. Those were tuned for a light interface and a purple
   sidebar. On a dark field a white sweep does not read as gloss, it reads as a
   grey smudge, and it was part of why the tabs looked wrong. Dialled down to
   the accent colour at a fraction of the strength, or removed. */
.sb-item::after { display: none !important;}
.tab::after     { display: none !important;}
.prog > i::after { opacity: 0.25;}
.btn:not(.ghost)::after {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--brand-1) 22%, transparent), transparent 55%) !important;}
:root[data-theme='dark'] .kpi .shine::before {
  background: linear-gradient(100deg, transparent,
    color-mix(in srgb, var(--brand-1) 12%, transparent), transparent) !important;}

/* ── Dashboard KPI cards ─────────────────────────────────────────────────────
   These keep their per-card accent stripe — that is where the colour variety on
   the dashboard comes from, and it is genuinely useful: the eye learns which
   stripe belongs to which domain. */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px 14px;
  box-shadow: var(--shadow);
  overflow: hidden;}
.kpi:hover { border-color: var(--brand-line); transform: translateY(-2px);}
.kpi.wide { grid-column: span 2;}
.kpi::before { height: 3px !important; opacity: 0.95;}
.kpi-top { display: flex; align-items: center; gap: 7px; margin-bottom: 9px;}
.kpi-ic { font-size: 14px;}
.kpi-lbl {
  font-size: 9.5px; font-weight: 750; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);}
.kpi-val {
  font-size: 25px; font-weight: 750; letter-spacing: -0.03em;
  line-height: 1.08; color: var(--fg);
  font-variant-numeric: tabular-nums;}
.kpi-sub { font-size: 10.5px; color: var(--muted); margin-top: 5px; line-height: 1.45;}
.kpi-delta { font-size: 11px; font-weight: 700; margin-top: 6px;}
.kpi-badge {
  position: absolute; top: 11px; right: 11px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.09em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-1);}
.kpi-basis {
  font-size: 10px; color: var(--muted); line-height: 1.5;
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line);}
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px;}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;}
.topbar h2 { font-size: 15.5px; font-weight: 650;}
.topbar .sub { font-size: 11px; color: var(--muted); margin-top: 2px;}
.view { padding: 18px 20px 48px;}

/* ── Panels ──────────────────────────────────────────────────────────────── */
.card {
  overflow: hidden; margin-bottom: 14px;}
.card-head {
  display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid var(--line);}
.card-head h3 { font-weight: 650;}
.card-pad { padding: 14px;}

/* ── KPI strip ───────────────────────────────────────────────────────────── */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden; margin-bottom: 14px;
  box-shadow: var(--shadow);}
.stat { padding: 12px 14px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative;}
.stat:hover { background: var(--panel-2);}
.stat .l { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.stat .v { font-size: 20px; font-weight: 700; line-height: 1.1; letter-spacing: -0.028em; color: var(--fg);}
.stat .d { font-size: 10.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.stat.is-alarm { background: var(--down-soft); animation: none;}
.stat.is-alarm::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2.5px; background: var(--down);}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px;}
.tbl thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--raised);
  font-size: 9px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap; cursor: pointer; user-select: none;}
.tbl thead th:hover { color: var(--brand-1);}
.tbl thead th.sorted { color: var(--brand-1);}
.tbl thead th .arrow { opacity: 0.4; margin-left: 4px; font-size: 8px;}
.tbl thead th.sorted .arrow { opacity: 1;}

/* Body text at full brightness. In v1 this was --fg-dim and rows of figures
   were genuinely hard to read, which is unforgivable in a financial table. */
.tbl tbody td {
  padding: 8px 11px; height: 33px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  color: var(--fg); vertical-align: middle;}
.tbl tbody tr:nth-child(even) { background: color-mix(in srgb, var(--fg) 2%, transparent);}
.tbl tbody tr.row-selected { background: var(--brand-soft); box-shadow: inset 2.5px 0 0 var(--brand-1);}
.tbl td.num, .tbl th.num { text-align: right;}
.tbl tfoot td {
  padding: 10px 11px; font-weight: 700; font-size: 12px; color: var(--fg);
  border-top: 1.5px solid var(--brand-line);
  background: var(--panel-2); position: sticky; bottom: 0;}
.tbl-wrap { overflow: auto; max-height: 72vh;}

/* ── Column filters ──────────────────────────────────────────────────────── */
.filter-row th {
  position: sticky; top: 32px; z-index: 2;
  background: var(--panel-2);
  padding: 5px 7px 6px;
  border-bottom: 1px solid var(--brand-line);
  cursor: default; text-transform: none; letter-spacing: 0;}
.fin {
  width: 100%; min-width: 0; font: inherit; font-size: 10.5px;
  padding: 4px 7px; border-radius: 5px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); outline: none;}
.fin:focus { border-color: var(--brand-1); box-shadow: var(--focus);}
.fin::placeholder { color: var(--faint);}
.frange { display: flex; gap: 3px;}
.frange .fin { text-align: right;}

/* ── Controls ────────────────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--panel-2);}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600;
  background: var(--raised); border: 1px solid var(--line-2); color: var(--fg-dim);
  cursor: pointer; transition: all 0.13s ease;}
.btn:hover:not(:disabled) { background: var(--panel-2); border-color: var(--brand-line); color: var(--fg); transform: none; box-shadow: none;}
.btn.sm { padding: 5px 10px; font-size: 11px;}
.btn.primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: transparent; font-weight: 700;
  box-shadow: 0 2px 10px -3px color-mix(in srgb, var(--brand-1) 55%, transparent);}
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); border-color: transparent;}
.btn.danger { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, transparent); background: var(--down-soft);}
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-dim);}
.btn.ghost:hover:not(:disabled) { background: var(--raised); color: var(--fg);}
.btn:disabled { opacity: 0.4; cursor: not-allowed;}

.icon-btn {
  display: inline-grid; place-items: center; width: 27px; height: 27px;
  border-radius: 7px; font-size: 12px;
  background: transparent; border: 1px solid transparent; color: var(--fg-dim); cursor: pointer;}
.icon-btn:hover { background: var(--raised); color: var(--brand-1); border-color: var(--line-2);}
.icon-btn.del:hover { color: var(--down); background: var(--down-soft);}

.input, select.input, input.input {
  padding: 6px 10px; border-radius: 7px; font-size: 11.5px;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--fg); outline: none;}
.input:focus { border-color: var(--brand-1); box-shadow: var(--focus);}
.search { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 7px; padding: 0 9px;}
.search .mag { font-size: 11px; color: var(--muted);}
.search .input { border: 0; background: transparent; box-shadow: none; min-width: 180px;}
.search:focus-within { border-color: var(--brand-1); box-shadow: var(--focus);}

/* ── Chips ───────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 2.5px 8px; border-radius: 5px;
  background: var(--raised); border: 1px solid var(--line-2); color: var(--fg-dim);
  white-space: nowrap;}
.chip.up   { background: var(--up-soft);   border-color: color-mix(in srgb, var(--up) 38%, transparent);   color: var(--up);}
.chip.down { background: var(--down-soft); border-color: color-mix(in srgb, var(--down) 38%, transparent); color: var(--down);}
.chip.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 38%, transparent); color: var(--warn);}
.chip.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 38%, transparent); color: var(--info);}
.chip.live { background: var(--up-soft); border-color: color-mix(in srgb, var(--up) 42%, transparent); color: var(--up);}
.chip.live::before { content: ''; width: 5px; height: 5px; border-radius: 99px; background: var(--up); box-shadow: 0 0 6px var(--up); animation: livePulse 1.8s ease-in-out infinite;}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 13px; border-radius: 9px;
  font-size: 11.5px; line-height: 1.6;
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 2.5px solid var(--muted); color: var(--fg-dim); margin-bottom: 8px;}
.alert b { color: var(--fg); font-weight: 650;}
.alert .ic { flex: 0 0 auto; font-size: 14px; line-height: 1.35;}
.alert.info   { border-left-color: var(--info); background: var(--info-soft);}
.alert.good   { border-left-color: var(--up);   background: var(--up-soft);}
.alert.warn   { border-left-color: var(--warn); background: var(--warn-soft);}
.alert.danger { border-left-color: var(--down); background: var(--down-soft);}
.banner { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--fg-dim); margin-bottom: 12px;}

/* ── Tabs — module families and legacy .tabs, aligned identically ───────── */
.mtabs, .tabs {
  display: flex; gap: 3px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px; padding: 4px;
  border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow);}
.mtab, .tabs > a, .tabs > button, .tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600;
  color: var(--fg-dim); background: transparent; border: 1px solid transparent;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: all 0.13s ease; line-height: 1.35;}
.mtab:hover, .tabs > a:hover, .tabs > button:hover, .tab:hover { background: var(--raised); color: var(--fg);}
.mtab.on, .tabs > a.on, .tabs > button.on, .tab.on, .tab.active, .tabs .active {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #0a0d14; font-weight: 700; border-color: transparent;
  box-shadow: 0 2px 10px -3px color-mix(in srgb, var(--brand-1) 55%, transparent);}
:root[data-palette='indigo']  .mtab.on, :root[data-palette='indigo']  .tab.on,
:root[data-palette='royal']   .mtab.on, :root[data-palette='royal']   .tab.on,
:root[data-palette='crimson'] .mtab.on, :root[data-palette='crimson'] .tab.on { color: #fff;}
.mtab .ic { font-size: 12.5px;}
.mtab-cnt { font-size: 9px; font-weight: 750; padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--fg) 12%, transparent);}
.mtab.on .mtab-cnt { background: rgb(0 0 0 / 18%);}

/* ── Pager, modals, forms ────────────────────────────────────────────────── */
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); background: var(--panel-2);}
.modal-back { background: rgb(3 5 9 / 68%); backdrop-filter: blur(5px);}
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 13px; box-shadow: 0 28px 70px -18px rgb(0 0 0 / 70%);}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2);}
.modal-body { padding: 16px;}
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 13px 16px; border-top: 1px solid var(--line); background: var(--panel-2);}
.form-section { grid-column: 1 / -1; font-size: 9px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-1); padding: 13px 0 4px; border-bottom: 1px solid var(--brand-line); margin-bottom: 6px;}
.lbl { font-size: 10.5px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 5px;}

.empty { padding: 46px 20px; text-align: center; color: var(--muted);}
.empty .big { font-size: 32px; opacity: 0.35; margin-bottom: 10px;}
.empty h3 { font-size: 13px; color: var(--fg-dim); margin-bottom: 4px;}

.toast { background: var(--panel); border: 1px solid var(--line-2); border-left: 2.5px solid var(--brand-1); border-radius: 9px; padding: 11px 14px; font-size: 11.5px; color: var(--fg); box-shadow: 0 10px 28px -10px rgb(0 0 0 / 60%);}
.toast.ok { border-left-color: var(--up);} .toast.err { border-left-color: var(--down);} .toast.warn { border-left-color: var(--warn);}
.pal { background: var(--panel); border-color: var(--line-2);}
.pal-row { color: var(--fg-dim);}
.pal-row.on { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #0a0d14; font-weight: 650;}
:root[data-palette='indigo'] .pal-row.on, :root[data-palette='royal'] .pal-row.on,
:root[data-palette='crimson'] .pal-row.on { color: #fff;}
.pal-in input { font-size: 14.5px;}

/* ── Palette / settings menu ─────────────────────────────────────────────── */
.palette-menu { background: var(--panel); border: 1px solid var(--line-2); border-radius: 11px; box-shadow: 0 18px 44px -14px rgb(0 0 0 / 65%); padding: 6px;}
.palette-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: 7px; background: none; border: 0; color: var(--fg-dim); font-size: 11.5px; font-weight: 550; cursor: pointer; text-align: left;}
.palette-row:hover { background: var(--raised); color: var(--fg);}
.palette-row.on { background: var(--brand-soft); color: var(--fg); box-shadow: inset 0 0 0 1px var(--brand-line);}
.palette-row .swatch { display: flex; gap: 2px;}
.palette-row .swatch i { width: 9px; height: 15px; border-radius: 2px; display: block;}
.palette-row .tick { margin-left: auto; color: var(--brand-1);}

/* ── Extra Income chart ──────────────────────────────────────────────────── */
.ei-col { border-color: var(--brand-line); background: var(--brand-soft);}
.ei-got { background: linear-gradient(180deg, var(--brand-1), var(--brand-2));}

.tick-up { animation: tUp 1.2s ease-out;} .tick-down { animation: tDn 1.2s ease-out;}
@keyframes tUp { 0% { background: var(--up-soft); } 100% { background: transparent; } }
@keyframes tDn { 0% { background: var(--down-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important;} }

@media (min-width: 1500px) { .view { padding: 20px 30px 52px;} }
