* { box-sizing: border-box; }
/* Site palette — every page draws from these seven accents so the whole
   dashboard reads as one system (mirrored in app.js ACCENT). */
:root {
  --ink: #1f2430; --muted: #7a8090; --line: #e3e5ea; --bg: #f4f5f7;
  --c-blue: #2563eb; --c-green: #059669; --c-amber: #d97706; --c-red: #dc2626;
  --c-violet: #7c3aed; --c-cyan: #0891b2; --c-slate: #64748b;
}
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
/* Sticky header (owner layout 2026-07-12): the broad store badge is a LEFT
   COLUMN spanning both rows; beside it .header-main stacks the tab row (nav
   left, Data + profile pinned right) over the controls row (period/basis/
   refresh, right-aligned — its left half is empty, which is why the badge
   spans). #nav is the flexible piece: it shrinks and wraps its own tabs, so
   Data can never be pushed off the right edge. .header-inner is the SAME
   centered container as <main>, keeping header and content edges flush at
   any window width. The thin gradient ribbon is the site-wide brand accent. */
header { background: #fff; border-bottom: 1px solid var(--line); padding: 0 20px 8px; position: sticky; top: 0; z-index: 10; }
header::before { content: ""; display: block; height: 3px; margin: 0 -20px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-violet) 35%, var(--c-green) 70%, var(--c-amber)); }
/* 1240 = main's 1280 minus its 2×20px padding (main is border-box, the
   header's padding sits outside this container) — keeps header and content
   edges pixel-identical */
.header-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center;
  flex-wrap: wrap; gap: 4px 14px; padding-top: 8px; }
/* faint full-height rule separating the badge column from the tab/controls
   stack; self-stretch so it spans both rows */
.header-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px;
  border-left: 1px solid #edeff3; padding-left: 14px; align-self: stretch; justify-content: center; }
.header-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#nav { flex: 1 1 auto; min-width: 0; }
h1.store-badge { display: flex; align-items: center; gap: 10px; margin: 0; flex: 0 0 auto; }
.store-badge-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 0 0 3px #dbeafe; }
/* long store names wrap onto a second line instead of eating tab space —
   the badge column is capped, short names are unaffected */
.store-badge-text { display: flex; flex-direction: column; line-height: 1.2; max-width: 150px; overflow-wrap: anywhere; }
.store-badge-label { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #93a0b4; }
.store-badge-name { font-size: 19px; font-weight: 750; color: var(--ink); letter-spacing: -.01em; }
/* mobile: the spanning badge column would squeeze the tall wrapped tab stack
   into a sliver — stack instead: badge on its own line, then the tabs flowing
   full-width (2–3 lines), then the controls row */
@media (max-width: 720px) {
  h1.store-badge { flex: 1 1 100%; }
  .store-badge-text { max-width: none; }
  .header-main { flex: 1 1 100%; border-left: none; padding-left: 0; }
  .header-inner { gap: 6px 0; }
}
#user-button { display: flex; align-items: center; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav button { border: none; background: none; padding: 7px 11px; border-radius: 7px; cursor: pointer; font-size: 13px; color: #444; font-weight: 500; }
nav button.active { background: var(--ink); color: #fff; }
nav button:hover:not(.active) { background: #eef1f5; }
/* grouped tabs: a tab-styled button opening a dropdown of page buttons.
   #nav-right (Data Notes / Upload) is pushed to the far right, visually
   separated from the main tabs; its dropdown opens right-aligned so it
   never overflows the viewport edge. */
#nav-right { margin-left: auto; }
.nav-menu { position: relative; }
.nav-menu .caret { font-size: 10px; color: #93a0b4; }
.nav-menu-btn.active .caret { color: #cfd6e4; }
.nav-menu-list { display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid #e3e5ea; border-radius: 9px; padding: 4px;
  min-width: 150px; box-shadow: 0 10px 28px rgba(31,36,48,.14); z-index: 30; }
.nav-menu.open .nav-menu-list { display: block; }
.nav-menu-list button { display: block; width: 100%; text-align: left; white-space: nowrap; }
#nav-right .nav-menu-list { left: auto; right: 0; }
/* the controls row: full-width flex line under the tabs, right-aligned */
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.refresh-ico { font-size: 17px; font-weight: 700; line-height: 1; color: var(--c-blue);
  display: inline-block; vertical-align: -2px; margin-right: 2px; }
select, #refresh { padding: 6px 10px; border-radius: 7px; border: 1px solid #cfd3da; background: #fff; font-size: 13px; cursor: pointer; }
#refresh:hover { background: #eef1f5; }
.toggle { display: flex; border: 1px solid #cfd3da; border-radius: 7px; overflow: hidden; }
.toggle button { border: none; background: #fff; padding: 6px 10px; font-size: 12px; cursor: pointer; color: #555; }
.toggle button.active { background: #2563eb; color: #fff; }
.banner { margin: 10px 20px 0; padding: 10px 14px; border-radius: 8px; background: #ecfdf5; border: 1px solid #a7f3d0; font-size: 13px; white-space: pre-line; }
.banner.error { background: #fef2f2; border-color: #fecaca; }
.banner.info { background: #eff6ff; border-color: #bfdbfe; }
.notif-enable { margin-left: 10px; padding: 4px 10px; border: 1px solid #2563eb;
  background: #2563eb; color: #fff; border-radius: 6px; cursor: pointer; font-size: 12px; }
.notif-enable:hover { background: #1d4ed8; }
.banner-close { float: right; border: none; background: none; cursor: pointer; font-size: 16px;
  line-height: 1; color: inherit; padding: 0 0 4px 10px; }
main { padding: 18px 20px 40px; max-width: 1280px; margin: 0 auto; }
.muted { color: #7a8090; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.card { background: #fff; border: 1px solid #e3e5ea; border-radius: 12px; padding: 14px 16px; overflow-x: auto;
        box-shadow: 0 1px 2px rgba(31, 36, 48, .04); }
.card.wide { grid-column: 1 / -1; }
/* wide-ish card: takes two grid tracks when the grid has them (e.g. the
   Overview By-store table — 7 columns scroll inside a single track), one on
   narrow screens where the grid is single-column anyway */
.card.grow { grid-column: span 2; }
@media (max-width: 720px) { .card.grow { grid-column: auto; } }
/* full-width row of equal-width sibling cards inside a .grid (Champions Board:
   the three counter-overview cards on one level, the two leaderboards 50/50 on
   the next — owner layout 2026-07-31). Cards keep their own overflow-x scroll;
   min-width:0 lets a wide table shrink into its share instead of blowing the row. */
.card-row { grid-column: 1 / -1; display: flex; gap: 14px; align-items: stretch; }
.card-row > .card { flex: 1 1 0; min-width: 0; }
@media (max-width: 900px) { .card-row { flex-wrap: wrap; }
  .card-row > .card { flex-basis: 100%; } }
.card h3 { margin: 0 0 10px; font-size: 13.5px; color: #333; font-weight: 650; }
/* accented card: colored top edge + matching dot before the title — the
   page-wide color language (set --acc via card()'s opts.acc in app.js) */
.card.acc { border-top: 3px solid var(--acc); }
.card.acc > h3::before { content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 3px; background: var(--acc); margin-right: 8px; }
.card .note { font-size: 12px; color: #7a8090; margin: 6px 0 0; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid #e3e5ea; border-radius: 12px; padding: 12px 14px;
       box-shadow: 0 1px 2px rgba(31, 36, 48, .04); }
.kpi .label { font-size: 12px; color: #7a8090; }
.kpi .value { font-size: 21px; font-weight: 650; margin-top: 3px; }
.kpi .sub { font-size: 11.5px; color: #7a8090; margin-top: 3px; }
/* second-rank number in a KPI box (e.g. month total under a day's sale):
   bold and readable, unlike the fine-print .sub line */
.kpi .sub-strong { font-size: 15.5px; font-weight: 650; color: #1f2430; margin-top: 5px; }
.overview-controls { display: flex; justify-content: flex-end; align-items: center;
  gap: 8px; margin-bottom: 10px; }
.overview-controls label { font-size: 12px; color: #7a8090; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e3e5ea; white-space: nowrap; }
th { color: #7a8090; font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .02em;
     white-space: normal; line-height: 1.25; vertical-align: bottom; max-width: 96px; border-bottom: 2px solid #cfd3da; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.neg { color: #dc2626; }
tbody tr:nth-child(even) td { background: #f7f8fa; }
tbody tr:hover td { background: #eef3fb; }
.status-ok { color: var(--c-green); font-weight: 650; }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 340px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; background: #eef1f5; }
.pill.watches { background: #dbeafe; color: #1d4ed8; }
.pill.eyewear { background: #d1fae5; color: #047857; }
.pill.service { background: #fef3c7; color: #b45309; }
ul.flags { margin: 0; padding-left: 18px; font-size: 13px; }
ul.flags li { margin-bottom: 6px; }
/* Champions Board page */
.star-hero { border: 1px solid #fcd34d; overflow: visible; position: relative;
             background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 45%, #eff6ff 100%);
             padding: 22px 20px 16px; }
.star-ribbon { position: absolute; top: -11px; left: 16px; padding: 3px 14px; border-radius: 999px;
               background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
               font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
               box-shadow: 0 2px 6px rgba(217, 119, 6, .35); }
.star-body { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.star-id { display: flex; flex-direction: column; align-items: center; text-align: center;
           gap: 4px; flex: 0 0 auto; min-width: 170px; }
.avatar { position: relative; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
          background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; flex: 0 0 auto;
          display: flex; align-items: center; justify-content: center;
          font-weight: 750; font-size: 20px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #fcd34d; }
.avatar.big { width: 96px; height: 96px; font-size: 34px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.star-name { font-size: 21px; font-weight: 750; margin-top: 4px; }
.star-role { font-size: 12.5px; color: #7a8090; display: flex; gap: 6px; align-items: center; }
.star-stats { font-size: 12px; color: #92700c; font-weight: 600; }
.star-comps { flex: 1 1 280px; display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.comp-row { display: grid; grid-template-columns: 92px 1fr 64px; gap: 10px; align-items: center; }
.comp-label { font-size: 11.5px; font-weight: 650; color: #444; }
.comp-bar { height: 10px; border-radius: 999px; background: rgba(31, 36, 48, .08); overflow: hidden; }
.comp-bar div { height: 100%; border-radius: 999px; }
.comp-pts { font-size: 12.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.comp-pts span { font-weight: 500; color: #7a8090; font-size: 11px; }
.star-ringbox { flex: 0 0 auto; text-align: center; }
.score-ring { width: 118px; height: 118px; }
.ring-bg { fill: none; stroke: rgba(31, 36, 48, .1); stroke-width: 9; }
.ring-fg { fill: none; stroke: #d97706; stroke-width: 9; stroke-linecap: round; }
.ring-num { font-size: 27px; font-weight: 750; fill: #1f2430; text-anchor: middle; }
.ring-lbl { font-size: 10px; fill: #7a8090; text-anchor: middle; }
.ring-cap { font-size: 11px; font-weight: 650; color: #92700c; margin-top: 2px;
            text-transform: uppercase; letter-spacing: .05em; }
.star-why { margin: 14px 0 0; padding: 0 0 0 2px; list-style: none; display: flex;
            flex-direction: column; gap: 4px; }
.star-why li { font-size: 12.5px; color: #444; }
.star-why li::before { content: "✔"; color: #b45309; font-weight: 700; margin-right: 7px; }
.badges { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.badge-chip { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e3e5ea;
              border-radius: 10px; padding: 10px 12px; background: #fafbfc; }
.badge-emoji { font-size: 22px; line-height: 1.2; }
.badge-text { min-width: 0; }
.badge-title { font-size: 11px; font-weight: 700; text-transform: uppercase;
               letter-spacing: .04em; color: #7a8090; }
.badge-name { font-size: 13.5px; font-weight: 700; display: flex; gap: 6px; align-items: center;
              flex-wrap: wrap; margin: 2px 0; }
.badge-detail { font-size: 11.5px; color: #7a8090; }
tr.ineligible td { color: #a5abb8; }
.why-not { font-size: 11px; color: #a5abb8; font-style: italic; }
.delta-up { color: #059669; font-weight: 650; }
.delta-down { color: #dc2626; font-weight: 650; }
.svc-flex { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.svc-tech { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 110px; }
.svc-tech-name { font-size: 14px; font-weight: 700; margin-top: 4px; }
.svc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
            gap: 10px 16px; flex: 1 1 220px; }
.svc-kpis .label { font-size: 11px; color: #7a8090; }
.svc-kpis .v { font-size: 15px; font-weight: 650; margin-top: 1px; }
.svc-chart { position: relative; height: 140px; flex: 0 1 180px; min-width: 150px; }
ol.rules-list { margin: 0 0 8px; padding-left: 20px; font-size: 13px; }
ol.rules-list li { margin-bottom: 6px; }
/* per-counter sub-points inside a score-explainer item (Add-On Selling) */
ol.rules-list ul.rules-sub { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
ol.rules-list ul.rules-sub li { margin-bottom: 3px; }
/* Action Items page */
.pill.sev-high { background: #fee2e2; color: #b91c1c; }
.pill.sev-medium { background: #fef3c7; color: #b45309; }
.pill.sev-low { background: #eef1f5; color: #555; }
.pill.sev-partner { background: #ede9fe; color: #6d28d9; }
.action-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid #e3e5ea; }
.action-item:last-child { border-bottom: none; }
.action-item .act-check { margin-top: 4px; width: 15px; height: 15px; cursor: pointer; flex: 0 0 auto; }
.item-body { flex: 1; min-width: 0; }
.item-title { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-detail { font-size: 12.5px; color: #444; margin-top: 3px; }
.item-partner { font-size: 12px; color: #6d28d9; margin-top: 3px; }
.item-comment { font-size: 12px; color: #1f2430; background: #f7f8fa; border-radius: 6px; padding: 4px 8px; margin-top: 5px; }
.item-comment-edit input { width: 100%; margin-top: 6px; padding: 6px 8px; border: 1px solid #cfd3da; border-radius: 6px; font-size: 12.5px; }
.item-actions { display: flex; gap: 8px; flex: 0 0 auto; font-size: 13px; }
.item-actions a { text-decoration: none; }
.item-done .item-title b, .item-done .item-detail { text-decoration: line-through; color: #7a8090; }
.item-stale { opacity: 0.65; }
.item-stale-note { font-size: 11.5px; color: #b45309; margin-top: 3px; }
.act-history { margin-top: 10px; }
.act-history summary { cursor: pointer; font-size: 12.5px; color: #7a8090; }
.act-add { display: flex; flex-direction: column; gap: 8px; }
/* wide one-line variant (Targets): inputs flex to fill the row, wrap on mobile */
.act-add.row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.act-add.row #act-new-title { flex: 3 1 280px; min-width: 0; }
.act-add.row #act-new-detail { flex: 2 1 200px; min-width: 0; }
.act-add.row select { flex: 0 1 auto; }
.act-add.row button { align-self: center; white-space: nowrap; }
.act-add input, .act-add select { padding: 7px 9px; border: 1px solid #cfd3da; border-radius: 7px; font-size: 13px; }
.act-add button, #ai-gen-btn { padding: 7px 12px; border: none; border-radius: 7px; background: #1f2430; color: #fff; font-size: 13px; cursor: pointer; align-self: flex-start; }
#ai-gen-btn:disabled { background: #9aa1ad; cursor: default; }
/* item numbering (UI-only, positional) */
.item-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #1f2430; color: #fff;
            font-size: 11.5px; font-weight: 650; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
/* AI Advisor — flagship: centered box, corner provider badge */
.ai-card { border: 1px solid #c7d2fe; background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 60%, #fff 100%);
           max-width: 860px; width: 100%; justify-self: center; position: relative;
           padding: 16px 18px 14px; overflow: visible; }
.ai-card h3 { font-size: 15px; margin-right: 150px; }
.gemini-mark { width: 15px; height: 15px; vertical-align: -2px; margin-left: 4px; }
.ai-badge { position: absolute; top: -10px; right: 14px; padding: 3px 12px; border-radius: 999px;
            background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff;
            font-size: 11px; font-weight: 650; letter-spacing: .02em;
            box-shadow: 0 2px 6px rgba(124, 58, 237, .35); }
.ai-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ai-foot .note { margin: 0; }
#ai-gen-btn { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.ai-list { list-style: none; counter-reset: ai; margin: 0 0 6px; padding: 0; }
.ai-list li { counter-increment: ai; display: flex; gap: 10px; align-items: flex-start;
              font-size: 13px; line-height: 1.45; padding: 6px 0; border-bottom: 1px dashed #dcd6f7; }
.ai-list li:last-child { border-bottom: none; }
.ai-list li::before { content: counter(ai); flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
                      background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; font-size: 11px;
                      font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }

/* Targets page (docs/targets.md) */
.target-att { font-size: 26px; font-weight: 700; margin: 6px 0 2px; }
.progress { height: 8px; border-radius: 999px; background: #e5e9f0; overflow: hidden; margin: 4px 0 12px; position: relative; }
.progress > div { height: 100%; border-radius: 999px; }
.progress > div.ok { background: #059669; }
.progress > div.near { background: #d97706; }
.progress > div.behind { background: #dc2626; }
/* 3-rung incentive ladder: a tick per rung on the pacing bar */
.progress .tick { position: absolute; top: 0; bottom: 0; width: 2px; background: #64748b; z-index: 1; }
.tier-nudge { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #b45309; }
.target-rows div { display: flex; justify-content: space-between; gap: 12px;
                   font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed #e5e9f0; }
.target-rows div:last-child { border-bottom: none; }
.target-rows span { color: #666; }
.target-rows b { font-weight: 650; }
.target-rows b.neg { color: #dc2626; }
.pill.sev-ok { background: #d1fae5; color: #047857; }
.ai-week-h { font-size: 12px; color: #6d28d9; margin: 10px 0 2px; }

/* Accented KPI — the site-wide pattern (Overview, GST, P&L, Bank Recon,
   Titan Account…): colored top edge + the headline number in the same color */
.kpi.acc { border-top: 3px solid var(--acc); }
.kpi.acc .value { color: var(--acc); }
.kpi.acc.tint { background: color-mix(in srgb, var(--acc) 7%, #fff); border-color: var(--acc); }

/* P&L page — grouped statement (one section per money bucket) */
.pnl-stmt { display: flex; flex-direction: column; gap: 12px; }
.pnl-sec { border: 1px solid #e3e5ea; border-left: 4px solid var(--sec); border-radius: 9px; overflow: hidden; }
.pnl-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; background: color-mix(in srgb, var(--sec) 7%, #fff); }
.pnl-sec-title { font-size: 11.5px; font-weight: 750; text-transform: uppercase;
  letter-spacing: .06em; color: var(--sec); }
.pnl-sec-total { font-size: 14.5px; font-weight: 700; color: var(--sec);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.pnl-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 14px;
  border-top: 1px solid #eef0f4; background: #fff; }
.pnl-row-label { font-size: 13px; }
.pnl-row-note { font-size: 11.5px; color: #7a8090; flex: 1; }
.pnl-row-amt { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* staff-discount Titan-payback inline editor (P&L) */
.pnl-row-note.sdrec { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sdrec-input { width: 104px; padding: 3px 7px; border: 1px solid #cfd3da; border-radius: 6px;
  font-size: 12px; font-variant-numeric: tabular-nums; }
.sdrec-save { padding: 3px 10px; border: none; border-radius: 6px; background: #1f2430;
  color: #fff; font-size: 11.5px; cursor: pointer; }
.sdrec-reset { padding: 3px 10px; border: 1px solid #cfd3da; border-radius: 6px;
  background: #fff; color: #1f2430; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.sdrec-reset:hover { background: #f3f4f6; }
.sdrec-tag { color: #93a0b4; }
.pnl-band { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 9px; background: #eef1f5; }
.pnl-band-label { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.pnl-band-label small { display: block; font-weight: 500; font-size: 11px; opacity: .75;
  text-transform: none; letter-spacing: 0; margin-top: 1px; }
.pnl-band-amt { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pnl-band.net-pos { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
.pnl-band.net-neg { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }
/* expandable expense categories */
details.pnl-exp summary.pnl-row { cursor: pointer; list-style: none; user-select: none; }
details.pnl-exp summary.pnl-row::-webkit-details-marker { display: none; }
details.pnl-exp summary.pnl-row:hover { background: #fafbfc; }
.pnl-caret { flex: 0 0 auto; font-size: 10px; color: #93a0b4; align-self: center;
  transition: transform .15s ease; }
details.pnl-exp[open] .pnl-caret { transform: rotate(90deg); }
.pnl-entries { background: #fafbfc; border-top: 1px dashed #e3e5ea; padding: 3px 0; }
.pnl-entry { display: flex; align-items: baseline; gap: 10px; padding: 4px 14px 4px 37px;
  font-size: 12px; color: #555; }
.pnl-entry-date { flex: 0 0 52px; color: #93a0b4; font-variant-numeric: tabular-nums; }
.pnl-entry-desc { flex: 1; }
.pnl-entry .pnl-row-amt { font-size: 12px; }

/* payslip popup (Salary page) */
.green { color: #047857; }
.red { color: #b91c1c; }
.amber { color: #b45309; }
.slip-btn { border: 1px solid #cfd3da; background: #fff; border-radius: 7px; padding: 3px 10px;
  font-size: 12px; cursor: pointer; color: #1f2430; white-space: nowrap; }
.slip-btn:hover { background: #eef1f5; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 18, 25, .45); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 12px; max-width: 660px; width: 100%; max-height: 85vh;
  overflow-y: auto; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 12.5px; color: #7a8090; margin-top: 2px; }
.modal-close { border: none; background: #eef1f5; border-radius: 7px; width: 28px; height: 28px;
  cursor: pointer; font-size: 14px; color: #444; flex: 0 0 auto; }
.modal-close:hover { background: #e3e5ea; }
.slip-sec-head { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
  color: #7a8090; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #e3e5ea; }
.slip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.slip-stat { background: #fafbfc; border: 1px solid #eceef2; border-radius: 8px; padding: 7px 9px; }
.slip-stat .label { font-size: 11px; color: #7a8090; }
.slip-stat .value { font-size: 14.5px; font-weight: 650; margin-top: 2px; }
.slip-total { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #ecfdf5;
  border: 1px solid #a7f3d0; font-size: 13.5px; }
.slip-total b { color: #047857; }
.modal-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.dl-pill { display: inline-block; padding: 7px 12px; border-radius: 7px; background: #1f2430;
  color: #fff; font-size: 13px; text-decoration: none; }
.dl-pill:hover { background: #343b4d; }
