/* Luminous Books: the Luminous design language (v1-frontend src/v2/styles: Manrope, cloud neutrals, purple primary,
   ag-theme-lum tables) in one stylesheet for server-rendered pages. */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/static/fonts/manrope-latin-wght-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: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/static/fonts/manrope-latin-ext-wght-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; }

:root {
  --white: #fff;
  --cloud-100: #fbf9fe; --cloud-200: #efebf5; --cloud-300: #d6d1df; --cloud-400: #b3aec1; --cloud-500: #8b879f;
  --cloud-600: #65627f; --cloud-700: #454364; --cloud-800: #2e2e50; --cloud-900: #12131a;
  --purple-100: #f3efff; --purple-200: #d5c2ff; --purple-400: #9970ff; --purple-600: #602ee7; --purple-700: #4c0ebc; --purple-800: #37008a;
  --blue-100: #eef9fb; --blue-700: #0d2fd3;
  --teal-100: #e7fcf7; --teal-600: #048096; --teal-700: #005a69;
  --green-100: #e7feea; --green-200: #baffca; --green-600: #00943c; --green-700: #006621;
  --yellow-100: #fff8d6; --yellow-200: #fff18f; --yellow-700: #907200; --yellow-800: #604d00;
  --orange-100: #fff2e4; --orange-600: #c64c00;
  --red-100: #ffeff0; --red-200: #ffd7e1; --red-600: #cb304b; --red-700: #8c182f;
  --fg: var(--cloud-900); --text: var(--cloud-800); --muted: var(--cloud-500); --line: var(--cloud-200); --line-strong: var(--cloud-300);
  --primary: var(--purple-600); --primary-hover: var(--purple-700);
  --radius: 8px; --side: 248px;
  --font: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/1.5 var(--font); color: var(--text); background: var(--white); font-variant-numeric: tabular-nums; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 2px; }
b, strong, th { font-weight: 600; }
code { font-family: var(--mono); font-size: 12px; background: var(--cloud-100); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
small { font-size: 12px; }
:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 2px; }

/* ---------- shell: sidebar + title bar ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--cloud-100); display: flex; flex-direction: column; padding: 18px 12px 12px; z-index: 30; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 8px; padding: 2px 10px 18px; color: var(--fg); }
.logo:hover { text-decoration: none; color: var(--fg); }
.logo img { height: 30px; width: auto; display: block; }
.logo span { font-weight: 600; font-size: 13px; color: var(--purple-600); background: var(--purple-100); border-radius: 6px; padding: 1px 7px; letter-spacing: .02em; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side .foot a, .navbtn { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--cloud-700); font-size: 15px; font-weight: 500; text-decoration: none; }
.side nav a:hover, .side .foot a:hover, .navbtn:hover { background: var(--cloud-200); color: var(--cloud-900); text-decoration: none; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chev { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: var(--cloud-500); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.grp.open .chev { transform: rotate(90deg); }
.grp > a .ico { color: var(--tone); }
.grp > a.on { color: var(--tone); background: var(--tone-bg); }
.tone-purple { --tone: var(--purple-600); --tone-bg: var(--purple-100); }
.tone-blue { --tone: var(--blue-700); --tone-bg: #e8edff; }
.tone-teal { --tone: var(--teal-600); --tone-bg: var(--teal-100); }
.tone-orange { --tone: var(--orange-600); --tone-bg: var(--orange-100); }
.tone-red { --tone: var(--red-600); --tone-bg: var(--red-100); }
.tone-green { --tone: var(--green-700); --tone-bg: var(--green-100); }
.tone-cloud { --tone: var(--cloud-700); --tone-bg: var(--cloud-200); }
.subnav { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; }
.side nav .subnav a { padding: 6px 10px 6px 40px; font-size: 14px; color: var(--cloud-700); font-weight: 500; }
.side nav .subnav a.on { color: var(--tone); font-weight: 600; background: transparent; }
.side nav .subnav a.on::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--tone); margin-left: -14px; margin-right: 11px; }
.foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side .foot a, .navbtn { font-size: 14px; }
.side .foot a.on { background: var(--cloud-200); }
.navbtn { width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; height: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--cloud-700); min-width: 0; }
.me span { display: flex; flex-direction: column; min-width: 0; }
.me b { font-size: 13px; font-weight: 600; color: var(--cloud-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.navtoggle, .scrim, .burger, .mbar { display: none; }

.app .shell { margin-left: var(--side); min-height: 100vh; }
.top { display: flex; align-items: center; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--white); min-height: 78px; flex-wrap: wrap; }
.ttl { min-width: 0; flex: 1 1 320px; }
.top h1 { font-size: 24px; line-height: 1.25; font-weight: 400; color: var(--fg); margin: 0; letter-spacing: -.01em; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.crumbs { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.crumbs a { color: var(--cloud-600); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
main { padding: 24px 28px 48px; max-width: 1400px; }
.bare .top { border: 0; justify-content: center; padding-top: 48px; }
.bare .top .ttl { display: none; }
.bare main { max-width: 440px; margin: 0 auto; }

/* ---------- type ---------- */
h1 { font-size: 22px; font-weight: 500; }
h2 { font-size: 16px; font-weight: 600; color: var(--fg); margin: 28px 0 10px; letter-spacing: -.005em; }
main > h2:first-child, .card > h2:first-child { margin-top: 0; }
p { margin: 8px 0; }
.muted { color: var(--muted); } .ok { color: var(--green-700); } .bad { color: var(--red-600); } .warn { color: var(--yellow-700); }
td.ok, td.bad, td.warn { font-weight: 600; }
ul { padding-left: 20px; margin: 8px 0; } li { margin: 3px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- tables (ag-theme-lum) ---------- */
.tablewrap { overflow-x: auto; margin: 0 0 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--white); }
.tablewrap > table { border: 0; }

th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--cloud-600); background: var(--white); white-space: nowrap; padding-top: 11px; padding-bottom: 11px; border-bottom-color: var(--line-strong); }
tbody tr:last-child td, table > tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--cloud-100); }
tr:hover th { background: var(--white); }
td.n, th.n, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.n { font-feature-settings: "tnum"; }
tr.total td { font-weight: 700; color: var(--fg); border-top: 1px solid var(--cloud-400); background: var(--cloud-100); }
tr.sub td { font-weight: 600; color: var(--fg); background: #fdfcff; }
tr.ind td:first-child { padding-left: 34px; }
td form, td .row { margin: 0; }
td input:not([type=checkbox]), td select { max-width: 220px; }
caption { text-align: left; font-weight: 600; padding: 8px 0; }

/* ---------- cards + stats ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }
.card.row { display: flex; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 8px; }
.grid > .card { margin: 0; }
.stat { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 104px; transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--cloud-300); box-shadow: 0 2px 10px rgba(46,46,80,.06); }
.stat { color: var(--cloud-600); font-size: 13px; font-weight: 500; }
.stat b { display: block; font-size: 26px; line-height: 1.15; font-weight: 600; color: var(--fg); letter-spacing: -.02em; margin-top: auto; }
.stat b a { color: inherit; }
.stat b a:hover { color: var(--primary); }
.stat a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.stat.bad b, .stat b.bad { color: var(--red-600); } .stat.ok b { color: var(--green-700); }

/* ---------- callouts ---------- */
.flash, .error, .callout { position: relative; display: block; padding: 11px 14px 11px 42px; border-radius: 10px; margin: 0 0 14px; border: 1px solid; font-size: 14px; }
.flash { background: var(--green-100); border-color: var(--green-200); color: var(--green-700); }
.error { background: var(--red-100); border-color: var(--red-200); color: var(--red-700); }
.callout.warn { background: var(--yellow-100); border-color: #f5e6a3; color: var(--yellow-800); }
.callout.info { background: var(--purple-100); border-color: var(--purple-200); color: var(--purple-800); }
.flash::before, .error::before, .callout::before { position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; border-radius: 50%; font-size: 12px; font-weight: 700; display: grid; place-items: center; color: #fff; }
.flash::before { content: "✓" / ""; background: var(--green-600); }
.error::before { content: "!" / ""; background: var(--red-600); }
.callout.warn::before { content: "!" / ""; background: var(--yellow-700); }
.callout.info::before { content: "i" / ""; background: var(--purple-600); }
.flash a, .error a, .callout a { color: inherit; text-decoration: underline; font-weight: 600; }
td .error, td .flash { margin: 0; }
.error p, .flash p, .callout p { margin: 4px 0 0; }

/* ---------- forms + buttons ---------- */
input, select, textarea, button { font: inherit; color: var(--fg); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { height: 38px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--white); min-width: 0; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; min-height: 96px; width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
select { padding-right: 32px; appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365627f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 16px; }
input:hover, select:hover, textarea:hover { border-color: var(--cloud-400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple-400); box-shadow: 0 0 0 3px var(--purple-100); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: middle; }
input[type=file] { font-size: 13px; color: var(--cloud-600); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 10px; height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--primary); background: var(--white); color: var(--primary); cursor: pointer; }
input[type=number], input.num { text-align: right; }
label { color: var(--cloud-700); font-size: 13px; font-weight: 500; }
label:has(> input:not([type=checkbox]), > select, > textarea) { display: inline-flex; flex-direction: column; gap: 4px; }
label:has(> input[type=checkbox]) { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
button { height: 38px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--primary); background: var(--primary); color: var(--white); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button:active { background: var(--purple-800); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: var(--white); color: var(--primary); border-color: var(--primary); }
button.secondary:hover { background: var(--purple-100); color: var(--primary-hover); }
button.danger { background: var(--white); color: var(--red-600); border-color: var(--red-600); }
button.danger:hover { background: var(--red-100); }
button.link { height: auto; background: none; border: 0; color: var(--primary); padding: 0; font-weight: 600; }
button.link:hover { text-decoration: underline; background: none; }
td button, td input:not([type=checkbox]), td select, .compact button, .compact input:not([type=checkbox]), .compact select { height: 32px; font-size: 13px; }
td button { padding: 0 12px; }
a.btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--primary); color: var(--primary); font-weight: 600; background: var(--white); }
a.btn:hover { background: var(--purple-100); text-decoration: none; }
a.btn.primary { background: var(--primary); color: var(--white); }
a.btn.primary:hover { background: var(--primary-hover); }
form.inline { display: inline; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.row > p { margin: 0; }
.row.noprint, form.row { background: var(--cloud-100); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
main > form.row:first-child, main > .flash + form.row, main > .error + form.row { margin-top: 0; }
td form.row, .card form.row, .actions form.row { background: none; border: 0; padding: 0; margin: 6px 0; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--cloud-200); color: var(--cloud-700); white-space: nowrap; vertical-align: middle; }
.pill.ok { background: var(--green-100); color: var(--green-700); }
.pill.bad { background: var(--red-100); color: var(--red-700); }
.pill.warn { background: var(--yellow-100); color: var(--yellow-800); }
.pill.ok::before, .pill.bad::before, .pill.warn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- details ---------- */
details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin: 12px 0; background: var(--white); }
details[open] { padding-bottom: 12px; }
summary { cursor: pointer; padding: 11px 0; font-weight: 600; color: var(--cloud-800); list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--cloud-500); border-bottom: 2px solid var(--cloud-500); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
details[open] > summary::before { transform: rotate(45deg); }

/* ---------- report index ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tiles .card { margin: 0; }
.tiles h2 { margin: 0 0 8px; font-size: 14px; color: var(--cloud-600); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.tiles ul { list-style: none; padding: 0; margin: 0; }
.tiles li { margin: 0; border-top: 1px solid var(--line); }
.tiles li:first-child { border-top: 0; }
.tiles li a { display: block; padding: 8px 0; font-weight: 600; }
.tiles li small { display: block; color: var(--muted); font-weight: 400; margin-top: -6px; padding-bottom: 8px; }

/* ---------- small screens: sidebar becomes a drawer ---------- */
@media (max-width: 960px) {
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(18,19,26,.18); }
  .navtoggle:checked ~ .side { transform: none; }
  .navtoggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(18,19,26,.35); z-index: 20; }
  .app .shell { margin-left: 0; }
  .mbar { display: flex; align-items: center; gap: 12px; width: 100%; }
  .mbar .logo { padding: 0; }
  .mbar .logo img { height: 24px; }
  .burger { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--line-strong); cursor: pointer; color: var(--cloud-700); flex: none; }
  .top { padding: 12px 16px; min-height: 0; gap: 12px; }
  .top h1 { font-size: 20px; }
  main { padding: 16px 16px 40px; }
  .actions { width: 100%; }
}
@media (max-width: 600px) {
  th, td { padding: 8px 10px; }
  table { font-size: 13px; }
  .stat b { font-size: 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .row > label, .row > label > input, .row > label > select { width: 100%; }
}

@media print {
  .side, .scrim, .burger, .actions, nav, form, .noprint, .who, form.row { display: none !important; }
  .app .shell { margin: 0; }
  .top { border: 0; padding: 0 0 8px; min-height: 0; }
  main { padding: 0; max-width: none; }
  body { font-size: 11px; }
  a { color: inherit; text-decoration: none; }
  .tablewrap { border: 0; overflow: visible; }
  table { page-break-inside: auto; } tr { page-break-inside: avoid; }
  tr:hover td { background: none; }
}

/* ---------- tabs, empty states, small buttons ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; overflow-y: hidden; padding-top: 2px; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--cloud-600); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--cloud-900); text-decoration: none; background: var(--cloud-100); border-radius: 6px 6px 0 0; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--cloud-200); color: var(--cloud-700); font-size: 11px; display: inline-grid; place-items: center; }
.tabs a.on .count { background: var(--purple-100); color: var(--primary); }
.empty { text-align: center; padding: 44px 20px; color: var(--cloud-600); border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--cloud-100); margin: 4px 0 16px; }
.empty b { display: block; font-size: 16px; color: var(--fg); margin-bottom: 4px; }
.empty p { margin: 0 0 14px; }
a.btn.sm, button.sm { height: 30px; padding: 0 11px; font-size: 13px; }
a.btn + a.btn { margin-left: 0; }
.rowacts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search], .toolbar input[name=q] { width: 320px; max-width: 100%; }
details.card { padding: 0 20px; }
details.card[open] { padding-bottom: 18px; }
details.card > summary { padding: 15px 0; }
.decide { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 280px; }
.decide .sugg button { background: var(--primary); }
.decide .more { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.decide details { margin: 0; border: 0; padding: 0; }
.decide details > summary { padding: 4px 0; font-size: 13px; color: var(--primary); }
.decide details > summary::before { display: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; font-weight: 500; color: var(--fg); }
/* downloads in a filter bar read as buttons */
.row a[href^="/export/"], .toolbar a[href^="/export/"], .actions a[href^="/export/"] { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--white); color: var(--cloud-800); font-weight: 600; }
.row a[href^="/export/"]::before, .toolbar a[href^="/export/"]::before, .actions a[href^="/export/"]::before { content: "↓"; color: var(--primary); }
.row a[href^="/export/"]:hover, .toolbar a[href^="/export/"]:hover, .actions a[href^="/export/"]:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
/* expandable rows inside a table stay flat */
td details { border: 0; padding: 0; margin: 0; background: none; }
td details[open] { padding-bottom: 4px; }
td summary { padding: 0; font-weight: 600; display: block; }
td summary::before { display: inline-block; margin: 0 8px 2px 0; }
td details > :not(summary) { margin-top: 8px; }
td.date { white-space: nowrap; }
h2.split { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
h2.split a { font-size: 13px; font-weight: 600; }
.stat.warn b, .stat.warn b a { color: var(--yellow-800); }
.stat.warn { border-color: #f5e6a3; background: linear-gradient(var(--yellow-100), var(--white) 70%); }
.stat.ok b, .stat.ok b a { color: var(--green-700); }
.callout ul { margin: 6px 0 4px; }
td.detail { font-family: var(--mono); word-break: break-word; max-width: 560px; }
table.lines td select { max-width: none; width: 100%; min-width: 220px; }
table.lines td input.num { width: 130px; }
table.lines td input[name$="[memo]"] { width: 100%; max-width: none; }
table.lines th:first-child { width: 40%; }
tr.total td.ok { color: var(--green-700); } tr.total td.bad { color: var(--red-600); } tr.total td.muted { color: var(--muted); font-weight: 500; }
.tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
td { overflow-wrap: break-word; }
/* signed out */
body.bare { background: var(--cloud-100); }
.bare main { padding-top: 8px; }
.signin { padding: 32px 30px; box-shadow: 0 8px 30px rgba(46,46,80,.07); }
.signin h2 { font-size: 20px; margin: 0 0 6px; }
.signin .muted { margin: 0 0 22px; }
a.btn.block { display: flex; justify-content: center; width: 100%; height: 44px; font-size: 15px; }
td.none { text-align: center; color: var(--muted); padding: 28px 14px; background: var(--cloud-100); }
.bare .top { background: transparent; padding-top: 72px; padding-bottom: 20px; } .bare .top .logo img { height: 34px; } .bare main { padding-top: 0; }
/* on a phone, a "stack" table reads as one card per row: label and status on a line, detail beneath */
@media (max-width: 600px) {
  table.stack tr:first-child { display: none; }
  table.stack tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 2px 0; }
  table.stack td:nth-child(3) { grid-column: 1 / -1; color: var(--cloud-600); font-size: 12.5px; }
}
.stat.dim b, .stat.dim b a { color: var(--cloud-400); } .stat.dim { background: var(--cloud-100); }
/* the sidebar's colour runs the full height of a long page (it's fixed; this paints behind it for printing/screenshots) */
@media (min-width: 961px) { body.app { background: linear-gradient(to right, var(--cloud-100) var(--side), var(--white) var(--side)); } }
.decide details.moremenu { border: 0; padding: 0; margin: 0; }
.decide details.moremenu > summary { font-size: 13px; color: var(--cloud-600); padding: 2px 0; }
.decide details.moremenu > summary::before { display: inline-block; }
.decide .morebody { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px 12px; border-left: 2px solid var(--line); margin-top: 4px; }
input.payee { width: 170px; }
/* a table wider than its frame shows a soft shadow at the edge that has more columns (so a hidden column never
   reads as an empty one) */
.tablewrap {
  background:
    linear-gradient(to right, var(--white) 30%, rgba(255,255,255,0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--white) 30%, rgba(255,255,255,0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(46,46,80,.16), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(46,46,80,.16), transparent) right center / 14px 100% no-repeat scroll,
    var(--white);
}
.tablewrap > table { background: transparent; }
.tablewrap th { background: transparent; }
.stat .cap { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: -2px; }
/* overview trend charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 18px 0 4px; }
.charts .card { margin: 0; padding: 16px 18px 10px; }
.chart-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--cloud-600); margin-bottom: 6px; }
.chart-h b { color: var(--fg); font-size: 14px; }
.chart-h i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .b1, .chart-h .k1 { fill: var(--purple-200); background: var(--purple-200); }
.chart .b2, .chart-h .k2 { fill: var(--purple-600); background: var(--purple-600); }
.chart .b3 { fill: var(--red-600); }
.chart .axis { stroke: var(--cloud-300); stroke-width: 1; }
.chart .lbl { font: 600 11px var(--font); fill: var(--cloud-500); text-anchor: middle; }
.chart .ln { fill: none; stroke: var(--teal-600); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--white); stroke: var(--teal-600); stroke-width: 2; }
.monthpick { display: inline-flex; gap: 8px; }
tr.kb td { background: var(--purple-100) !important; }
tr.kb td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
kbd { font: 600 11px var(--mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--white); color: var(--cloud-700); }
.kbhint { font-size: 12px; margin: -6px 0 10px; }
.checksum { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
tr.st-fail td:first-child { box-shadow: inset 3px 0 0 var(--red-600); }
tr.st-warn td:first-child { box-shadow: inset 3px 0 0 var(--yellow-700); }
