/* TrustTide Marketing: the client portal's look (portal includes/header.php):
   Inter, the same navy rail and white top bar, the same colours and the calm
   type rules (weights to 600, 14.5px base, 22px page titles). */
:root {
  --navy: #072B32;
  --brand-navy: #043668;
  --green: #049D5E;
  --green-dark: #04774D;
  --green-soft: #E7F6EC;
  --ink: #2A3744;
  --muted: #617180;
  --line: #E3E8EC;
  --bg: #F4F6F8;
  --white: #FFFFFF;
  --gold: #F5A623;
  --amber: #93650F;
  --amber-soft: #FDF3E3;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.55 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, b, strong, th { font-weight: 600; }
a { color: var(--green-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* The shell */
.shell { display: flex; min-height: 100vh; }
.rail { flex: 0 0 76px; background: var(--navy); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; position: sticky; top: 0; height: 100vh; z-index: 40; }
.rail-logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; margin-bottom: 12px; flex: none; }
.rail-logo img { width: 28px; height: auto; display: block; }
.rail-item { position: relative; width: 64px; min-height: 56px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #B8CBD9; font-size: 10.5px; font-weight: 500; text-decoration: none; flex: none; }
.rail-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail-item[aria-current="page"] { background: #0E4650; color: #fff; }
.rail-spacer { flex: 1; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px; }
.tb-search { flex: 1 1 auto; max-width: 560px; display: flex; align-items: center; gap: 8px; background: #F4F6F8; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; height: 38px; color: var(--muted); }
.tb-search svg { width: 17px; height: 17px; flex: none; }
.tb-search input[type="search"] { border: 0; background: transparent; padding: 0; height: 100%; font-size: 13.5px; width: 100%; }
.tb-search input[type="search"]:focus { outline: none; }
.tb-search:focus-within { border-color: var(--green); background: #fff; }
.tb-app { flex: none; margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--navy); text-decoration: none; border: 1px solid #CFE3DA; background: #EEF8F3; border-radius: 8px; padding: 7px 12px; }
.tb-app:hover { background: #E1F3EA; border-color: var(--green); }
.navmenu { position: relative; }
.navmenu > summary { list-style: none; cursor: pointer; }
.navmenu > summary::-webkit-details-marker { display: none; }
.nav-btn { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink); padding: 4px 6px; border-radius: 8px; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.nav-caret { color: var(--muted); font-size: 11px; }
.navdd { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(22,35,43,.16); padding: 6px; min-width: 240px; z-index: 50; }
.navdd a, .navdd button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; text-decoration: none; }
.navdd a:hover, .navdd button:hover { background: #F3F6F9; color: var(--brand-navy); }
.navdd hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.navdd form { margin: 0; }
.nav-who { padding: 8px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-pill { background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }

/* Signed-out pages: the portal's white header with the animated logo */
header.site { background: rgba(247,247,247,.97); border-bottom: 1px solid var(--line); position: relative; box-shadow: 0 2px 14px rgba(7,43,50,.04); }
header.site::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--green), var(--gold)); }
.site-in { max-width: 1180px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-h-34 { --logo-h: 34px; }
.logo-tag { font-size: 10.5px; font-weight: 600; color: var(--green-dark); letter-spacing: .05em; text-transform: uppercase; background: var(--green-soft); padding: 3px 9px; border-radius: 999px; }

.main { width: 100%; max-width: 1320px; padding: 22px 28px 48px; }
.main-narrow { margin: 0 auto; max-width: 1120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1 { font-size: 21px; line-height: 1.25; color: var(--brand-navy); margin: 0 0 4px; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 13.5px; }
.page-head { margin-bottom: 18px; }
.page-head p { color: var(--muted); font-size: 13.5px; margin: 0; }


.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.tile .n { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: 13.5px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.panel h2 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.panel p { margin: 0 0 10px; max-width: 64ch; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: baseline; }
.steps .tag { flex: none; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--bg); color: var(--muted); }
.steps .tag.now { background: var(--green-soft); color: var(--green); }

.signin { max-width: 440px; margin: 48px auto 0; }
.signin .panel { padding: 28px; }
.btn { display: inline-block; font: inherit; font-weight: 600; background: var(--green); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-dark); }
.notice { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.muted { color: var(--muted); }

/* ---------------------------------------------------------------- CRM (23 Nov 2026) */
:root { --blue: #1D5FA8; --blue-soft: #E8F0FA; --red: #B42318; --red-soft: #FDECEA; --violet: #6941C6; --violet-soft: #F1ECFB; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.small { font-size: 13px; } .strong { font-weight: 600; color: var(--ink); text-decoration: none; }
a.strong:hover { color: var(--green); } .nowrap { white-space: nowrap; } .right { text-align: right; } .pad { padding: 0 18px 14px; }
.crumbs { margin: 0 0 6px; font-size: 13px; color: var(--muted); } .crumbs a { color: var(--muted); }

.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head-row h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-row .sub { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-call { background: var(--navy); }
.btn-call:hover { background: #0b3c45; }
.link-btn { font: inherit; font-size: 13px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

.flash { border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.flash-ok { background: var(--green-soft); color: #05603A; }
.flash-err { background: var(--red-soft); color: var(--red); }
.flash-warn { background: var(--amber-soft); color: var(--amber); }

.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
a.tile { text-decoration: none; color: inherit; }
a.tile:hover { border-color: var(--green); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.split-side .card h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 18px 6px; font-weight: 600; }
.split-side .card > p, .split-side .card > form, .split-side .card > dl { margin: 0 18px 10px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 18px 10px; }
.card-head h2 { font-size: 16px; margin: 0; font-weight: 600; }

.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.row-main { text-decoration: none; color: var(--ink); min-width: 0; }
.row-main b { display: block; font-weight: 600; }
.row-main span { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.pill, .chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.stage-new { background: var(--blue-soft); color: var(--blue); }
.stage-contacted { background: var(--bg); color: var(--ink); }
.stage-interested { background: var(--green-soft); color: #05603A; }
.stage-quote { background: var(--violet-soft); color: var(--violet); }
.stage-won { background: #D1FADF; color: #05603A; }
.stage-lost { background: var(--bg); color: var(--muted); }
.pill-ok { background: var(--green-soft); color: var(--green-dark); }
.pill-warn { background: var(--amber-soft); color: var(--amber); }
.pill-err { background: var(--red-soft); color: var(--red); }
.pill-dnc { background: var(--red-soft); color: var(--red); }
.chip-late { background: var(--red-soft); color: var(--red); }
.chip-due { background: var(--amber-soft); color: var(--amber); }
.chip-later { background: var(--bg); color: var(--muted); }
.chip-warn { background: var(--amber-soft); color: var(--amber); font-weight: 500; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters input[type="search"] { flex: 1 1 260px; min-width: 0; }
input[type="search"], input[type="text"], input[type="tel"], input[type="email"], input[type="datetime-local"], input[type="file"], select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
.views { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.views a { font-size: 13px; padding: 5px 11px; border-radius: 999px; color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.views a:hover { color: var(--ink); }
.views a[aria-current="true"] { background: var(--white); border-color: var(--line); color: var(--ink); font-weight: 600; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }

.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.card .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--line); margin: 0; }
table.list { border-collapse: collapse; width: 100%; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list th.right, table.list td.right { text-align: right; }
table.list .tick { width: 32px; padding-right: 0; }

.empty { background: var(--white); border: 1px dashed var(--line); border-radius: 12px; padding: 32px 24px; text-align: center; }
.empty h2 { font-size: 17px; margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 auto 12px; max-width: 52ch; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.split-main, .split-side { min-width: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.split-side .card > form.dnc { margin: 14px 18px 16px; }

.logform { padding: 0 18px 16px; display: grid; gap: 10px; }
.seg { display: inline-flex; gap: 14px; font-weight: 600; }
.outcomes, .next { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.outcomes legend, .next legend, .lbl { font-size: 13px; color: var(--muted); margin-bottom: 4px; padding: 0; width: 100%; }
.opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: var(--white); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.opt input[type="datetime-local"] { padding: 2px 4px; border: 0; }
.formrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lbl-inline { font-size: 13px; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0 18px 10px; }
.timeline li { border-left: 2px solid var(--line); padding: 2px 0 14px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.t-call::before { background: var(--navy); }
.timeline li.t-note::before { background: var(--green); }
.timeline li.t-stage::before { background: var(--violet); }
.t-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.t-head b { font-weight: 600; }
.timeline p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }

.form { padding: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select { width: 100%; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #EDF1F3; border-radius: 12px; padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.col header { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 4px; }
.col.over { outline: 2px dashed var(--green); outline-offset: -4px; }
.col-won { background: #E3F6EC; }
.col-lost { background: #F1F1F1; }
.kcard { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; display: grid; gap: 4px; }
.kcard.dragging { opacity: .5; }
.kmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kmove select { font-size: 12px; padding: 3px 6px; width: 100%; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row-meta { grid-column: 1 / -1; justify-content: flex-start; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .rail { position: sticky; top: 0; height: auto; flex: none; flex-direction: row; width: 100%; overflow-x: auto; padding: 6px 8px; gap: 2px; }
  .rail-logo { margin: 0 6px 0 0; width: 38px; height: 38px; }
  .rail-item { width: 60px; min-height: 48px; }
  .rail-spacer { display: none; }
  .topbar { position: static; padding: 8px 14px; flex-wrap: wrap; }
  .nav-name { display: none; }
  .main { padding: 16px 14px 32px; }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: 1fr; }
}

/* ---- Nov 2026 look, the same as the client and staff portals ----
   Open Sans with light titles, deep navy rail with a gold marker on the
   open item, navy rule under the top bar, square cards, pill buttons. */
:root { --navy: #032D57; --navy-2: #0B3F73; --gold: #F5A623; }
body { font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; font-size: 13.5px; background: #F5F7F9; }
h1 { font-weight: 300; letter-spacing: -.015em; color: var(--brand-navy); }
.page-head h1 { font-size: 28px; font-weight: 300; }
.rail { background: var(--navy); }
.rail-logo { border-radius: 8px; }
.rail-item { border-radius: 6px; font-weight: 600; }
.rail-item[aria-current="page"] { background: var(--navy-2); box-shadow: inset 3px 0 0 var(--gold); }
.topbar { border-bottom: 2px solid var(--brand-navy); }
.tb-search { border-radius: 2px; border: 0; border-bottom: 1.5px solid #8A99A6; background: #F3F5F7; }
.tile, .panel, .card, .table-wrap, .empty, .kcard { border-radius: 2px; }
.tile, .panel { border-top: 3px solid var(--brand-navy); }
.tiles > .tile:nth-child(2) { border-top-color: var(--green); }
.tiles > .tile:nth-child(3) { border-top-color: #4F7195; }
.tiles > .tile:nth-child(4) { border-top-color: var(--gold); }
.col { border-radius: 2px; background: #EDF1F4; }
.btn { border-radius: 999px; font-weight: 600; }
.views a[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--gold); }
.navdd { border-radius: 4px; }
th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------------------------------------------------------------- M&F sections + Finance (24 Nov 2026) */
.rail-sec { font-size: 9.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #8FA9C2; margin: 10px 0 2px; flex: none; }
.rail-logo + .rail-sec { margin-top: 0; }
@media (max-width: 760px) { .rail-sec { margin: 0 2px 0 8px; writing-mode: vertical-rl; transform: rotate(180deg); } }

.fin { --fin-in: #049D5E; --fin-out: #B42318; }
.fin .pos { color: var(--fin-in); } .fin .neg { color: var(--fin-out); }
.fin .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-view { display: none; } .fin-view.on { display: block; }
.fin-hide, .fin [hidden] { display: none !important; }
.fin-live { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.fin-dot { width: 9px; height: 9px; border-radius: 50%; background: #A9B4BE; } .fin-dot.on { background: var(--green); } .fin-dot.warn { background: var(--gold); }
.fin-head { font-size: 20px; font-weight: 300; color: var(--brand-navy); margin: 6px 0 2px; letter-spacing: -.01em; }
.fin-lede { color: var(--muted); margin: 0 0 4px; max-width: 75ch; }
.fin-info { background: var(--blue-soft); color: var(--blue); }
.fin-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; margin: 14px 0 16px; }
.fin-figs .tile { padding: 12px 14px; }
.fin-v { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; }
.fin-body { padding: 0 18px 16px; } .fin-pt { padding-top: 14px; } .fin-pad { padding: 10px 18px 14px; margin: 0; }
.fin-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
.fin-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fin-2 > .card { min-width: 0; }
.fin-2-tight { gap: 12px 16px; }
.fin table.list td.right, .fin table.list th.right { text-align: right; }
.fin table.list tfoot td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; }
.fin tr.fin-ob td { background: #F3F7FA; font-weight: 600; }
.fin .pill.t-income { background: var(--green-soft); color: #05603A; }
.fin .pill.t-expense { background: var(--red-soft); color: var(--red); }
.fin .pill.t-contribution { background: var(--blue-soft); color: var(--blue); }
.fin .pill.t-drawing { background: var(--amber-soft); color: var(--amber); }
.fin .pill.t-transfer { background: var(--bg); color: var(--ink); }
.fin-fig { position: relative; min-height: 290px; color: var(--ink); }
.fin-fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fin .g-top { stop-color: var(--fin-in); stop-opacity: .3; } .fin .g-bot { stop-color: var(--fin-in); stop-opacity: .02; }
.fin .c-line { stroke: var(--fin-in); } .fin .c-dot { fill: var(--brand-navy); stroke: #fff; }
.fin .c-in { fill: var(--fin-in); } .fin .c-out { fill: var(--fin-out); } .fin .c-spark { stroke: var(--fin-out); }
@media (prefers-reduced-motion: no-preference) { .fin .tide-line { stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: fin-draw 1.4s ease-out forwards; } }
@keyframes fin-draw { to { stroke-dashoffset: 0; } }
.fin-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.fin-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.fin-legend .k-in { background: var(--fin-in); } .fin-legend .k-out { background: var(--fin-out); } .fin-legend .k-net { background: var(--ink); height: 3px; vertical-align: 3px; }
.fin-spark { width: 110px; height: 28px; display: block; }
.fin-meters { padding-top: 4px; }
.fin-r { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 8px 0; }
.fin-r > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-meter { height: 10px; background: #EEF1F4; border-radius: 2px; overflow: hidden; }
.fin-meter > b { display: block; height: 100%; width: 0; background: var(--fin-out); }
.fin-meter.in > b { background: var(--fin-in); }
.fin-insights { margin: 0; padding-left: 20px; } .fin-insights li { margin: 6px 0; }
.fin-empty { color: var(--muted); padding: 10px 0; }
.fin-toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.fin label, .fin-lbl { display: grid; gap: 4px; align-content: start; font-size: 13px; color: var(--muted); font-weight: 500; }
.fin input[type="date"], .fin input:not([type]), .fin input[type="text"], .fin input[type="search"], .fin select, .fin textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-height: 38px; }
.fin input.num-in { text-align: right; }
.fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.fin-grid .wide { grid-column: span 2; }
.fin-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.fin-sum { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.fin-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.fin-savebar { margin: 0 0 16px; }
.fin-note { margin: 0 0 10px; }
.fin-plist { display: grid; gap: 8px; margin-bottom: 10px; max-width: 520px; }
.fin-pr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.fin .link-btn { color: var(--green-dark); text-decoration: none; font-weight: 600; }
.fin .link-btn:hover { text-decoration: underline; }
.fin .link-btn.fin-del { color: var(--red); }
.fin th.w-cur { width: 100px; } .fin th.w-amt { width: 170px; } .fin th.w-rate { width: 150px; } .fin th.w-x { width: 90px; }
.fin #s-accts td { padding: 8px 10px; }
.fin-modal { position: fixed; inset: 0; background: rgba(3,45,87,.45); display: none; align-items: center; justify-content: center; z-index: 70; padding: 16px; }
.fin-modal.show { display: flex; }
.fin-box { background: var(--white); border-top: 3px solid var(--brand-navy); border-radius: 2px; padding: 20px; max-width: 440px; width: 100%; box-shadow: 0 18px 40px rgba(3,45,87,.25); }
.fin-box p { margin: 0 0 16px; white-space: pre-line; }
.fin-end { justify-content: flex-end; }
.fin-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--brand-navy); color: #fff; padding: 10px 16px; border-radius: 4px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80; max-width: 90vw; }
.fin-toast.show { opacity: 1; } .fin-toast.err { background: var(--red); }
@media (max-width: 900px) { .fin-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .fin-grid .wide { grid-column: auto; }
  .fin .stack thead { display: none; }
  .fin .stack tr { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .fin .stack td { display: flow-root; border: 0; padding: 3px 14px 3px calc(8em + 14px); text-align: start !important; }
  .fin .stack td::before { content: attr(data-l); float: inline-start; width: 7.5em; margin-inline-start: -8em; white-space: normal; color: var(--muted); font-size: 12px; }
  .fin .stack td:empty { display: none; }
  .fin-r { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) auto; }
}

/* Two main options on the rail; the open one's screens as tabs (24 Nov 2026) */
.subnav { display: flex; gap: 2px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 28px; overflow-x: auto; }
.subnav a { padding: 12px 14px 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--brand-navy); border-bottom-color: var(--gold); }
@media (max-width: 760px) { .subnav { padding: 0 8px; } }

/* Finance › P&L and Portal income (24 Nov 2026): one line per row, never wrapped. */
.fin-pl, .fin-reg { min-width: 640px; }
.fin-pl td, .fin-pl th, .fin-reg td, .fin-reg th { white-space: nowrap; }
.fin .fin-pl-l { border-left: 2px solid var(--line); }
.fin .fin-grp th { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; padding-bottom: 0; }
.fin-pl tr.fin-pl-sec td { font-weight: 600; color: var(--brand-navy); background: #F3F7FA; }
.fin-pl tr.fin-pl-in td:first-child { padding-left: 28px; }
.fin-pl tr.fin-pl-tot td { font-weight: 600; border-top: 1px solid var(--line); }
.fin-pl tr.fin-pl-net td { font-weight: 600; font-size: 15px; border-top: 2px solid var(--brand-navy); }
.fin-reg tfoot td { font-weight: 600; }
.fin .fin-trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.fin-cur { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: #EEF3F7; color: var(--brand-navy); }
.fin tr.fin-off td { color: var(--muted); text-decoration: line-through; }
.fin tr.fin-off td:last-child { text-decoration: none; }
.fin-memo div + div { margin-top: 4px; }
