@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/inter-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/inter-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/inter-latin-ext-500-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/inter-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/inter-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/inter-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(../fonts/inter-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(../fonts/inter-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* Vcloud-Kitbox Books — calm, dense, built for daily bookkeeping. One neutral canvas; Vcloud-Kitbox blue for actions, green for money in and "done"; red only for overdue and differences. */
:root {
  --green: #0C4DC4; --green-d: #093A96; --green-brand: #1479E3; --green-l: #E6EFFF; --green-t: #093A96; --green-row: #EEF4FF;
  --side: #111A2B; --side-on: #1A3566; --side-hover: #1B2740; --side-text: #D6DEEA; --side-muted: #93A1B8; --side-line: #223049;
  --ink: #17202F; --ink-2: #364154; --muted: #5A6679; --faint: #8794A8; --line: #E1E7EF; --line-2: #EDF1F6; --bg: #F4F7FB; --card: #FFFFFF; --head: #F8FAFD; --field: #D5DDE8;
  --red: #A8261B; --red-l: #FDECEA; --amber: #7A4A00; --amber-l: #FDF3DF; --blue: #5B3FB8; --blue-l: #EFEBFB; --paid: #1A7F4E; --paid-l: #E4F4EC;
  --r: 10px; --r-s: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.2px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-kerning: normal; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-d); text-decoration: underline; }
.ic { vertical-align: -3px; flex: none; }
.num, .r, .kpi b, .totals div, td { font-variant-numeric: tabular-nums; }

/* shell */
.app { display: grid; grid-template-columns: 255px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 14px 10px 14px; scrollbar-width: thin; scrollbar-color: #3A4A4D transparent; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand img { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; background: #fff; }
.brand b { font-weight: 650; font-size: 14.7px; color: #fff; display: block; line-height: 1.25; }
.brand small { color: #A8A8B8; font-size: 12.6px; }
.nav { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.nav h6 { margin: 12px 10px 4px; font-size: 11.6px; letter-spacing: .06em; text-transform: uppercase; color: var(--side-muted); font-weight: 600; }
.nav h6:first-child { margin-top: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--side-text); font-size: 14.2px; font-weight: 500; }
.nav a .ic { width: 16px; height: 16px; }
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; font-weight: 650; }
.nav a { white-space: nowrap; transition: background .12s, color .12s; }
.nav a.on { background: var(--side-on); color: #fff; font-weight: 600; }
.nav a .ct { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12.1px; font-weight: 600; display: grid; place-items: center; background: #33464A; color: #E6E6EE; }
.nav a .ct.hot { background: #F2B33D; color: #3A2A00; }
.me { border-top: 1px solid var(--side-line); padding: 10px 6px 0; margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--side-on); color: #fff; font-size: 12.6px; font-weight: 600; display: grid; place-items: center; flex: none; }
.me .who { flex: 1; min-width: 0; color: #fff; font-size: 13.7px; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { display: block; color: #A8A8B8; font-weight: 400; font-size: 12.6px; }
.me button { background: none; border: 0; color: var(--side-text); cursor: pointer; padding: 8px; border-radius: 7px; }
.me button:hover { background: var(--side-hover); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); height: 60px; padding: 0 28px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; }
.topbar form.search { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; max-width: 460px; height: 36px; padding: 0 10px; border: 1px solid var(--field); border-radius: var(--r-s); background: var(--head); color: var(--muted); }
.topbar form.search:focus-within { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(23,59,126,.14); }
.topbar form.search input { flex: 1; border: 0; background: transparent; min-height: 0; height: 34px; padding: 0; outline: none; box-shadow: none; }
.topbar .sp { flex: 1; }
.rate-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 12.6px; font-weight: 600; white-space: nowrap; }
.rate-pill:hover { text-decoration: none; color: var(--ink); background: #E4E6E9; }
.newmenu { position: relative; }
.newmenu > summary { list-style: none; } .newmenu > summary::-webkit-details-marker { display: none; }
.newmenu .menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(20,20,30,.12); padding: 6px; min-width: 220px; z-index: 30; display: flex; flex-direction: column; }
.newmenu .menu a { padding: 8px 10px; border-radius: 6px; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.newmenu .menu a:hover { background: var(--head); text-decoration: none; }
.newmenu .menu .kbd { margin-left: auto; }
.content { padding: 20px 28px 56px; width: 100%; max-width: 1760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .tt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.page-head h1 { font-size: 23.1px; font-weight: 700; letter-spacing: -.015em; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.25; }
.page-head .sub { font-size: 13.7px; color: var(--muted); }
.page-head .crumb { font-size: 13.7px; font-weight: 600; margin-bottom: 8px; }
.page-head .crumb a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 11px; border: 1px solid var(--field); border-radius: 999px; background: #fff; color: var(--green-t); box-shadow: 0 1px 2px rgba(16,15,33,.05); }
.page-head .crumb a:hover { background: var(--green-row); border-color: var(--green); text-decoration: none; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .acts form { display: inline-flex; margin: 0; }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--field); border-bottom-width: 2px; border-radius: 5px; font-size: 11.6px; font-weight: 600; color: var(--muted); background: #fff; line-height: 1; font-family: inherit; }
.btn.p .kbd { background: transparent; color: #DCE2EE; border-color: #4B689D; }
.hint { font-size: 13.1px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 18px; }
.card h2 { font-size: 14.7px; font-weight: 650; letter-spacing: -.005em; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card h2 .ic { color: var(--muted); width: 16px; height: 16px; }
.card h2 .sp { flex: 1; }
.card h2 a { font-size: 13.7px; font-weight: 600; }
.card h3 { font-size: 13.7px; font-weight: 650; margin: 16px 0 8px; }
.card.flush { padding: 0; overflow: hidden; overflow: clip; } /* clip, not hidden: hidden makes the card a scroll box and sticky headers slid over the first row */
.card.flush > h2 { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line-2); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .full { grid-column: 1 / -1; }
.grid > .card { margin-bottom: 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: #C2C7D4; }
.kpi small { color: var(--muted); font-size: 12.1px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; display: block; }
.kpi b { font-size: 22.1px; font-weight: 700; letter-spacing: -.02em; display: block; line-height: 1.25; }
.kpi b + b { font-size: 15.8px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.kpi span { font-size: 13.1px; color: var(--muted); }
.kpi.warn b { color: var(--red); }
.kpi.dark { background: var(--side); border-color: var(--side); color: #fff; }
.kpi.dark small, .kpi.dark span { color: #B9B8C7; }
.kpi.dark b { color: #fff; }

/* tables — compact rows, sticky headers, figures right-aligned */
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.2px; }
table.t th { position: sticky; top: 60px; z-index: 2; text-align: left; font-weight: 600; color: var(--muted); font-size: 12.1px; letter-spacing: .04em; text-transform: uppercase; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--head); }
.tw table.t th, .card.flush .tw table.t th { top: 0; }
table.t td { padding: 10px 14px; height: 42px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr:hover td, table.t tr:hover > td { background: #F7F8FA; }
table.t tr.kb-on > td { background: var(--green-row); box-shadow: inset 0 0 0 0 transparent; }
table.t tr.kb-on > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
table.t .r, .r { text-align: right; }
table.t tfoot td { font-weight: 650; border-bottom: 0; background: var(--head); }
table.t td.wrap { max-width: 460px; }
table.t td a:first-child { font-weight: 600; }
table.t td.ed { width: 44px; text-align: right; padding-right: 10px; }
table.t td.ed a { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--muted); }
table.t td.ed a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.card > table.t, .card > .tw { margin: 0 -18px; width: calc(100% + 36px); }
.card > table.t:last-child, .card > .tw:last-child { margin-bottom: -18px; }
.card > table.t:last-child tr:last-child td, .card > .tw:last-child tr:last-child td { border-bottom: 0; }
.card.flush > table.t, .card.flush > .tw { margin: 0; width: 100%; }
.tw { overflow-x: auto; }
.muted { color: var(--muted); } .small { font-size: 13.1px; } .nowrap { white-space: nowrap; }
.neg { color: var(--red); } .pos { color: var(--green-t); }

/* forms */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13.1px; color: var(--ink-2); font-weight: 600; }
label.f.check { flex-direction: row; align-items: center; gap: 9px; color: var(--ink); font-weight: 400; font-size: 14.2px; min-height: 32px; }
input, select, textarea { font: inherit; font-size: 14.2px; color: var(--ink); border: 1px solid var(--field); border-radius: var(--r-s); padding: 7px 11px; background: #fff; width: 100%; min-width: 0; min-height: 36px; }
select { padding-right: 28px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; accent-color: var(--green); }
input[type=file] { padding: 6px; }
input[type=color] { padding: 3px; height: 36px; }
input::placeholder, textarea::placeholder { color: #8E8E99; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,59,126,.14); }
:focus-visible { outline: 2px solid rgba(23,59,126,.5); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--field); background: #fff; color: var(--ink); font: inherit; font-size: 13.7px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.btn .ic { width: 15px; height: 15px; }
.btn.p { background: var(--green); border-color: var(--green); color: #fff; }
.btn.p:hover { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.btn.d { color: var(--red); border-color: #EFC7C2; }
.btn.d:hover { background: var(--red-l); }
.btn.s { height: 30px; padding: 0 10px; font-size: 13.1px; border-radius: 7px; }
.btn.ghost, .btn.q { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover, .btn.q:hover { background: var(--line-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* status */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12.6px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.b-sent, .b-viewed, .b-new { background: var(--blue-l); color: var(--blue); }
.b-paid, .b-approved, .b-imported, .b-converted, .b-high { background: var(--green-l); color: var(--green-t); }
.b-partial, .b-matched, .b-probable { background: var(--amber-l); color: var(--amber); }
.b-overdue, .b-cancelled, .b-rejected { background: var(--red-l); color: var(--red); }
.b-duplicate, .b-ignored, .b-draft, .b-customer { background: var(--line-2); color: var(--ink-2); }
.flash { padding: 10px 14px; border-radius: var(--r-s); margin-bottom: 16px; font-size: 14.2px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.flash.ok { background: var(--green-l); color: var(--green-t); border-color: #CAD4E5; }
.flash.err { background: var(--red-l); color: var(--red); border-color: #F5CDC8; }
.flash.warn { background: var(--amber-l); color: var(--amber); border-color: #F3DDB0; }

/* tabs, filters, pager */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 0 10px; height: 42px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; font-size: 14.2px; }
.tabs a .n { font-size: 12.6px; color: var(--faint); font-weight: 500; }
.tabs a.on { color: var(--ink); border-color: var(--green); font-weight: 600; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.card.flush > .tabs { margin: 0; padding: 0 10px; }
.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.filters label.f { width: auto; }
.card.flush > .filters { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FBFCFC; align-items: center; }
.pager { display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--field); border-radius: 7px; font-size: 13.1px; color: var(--ink); background: #fff; }
.pager span.on { background: var(--green); color: #fff; border-color: var(--green); }
.empty { text-align: center; padding: 40px 12px; color: var(--muted); }

/* documents */
table.t.lines td { padding: 5px 4px; height: auto; vertical-align: top; }
table.t.lines th { padding-left: 8px; padding-right: 8px; }
.lines input, .lines select, .lines textarea { padding: 6px 8px; font-size: 14.2px; min-height: 34px; border-color: transparent; background: transparent; }
.lines tr:hover input, .lines tr:hover select, .lines tr:hover textarea, .lines input:focus, .lines select:focus, .lines textarea:focus { border-color: var(--field); background: #fff; }
.lines textarea { min-height: 36px; }
.totals { margin-left: auto; width: 340px; max-width: 100%; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .big { font-size: 17.9px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 9px; margin-top: 6px; }
.doc-stage { background: #E9EAED; border-radius: var(--r); padding: 24px; }
.preview { width: 100%; height: 1120px; border: 0; border-radius: 2px; background: #fff; box-shadow: 0 1px 3px rgba(20,20,30,.08), 0 8px 24px rgba(20,20,30,.06); display: block; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14.2px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rowsel td { background: var(--green-row); }
tr.bad td { background: #FFF7F6; }
.stick-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 0; display: flex; gap: 10px; align-items: center; margin-top: 12px; z-index: 3; }
.bar { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; display: flex; } .bar > i { display: block; height: 100%; background: var(--green); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13.7px; }
.timeline li { display: flex; gap: 10px; } .timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9A9AA6; margin-top: 6px; flex: none; }
.timeline li:first-child::before { background: var(--green); }
.rail { display: flex; flex-direction: column; gap: 14px; }
.rail .card { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

/* dashboard */
.chart { height: 190px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 18px; align-items: end; border-bottom: 1px solid var(--line); padding: 0 6px; }
.chart .m { display: flex; gap: 4px; align-items: end; height: 100%; }
.chart .m i { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .m i.a { background: var(--green); } .chart .m i.b { background: #A8B4CA; }
.chart-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 18px; padding: 8px 6px 0; font-size: 12.6px; color: var(--muted); text-align: center; }
.legend { display: flex; gap: 14px; font-size: 13.1px; color: var(--muted); font-weight: 400; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.row-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.row-line:last-child { border-bottom: 0; }
.todo { display: flex; flex-direction: column; margin: 0 -18px -18px; }
.todo a { display: flex; align-items: center; gap: 14px; padding: 11px 18px; border-top: 1px solid var(--line-2); color: var(--ink); }
.todo a:hover { background: #F7F8FA; text-decoration: none; }
.todo .n { min-width: 44px; height: 24px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-weight: 650; font-size: 12.6px; flex: none; background: var(--line-2); color: var(--ink-2); }
.todo .n.a { background: var(--amber-l); color: var(--amber); } .todo .n.r { background: var(--red-l); color: var(--red); } .todo .n.b { background: var(--blue-l); color: var(--blue); } .todo .n.g { background: var(--green-l); color: var(--green-t); }
.todo b { display: block; font-weight: 600; } .todo span.d { font-size: 13.1px; color: var(--muted); }
.todo .go { margin-left: auto; color: var(--muted); font-size: 13.7px; white-space: nowrap; }
/* older dashboard task tiles keep working */
.task { display: flex; gap: 12px; align-items: center; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.task:hover { border-color: #C8CAD7; background: #FAFAFC; color: var(--ink); text-decoration: none; }
.task .n { min-width: 34px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13.7px; flex: none; background: var(--line-2); color: var(--ink-2); padding: 0 6px; }
.task .n.g { background: var(--green-l); color: var(--green); } .task .n.a { background: var(--amber-l); color: var(--amber); }
.task b { display: block; font-size: 14.2px; font-weight: 600; } .task span { font-size: 12.6px; color: var(--muted); }

/* settings */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.setnav { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px 10px; position: sticky; top: 80px; }
.setnav h6 { margin: 12px 10px 4px; font-size: 11.6px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.setnav a { display: block; padding: 7px 10px; border-radius: 7px; font-weight: 500; color: var(--ink-2); }
.setnav a:hover { background: var(--head); text-decoration: none; color: var(--ink); }
.setnav a.on { background: var(--green-row); color: var(--green-t); font-weight: 600; }
.settings > .body { min-width: 0; max-width: 1040px; }

/* login & portal */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--side); padding: 20px; }
.login .card { width: 400px; max-width: 100%; padding: 32px; }
.login img { width: 210px; display: block; margin: 0 auto 22px; }
.portal-top { background: #fff; border-bottom: 1px solid var(--line); }
.portal-top .in { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.portal-top img { height: 44px; width: auto; }
.portal-top .who { margin-left: auto; font-size: 14.7px; color: var(--muted); }
.portal-top .who b { color: var(--ink); font-weight: 600; }
.portal { max-width: 1120px; margin: 0 auto; padding: 32px 24px 56px; }
.portal h1 { font-size: 29.4px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.portal .lead { margin: 0 0 24px; font-size: 15.8px; color: var(--muted); }
.portal-foot { border-top: 1px solid var(--line); background: #fff; }
.portal-foot .in { max-width: 1120px; margin: 0 auto; padding: 18px 24px; font-size: 13.7px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; }
.paybox { background: #F6F6F8; border-radius: 12px; padding: 14px; font-size: 13.7px; line-height: 1.6; white-space: pre-line; }
.portal header { display: none; }

@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .g4, .g6 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } .g3, .g2 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } .topbar { padding: 0 16px; } .content { padding: 16px; } .kv { grid-template-columns: 1fr; } .settings { grid-template-columns: 1fr; } .setnav { position: static; } table.t th { top: 0; } }
@media (max-width: 560px) { .g4, .g6 { grid-template-columns: 1fr; } .rate-pill { display: none; } }
@media print { .side, .topbar, .page-head .acts, .actions, .no-print, .sheet-foot, .bulkbar { display: none !important; } .app { display: block; } .content { padding: 0; } .card { border: 0; } }

/* text-style buttons for row actions */
button.link { background: none; border: 0; padding: 0; color: var(--green); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }
button.link.d { color: var(--red); }
details > summary.btn { list-style: none; display: inline-flex; }
details > summary.btn::-webkit-details-marker { display: none; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--green); }

/* Bank Accounts */
.section-h { font-size: 15.8px; margin: 22px 0 10px; display: flex; gap: 8px; align-items: baseline; }
.section-h:first-of-type { margin-top: 4px; }
.acct-grid { align-items: stretch; }
.card.acct { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.card.acct:hover { border-color: #BEC8DA; box-shadow: 0 2px 10px rgba(28,28,36,.06); }
.acct-top { display: flex; justify-content: space-between; align-items: center; font-size: 13.1px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.acct-name { font-weight: 650; font-size: 16.8px; line-height: 1.3; }
.acct-bal b { font-size: 25.2px; font-weight: 700; letter-spacing: -.02em; display: block; font-variant-numeric: tabular-nums; }
.acct-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acct-flow { display: flex; flex-wrap: wrap; gap: 10px; font-variant-numeric: tabular-nums; }
.acct-alert { font-size: 13.1px; display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 8px; }
.acct-alert.err { background: var(--red-l); color: var(--red); }
.acct-alert.warn { background: #FFF6E5; color: #7A4A00; }
.pos { color: var(--green-t); } .neg { color: var(--red); }
.spark { display: block; margin: 2px 0; }
.spark-x { display: flex; justify-content: space-between; font-size: 12.6px; color: var(--muted); margin-top: 4px; }
.kind-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 8px; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14.7px; background: var(--card); }
.kind-opt input:checked + span { border-color: var(--green); background: var(--green-l); color: var(--green-t); box-shadow: 0 0 0 1px var(--green) inset; }
.kind-opt input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.span3 { grid-column: span 3; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } .span3 { grid-column: auto; } }

/* dashboard */
.dash-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.chart-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.chart-sum small { display: block; font-size: 12.1px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.chart-sum b { font-size: 15.8px; font-weight: 650; }
.kpi .warnline { color: var(--amber); font-weight: 600; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: 1fr; } }
.yr-slider { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; flex-wrap: wrap; }
.yr-slider input[type=range] { flex: 0 1 220px; min-height: 0; height: 20px; padding: 0; border: 0; accent-color: var(--green); background: transparent; box-shadow: none; }
.yr-ticks { display: flex; gap: 4px; margin-left: 6px; }
.yr-ticks a { padding: 3px 10px; border-radius: 999px; font-size: 13.1px; font-weight: 600; color: var(--muted); }
.yr-ticks a:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.yr-ticks a.on { background: var(--green-l); color: var(--green-t); }
.chart-sum .small { font-weight: 600; margin-top: 2px; }

/* Bank transactions feed */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acard { display: flex; flex-direction: column; gap: 5px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); min-width: 0; }
.acard:hover { text-decoration: none; border-color: #C9CAD2; }
.acard.on { border: 2px solid var(--green); padding: 11px 13px; }
.acard.all { justify-content: center; border-style: dashed; }
.acard-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acard-h b { font-size: 13.7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard-r { display: flex; justify-content: space-between; gap: 8px; font-size: 13.1px; font-variant-numeric: tabular-nums; }
.bulkbar { display: flex; gap: 10px; align-items: center; padding: 8px 14px; background: var(--green-row); border-bottom: 1px solid #D4DCE8; font-size: 13.7px; position: sticky; top: 60px; z-index: 4; }
.bulkbar select.s, select.s, input.s { height: 30px; font-size: 13.1px; padding: 0 8px; }
table.feed td.narr { max-width: 340px; min-width: 220px; }
table.feed td.narr > a { display: block; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.feed td.narr .ell { max-width: 340px; }
table.feed tr.open > td { background: #F7F8FA; }
table.feed tr.open > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
table.feed tr.busy { opacity: .55; pointer-events: none; }
table.feed tr.gone { opacity: 0; transition: opacity .25s; }
tr.fd-row > td { background: #F7F8FA; box-shadow: inset 3px 0 0 var(--green); padding: 4px 14px 16px 48px !important; }
.fd-top { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.seg { display: inline-flex; gap: 2px; background: var(--line-2); border-radius: 8px; padding: 3px; }
.seg button { all: unset; cursor: pointer; padding: 5px 12px; border-radius: 6px; font-size: 13.7px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.fd-note { font-size: 13.1px; color: var(--muted); margin-bottom: 8px; }
.fd-acts { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.fd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 980px; }
table.t.mini { background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13.7px; }
table.t.mini th { position: static; }
#gb-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1F2A2C; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13.7px; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 640px; }
#gb-toast.bad { background: var(--red); }

/* Reconcile (statement sign-off) */
.rsum { display: grid; grid-template-columns: minmax(0, 1fr) 1px 280px; gap: 24px; align-items: center; }
.rsum .eq { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; column-gap: 24px; row-gap: 14px; align-items: end; }
.rsum .big { font-size: 23.1px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rsum .mid { font-size: 16.8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rsum .op { font-size: 21px; color: var(--muted); }
.rsum .sep { background: var(--line); height: 90px; }
.rsum .diff { text-align: right; }
.rsum .diff .v { font-size: 29.4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rsum .diff.zero .v { color: var(--green-t); }
.lbl { font-size: 12.1px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
table.t td.tk { width: 46px; text-align: center; }
table.t tr.ticked td { color: var(--muted); }

/* Invoice list bars, invoice sheet */
.ibars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.ibar-h { display: flex; justify-content: space-between; font-size: 13.1px; }
.ibar-n { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; }
.ibar-n .v { font-size: 19.9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ibar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 8px; gap: 2px; background: var(--line-2); }
.ibar > a { display: block; height: 100%; }
.sheet-nav { display: flex; gap: 6px; align-items: center; }
.sheet-foot { position: sticky; bottom: 0; margin: 16px -28px -56px; padding: 12px 28px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; z-index: 5; flex-wrap: wrap; }
.sheet-foot.sheet-top { top: 60px; bottom: auto; margin: -8px 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s, 8px); }
@media (max-width: 900px) { .rsum { grid-template-columns: 1fr; } .rsum .sep { display: none; } .ibars { grid-template-columns: 1fr; } .fd-grid { grid-template-columns: 1fr 1fr; } }
.filters > input, .filters > select { width: auto; height: 34px; }
.filters > input[type=date] { width: 150px; }
.fd { width: 0; min-width: 100%; }
.fd-top .ell { min-width: 0; }
table.feed td.narr { max-width: 300px; min-width: 200px; }
table.feed select.s { width: 150px; }
table.feed select.s[data-f="category_account_id"] { width: 200px !important; }
table.feed td, table.feed th { padding-left: 8px; padding-right: 8px; }
table.feed td:first-child, table.feed th:first-child { padding-left: 14px; }
table.feed td.narr { max-width: 250px; min-width: 170px; }
table.feed select.s { width: 140px; }
table.feed select.s[data-f="category_account_id"] { width: 180px !important; }
.bulkbar > b, .bulkbar > span { white-space: nowrap; }
.bulkbar select.s { width: 260px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
/* foldable cards */
details.card.fold > summary { list-style: none; cursor: pointer; }
details.card.fold > summary::-webkit-details-marker { display: none; }
details.card.fold > summary h2 { margin: 0; }
details.card.fold .chev { display: inline-block; margin-left: 10px; color: var(--muted); transition: transform .15s; }
details.card.fold[open] .chev { transform: rotate(180deg); }
details.card.fold[open] .fold-peek { display: none; }
details.card.fold .fold-peek { margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.card.fold[open] > summary { margin-bottom: 12px; }
fieldset.cur-set { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
fieldset.cur-set legend { font-size: 13.1px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; width: 100%; }
fieldset.cur-set label.check { display: inline-flex; gap: 6px; align-items: center; font-size: 14.2px; }
fieldset.cur-set .small { width: 100%; }
fieldset.cur-set { grid-column: 1 / -1; } fieldset.cur-set .small { width: auto; margin-left: 8px; }
/* customer activity */
.trk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trk > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.trk b { font-size: 17.9px; font-variant-numeric: tabular-nums; }
.trk span { font-size: 12.6px; color: var(--ink-2); }
.trk small { font-size: 11.6px; color: var(--muted); }
.trk .good { background: var(--green-l); border-color: #CED7E6; }
.trk .bad { background: var(--red-l); border-color: #F3C9C4; }
.seen { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 12.1px; color: var(--green-t); font-weight: 600; }

/* ===== rows that open their record ===== */
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: #F6F8FA; }
td.go-col, th.go-col { width: 28px; padding-left: 0 !important; color: var(--faint); font-size: 18.9px; text-align: center; }
tr.rowlink:hover td.go-col { color: var(--green); }

/* ===== shared pills ===== */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12.1px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); letter-spacing: 0; text-transform: none; }
.pill.green { background: var(--paid-l); color: var(--paid); } .pill.red { background: var(--red-l); color: var(--red); } .pill.amber { background: var(--amber-l); color: var(--amber); }
.pill.orange { background: #FDE8D7; color: #9A4110; } .pill.blue { background: var(--blue-l); color: var(--blue); } .pill.grey { background: var(--line-2); color: var(--ink-2); }

/* ===== dynamic island ===== */
.island { position: relative; flex: none; z-index: 30; }
.isl-pill { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; border: 0; background: #121218; color: #EAEBF1; font: 600 13.1px/1 Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 6px 18px -8px rgba(0,0,0,.35);
  max-width: 340px; transition: max-width .35s cubic-bezier(.2,.8,.2,1), padding .35s, background .2s; }
.isl-pill:hover { background: #0B0B0F; }
.isl-pill:focus-visible { outline: 3px solid rgba(23,59,126,.4); outline-offset: 2px; }
.isl-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .25s, transform .25s; }
.isl-msg.swap { opacity: 0; transform: translateY(5px); }
.isl-dot { width: 8px; height: 8px; border-radius: 50%; background: #3765E2; flex: none; box-shadow: 0 0 0 0 rgba(55,101,226,.6); animation: isl-pulse 2.4s infinite; }
.island[data-state="amber"] .isl-dot { background: #F5B43C; box-shadow: 0 0 0 0 rgba(245,180,60,.6); }
.island[data-state="red"] .isl-dot { background: #FF6B5E; box-shadow: 0 0 0 0 rgba(255,107,94,.6); }
@keyframes isl-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
.island .isl-dot { color: rgba(55,101,226,.55); } .island[data-state="amber"] .isl-dot { color: rgba(245,180,60,.55); } .island[data-state="red"] .isl-dot { color: rgba(255,107,94,.55); }
.isl-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 11.6px; }
.island.toast .isl-pill { background: #0D1A3F; max-width: 520px; }
.island.toast .isl-dot { background: #3765E2; }
.isl-panel { position: absolute; top: calc(100% + 10px); left: 50%; width: 360px; transform: translate(-50%, -8px) scale(.96); transform-origin: top center; opacity: 0; pointer-events: none;
  background: #121218; color: #EAEBF1; border-radius: 22px; padding: 14px; box-shadow: 0 24px 48px -16px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.2); transition: opacity .22s, transform .3s cubic-bezier(.2,.8,.2,1); }
.island.open .isl-panel { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.isl-h { display: flex; align-items: center; gap: 8px; font-size: 12.6px; color: #9C9DB1; padding: 0 4px 10px; }
.isl-h a { color: #CED2E4; font-weight: 600; } .isl-h .sp { flex: 1; }
.isl-items { display: flex; flex-direction: column; gap: 2px; }
.isl-items a, .isl-last { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; color: #EAEBF1; font-size: 13.7px; font-weight: 500; }
.isl-items a:hover, .isl-last:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.isl-items .go { margin-left: auto; color: #6E6F84; }
.ii { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.08); color: #CED2E4; }
.ii.red { background: rgba(255,107,94,.16); color: #FF8E84; } .ii.amber { background: rgba(245,180,60,.16); color: #F7C66A; } .ii.green { background: rgba(55,101,226,.14); color: #6688E8; }
.isl-ok { display: flex; align-items: center; gap: 8px; padding: 10px 8px; color: #9AAEE8; font-size: 13.7px; }
.isl-last { margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0 0 12px 12px; padding-top: 12px; }
.isl-last small { display: block; color: #8D8EA4; font-size: 12.1px; font-weight: 500; margin-bottom: 2px; }
.isl-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.isl-acts a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.08); color: #EAEBF1; font-size: 13.1px; font-weight: 600; }
.isl-acts a:hover { background: var(--green); color: #fff; text-decoration: none; }
.island-js .island-fallback { display: none; }
@media (prefers-reduced-motion: reduce) { .isl-dot { animation: none; } .isl-pill, .isl-panel, .isl-msg { transition: none; } }

/* ===== dashboard ===== */
.attn { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.attn > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; min-height: 52px; }
.attn > summary::-webkit-details-marker { display: none; }
.attn-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--amber-l); color: var(--amber); flex: none; }
.attn-ic.ok { background: var(--green-l); color: var(--green); }
.attn > summary b { font-weight: 650; font-size: 14.2px; white-space: nowrap; }
.attn-peek { display: flex; gap: 6px; overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.attn-more { color: var(--green); font-weight: 600; font-size: 13.1px; white-space: nowrap; }
.attn .chev { color: var(--muted); transition: transform .2s; display: grid; }
.attn[open] .chev { transform: rotate(180deg); } .attn[open] .attn-more { display: none; }
.attn-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.attn-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.attn-list a:nth-child(odd) { border-right: 1px solid var(--line-2); }
.attn-list a:hover { background: #F7F8FA; text-decoration: none; }
.attn-list .n { min-width: 40px; height: 26px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 12.6px; background: var(--line-2); color: var(--ink-2); flex: none; }
.attn-list .n.a { background: var(--amber-l); color: var(--amber); } .attn-list .n.r { background: var(--red-l); color: var(--red); } .attn-list .n.b { background: var(--blue-l); color: var(--blue); }
.attn-list .t { min-width: 0; } .attn-list .t b { display: block; font-weight: 600; font-size: 13.7px; } .attn-list .t span { display: block; font-size: 12.6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn-list .go { margin-left: auto; color: var(--green); font-size: 13.1px; font-weight: 600; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi2 { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; color: inherit; min-height: 152px; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.kpi2:hover { text-decoration: none; border-color: #C2C7D4; box-shadow: 0 6px 20px -12px rgba(18,28,62,.35); transform: translateY(-1px); }
.kpi2 .kh { display: flex; align-items: center; gap: 9px; min-height: 26px; }
.kpi2 .kh small { font-size: 13.1px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi2 .ki { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--green-l); color: var(--green); flex: none; }
.kpi2 > b { font-size: 26.2px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi2 .k2 { font-size: 13.1px; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.kpi2 .kf { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12.6px; color: var(--muted); display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kpi2 .kf > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi2 .meter, .kpi2 .split { height: 5px; border-radius: 99px; background: var(--green-l); overflow: hidden; margin-top: 4px; }
.kpi2 .meter i { display: block; height: 100%; background: var(--red); border-radius: 99px; }
.kpi2 .split { background: var(--green); } .kpi2 .split i { display: block; height: 100%; background: #A8B4CA; }

.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(380px, 1fr); gap: 16px; align-items: start; }
.dash .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash .card { margin: 0; border-radius: 12px; }
.pane > header { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; min-height: 30px; }
.pane > header h2 { margin: 0; font-size: 15.2px; font-weight: 650; letter-spacing: -.01em; }
.pane > header .sp { flex: 1; } .pane > header > a { font-size: 13.7px; font-weight: 600; }
.pane.flush > header { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line-2); }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 7px; font-size: 13.1px; font-weight: 600; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 18px; }
.stats > div { padding: 12px 16px; display: flex; flex-direction: column; gap: 3px; }
.stats > div + div { border-left: 1px solid var(--line-2); }
.stats small { font-size: 12.6px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stats b { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12.6px; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--green); } .dot.l { background: #A8B4CA; } .dot.g { background: var(--green); }
.bars { position: relative; height: 240px; padding-left: 48px; }
.bars .grid-y { position: absolute; inset: 0 0 24px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bars .grid-y span { border-top: 1px dashed #E6E8EB; position: relative; height: 0; }
.bars .grid-y span:last-child { border-top: 1px solid var(--line); }
.bars .grid-y em { position: absolute; left: 0; top: -8px; font-style: normal; font-size: 11.6px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bars .cols { position: relative; height: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.bars .m { position: relative; display: flex; flex-direction: column; height: 100%; outline: none; }
.bars .pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 0 8%; border-radius: 8px 8px 0 0; transition: background .15s; }
.bars .m:hover .pair, .bars .m:focus .pair { background: #F2F4F6; }
.bars .pair i { flex: 1; max-width: 16px; min-height: 2px; border-radius: 5px 5px 2px 2px; }
.bars .pair i.a { background: var(--green); } .bars .pair i.b { background: #A8B4CA; }
.bars .m.fut .pair i { opacity: .3; }
.bars .x { height: 24px; display: grid; place-items: center; font-size: 12.1px; color: var(--muted); }
.bars .m.now .x { color: var(--ink); font-weight: 700; }
.bars .tip { position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translate(-50%, 6px); background: #121218; color: #EAEBF1; border-radius: 10px; padding: 9px 11px; font-size: 12.6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.bars .tip b { font-size: 12.6px; margin-bottom: 2px; }
.bars .tip span { display: flex; align-items: center; gap: 6px; color: #C6C8D6; font-variant-numeric: tabular-nums; }
.bars .m:hover .tip, .bars .m:focus .tip { opacity: 1; transform: translate(-50%, 0); }
.bars .m:first-child .tip { left: 0; transform: translate(0, 6px); } .bars .m:first-child:hover .tip { transform: translate(0, 0); }
.bars .m:last-child .tip { left: auto; right: 0; transform: translate(0, 6px); } .bars .m:last-child:hover .tip { transform: translate(0, 0); }

table.t.lite th { background: transparent; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; font-weight: 500; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--green-l); color: var(--green-t); display: grid; place-items: center; font-size: 11.6px; font-weight: 700; flex: none; }
.av.out { background: var(--line-2); color: var(--ink-2); }
.calm { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px; color: var(--muted); }
.calm .ic { color: var(--green); }

.banks, .feedl { list-style: none; margin: 0; padding: 0; }
.banks li + li, .feedl li + li { border-top: 1px solid var(--line-2); }
.banks a, .feedl a { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: var(--ink); }
.banks a:hover, .feedl a:hover { background: #F7F8FA; text-decoration: none; }
.cur { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); flex: none; }
.bn { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bn b { font-weight: 600; font-size: 13.7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn > span { font-size: 12.6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banks .st::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #C9CAD2; margin-right: 6px; vertical-align: 1px; }
.banks .st.ok::before { background: var(--green); } .banks .st.bad { color: var(--red); } .banks .st.bad::before { background: var(--red); }
.bspark { width: 64px; height: 28px; flex: none; overflow: visible; --c: var(--green); }
.bspark.neg { --c: var(--red); }
.bspark polyline { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bspark .area { fill: var(--c); opacity: .1; stroke: none; }
.bspark circle { fill: var(--c); }
.bspark .zero { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.bspark .none { stroke: #C9CAD2; stroke-width: 1.4; stroke-dasharray: 1 3; stroke-linecap: round; }
.bv { min-width: 150px; font-weight: 650; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.bv em { font-style: normal; font-weight: 500; font-size: 12.1px; color: var(--muted); }
.feedl .amt { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }

.age + .age { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.age-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.age-h b { font-size: 17.9px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.age-h .muted { margin-left: auto; font-size: 12.6px; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line-2); gap: 2px; }
.stack i { display: block; height: 100%; min-width: 3px; }
.a0 { background: var(--green); } .a1 { background: #E5B44B; } .a2 { background: #E08A3C; } .a3 { background: #CC5A2E; } .a4 { background: var(--red); }
.age-l { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.1px; }
.age-l li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.age-l li i { width: 8px; height: 8px; border-radius: 3px; }
.age-l li .r { margin-left: auto; font-weight: 600; color: var(--ink); }

@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } .attn-list { grid-template-columns: minmax(0, 1fr); } .attn-list a:nth-child(odd) { border-right: 0; } }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr; } .stats > div + div { border-left: 0; border-top: 1px solid var(--line-2); } .attn-peek { display: none; } .isl-pill { max-width: 46px; padding: 0 13px; } .isl-pill .isl-msg, .isl-pill .isl-n { display: none; } .isl-panel { width: min(360px, 92vw); left: auto; right: -40px; transform: translate(0, -8px) scale(.96); } .island.open .isl-panel { transform: none; } }
.isl-live { font-weight: 600; color: #9C9DB1; display: inline-flex; align-items: center; gap: 6px; }
.isl-live.on { color: #8BA1E3; }
.isl-live.on::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #3765E2; animation: isl-pulse 2.4s infinite; color: rgba(55,101,226,.55); }
.isl-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 0 0 10px; }
.isl-rates .rt { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.06); color: #EAEBF1; }
.isl-rates .rt:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.isl-rates .rt b { font-size: 11.6px; color: #9C9DB1; letter-spacing: .04em; }
.isl-rates .rt span { font-size: 14.7px; font-weight: 700; font-variant-numeric: tabular-nums; }
.isl-rates .rt em { font-style: normal; font-size: 11.6px; font-weight: 600; color: #9C9DB1; }
.isl-rates .rt em.up { color: #FF8E84; } .isl-rates .rt em.down { color: #6688E8; }

/* search box on long drop-downs */
.pick { position: fixed; z-index: 400; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,15,33,.18), 0 2px 6px rgba(16,15,33,.08); padding: 6px; display: flex; flex-direction: column; max-height: 340px; }
.pick[hidden] { display: none; }
.pick input { min-height: 34px; margin-bottom: 4px; }
.pick ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.pick li { padding: 6px 9px; border-radius: 6px; font-size: 13.7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick li.hi { background: var(--green-row); color: var(--green-t); }
.pick li.cur { font-weight: 600; }
.pick li.grp { cursor: default; font-size: 11.6px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 9px 3px; }
.pick li.none { cursor: default; color: var(--muted); }

/* refresh button in the top bar */
.topbar .refresh { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r-s); background: #fff; color: var(--ink-2); font: inherit; font-size: 13.7px; font-weight: 550; cursor: pointer; flex: none; }
.topbar .refresh:hover { border-color: var(--green); color: var(--green-t); background: var(--green-row); }
.topbar .refresh.busy svg { animation: gbspin .8s linear infinite; }
@keyframes gbspin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .topbar .refresh span { display: none; } .topbar .refresh { padding: 0 9px; } }

/* exchange rates card on the dashboard */
.fxgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 4px 18px 6px; }
.fxt { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--head); color: var(--ink); }
a.fxt:hover { border-color: var(--green); text-decoration: none; }
.fxt .fc { display: flex; align-items: center; justify-content: space-between; font-size: 12.1px; font-weight: 650; letter-spacing: .05em; color: var(--muted); }
.fxt .fv { font-size: 22.1px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fxt .fv small { font-size: 12.6px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.fxt .fxd { font-style: normal; font-size: 12.1px; font-weight: 650; color: var(--muted); }
.fxt .fxd.up { color: var(--red); } .fxt .fxd.down { color: var(--green); }
.fxt .fb { font-size: 12.1px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fx-at { font-size: 12.1px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.fx-at::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #C9CAD2; }
.fx-at.on::before { background: var(--green); box-shadow: 0 0 0 3px rgba(23,59,126,.15); }
.fxnote { padding: 6px 18px 14px; margin: 0; }

.banks .bn b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.fxt .fc { width: 100%; }

/* pager: count, records per page, pages */
.pager { align-items: center; padding: 10px 14px 0; }
.pager .sp { flex: 1; }
.pager span.pinfo, .pager label.pper { border: 0; background: none; padding: 0; min-width: 0; color: var(--muted); font-size: 13.1px; height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.pager .pper select { width: auto; min-height: 30px; height: 30px; padding: 0 26px 0 8px; font-size: 13.1px; }
/* expenses list */
table.exps td.num { white-space: nowrap; font-weight: 500; }
table.exps td.desc { min-width: 240px; }
table.exps td.desc .small { overflow-wrap: anywhere; }
.pager span.sp { border: 0; background: none; padding: 0; min-width: 0; flex: 1; }
.pager .pper select { width: 72px; }

/* statement files: one table, a header row per account */
table.stfiles { table-layout: fixed; min-width: 1000px; }
table.stfiles tr.grp td { background: var(--head); padding: 10px 18px; font-size: 13.7px; font-weight: 600; border-top: 1px solid var(--line); }
table.stfiles tr.grp td svg { vertical-align: -3px; margin-right: 6px; color: var(--muted); }
table.stfiles tr.grp .muted { font-weight: 500; margin-left: 6px; }
table.stfiles td.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alertbox summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.alertbox summary::-webkit-details-marker { display: none; }
.alertbox textarea { width: 100%; font: 13.1px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* list columns sized to their content (public/js/app.js): short columns fit, the main column takes the rest */
table.t th.fit, table.t td.fit { width: 1%; white-space: nowrap; }
table.t th.fill, table.t td.fill { width: auto; min-width: 180px; }
table.t td.fill { overflow-wrap: anywhere; }
table.t th.fit + th.fit, table.t td.fit + td.fit { padding-left: 18px; }

/* receipt chip (expenses) and the file preview viewer */
a.rcpt { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: var(--green-l); color: var(--green-t); font-size: 13.1px; font-weight: 600; text-decoration: none; white-space: nowrap; border: 1px solid transparent; }
a.rcpt:hover { border-color: var(--green); background: #fff; }
.rcpt-none { color: var(--faint); font-size: 13.1px; }
.rcpt-box { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.rcpt-box .lbl-t { font-size: 13.1px; color: var(--ink-2); font-weight: 600; }
.rcpt-have { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv { position: fixed; inset: 0; z-index: 1000; background: rgba(20,22,28,.55); display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.pv-card { background: #fff; border-radius: 12px; width: min(980px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pv-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pv-head b { font-weight: 600; font-size: 14.7px; }
.pv-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f2f3f2; overflow: auto; }
.pv-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pv-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-wait { color: var(--muted); }

table.kv th { width: 34%; text-transform: none; letter-spacing: 0; font-size: 13.1px; position: static; background: transparent; }
.rcpt-panel { position: sticky; top: 76px; }
.rcpt-view { display: block; width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 8px; background: #f2f3f2; overflow: auto; text-align: center; }
.rcpt-view img { max-width: 100%; height: auto; }
.rcpt-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; border: 1px dashed var(--field); border-radius: 10px; color: var(--muted); text-align: center; }
fieldset.deduct-set { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; margin: 0; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
fieldset.deduct-set legend { font-size: 13.1px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
table.dla td.dla-d { min-width: 260px; max-width: 420px; }

/* grid cells may shrink below their content (wide tables scroll inside their card instead of spilling out) */
.grid > * { min-width: 0; }
.imports-t td:nth-child(4) { word-break: break-all; min-width: 140px; max-width: 220px; }
/* Banking: the statements table takes the full width; the transfer form sits beside it only on very wide screens */
.bank-split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.bank-split > * { min-width: 0; }
@media (min-width: 1700px) { .bank-split { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (min-width: 900px) and (max-width: 1699px) { .bank-split #transfer form.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; } .bank-split #transfer form.grid > :last-child { grid-column: 1 / -1; } }

/* ---- readability + small screens (Nov 2026) ---- */
.grid > *, .split > *, .dash > *, .dash-row > *, .acct-grid > *, .settings > * { min-width: 0; }
fieldset { min-width: 0; }
p, li, dd { line-height: 1.6; }
.menu-btn, .nav-scrim { display: none; }
/* a wide table scrolls inside its card, never the whole page (app.js wraps it when it overflows) */
.tw.auto { -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .bars { overflow-x: clip; }
  .menu-btn { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid var(--field); border-radius: var(--r-s); background: var(--card); color: var(--ink); cursor: pointer; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; max-width: 86vw; height: 100vh; height: 100dvh; z-index: 60; transform: translateX(-102%); transition: transform .2s ease; box-shadow: none; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(16,15,22,.45); }
  body.nav-open { overflow: hidden; }
  .topbar { gap: 8px; }
  .topbar form.search { flex: 1 1 auto; min-width: 0; }
  .page-head { align-items: flex-start; }
  .page-head .acts { flex-wrap: wrap; }
  .content { max-width: 100%; }
  img, video, iframe, canvas { max-width: 100%; }
  pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 10px; }
  .topbar form.search .kbd { display: none; }
  .content { padding: 14px 12px 48px; }
  .card { padding-left: 14px; padding-right: 14px; }
  .card > table.t, .card > .tw { margin-left: -14px; margin-right: -14px; width: calc(100% + 28px); }
  .card.flush > table.t, .card.flush > .tw { margin: 0; width: 100%; }
  .page-head h1 { font-size: 21px; }
  /* 16px stops phones zooming in when a field is tapped */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
  .btn { min-height: 38px; }
  .stick-bar { flex-wrap: wrap; }
  .stick-bar > * { min-width: 0; max-width: 100%; }
  /* any grid laid out in the page itself stacks into one column on a phone */
  [style*="grid-template-columns"], div[style*="display:grid"] { grid-template-columns: minmax(0, 1fr) !important; }
  .attn-list .go { display: none; }
  /* in a table that already scrolls sideways, keep each row on one line instead of tall wrapped cells */
  .tw.auto table.t td:not(.wrap):not(.fill) { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
/* sortable column headings (app.js) */
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover, table.t th.sortable:focus-visible { color: var(--ink); outline: none; }
table.t th.sortable::after { content: '↕'; display: inline-block; margin-left: 5px; font-size: 10px; opacity: .35; letter-spacing: 0; }
table.t th.sortable[aria-sort=ascending]::after { content: '▲'; opacity: .9; color: var(--green); }
table.t th.sortable[aria-sort=descending]::after { content: '▼'; opacity: .9; color: var(--green); }
table.t th.sortable.r::after { margin-left: 4px; }

/* live search results under the top bar search box */
.live-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 340px; max-height: min(70vh, 520px); overflow-y: auto; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(16, 24, 40, .14); padding: 6px 0; color: var(--ink, inherit); }
.live-results .lr-group { padding: 8px 14px 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.live-results a.lr-item { display: flex; flex-direction: column; gap: 1px; padding: 7px 14px; color: inherit; text-decoration: none; }
.live-results a.lr-item b { font-weight: 600; font-size: 13.5px; }
.live-results a.lr-item span { font-size: 12.3px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-results a.lr-item:hover, .live-results a.lr-item.on { background: var(--head); }
.live-results .lr-all { display: block; padding: 9px 14px 6px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 13px; font-weight: 600; }
.live-results .lr-none { padding: 12px 14px; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .live-results { position: fixed; top: 56px; left: 8px; right: 8px; min-width: 0; } }
