/* ======================================================================
   Client app v4 (platform): every page gets the home-screen treatment —
   white title on the moving dark gradient, a big centred summary, round
   glass actions, glossy cards below. Loaded after portal.css.
   ====================================================================== */
body.client-app { --mint: #1EC677; --lime: #C9F27B; --gold: #F7C969; --glass: rgba(255, 255, 255, .12); --glass-line: rgba(255, 255, 255, .16); }

/* pages with their own header: no top bar on phones (same as home) */
@media (max-width: 959px) {
  body.client-app.is-hero .topbar { display: none; }
  body.client-app.is-hero .main { padding-top: calc(10px + env(safe-area-inset-top)); }
}
@media (min-width: 960px) { body.client-app.is-hero #view { max-width: 720px; } }

/* header row: page title on the left, one round button on the right */
.pgh { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.pgh-t { flex: 1; min-width: 0; color: #fff; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -.01em; text-transform: uppercase; }

/* summary block (same family as the home hero) */
.hs { text-align: center; color: #fff; padding: 18px 0 14px; display: flex; flex-direction: column; align-items: center; }
.hs-lbl { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.hs-amt { margin-top: 6px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hs-amt .hx-int { font-size: 52px; }
.hs-amt .hx-dec { font-size: 24px; }
.hs-sub { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.hs-sub b { color: #fff; }
.hs-bar { width: min(280px, 80%); height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); margin-top: 14px; overflow: hidden; }
.hs-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--mint), var(--lime)); transition: width 700ms cubic-bezier(.2, .8, .2, 1); }

/* three glass stat tiles under the summary */
.hs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 16px; }
.hs-tile { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 16px; padding: 10px 12px; color: #fff; min-width: 0; }
.hs-tile .k { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: rgba(255, 255, 255, .7); text-transform: uppercase; }
.hs-tile .v { margin-top: 4px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-tile .s { font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-tile.warn { background: rgba(247, 201, 105, .18); box-shadow: inset 0 0 0 1px rgba(247, 201, 105, .4); }
.hs-tile.warn .v { color: #FFD98A; }

/* round actions (reuse .hx-act from home) — allow 3 or 4 per row */
.hx-acts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* big avatar (profile, adviser) */
.hs-av { width: 84px; height: 84px; border-radius: 42px; display: inline-flex; align-items: center; justify-content: center; font-family: 'Unbounded', system-ui, sans-serif; font-size: 28px; font-weight: 700; color: #002E1B;
  background: linear-gradient(135deg, var(--mint) 0%, var(--lime) 100%); box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 12px 32px rgba(0, 0, 0, .3); }
.hs-av.logo { background: #fff; }
.hs-av.logo img { width: 54px; height: auto; }
.hs-name { margin-top: 14px; font-size: 22px; font-weight: 700; color: #fff; }
.hs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.hs-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .92); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
.hs-chip svg { width: 14px; height: 14px; }
.hs-chip i { width: 8px; height: 8px; border-radius: 4px; background: var(--mint); box-shadow: 0 0 0 3px rgba(30, 198, 119, .25); }
.hs-chip.off i { background: #9AA9A2; box-shadow: none; }

/* glass segmented tabs sit right on the gradient */
body.client-app.is-hero .segtabs { margin-bottom: 2px; }

/* cards: a little more air, a coloured left rule on section titles */
body.client-app.is-hero .card-h .h2, .sec-t { position: relative; padding-left: 12px; }
body.client-app.is-hero .card-h .h2::before, .sec-t::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; background: linear-gradient(180deg, var(--mint), var(--lime)); }
.sec-t { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }

/* profile: devices list without the cramped button */
.dev-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line); }
.dev-row:first-child { border-top: 0; }
.dev-row .grow { min-width: 0; }
.dev-row .t { font-weight: 600; color: var(--text); }
.dev-row .s { font-size: 13px; color: var(--mute); }
.dev-x { flex: none; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 0; background: #FDECEC; color: #B42318; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); }
.kv > div { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; }
.kv .av { flex: none; }
.kv .k { font-size: 12px; color: var(--mute); }
.kv .v { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.kv .v.miss { color: #B26B00; }

/* adviser */
.open-dot { display: inline-flex; align-items: center; gap: 6px; }

/* payments: today line in mint */
body.client-app .today-mark { color: #0E9F5A; }

@media (max-width: 599px) {
  .hs { padding: 12px 0 10px; }
  .hs-amt .hx-int { font-size: 46px; }
  .hs-amt .hx-dec { font-size: 22px; }
  .hs-tile { padding: 9px 10px; border-radius: 14px; }
  .hs-tile .v { font-size: 15px; }
  .pgh-t { font-size: 18px; }
  .hs-av { width: 72px; height: 72px; font-size: 24px; }
  .hs-name { font-size: 20px; }
}
@media (max-height: 700px) and (max-width: 599px) { .hs { padding: 6px 0 6px; } .hs-amt .hx-int { font-size: 40px; } }

/* ======================================================================
   Client app v5: dark glass. Cards are smoked green glass on the moving
   gradient instead of white; mint/lime accents; tighter spacing.
   Desktop: content pinned next to the sidebar (does not drift on wide screens).
   Scoped with #view so it wins over the older light-card rules.
   ====================================================================== */
@media (min-width: 960px) {
  body.client-app .main { padding: 32px 40px 24px; }
  body.client-app .main > .wrap { margin: 0; max-width: 760px; }
  body.client-app.is-hero #view, body.client-app.is-home #view { max-width: 760px; }
}
body.client-app #view .card, body.client-app #view .loan, body.client-app #view .rowlink,
body.client-app #view .state:not(.card .state) {
  --ink: #fff; --text: #fff; --mute: rgba(255, 255, 255, .6); --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16); --bg: rgba(255, 255, 255, .06);
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .085) 0%, rgba(255, 255, 255, .035) 100%), rgba(4, 30, 19, .38);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 30px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  border-radius: 20px;
}
body.client-app #view .card { padding: 16px 18px; }
@media (max-width: 599px) { body.client-app #view .card { padding: 14px; border-radius: 18px; } }
body.client-app #view .loan.late { background: linear-gradient(160deg, rgba(247, 201, 105, .16), rgba(247, 201, 105, .06)), rgba(4, 30, 19, .38); border-color: rgba(247, 201, 105, .3); }
body.client-app #view .card .h2, body.client-app #view .hl-h h2, body.client-app #view .sec-t { color: #fff; }
body.client-app #view .link { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); }
body.client-app #view .link:hover { color: var(--mint); }
body.client-app #view .cap, body.client-app #view .hint { color: rgba(255, 255, 255, .6); }
/* small round icons inside cards */
body.client-app #view .card .av, body.client-app #view .li .av, body.client-app #view .rowlink .av { background: rgba(30, 198, 119, .14); color: var(--mint); box-shadow: none; }
/* amounts and positives in mint */
body.client-app #view .card .amt, body.client-app #view .li .r b, body.client-app #view .li .r .num, body.client-app #view .pos { color: var(--mint); }
/* progress */
body.client-app #view .prog { background: rgba(255, 255, 255, .1); }
body.client-app #view .prog > i, body.client-app #view .prog > span { background: linear-gradient(90deg, var(--mint), var(--lime)); }
body.client-app #view .hc-row { color: rgba(255, 255, 255, .62); }
body.client-app #view .hc-row b { color: #fff; }
/* status chips on dark */
body.client-app #view .sc-paid { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .7); }
body.client-app #view .sc-due { background: rgba(120, 170, 255, .14); color: #A9C8FF; }
body.client-app #view .sc-late { background: rgba(255, 110, 100, .16); color: #FF9F96; }
body.client-app #view .sc-partial { background: rgba(247, 201, 105, .14); color: #F7C969; box-shadow: none; }
body.client-app #view .st-approved { background: rgba(30, 198, 119, .16); color: var(--mint); }
/* schedule */
body.client-app #view .inst .n { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .7); }
body.client-app #view .inst.cur .n, body.client-app #view .inst .n.cur { background: var(--mint); color: #002E1B; }
body.client-app #view .inst .split div { background: rgba(255, 255, 255, .05); }
body.client-app #view .inst.late .grow > span:first-child, body.client-app #view .inst.late .n { color: #FF9F96; }
body.client-app #view .today-mark { color: var(--mint); }
body.client-app #view .today-mark::after { background: linear-gradient(90deg, var(--mint), rgba(30, 198, 119, 0)); }
body.client-app #view .pill { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); border: 0; }
body.client-app #view .pill[aria-pressed="true"], body.client-app #view .pill.on, body.client-app #view .pill[aria-selected="true"] { background: var(--mint); color: #002E1B; box-shadow: none; }
body.client-app #view .segtabs button[aria-selected="true"] { background: var(--mint); color: #002E1B; }
/* forms inside cards (consultant message) */
body.client-app #view .card .inp, body.client-app #view .card .txt, body.client-app #view .card .sel { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16); color: #fff; }
body.client-app #view .card .inp::placeholder, body.client-app #view .card .txt::placeholder { color: rgba(255, 255, 255, .4); }
body.client-app #view .card .seg label span { color: rgba(255, 255, 255, .85); }
body.client-app #view .card .btn.line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
body.client-app #view .note { background: rgba(30, 198, 119, .1); color: rgba(255, 255, 255, .88); }
body.client-app #view .note.warn { background: rgba(247, 201, 105, .12); color: #F7DFA0; }
body.client-app #view .kv .v.miss { color: #F7C969; }
body.client-app #view .dev-x { background: rgba(255, 110, 100, .14); color: #FF9F96; }
body.client-app #view .switch { --off: rgba(255, 255, 255, .18); }
/* promo card */
body.client-app #view .hp-link b { color: #fff; }
body.client-app #view .hp-x { color: rgba(255, 255, 255, .55); }
/* compact hero */
body.client-app .hx { padding: 18px 0 12px; }
body.client-app .hx-int { font-size: 52px; }
body.client-app .hx-dec { font-size: 24px; }
body.client-app .hx-pill { margin-top: 12px; min-height: 32px; }
body.client-app .hx-acts { padding: 4px 0 14px; }
body.client-app .hx-act > span { width: 48px; height: 48px; border-radius: 24px; }
body.client-app .hx-act > span svg { width: 20px; height: 20px; }
@media (min-width: 960px) { body.client-app .hx-acts { max-width: 520px; margin: 0 auto; width: 100%; } body.client-app .hx-acts.n3 { max-width: 400px; } }
body.client-app #view > .stack, body.client-app #view .stack.lg { gap: 10px; }

/* loading placeholders on dark glass */
body.client-app #view .sk, body.client-app #view .card .sk { background: linear-gradient(90deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .06) 100%); background-size: 200% 100%; }
/* icons: lighter, smaller */
@media (min-width: 960px) { .side nav a svg { width: 19px; height: 19px; } }
/* phone menu: dark glass pill */
@media (max-width: 959px) {
  body.client-app .tabs { background: rgba(6, 34, 22, .62); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
  body.client-app .tabs a { color: rgba(255, 255, 255, .6); }
  body.client-app .tabs a svg { width: 21px; height: 21px; }
  body.client-app .tabs a[aria-current="page"] { background: rgba(30, 198, 119, .16); color: #fff; }
  body.client-app .tabs a[aria-current="page"] svg { color: var(--mint); }
}

body.client-app #view .card .seg span { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .88); }
body.client-app #view .card .seg input:checked + span { background: var(--mint); color: #002E1B; box-shadow: none; }
body.client-app #view .card .field > label, body.client-app #view .card .lbl { color: rgba(255, 255, 255, .85); }

@media (min-width: 960px) { body.client-app #view .segtabs { display: flex; } body.client-app #view .segtabs button { flex: 1; } }

/* ---------- New loan (client app): website calculator + steps on dark glass ---------- */
.nz-steps { display: flex; gap: 6px; margin: 2px 0 12px; }
.nz-steps i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); transition: background 200ms ease; }
.nz-steps i.on { background: linear-gradient(90deg, var(--mint), var(--lime)); }
body.client-app #view .nz { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.nz-k { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.nz-h { margin: -10px 0 0; font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.1; letter-spacing: -.01em; text-transform: uppercase; color: #fff; }
.nz-big { font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.nz-rg { display: flex; flex-direction: column; gap: 10px; }
.nz-rh { display: flex; justify-content: space-between; font-size: 14px; color: rgba(255, 255, 255, .7); }
.nz-rh b { color: #fff; font-variant-numeric: tabular-nums; }
.nz-rg input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y; }
.nz-rg input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--mint) 0, var(--lime) var(--p, 50%), rgba(255, 255, 255, .14) var(--p, 50%)); }
.nz-rg input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--mint) 0, var(--lime) var(--p, 50%), rgba(255, 255, 255, .14) var(--p, 50%)); }
.nz-rg input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; margin-top: -9px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); border: 0; }
.nz-rg input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); border: 0; }
.nz-rg input[type=range]:focus-visible { outline: none; }
.nz-rg input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(30, 198, 119, .4); }
.nz-res { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nz-pay { margin-top: 4px; font-size: 26px; font-weight: 700; color: var(--mint); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.nz-rr { text-align: right; font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .62); }
.nz-rr b { color: #fff; }
.nz-fn { margin: 0; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .5); }
body.client-app #view .nz-back { align-self: flex-start; margin: -10px 0 -10px 0; padding-left: 0; gap: 4px; font-size: 14px; text-decoration: none; }
.nz-back svg { width: 18px; height: 18px; margin-left: -3px; }
.nz-back span { text-decoration: underline; text-underline-offset: 3px; }
.nz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .nz-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nz-opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-radius: 14px; border: 0; font: inherit; font-size: 15px; font-weight: 600; color: #fff; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: background 150ms ease, box-shadow 150ms ease; }
.nz-opt > span { width: 32px; height: 32px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(30, 198, 119, .14); color: var(--mint); }
.nz-opt:hover { background: rgba(255, 255, 255, .09); }
.nz-opt[aria-checked="true"] { background: rgba(30, 198, 119, .16); box-shadow: inset 0 0 0 1.5px var(--mint); }
.nz-opt[aria-checked="true"] > span { background: var(--mint); color: #002E1B; }
.nz-opt[data-v="none"] { color: rgba(255, 255, 255, .75); }
.nz-sum { border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); padding: 4px 14px; }
.nz-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 14px; }
.nz-row:first-child { border-top: 0; }
.nz-row > span { color: rgba(255, 255, 255, .6); }
.nz-row > b { color: #fff; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.nz-miss { color: #F7C969; }
.nz-cons { margin: 0; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .55); }
.nz-cons a { color: rgba(255, 255, 255, .85); }
.nz-mk { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .78); cursor: pointer; }
.nz-mk input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #1EC677; }
.nz-fin { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 12px 0 4px; }
.nz-fin .nz-h { margin: 0; }
.nz-fin p { margin: 0; font-size: 15px; line-height: 1.3; color: rgba(255, 255, 255, .78); max-width: 34ch; }
.nz-fin p b { color: #fff; }
.nz-ic { width: 60px; height: 60px; border-radius: 30px; display: inline-flex; align-items: center; justify-content: center; background: rgba(30, 198, 119, .16); color: var(--mint); }
.nz-ic.warn { background: rgba(247, 201, 105, .16); color: #F7C969; }
.nz-ic svg { width: 28px; height: 28px; }
@media (max-width: 599px) { body.client-app #view .nz { padding: 16px; gap: 14px; } .nz-big { font-size: 38px; } }

/* segmented tabs: more room between the two options */
body.client-app #view .segtabs { gap: 6px; padding: 5px; }
body.client-app #view .segtabs button { padding: 0 20px; }
body.client-app #view .hp-link { padding-right: 16px; }

.nz-steps[hidden] { display: none; }
body.client-app #view .btn:not(.line):not(.sec):not([disabled]):hover { background: #3DDB8E; color: #002E1B; }

/* overdue instalments: same soft coral as the "Просрочена" chip */
body.client-app #view .inst.late .grow > span:first-child { color: #FF9F96 !important; }
body.client-app #view .inst.late .n { background: rgba(255, 110, 100, .16); color: #FF9F96; }

/* one content width everywhere: header, hero, tiles, tabs and cards share the same left/right edges */
body.client-app #view .hh, body.client-app #view .pgh, body.client-app #view > .stack, body.client-app #view .stack { max-width: none; width: 100%; }
@media (min-width: 600px) { body.client-app #view { max-width: 760px; } }

/* hero amount odometer: each digit (euros and cents) is a column of 0-9 (twice) that rolls up into place.
   The window is taller than the digit, so passing numbers fade in at the bottom and out at the top. */
.hx-int.odo-on, .hx-dec.odo-on { --h: 1.16em; }
.odo-on .odo, .odo-on .odo-c { display: inline-block; height: var(--h); line-height: var(--h); vertical-align: top; margin: calc((1em - var(--h)) / 2) 0; }
.odo-on .odo { overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%); }
.odo-on .odo-s { display: flex; flex-direction: column; transform: translateY(0); }
.odo-on .odo-s > span { display: block; height: var(--h); line-height: var(--h); }
.odo-go .odo-s { transform: translateY(calc(-1 * var(--h) * (10 + var(--d)))); transition: transform calc(1100ms + var(--i) * 110ms) cubic-bezier(.25, .85, .25, 1); }
.hx-int, .hx-dec { display: inline-block; line-height: 1; }

/* overdue breakdown card (home) */
body.client-app #view .od { display: flex; flex-direction: column; gap: 0; }
body.client-app #view .od .hl-h { margin-bottom: 4px; }
.od-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; font-size: 14px; color: rgba(255, 255, 255, .78); border-top: 1px solid rgba(255, 255, 255, .07); }
.od-row b { color: #fff; font-weight: 600; white-space: nowrap; }
.od-row.sub { padding: 4px 0 4px 14px; border-top: 0; font-size: 13px; color: rgba(255, 255, 255, .55); }
.od-row.sub b { color: rgba(255, 255, 255, .78); font-weight: 500; }
.od-row.tot { margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 15px; color: #fff; font-weight: 600; }
.od-row.tot b { color: #FFD98A; font-size: 17px; font-weight: 700; }
.od-note { margin: 6px 0 0; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .5); }

/* year strip: one line, side-scroll on every screen, compact chips, soft fade at the edges */
body.client-app #view .yearbar { padding: 2px 0 6px; }
body.client-app #view .yearbar .pills { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; margin: 0 -18px; padding: 2px 18px; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); }
body.client-app #view .yearbar .pills::-webkit-scrollbar { display: none; }
body.client-app #view .yearbar .pill { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 16px; }
body.client-app #view .yearbar .pill.cur::after { width: 5px; height: 5px; margin-left: 5px; }
@media (max-width: 599px) { body.client-app #view .yearbar .pills { margin: 0 -14px; padding: 2px 14px; } }

/* ======================================================================
   Partner portal on the same dark glass look as the client app
   ====================================================================== */
@media (min-width: 600px) { body.partner-app #view, body.partner-app.is-home #view, body.partner-app.is-hero #view { max-width: 1000px; } }
@media (min-width: 960px) { body.partner-app .main > .wrap { max-width: 1000px; } }
body.partner-app .foot { color: rgba(255, 255, 255, .5); max-width: 1000px; }
body.partner-app .page-h .lead { color: rgba(255, 255, 255, .72); }
/* tiles (summary numbers) */
body.partner-app #view .tile { background: linear-gradient(160deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035)), rgba(4, 30, 19, .38); border: 1px solid rgba(255, 255, 255, .09); color: #fff; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
body.partner-app #view .tile .k { color: rgba(255, 255, 255, .62); }
body.partner-app #view .tile .v { color: #fff; }
body.partner-app #view .tile.hl { background: linear-gradient(135deg, rgba(30, 198, 119, .28), rgba(201, 242, 123, .14)); border-color: rgba(30, 198, 119, .45); }
body.partner-app #view .tile.hl .k { color: #C9F27B; }
/* period switch */
body.client-app #view .periods { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body.client-app #view .periods button { color: rgba(255, 255, 255, .8); min-height: 34px; font-size: 13px; }
body.client-app #view .periods button[aria-pressed="true"] { background: var(--mint); color: #002E1B; box-shadow: none; }
.pp-per { display: flex; justify-content: center; margin: -4px 0 16px; }
/* primary round action */
.hx-act.pri > span { background: var(--mint); color: #002E1B; box-shadow: none; }
.hx-act.pri:hover > span { background: #3DDB8E; }
/* stage and commission chips on dark */
body.client-app #view .st-new { background: rgba(120, 170, 255, .14); color: #A9C8FF; }
body.client-app #view .st-review { background: rgba(247, 201, 105, .14); color: #F7C969; }
body.client-app #view .st-funded { background: var(--mint); color: #002E1B; }
body.client-app #view .st-declined { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); }
body.client-app #view .cm-pending { background: rgba(247, 201, 105, .14); color: #F7C969; }
body.client-app #view .cm-approved { background: rgba(30, 198, 119, .16); color: var(--mint); }
body.client-app #view .cm-paid { background: var(--mint); color: #002E1B; }
body.client-app #view .cm-none { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); }
body.client-app #view .st-funded::before, body.client-app #view .cm-paid::before { background: #002E1B; }
/* search, selects and inputs that sit on the gradient (outside cards) */
body.client-app #view .inp, body.client-app #view .sel, body.client-app #view .txt { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: #fff; }
body.client-app #view .inp::placeholder, body.client-app #view .txt::placeholder { color: rgba(255, 255, 255, .42); }
body.client-app #view .sel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); }
body.client-app #view .sel option { color: #0B2A1D; background: #fff; }
body.client-app #view .inp-wrap svg, body.client-app #view .inp-wrap .iconbtn { color: rgba(255, 255, 255, .6); }
body.client-app #view .field > label, body.client-app #view .lbl { color: rgba(255, 255, 255, .85); }
body.client-app #view .hint, body.client-app #view .opt { color: rgba(255, 255, 255, .55); }
/* filter chips */
body.client-app #view .pills .pill { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
body.client-app #view .pills .pill[aria-pressed="true"] { background: var(--mint); color: #002E1B; box-shadow: none; }
/* tables */
body.client-app #view .tbl th { color: rgba(255, 255, 255, .55); border-bottom-color: rgba(255, 255, 255, .08); }
body.client-app #view .tbl td { border-bottom-color: rgba(255, 255, 255, .07); color: #fff; }
body.client-app #view .tbl tr:hover td { background: rgba(255, 255, 255, .03); }
/* chart readout and legend */
body.client-app #view .legend { color: rgba(255, 255, 255, .62); }
body.client-app #view .readout { color: rgba(255, 255, 255, .78); }
body.client-app #view .readout b { color: #fff; }
/* generic text inside dark */
body.client-app #view .mute, body.client-app #view .s { color: rgba(255, 255, 255, .58); }
body.client-app #view .li .t { color: #fff; }
body.client-app #view .note a { color: #fff; }
body.client-app #view .btn.line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
body.client-app #view .btn.sec { background: rgba(255, 255, 255, .1); color: #fff; }
body.client-app #view .btn.dark { background: rgba(255, 255, 255, .12); color: #fff; }
body.client-app #view .iconbtn { color: #fff; }
body.client-app #view .iconbtn:hover { background: rgba(255, 255, 255, .08); }
body.partner-app .topbar .av { background: rgba(255, 255, 255, .1); color: #fff; }

body.client-app #view .sel { background-repeat: no-repeat; background-position: right 14px center; background-size: 20px 20px; }
@media (max-width: 959px) { body.partner-app .tabs { width: min(420px, calc(100vw - 20px)); } body.partner-app .tabs a span { font-size: 10px; letter-spacing: -.02em; } body.partner-app .tabs a { padding: 0; } }

body.client-app #view .card:has(> .tbl), body.client-app #view .card:has(table.tbl) { overflow-x: auto; }
body.client-app #view .tbl td, body.client-app #view .tbl th { white-space: nowrap; }

body.client-app .main, body.client-app .main > .wrap, body.client-app #view, body.client-app #view .stack, body.client-app #view .card { min-width: 0; }

/* ---------- smooth page changes ---------- */
/* Pages cross-fade instead of blinking; menu, sidebar and admin bar stay put. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
body.client-app .side { view-transition-name: side; }
body.client-app .tabs { view-transition-name: tabs; }
#zadm { view-transition-name: zadm; }
/* The moving background continues where the last page left it (delay set by api.js). */
body.client-app::before { animation-delay: var(--g1, 0ms); }
body.client-app::after { animation-delay: var(--g2, 0ms); }
/* First open only: a calm logo instead of grey boxes while we check who you are. */
body.client-app .app[aria-busy="true"] .wrap > * { display: none; }
body.client-app .app[aria-busy="true"] .wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
/* Logo sits in the middle of the whole screen and only appears if loading takes longer than 600 ms. */
body.client-app .app[aria-busy="true"] .wrap::after { content: ""; position: fixed; z-index: 60; left: 50%; top: 50%; width: 144px; height: 16px; margin: -8px 0 0 -72px; background: url(logo-green.svg) center / contain no-repeat; opacity: 0; animation: zPulse 1.2s ease-in-out 600ms infinite; }
@keyframes zPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
/* Content blocks fade in when their data arrives instead of popping. */
body.client-app #view > * { animation: zIn 220ms ease both; }
@keyframes zIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.client-app #view > * { animation: none; } ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

