/* Jenblat Books. The look borrows from a paper accounting ledger: green-ruled
   paper, fountain-pen blue for actions, red ink for money going the wrong
   way, a single rule above a total and a double rule under the bottom line. */

@font-face { font-family: 'Public Sans'; font-weight: 400; font-display: swap; src: url(/fonts/public-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 500; font-display: swap; src: url(/fonts/public-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 600; font-display: swap; src: url(/fonts/public-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 700; font-display: swap; src: url(/fonts/public-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-display: swap; src: url(/fonts/source-serif-4-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; font-display: swap; src: url(/fonts/source-serif-4-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 700; font-display: swap; src: url(/fonts/source-serif-4-latin-700-normal.woff2) format('woff2'); }

:root {
  --paper: #f2f5f0;      /* page */
  --sheet: #fcfdfb;      /* ledger sheet */
  --white: #ffffff;
  --ink: #1b2a38;        /* text, rules under totals */
  --ink-2: #536170;      /* secondary text */
  --ink-3: #7d8a96;      /* hints */
  --pen: #1f4e8c;        /* actions and links */
  --pen-dark: #173d70;
  --pen-soft: #e6eef8;
  --ledger: #2e6b4f;     /* money in, good news */
  --ledger-soft: #e3efe6;
  --rule: #d6e3d8;       /* green ledger rule */
  --rule-2: #e7efe8;
  --margin: #e3a29c;     /* the red margin line */
  --red: #b42318;
  --red-soft: #fbeae8;
  --amber: #f3c75a;
  --amber-ink: #5e4300;
  --amber-soft: #fdf3d6;
  --tabbar: #1b2a38;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r: 6px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--pen); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #8fb3e3; outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0; letter-spacing: -0.005em; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 600; }
h2 { font-size: 21px; line-height: 1.25; font-weight: 600; margin-bottom: 12px; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; margin: 22px 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.fig { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.neg { color: var(--red); }
.pos { color: var(--ledger); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.boot { padding: 90px; text-align: center; color: var(--ink-2); font-family: var(--serif); font-size: 20px; }
.hide { display: none !important; }

/* ---------- company tabs ---------- */
.tabbar { background: var(--tabbar); display: flex; align-items: flex-end; gap: 4px; padding: 10px 16px 0; position: sticky; top: 0; z-index: 30; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-family: var(--serif); font-weight: 600; font-size: 18px; padding: 0 18px 12px 2px; white-space: nowrap; align-self: center; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.cotabs { display: flex; gap: 4px; align-items: flex-end; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.cotabs::-webkit-scrollbar { display: none; }
.cotab { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 150px; max-width: 240px; padding: 9px 16px 10px; border-radius: 8px 8px 0 0; color: #c9d3dc; background: rgba(255,255,255,.06); text-decoration: none; border-top: 4px solid var(--tab, #7a8a99); line-height: 1.25; }
.cotab:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.cotab .n { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }
.cotab .k { font-size: 12px; opacity: .75; white-space: nowrap; }
.cotab .key { position: absolute; right: 10px; top: 9px; font-size: 11px; opacity: .55; }
.cotab.on { background: var(--paper); color: var(--ink); padding-bottom: 12px; }
.cotab.on .k { color: var(--ink-2); opacity: 1; }
.cotab.add { min-width: 0; border-top-color: transparent; padding: 9px 14px 10px; font-size: 22px; line-height: 1; color: #c9d3dc; background: transparent; cursor: pointer; border-left: 0; border-right: 0; border-bottom: 0; font-family: inherit; align-self: center; border-radius: 8px; margin-bottom: 6px; }
.cotab.add:hover { background: rgba(255,255,255,.1); color: #fff; }
.who { position: relative; align-self: center; padding-bottom: 10px; margin-left: 10px; }
.who > button { background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 99px; padding: 5px 12px 5px 5px; display: flex; gap: 8px; align-items: center; font: inherit; font-size: 14px; cursor: pointer; }
.who .av { width: 26px; height: 26px; border-radius: 50%; background: #e8d9a8; color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* ---------- layout under the tabs ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.side { padding: 26px 14px 20px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
.side a { color: var(--ink); padding: 9px 12px; border-radius: var(--r); display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15.5px; }
.side a:hover { background: var(--rule-2); text-decoration: none; }
.side a.on { background: var(--white); box-shadow: inset 3px 0 0 var(--co, var(--pen)), 0 1px 2px rgba(27,42,56,.08); font-weight: 600; }
.side .sep { height: 1px; background: var(--rule); margin: 12px 10px; }
.side .count { margin-left: auto; background: var(--amber); color: var(--amber-ink); font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 0 8px; line-height: 21px; }
.side .foot { margin-top: auto; padding: 14px 12px 0; font-size: 13.5px; color: var(--ink-3); }
.main { padding: 30px 36px 70px; max-width: 1320px; width: 100%; min-width: 0; }
.pagehead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead .sub { color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.pagehead .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-block; font-size: 14px; margin-bottom: 6px; }

/* ---------- surfaces ---------- */
.panel { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 22px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel .phead { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px 10px; }
.panel .phead h2 { margin: 0; font-size: 19px; }
.panel .phead a { font-size: 14px; margin-left: auto; }
.empty { padding: 44px 24px; text-align: center; color: var(--ink-2); }
.empty h2 { margin-bottom: 6px; }

/* the ledger sheet: reports, registers and the home statement */
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); position: relative; padding: 26px 30px 26px 54px; }
.sheet::before { content: ''; position: absolute; top: 0; bottom: 0; left: 36px; width: 2px; background: var(--margin); opacity: .55; }
.sheet.tight { padding: 0 0 0 40px; overflow: hidden; }
.sheet.tight::before { left: 24px; }
.sheethead { text-align: center; margin-bottom: 18px; }
.sheethead .co { font-size: 14px; color: var(--ink-2); }
.sheethead .title { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.sheethead .when { color: var(--ink-2); font-size: 15px; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 12px; text-align: left; vertical-align: middle; }
thead th { font-size: 13.5px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid var(--ink); background: var(--white); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
tbody td { border-bottom: 1px solid var(--rule-2); }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f6faf6; }
.tablewrap { overflow-x: auto; }
.ledger td a { color: var(--ink); }
.ledger td a:hover { color: var(--pen); }

/* ledger tables: ruled lines, serif figures, accounting totals */
.ledger { font-size: 15.5px; }
.ledger thead th { background: var(--sheet); }
.ledger tbody td { border-bottom: 1px solid var(--rule); padding: 8px 12px; }
.ledger td.num, .ledger th.num { font-family: var(--serif); font-size: 16.5px; }
.ledger thead th.num { font-family: var(--sans); font-size: 13.5px; }
.ledger tr.sec td { font-family: var(--serif); font-weight: 600; font-size: 17px; padding-top: 18px; border-bottom-color: transparent; }
.ledger td.indent { padding-left: 30px; }
.ledger tr.tot td { font-weight: 600; }
.ledger tr.tot td.num { border-top: 1.5px solid var(--ink); }
.ledger tr.big td { font-family: var(--serif); font-weight: 700; font-size: 18px; border-bottom: 0; padding-top: 14px; }
.ledger tr.big td.num { border-top: 1.5px solid var(--ink); border-bottom: 4px double var(--ink); }
.ledger .hint-row td { color: var(--ink-2); font-size: 14px; }
.ledger td.total { font-weight: 600; background: rgba(214,227,216,.25); }
.ledger th.num { padding-left: 20px; }

/* ---------- forms and buttons ---------- */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
input, select, textarea { font: inherit; font-size: 15.5px; color: var(--ink); border: 1px solid #c3cfc6; border-radius: var(--r); padding: 8px 11px; background: var(--white); min-width: 0; }
input:not([type=checkbox]):not([type=file]):not([type=color]), select { height: 42px; }
input[type=color] { height: 42px; width: 64px; padding: 4px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #c7daf2; border-color: var(--pen); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--pen); margin: 0; }
input.num { text-align: right; }
select.cat { width: 100%; max-width: 280px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink); }
.btn { font: inherit; font-size: 15px; font-weight: 600; border-radius: var(--r); padding: 9px 16px; border: 1px solid #b9c6bd; background: var(--white); color: var(--ink); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; line-height: 1.3; }
.btn:hover { background: #f1f5f1; text-decoration: none; }
.btn.primary { background: var(--pen); border-color: var(--pen); color: #fff; }
.btn.primary:hover { background: var(--pen-dark); }
.btn.danger { color: var(--red); border-color: #e6b6b1; }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { padding: 5px 11px; font-size: 14px; }
.btn.link { border: 0; background: none; color: var(--pen); padding: 5px 7px; font-weight: 500; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn:disabled { opacity: .5; cursor: default; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 3px; line-height: 1.4; }
.notice { border-radius: var(--r); padding: 13px 16px; background: var(--amber-soft); color: var(--amber-ink); margin-bottom: 16px; border-left: 4px solid var(--amber); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.notice.info { background: var(--pen-soft); color: var(--pen-dark); border-left-color: var(--pen); }
.notice.err { background: var(--red-soft); color: var(--red); border-left-color: var(--red); }
.notice .btn { margin-left: auto; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #edf1ee; color: var(--ink-2); white-space: nowrap; }
.pill.green { background: var(--ledger-soft); color: var(--ledger); }
.pill.amber { background: var(--amber-soft); color: var(--amber-ink); }
.pill.red { background: var(--red-soft); color: var(--red); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); margin: 4px 0 16px; }
.tabs button { font: inherit; font-size: 15.5px; background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }

/* ---------- home ---------- */
.waiting { display: flex; align-items: center; gap: 16px; background: var(--amber-soft); border: 1px solid #ecd48a; border-radius: var(--r); padding: 14px 18px; margin-bottom: 22px; }
.waiting .big { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; color: var(--amber-ink); min-width: 46px; text-align: center; }
.waiting .t { color: var(--amber-ink); }
.waiting .t b { display: block; font-size: 17px; }
.waiting .btn { margin-left: auto; }
.statement td { padding: 9px 4px; }
.statement td.num { font-size: 21px; }
.statement tr.big td { font-size: 23px; }
.statement .lbl { font-size: 16px; }
.bars { display: grid; grid-template-columns: repeat(var(--n, 12), 1fr); gap: 6px; align-items: end; height: 120px; margin: 18px 0 6px; }
.bars .m { display: flex; gap: 2px; align-items: flex-end; height: 100%; justify-content: center; }
.bars .bi { width: 40%; max-width: 14px; background: var(--ledger); border-radius: 2px 2px 0 0; }
.bars .be { width: 40%; max-width: 14px; background: #c9b37a; border-radius: 2px 2px 0 0; }
.barlbl { display: grid; grid-template-columns: repeat(var(--n, 12), 1fr); gap: 6px; font-size: 12px; color: var(--ink-3); text-align: center; }
.legend { display: flex; gap: 16px; font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.acctlist a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--rule-2); color: var(--ink); }
.acctlist a:hover { background: #f6faf6; text-decoration: none; }
.acctlist .nm { font-weight: 600; }
.acctlist .ty { font-size: 13.5px; color: var(--ink-2); }
.acctlist .amt { font-family: var(--serif); font-size: 18px; font-variant-numeric: tabular-nums; }
.costs { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 18px; }
.costs .c { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; font-size: 15px; }
.costs .c .fig { font-size: 16px; }
.costs .track { grid-column: 1 / -1; height: 6px; background: var(--rule-2); border-radius: 3px; overflow: hidden; }
.costs .track i { display: block; height: 100%; background: #c9b37a; }

/* ---------- companies page ---------- */
.cocard { display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--tab); color: inherit; position: relative; }
.cocard:hover { text-decoration: none; border-color: #b9cbbd; border-top-color: var(--tab); background: #fbfdfb; }
.cocard b { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.cocard .key { position: absolute; right: 16px; top: 14px; font-size: 12px; color: var(--ink-3); }

/* ---------- banking ---------- */
.feeds { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 14px; }
.feed { min-width: 250px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 13px 16px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.feed:hover { border-color: #b9cbbd; }
.feed.on { border-color: var(--pen); box-shadow: inset 0 0 0 1px var(--pen); }
.feed .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .src { font-size: 13px; color: var(--ink-3); }
.feed .b { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.feed .b span:last-child { font-family: var(--serif); color: var(--ink); font-size: 15.5px; font-variant-numeric: tabular-nums; }
.feed .foot { margin-top: 9px; }
.review td { padding-top: 12px; padding-bottom: 12px; }
.review .desc { font-weight: 500; }
.review .sub { font-size: 13px; color: var(--ink-3); }
.review td.amt { font-family: var(--serif); font-size: 16.5px; }
.review .why { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.review .why.match { color: var(--pen); }
.review .acts { white-space: nowrap; text-align: right; }
.review td.date { white-space: nowrap; color: var(--ink-2); font-size: 15px; }
.review td.descc { min-width: 220px; }
.review .sub { overflow-wrap: anywhere; }
.review .feedname { display: block; color: var(--ink-2); }
.review select.cat { min-width: 210px; }
.review select[name=cls] { min-width: 150px; max-width: 220px; }
.review .why { max-width: 280px; }
.btn.more { color: var(--ink-2); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { width: 280px; }

/* ---------- reports list ---------- */
.reportlist a { display: block; padding: 15px 20px; border-top: 1px solid var(--rule-2); color: var(--ink); }
.reportlist a:first-child { border-top: 0; }
.reportlist a:hover { background: #f6faf6; text-decoration: none; }
.reportlist a b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.reportlist a span { color: var(--ink-2); font-size: 14.5px; }
.controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }

/* ---------- register quick entry ---------- */
.quick { display: grid; grid-template-columns: 148px 78px minmax(0, 1.3fr) minmax(0, 1.4fr) repeat(var(--extra, 0), minmax(0, 1fr)) 104px 104px minmax(0, 1fr) auto; gap: 10px; align-items: end; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }
.quick label.f { font-size: 13px; }
.quick input, .quick select { width: 100%; }

/* ---------- menus, modals, toasts ---------- */
.menu { position: fixed; z-index: 60; background: var(--white); border-radius: 10px; box-shadow: 0 12px 40px rgba(27,42,56,.25); min-width: 220px; padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 6px; font: inherit; color: var(--ink); cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--rule-2); text-decoration: none; }
.menu .sep { height: 1px; background: var(--rule); margin: 6px 4px; }
.menu .me { padding: 8px 12px 10px; font-size: 14px; color: var(--ink-2); }
.menu .me b { display: block; color: var(--ink); font-size: 15px; }
.overlay { position: fixed; inset: 0; background: rgba(20,32,44,.45); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px; z-index: 100; overflow: auto; }
.modal { background: var(--white); border-radius: 10px; width: 100%; max-width: 580px; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.modal.wide { max-width: 940px; }
.modal header { padding: 20px 24px 4px; display: flex; align-items: center; gap: 12px; }
.modal header h2 { margin: 0; }
.modal .body { padding: 12px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal footer { padding: 16px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--rule-2); margin-top: 6px; }
.x { margin-left: auto; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px; }
.lines td { padding: 5px 6px; border-bottom: 0; }
.lines input, .lines select { width: 100%; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; }
#toast div { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 15px; }
#toast div.err { background: var(--red); }

/* ---------- sign in ---------- */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background-color: var(--paper);
  background-image: linear-gradient(90deg, transparent calc(50% - 290px), rgba(227,162,156,.6) calc(50% - 290px), rgba(227,162,156,.6) calc(50% - 288px), transparent calc(50% - 288px)),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px); }
.authcard { background: var(--white); border: 1px solid var(--rule); border-radius: 10px; padding: 34px 34px 30px; width: 100%; max-width: 420px; box-shadow: 0 18px 50px rgba(27,42,56,.12); display: flex; flex-direction: column; gap: 16px; }
.authcard .brandline { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.authcard .brandline img { width: 32px; height: 32px; }
.authcard h1 { font-size: 30px; }
.authcard .btn.primary { justify-content: center; padding: 11px; font-size: 16px; }

.mobile-nav { display: none; }

@media (max-width: 1150px) {
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .tabbar { padding: 8px 8px 0; min-height: 52px; }
  .brand span { display: none; }
  .brand { padding: 0 6px 10px 2px; }
  .cotab { min-width: 128px; padding: 7px 12px 8px; }
  .cotab .key { display: none; }
  .cotab .n { padding-right: 0; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 10px; background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 52px; z-index: 20; scrollbar-width: none; }
  .mobile-nav a { white-space: nowrap; padding: 7px 12px; border-radius: 99px; color: var(--ink); font-weight: 500; font-size: 15px; }
  .mobile-nav a.on { background: var(--ink); color: #fff; }
  .mobile-nav .count { background: var(--amber); color: var(--amber-ink); border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 700; margin-left: 4px; }
  .main { padding: 18px 14px 60px; }
  h1 { font-size: 27px; }
  .sheet { padding: 18px 12px 18px 30px; }
  .sheet::before { left: 18px; }
  .quick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hide-sm { display: none; }
  .who > button .nm { display: none; }
  .who > button { padding: 4px; }
  .toolbar input[type=search] { width: 100%; }
  .waiting { flex-wrap: wrap; }
  .waiting .t { flex: 1; min-width: 180px; }
  .review thead { display: none; }
  .review, .review tbody { display: block; }
  .review tr { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "cb desc amt" "cb date date" "cb cat cat" "cb cls cls" "cb acts acts"; gap: 4px 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--rule-2); }
  .review td { display: block; padding: 0; border: 0; }
  .review td.cb { grid-area: cb; padding-top: 3px; }
  .review td.descc { grid-area: desc; min-width: 0; }
  .review td.date { grid-area: date; font-size: 13px; }
  .review td.amt { grid-area: amt; }
  .review td.catc { grid-area: cat; margin-top: 6px; }
  .review td.clsc { grid-area: cls; }
  .review td.acts { grid-area: acts; text-align: left; margin-top: 6px; }
  .review select.cat, .review select[name=cls] { width: 100%; max-width: none; min-width: 0; }
  .review td.empty { grid-column: 1 / -1; }
}
@media print {
  .tabbar, .side, .mobile-nav, .noprint, .pagehead .actions, .controls { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .sheet { border: 0; padding: 0 0 0 24px; }
  .tablewrap { max-height: none; overflow: visible; }
  thead th { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
