/* ServaSW CRM. Brand: #2FA2DC blue, #4B617D slate, #424242 ink, #96D0ED light, #DCEFF9 pale.
   Mobile first: one column and a bottom tab bar; a sidebar from 960px. Light and dark from the same tokens. */
:root {
  --bg: #f4f7fa; --card: #ffffff; --card-2: #f8fafc; --ink: #24303d; --text: #424242; --muted: #66727f; --line: #e2e8ef; --line-2: #eef2f6;
  --blue: #2FA2DC; --blue-ink: #1a7fb3; --blue-soft: #e3f3fb; --slate: #4B617D; --nav: #14285A; --nav-ink: #c9d6ea; --nav-hi: #23407e;
  --ok: #1e8a52; --ok-soft: #e3f5ec; --warn: #9a6400; --warn-soft: #fff3d9; --bad: #c0392b; --bad-soft: #fdecea;
  /* chart series: blue, slate, teal, amber (checked for contrast on both themes) */
  --c1: #2FA2DC; --c2: #4B617D; --c3: #1aa384; --c4: #d98b00;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e141c; --card: #161f2b; --card-2: #1b2532; --ink: #e8eef5; --text: #d3dbe4; --muted: #95a3b3; --line: #273444; --line-2: #202b38;
  --blue: #4cb8e8; --blue-ink: #7fcdf0; --blue-soft: #15324a; --slate: #9fb2ca; --nav: #0a1424; --nav-ink: #a9b8cc; --nav-hi: #1a2e50;
  --ok: #5fd39a; --ok-soft: #123526; --warn: #f0c060; --warn-soft: #3a2e12; --bad: #ff8a7d; --bad-soft: #3d1a17;
  --c1: #4cb8e8; --c2: #9fb2ca; --c3: #3fd0ae; --c4: #f0b43c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141c; --card: #161f2b; --card-2: #1b2532; --ink: #e8eef5; --text: #d3dbe4; --muted: #95a3b3; --line: #273444; --line-2: #202b38;
    --blue: #4cb8e8; --blue-ink: #7fcdf0; --blue-soft: #15324a; --slate: #9fb2ca; --nav: #0a1424; --nav-ink: #a9b8cc; --nav-hi: #1a2e50;
    --ok: #5fd39a; --ok-soft: #123526; --warn: #f0c060; --warn-soft: #3a2e12; --bad: #ff8a7d; --bad-soft: #3d1a17;
    --c1: #4cb8e8; --c2: #9fb2ca; --c3: #3fd0ae; --c4: #f0b43c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
small, .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .logo img { height: 26px; display: block; }
.topbar .spacer { flex: 1; }
.topbar .logo img.on-dark { display: none; }
:root[data-theme="dark"] .topbar .logo img.on-light { display: none; }
:root[data-theme="dark"] .topbar .logo img.on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar .logo img.on-light { display: none; } :root:not([data-theme="light"]) .topbar .logo img.on-dark { display: block; } }
.main { padding: 18px max(16px, env(safe-area-inset-left)) calc(84px + env(safe-area-inset-bottom)); max-width: 1320px; margin: 0 auto; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font: 600 11px var(--font); color: var(--muted); background: none; border: 0; cursor: pointer; }
.tabbar a.on, .tabbar a:hover { color: var(--blue-ink); text-decoration: none; }
.tabbar svg { width: 22px; height: 22px; }
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(10, 18, 30, .45); }
.drawer nav { position: absolute; right: 0; top: 0; bottom: 0; width: min(300px, 86vw); background: var(--nav); padding: 18px 12px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
.nav a, .nav button.linkish { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--nav-ink); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--nav-hi); color: #fff; text-decoration: none; }
.nav a.on { background: var(--blue); color: #fff; }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .group { margin: 16px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7d8fa9; font-weight: 700; }
.nav .badge { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--nav); padding: 18px 12px; overflow-y: auto; }
  .side .logo img { height: 30px; margin: 4px 10px 18px; display: block; }
  .side .foot { margin-top: auto; padding: 12px; color: var(--nav-ink); font-size: 13px; }
  .topbar, .tabbar { display: none; }
  .main { padding: 24px 28px 48px; }
}

/* ---------- page parts ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; flex-wrap: wrap; }
.card > .bd { padding: 14px 16px 16px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.side-r { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (min-width: 1100px) { .grid.side-r { grid-template-columns: minmax(0, 1fr) 380px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: 600 14px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--blue-ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { min-height: 32px; padding: 4px 11px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.iconbtn svg { width: 19px; height: 19px; }

label { display: block; font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 5px; }
label .req { color: var(--bad); }
.field { margin-bottom: 14px; min-width: 0; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=time], input[type=url], input[type=tel], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: 15px var(--font);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; min-height: 280px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
.filters { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.filters .q { grid-column: 1 / -1; }
/* half a wide screen (about 900-1299px): search + two filters, then the rest; one row from 1300px */
@media (min-width: 900px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } .filters .q { grid-column: span 2; } }
@media (min-width: 1300px) { .filters { grid-template-columns: minmax(200px, 2fr) repeat(5, minmax(0, 1fr)) auto; } .filters .q { grid-column: auto; } }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash ul { margin: 0; padding-left: 18px; }
.banner-mode { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border-radius: 10px; margin-bottom: 16px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.banner-mode svg { width: 18px; height: 18px; flex: none; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--slate); border: 1px solid transparent; }
.pill.new, .pill.researching { background: var(--line-2); color: var(--slate); }
.pill.contacted, .pill.logged, .pill.sent, .pill.delivered { background: var(--blue-soft); color: var(--blue-ink); }
.pill.engaged, .pill.opened, .pill.clicked { background: #e7f0ff; color: #2f5fb0; }
:root[data-theme="dark"] .pill.engaged, :root[data-theme="dark"] .pill.opened, :root[data-theme="dark"] .pill.clicked { background: #1b2a4a; color: #9dbdf5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.engaged, :root:not([data-theme="light"]) .pill.opened, :root:not([data-theme="light"]) .pill.clicked { background: #1b2a4a; color: #9dbdf5; } }
.pill.replied, .pill.trial { background: var(--warn-soft); color: var(--warn); }
.pill.customer, .pill.paid, .pill.active { background: var(--ok-soft); color: var(--ok); }
.pill.lost, .pill.cancelled, .pill.stopped, .pill.completed { background: var(--line-2); color: var(--muted); }
.pill.do_not_contact, .pill.bounced, .pill.failed, .pill.complained, .pill.unsubscribed { background: var(--bad-soft); color: var(--bad); }
.pill.outline { background: transparent; border-color: var(--line); color: var(--muted); }
.tag { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* tables: a card list on phones, a table from 760px */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tbody tr:hover { background: var(--card-2); }
.tbl .name { font-weight: 600; color: var(--ink); }
@media (max-width: 759px) {
  table.tbl.cards thead { display: none; }
  table.tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.cards td { padding: 2px 0; border: 0; }
  .tbl.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; }
  .tbl.cards td.hide-sm { display: none; }
  .tbl.cards td.r { text-align: left; }
}

/* KPI tiles */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px; }
.kpi .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .val { font-size: 26px; font-weight: 700; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--k); vertical-align: -1px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .track { display: block; height: 10px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.bar-row .fill { display: block; height: 100%; border-radius: 6px; background: var(--c1); }
/* long names ("Lawn and outdoor power equipment") wrap to two lines rather than being cut */
.bar-row .lab { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; overflow-wrap: anywhere; }
.funnel { display: grid; gap: 8px; }
.funnel .step { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13.5px; }
.funnel .frow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.funnel .fbar { height: 26px; border-radius: 7px; background: var(--blue); flex: none; min-width: 6px; }
.funnel .fnum { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel .step:nth-child(n+3) .fbar { background: var(--slate); }
.funnel .step:nth-child(n+5) .fbar { background: var(--c3); }
.funnel .conv { font-weight: 500; color: var(--muted); margin-left: 4px; font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; flex-wrap: wrap; }
.seg a { padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg a.on { background: var(--blue); color: #fff; }
.seg a:hover { text-decoration: none; background: var(--blue-soft); }
.seg a.on:hover { background: var(--blue); }

/* lead page */
.lead-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-ink); display: flex; align-items: center; justify-content: center; }
.timeline .ico svg { width: 15px; height: 15px; }
.timeline .ico.signup { background: var(--ok-soft); color: var(--ok); }
.timeline .ico.optout { background: var(--bad-soft); color: var(--bad); }
.timeline .ico.note, .timeline .ico.call, .timeline .ico.status { background: var(--line-2); color: var(--slate); }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .txt { overflow-wrap: anywhere; }
details.box { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card-2); }
details.box > summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--ink); }
details.box[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.email-preview { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fff; color: #2b2f33; font: 15px/1.5 Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
.email-preview a { color: #1a7fb3; }
.merge-list { display: flex; flex-wrap: wrap; gap: 6px; }
.merge-list button { font: 12.5px ui-monospace, Consolas, monospace; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); cursor: pointer; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 14px 0 4px; font-size: 14px; }
.pager a, .pager span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); }
.pager span.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager span.off { opacity: .45; }
.steps-edit .step { display: grid; grid-template-columns: 32px minmax(0, 1fr) 110px 40px; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.steps-edit .n { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
@media (max-width: 559px) { .steps-edit .step { grid-template-columns: 28px minmax(0, 1fr) 40px; } .steps-edit .step .delay { grid-column: 2; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; }
.checklist .y { color: var(--ok); font-weight: 700; } .checklist .n { color: var(--warn); font-weight: 700; }
.codebox { display: flex; gap: 8px; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 6px 12px; font: 13px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.codebox span { flex: 1; min-width: 0; }

/* sign-in + public pages */
.solo { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.solo .card { width: min(420px, 100%); padding: 28px 24px; }
.solo .logo img { height: 34px; margin: 0 auto 18px; display: block; }
.solo .logo .on-dark { display: none; }
:root[data-theme="dark"] .solo .logo .on-light { display: none; } :root[data-theme="dark"] .solo .logo .on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .solo .logo .on-light { display: none; } :root:not([data-theme="light"]) .solo .logo .on-dark { display: block; } }
.sample-note { font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 1px 7px; }
@media (prefers-reduced-motion: no-preference) { .btn, .iconbtn, .nav a { transition: background .15s, filter .15s; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 759px) { .wide-only { display: none; } }
@media (min-width: 760px) { .narrow-only { display: none; } }

/* Growth page: metric cards measured against benchmarks (resources/views/growth, components/bench-card) */
h2.sec { margin: 22px 0 10px; font-size: 15px; color: var(--slate); text-transform: uppercase; letter-spacing: .05em; }
h2.sec:first-of-type { margin-top: 8px; }
.kpi.bench { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .tip { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); font-size: 10.5px; color: var(--muted); cursor: help; margin-left: 3px; vertical-align: 1px; }
.gauge { position: relative; height: 8px; border-radius: 99px; background: var(--bad-soft); margin: 10px 0 6px; }
.gauge .z-mid { position: absolute; top: 0; bottom: 0; background: var(--warn-soft); }
.gauge .z-top { position: absolute; top: 0; bottom: 0; background: var(--ok-soft); border-radius: 0 99px 99px 0; }
.gauge .mark { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--card); }
.gauge .mark.g-top { background: var(--ok); } .gauge .mark.g-mid { background: var(--warn); } .gauge .mark.g-below { background: var(--bad); }
.bench-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.pill.g-top { background: var(--ok-soft); color: var(--ok); } .pill.g-mid { background: var(--warn-soft); color: var(--warn); } .pill.g-below { background: var(--bad-soft); color: var(--bad); }
.kpi .why { font-size: 12px; color: var(--muted); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.bench-tbl th.here, .bench-tbl td.here { background: var(--blue-soft); color: var(--ink); }
.bench-tbl td.here { font-weight: 700; }
.money-in { display: inline-flex; align-items: center; gap: 4px; }
.money-in span { color: var(--muted); }
.money-in input { width: 110px; text-align: right; }
.fin .src { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (min-width: 1200px) { .kpis:has(> .bench:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } .kpis:has(> .bench:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis:has(> .bench:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.flash > svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }

/* Half a wide screen (960-1299px, e.g. a 3440px monitor at 150% snapped to half): a narrower sidebar, less page
   padding and tighter table cells, so lists fit without a sideways scroll */
@media (min-width: 960px) and (max-width: 1299px) {
  .shell { grid-template-columns: 208px minmax(0, 1fr); }
  .main { padding: 20px 18px 40px; }
  .tbl th, .tbl td { padding-left: 7px; padding-right: 7px; }
}
/* the narrowest sidebar layout (960-1099px): lists drop their least-needed columns (shown on each record) */
@media (min-width: 960px) and (max-width: 1099px) { .tbl .hide-mid { display: none; } }
@media (min-width: 960px) and (max-width: 1099px) { .grid.side-r { grid-template-columns: minmax(0, 1fr); } .tbl th, .tbl td { padding-left: 5px; padding-right: 5px; } }
