:root {
  --navy: #1d3557; --navy2: #274472; --blue: #2563eb; --sky: #8ecae6; --bg: #f4f6f9; --panel: #fff; --line: #dfe4ec; --line2: #eef1f5;
  --text: #1f2933; --muted: #66727f; --green: #12805c; --red: #c0392b; --amber: #b7791f; --sel: #e8f0fe; --stripe: #f8fafc;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.4 var(--font); color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.neg { color: var(--red); } .pos { color: var(--green); } .muted { color: var(--muted); }
.err { color: var(--red); min-height: 1.2em; margin: 6px 0 0; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy), #0f2140); padding: 20px; }
.login-card { background: #fff; padding: 32px 28px; border-radius: 14px; width: 100%; max-width: 320px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login-card h1 { margin: 10px 0 2px; font-size: 22px; } .login-card p { color: var(--muted); margin: 0 0 16px; }
.login-card .lf { display: block; text-align: left; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login-card .lf input { display: block; width: 100%; margin-top: 4px; font-size: 17px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.login-card #lCode, .login-card #sCode { letter-spacing: 3px; }
.login-card a.sm { display: inline-block; margin-top: 10px; font-size: 13px; }
.setup-card { max-width: 420px; text-align: left; } .setup-card .logo, .setup-card h1 { text-align: center; } .setup-card .logo { margin: 0 auto; }
.setup-card p { color: var(--text); } .login-card p.err { color: var(--red); }
.setup-steps { display: flex; justify-content: center; gap: 8px; margin: 6px 0 16px; }
.setup-steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: #e8edf3; color: var(--muted); }
.setup-steps span.on { background: var(--navy); color: #fff; } .setup-steps span.done { background: #16a34a; color: #fff; }
.qr { display: block; width: 220px; height: 220px; margin: 4px auto 12px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; }
.secret { display: block; font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f4f8; padding: 8px 10px; border-radius: 6px; word-break: break-all; margin: 8px 0 4px; user-select: all; }
details { margin-bottom: 14px; font-size: 14px; } summary { cursor: pointer; color: var(--blue); }
.codes { columns: 2; padding-left: 24px; font: 15px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding-top: 8px; padding-bottom: 8px; margin: 8px 0 12px; }
.row-btns { display: flex; gap: 8px; margin-bottom: 12px; } .row-btns .btn { flex: 1; justify-content: center; }
.chk { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 14px; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.sec-grid .panel h2 { margin: 0 0 12px; padding: 0 0 10px; font-size: 16px; } .sec-grid .err:empty { display: none; } .stack { display: flex; flex-direction: column; gap: 10px; } .stack .btn { align-self: flex-start; }
.muted.sm, p.sm { font-size: 12.5px; }
.login-card .btn { width: 100%; padding: 11px; }
.logo { width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: var(--sky); font-weight: 700; font-size: 28px; display: inline-grid; place-items: center; }
.logo.sm { width: 26px; height: 26px; font-size: 16px; border-radius: 7px; background: rgba(255,255,255,.12); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; background: var(--navy); color: #fff; padding: 0 14px; height: 48px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.tabs { display: flex; height: 100%; }
.tabs a { color: #c9d6ea; padding: 0 14px; display: flex; align-items: center; border-bottom: 3px solid transparent; font-weight: 500; }
.tabs a:hover { color: #fff; background: rgba(255,255,255,.06); }
.tabs a.on { color: #fff; border-bottom-color: var(--sky); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.uncat-pill { background: #f6c344; color: #3d2c00; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.uncat-pill.zero { background: rgba(255,255,255,.14); color: #c9d6ea; }
.icon-btn { background: transparent; border: 0; color: inherit; font-size: 20px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.menu { position: absolute; right: 0; top: 42px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); min-width: 190px; padding: 6px; z-index: 50; }
.menu button, .menu a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 6px; color: var(--text); cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--bg); }

/* shell */
.shell { display: flex; min-height: calc(100vh - 48px); background: linear-gradient(to right, #eaeef4 250px, transparent 250px); }
.acctbar { width: 250px; flex: none; background: #eaeef4; border-right: 1px solid var(--line); padding: 10px 0 30px; position: sticky; top: 48px; height: calc(100vh - 48px); overflow-y: auto; }
.acctbar h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 14px 4px; display: flex; justify-content: space-between; }
.acctbar a.acct { display: flex; justify-content: space-between; gap: 8px; padding: 6px 14px; color: var(--text); border-left: 3px solid transparent; }
.acctbar a.acct:hover { background: #dfe5ee; }
.acctbar a.acct.on { background: #fff; border-left-color: var(--blue); font-weight: 600; }
.acctbar .acct .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctbar .acct .nm small { color: var(--muted); font-weight: 400; }
.acctbar .tot { display: flex; justify-content: space-between; padding: 4px 14px 0; font-weight: 600; font-size: 13px; border-top: 1px solid var(--line); margin: 4px 14px 0; padding-left: 0; padding-right: 0; }
.acctbar .add { margin: 16px 14px 0; display: block; }
main { flex: 1; min-width: 0; padding: 16px 20px 40px; }
main:focus { outline: none; }
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-h h1 { font-size: 20px; margin: 0; }
.page-h .sub { color: var(--muted); }
.page-h .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c5ccd6; background: #fff; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text); }
.btn:hover { background: #f1f4f8; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn.primary:hover { background: #1d4fd0; }
.btn.danger { color: var(--red); border-color: #e7b7b1; } .btn.sm { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input:not([type]), select, textarea { border: 1px solid #c5ccd6; border-radius: 7px; padding: 6px 8px; background: #fff; min-width: 0; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.f input, label.f select { font-size: 14px; color: var(--text); }
label.chk { display: inline-flex; align-items: center; gap: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.panel > h2 { font-size: 14px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; gap: 8px; }
.panel > h2 .right { margin-left: auto; font-weight: 400; }
.panel .pad, .panel.pad { padding: 12px 14px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); margin: 0 0 6px; font-size: 18px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 8px 10px; border-bottom: 0; }
.filters input[type=search] { width: 220px; }
.filters .grow { flex: 1; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff7dd; border: 1px solid #f0d58a; padding: 8px 10px; border-bottom: 0; }
.bulkbar strong { margin-right: 4px; }

/* register */
.regwrap { background: #fff; border: 1px solid var(--line); border-radius: 0 0 10px 10px; overflow: auto; max-height: calc(100vh - 210px); }
table.reg { width: 100%; border-collapse: collapse; font-size: 13px; }
table.reg th { position: sticky; top: 0; z-index: 2; background: #e9edf3; color: #3b4652; text-align: left; font-weight: 600; font-size: 12px; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
table.reg th.nosort { cursor: default; }
table.reg th .ar { color: var(--blue); font-size: 10px; }
table.reg td { padding: 5px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.reg tbody tr:nth-child(even) td { background: var(--stripe); }
table.reg tbody tr:hover td { background: #eef4ff; }
table.reg tbody tr.sel td { background: var(--sel); }
table.reg td.c-chk, table.reg th.c-chk { width: 30px; text-align: center; }
table.reg td.c-date { width: 92px; white-space: nowrap; }
table.reg td.c-num { width: 58px; color: var(--muted); }
table.reg td.c-acct { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
table.reg td.c-payee { min-width: 160px; }
table.reg td.c-cat { min-width: 170px; }
table.reg td.c-memo { min-width: 100px; color: var(--muted); }
table.reg td.c-amt { width: 96px; }
table.reg td.c-clr { width: 34px; text-align: center; font-weight: 700; cursor: pointer; color: var(--muted); }
table.reg td.c-clr.R { color: var(--green); } table.reg td.c-clr.c { color: var(--blue); }
table.reg td.c-bal { width: 104px; font-weight: 500; }
table.reg td.c-act { width: 30px; }
.ed { cursor: text; border-radius: 4px; padding: 2px 4px; margin: -2px -4px; display: block; min-height: 20px; }
.ed:hover { box-shadow: inset 0 0 0 1px #b9c6d8; background: #fff; }
.cat-none { color: var(--amber); font-weight: 600; }
.cat-split { color: var(--navy2); font-style: italic; }
td input.inl { width: 100%; padding: 3px 5px; font-size: 13px; border-color: var(--blue); }
.badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: #fdecc8; color: #8a5a00; margin-left: 6px; vertical-align: 1px; }
.badge.rule { background: #e0ecff; color: #1d4fd0; }
.row-act { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; padding: 0 4px; border-radius: 4px; }
.row-act:hover { background: #dfe5ee; color: var(--text); }
.regfoot { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 10px; font-size: 13px; color: var(--muted); align-items: center; }
.regfoot b { color: var(--text); }
.cards { display: none; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.warn { background: #fff8e6; border-color: #f0d58a; }
.dash { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.dash .wide { grid-column: 1 / -1; }
.bars .row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 90px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.bars .row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { background: var(--line2); border-radius: 4px; height: 14px; overflow: hidden; }
.bars .fill { display: block; background: linear-gradient(90deg, #3b82f6, #2563eb); height: 100%; border-radius: 4px; }
.bars a.row { color: var(--text); } .bars a.row:hover .nm { color: var(--blue); }
.trend svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
table.simple { width: 100%; border-collapse: collapse; font-size: 13px; }
table.simple td, table.simple th { padding: 7px 14px; border-bottom: 1px solid var(--line2); text-align: left; }
table.simple th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfd; }
table.simple tr:last-child td { border-bottom: 0; }
table.simple tr.tot td { font-weight: 700; border-top: 1px solid var(--line); background: #fafbfd; }
table.simple tr.sec td { font-weight: 700; background: #f1f4f8; color: var(--navy); }
table.simple tr.grand td { font-weight: 800; font-size: 15px; background: #e8f0fe; }
table.simple td a { color: var(--text); } table.simple td a:hover { color: var(--blue); }

/* import */
.drop { border: 2px dashed #b9c6d8; border-radius: 12px; background: #fff; padding: 34px 20px; text-align: center; cursor: pointer; }
.drop.over { border-color: var(--blue); background: #f2f7ff; }
.drop h2 { margin: 0 0 6px; font-size: 17px; }
.mapgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.preview { overflow: auto; max-height: 300px; border: 1px solid var(--line); border-radius: 8px; }
.preview table { border-collapse: collapse; font-size: 12px; width: 100%; }
.preview td, .preview th { border-bottom: 1px solid var(--line2); padding: 4px 8px; white-space: nowrap; text-align: left; }
.preview th { background: #f1f4f8; position: sticky; top: 0; }
.steps { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.result { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }

/* categories & rules */
.catlist .row { display: grid; grid-template-columns: 60px 1fr 150px 120px 60px 120px; gap: 10px; align-items: center; padding: 6px 14px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.catlist .row.hd { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfd; }
.catlist .row.child .nm { padding-left: 18px; }
.catlist .row.hid { opacity: .5; }
.catlist .tag { font-size: 11px; color: var(--muted); }
.catlist .acts { display: flex; gap: 4px; justify-content: flex-end; }

/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(15, 25, 40, .45); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-card { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-card h2 { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line2); font-size: 16px; }
.modal-card .body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-card .foot { padding: 12px 18px; border-top: 1px solid var(--line2); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-card .foot .left { margin-right: auto; }
.splitrow { display: grid; grid-template-columns: 1fr 110px 28px; gap: 6px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2933; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; box-shadow: 0 8px 20px rgba(0,0,0,.25); max-width: 90vw; }
.bottomnav { display: none; }
.mobile-only { display: none; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .shell { background: none; }
  .tabs, .acctbar { display: none; }
  .topbar { gap: 10px; padding: 0 10px; padding-top: env(safe-area-inset-top); height: calc(48px + env(safe-area-inset-top)); }
  main { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
  .mobile-only { display: initial; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; font-size: 11px; color: var(--muted); }
  .bottomnav a span { font-size: 18px; line-height: 1; }
  .bottomnav a.on { color: var(--blue); font-weight: 600; }
  .dash { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 12px; } .kpi .v { font-size: 18px; }
  .filters input[type=search] { width: 100%; flex: 1 1 100%; }
  .filters select { flex: 1 1 45%; }
  .regwrap { display: none; }
  .cards { display: block; background: #fff; border: 1px solid var(--line); border-radius: 0 0 10px 10px; }
  .card { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line2); align-items: center; }
  .card .ck { grid-row: span 2; display: none; } .selecting .card .ck { display: block; }
  .card .p { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card .a { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
  .card .m { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 2; }
  .card .b { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
  .card.sel { background: var(--sel); }
  .grid2 { grid-template-columns: 1fr; }
  .catlist .row { grid-template-columns: 1fr auto; }
  .catlist .row > :nth-child(1), .catlist .row > :nth-child(3), .catlist .row > :nth-child(4), .catlist .row > :nth-child(5) { display: none; }
  .catlist .row.hd { display: none; }
  .bars .row { grid-template-columns: 40% 1fr 76px; }
  .page-h h1 { font-size: 18px; }
  .modal { align-items: end; padding: 0; }
  .modal-card { border-radius: 14px 14px 0 0; max-height: 88vh; }
  .modal-card .foot { position: sticky; bottom: 0; background: #fff; display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-card .foot .left { margin-right: 0; }
  .modal-card .foot .btn { justify-content: center; padding: 9px 8px; }
  .uncat-pill { font-size: 11px; }
  table.simple td, table.simple th { padding: 7px 10px; }
  .hide-m { display: none; }
}

/* dropdown picker */
.pkf { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; text-align: left; border: 1px solid #c5ccd6; border-radius: 7px; padding: 6px 8px; background: #fff; cursor: pointer; font-size: 14px; color: var(--text); }
.pkf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pkf i { font-style: normal; color: var(--muted); font-size: 11px; }
.pkf.empty span { color: var(--muted); } .pkf:disabled { background: #f3f5f8; cursor: not-allowed; } .pkf.pk-open { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.pkf.sm { width: auto; min-width: 170px; max-width: 240px; padding: 4px 8px; font-size: 13px; }
.bulkbar .pkf.sm { background: #fff; }
.pk { position: fixed; z-index: 160; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(15,33,64,.22); display: flex; flex-direction: column; overflow: hidden; }
.pk-q { margin: 8px; padding: 8px 10px; border: 1px solid #c5ccd6; border-radius: 7px; font-size: 14px; }
.pk-l { overflow-y: auto; padding: 0 4px 6px; flex: 1; overscroll-behavior: contain; }
.pk-g { position: sticky; top: 0; background: #f1f4f8; color: var(--navy); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; margin: 4px 0 2px; border-radius: 5px; }
.pk-i { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.pk-i.ind { padding-left: 20px; } .pk-i.act { background: var(--sel); } .pk-i.cur { font-weight: 600; } .pk-i.cur::after { content: "✓"; margin-left: auto; color: var(--blue); }
.pk-i.add { color: var(--blue); }
.pk-n { color: var(--muted); font-size: 12px; min-width: 34px; font-variant-numeric: tabular-nums; } .pk-e { padding: 12px; color: var(--muted); }
.pk-t { padding: 12px 14px 0; font-weight: 600; }
.pk.sheet { left: 0; right: 0; bottom: 0; top: auto; border-radius: 14px 14px 0 0; max-height: 75vh; padding-bottom: env(safe-area-inset-bottom); }
.pk.sheet .pk-q { font-size: 16px; } .pk.sheet .pk-i { padding: 10px 10px; font-size: 15px; }
.pk-back { position: fixed; inset: 0; background: rgba(15,33,64,.35); z-index: 159; }
/* register: category/entity dropdown cells, QuickReport */
table.reg .pick { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; cursor: pointer; border-radius: 5px; padding: 2px 4px; margin: -2px -4px; }
table.reg .pick i { font-style: normal; color: #9aa5b1; font-size: 10px; } table.reg tr:hover .pick { background: #eef3fb; } table.reg .pick:hover i { color: var(--blue); }
table.reg td.c-ent { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .inh { color: var(--muted); font-style: italic; }
.c-payee .pw { display: flex; align-items: center; gap: 6px; } .c-payee .pw .ed { overflow: hidden; text-overflow: ellipsis; }
.qr-b { margin-left: auto; flex: none; border: 0; background: transparent; color: var(--blue); padding: 2px 3px; border-radius: 4px; cursor: pointer; opacity: 0; line-height: 0; }
table.reg tr:hover .qr-b, .qr-b:focus-visible { opacity: 1; } .qr-b:hover { background: #e3ecfb; }
.card .p { display: flex; align-items: center; gap: 6px; } .card .qr-b { opacity: 1; margin-left: 4px; }
.card .pick { color: var(--blue); } .ent-tag { background: #eef1f5; border-radius: 4px; padding: 0 5px; font-size: 11.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #e8f0fe; border: 1px solid #c7d7f8; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.chip button { border: 0; background: #fff; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; }
.modal-card.wide { max-width: 760px; } .qr-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .qr-body { max-height: 55vh; overflow: auto; } .qr-t tfoot td { border-top: 2px solid var(--line); }
/* card statement */
.stmt { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.stmt > div { display: flex; flex-direction: column; } .stmt .l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; } .stmt b { font-size: 16px; } .stmt .s { font-size: 12px; color: var(--muted); }
.stmt .edit { margin-left: auto; align-self: center; } .stmt.empty { display: block; color: var(--muted); }
.stmt.urgent { border-color: #f1a7a0; background: #fff5f4; } .stmt.urgent .s { color: var(--red); font-weight: 600; }
.cardpay tr.urgent td { background: #fff1f0; } .cardpay tr.urgent td:first-child { box-shadow: inset 3px 0 0 var(--red); } .due-red { color: var(--red); font-weight: 600; }
fieldset.stmtf { border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px 4px; margin: 0; } fieldset.stmtf legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.pnl-wide { overflow-x: auto; } table.pnl th { white-space: nowrap; } .nowrap { white-space: nowrap; } table.audit td { vertical-align: top; }
#whoami { font-size: 12px; }
@media (max-width: 860px) {
  table.reg .qr-b { opacity: 1; }
  .stmt { gap: 6px 16px; } .stmt b { font-size: 15px; }
  .pkf.sm { min-width: 0; flex: 1 1 140px; }
  .card .m { white-space: normal; overflow: visible; }
}

/* Dropdowns open above modals (modal 100 < picker 160 < toast 200). */
/* "Copy from previous" suggestion chip */
.sug { display: inline-flex; align-items: center; max-width: 100%; margin: 3px 0 0; padding: 1px 7px; border: 1px dashed #93b4e8; border-radius: 999px; background: #f2f7ff; color: var(--blue); font: inherit; font-size: 11.5px; line-height: 1.5; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug:hover, .sug:focus-visible { background: #e3eeff; border-style: solid; }
table.reg td.c-cat .sug { display: flex; width: fit-content; }
@media (max-width: 860px) {
  /* phone cards: explicit areas so the hidden select-checkbox doesn't shift the columns */
  .card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p a" "m b" "s s"; }
  .selecting .card { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ck p a" "ck m b" "ck s s"; }
  .card .ck { grid-area: ck; } .card .p { grid-area: p; min-width: 0; } .card .a { grid-area: a; } .card .m { grid-area: m; } .card .b { grid-area: b; } .card .s { grid-area: s; margin-top: 3px; }
  .card .sug { font-size: 12.5px; padding: 4px 10px; }
  /* the category on a card is its own tap target (a button with room around it), so a tap never lands on the QuickReport icon above */
  .card .m button.pick { font: inherit; color: var(--blue); background: none; border: 0; padding: 6px 4px; margin: -3px -4px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: baseline; }
  .card .p { padding-bottom: 2px; }
}
.sug-t td { vertical-align: top; } .sug-t .sm { font-size: 11.5px; } .nowrap { white-space: nowrap; }
.cf-list { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line2); border-radius: 8px; padding: 4px; }
.cf-i { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; text-align: left; border: 0; background: #fff; border-radius: 6px; padding: 7px 9px; font: inherit; cursor: pointer; color: inherit; }
.cf-i:hover, .cf-i:focus-visible { background: var(--sel); } .cf-i.best { background: #f2f7ff; }
.cf-p { font-weight: 600; } .cf-a { font-variant-numeric: tabular-nums; } .cf-c { font-size: 13px; } .cf-d { font-size: 12px; color: var(--muted); text-align: right; }
.badge.ok { background: #e3f5e8; color: #1d7a3a; }

/* ---------- entities page: each entity with its vendor rules ---------- */
.ent-hint { margin: -4px 0 12px; }
.ent-list { display: flex; flex-direction: column; gap: 12px; }
.ent { overflow: hidden; }
.ent-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.ent-t { flex: 1; min-width: 0; }
.ent-n { font-size: 15px; font-weight: 700; color: var(--navy); } .ent-n:hover { color: var(--blue); }
.ent-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ent-rules { table-layout: fixed; } .ent-rules td { vertical-align: top; overflow-wrap: anywhere; }
.ent-rules th:nth-child(1) { width: 44%; } .ent-rules th:nth-child(3) { width: 70px; } .ent-rules th:nth-child(4) { width: 140px; }
.ent-ra { white-space: nowrap; } .ent-ra .btn + .btn { margin-left: 6px; }
.ent-none { margin: 0; padding: 10px 14px; }
.ent-quick { display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: #fafbfd; border-top: 1px solid var(--line2); }
.ent-quick .eqPat { flex: 1 1 200px; min-width: 0; padding: 6px 9px; border: 1px solid #c5ccd6; border-radius: 7px; font: inherit; }
.ent-quick .pkf { flex: 1 1 220px; min-width: 0; max-width: 340px; }
.ent-quick .eqAdd { padding: 6px 12px; font-size: 13px; }
.ent-foot { margin: 12px 2px 0; }
@media (max-width: 860px) {
  .ent-h { flex-wrap: wrap; padding: 10px 12px; }
  .ent-acts { width: 100%; justify-content: flex-start; }
  .ent-acts .btn { padding: 7px 10px; font-size: 13px; }
  .ent-acts .btn.primary { flex: 1 1 100%; justify-content: center; }
  .ent-quick { flex-wrap: wrap; padding: 10px 12px; }
  .ent-quick .eqPat, .ent-quick .pkf { flex: 1 1 100%; max-width: none; font-size: 16px; padding: 9px 10px; }
  .ent-quick .eqAdd { flex: 1 1 100%; justify-content: center; padding: 9px; font-size: 14px; }
  .ent-ra .btn { padding: 6px 9px; }
  .ent-rules th:nth-child(1) { width: 46%; } .ent-rules th:nth-child(4) { width: 118px; }
  .bottomnav a { font-size: 10.5px; }
}

/* "Paid from" on credit-card payments: a small tag under the payee (tap to set/change) */
.pf { display: flex; width: fit-content; max-width: 100%; align-items: center; margin: 3px 0 0; padding: 1px 8px; border: 1px solid #c9dccb; border-radius: 999px; background: #eef7ef; color: #2f6b3a; font: inherit; font-size: 11.5px; line-height: 1.5; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf.unset { border-style: dashed; border-color: #b9c3cf; background: #f6f8fa; color: var(--muted); }
.pf:hover, .pf:focus-visible { background: #e2f1e4; }
.pf.unset:hover, .pf.unset:focus-visible { background: #eef1f5; color: var(--blue); }
.card .s { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.card .s .pf, .card .s .sug { margin: 0; }
.pfwrap .pkf { width: 100%; }
.pf-last { white-space: nowrap; }
@media (max-width: 860px) { .card .pf { font-size: 12.5px; padding: 4px 10px; } }

/* vendor picker (rule popup + Entities quick add): payees from the transactions, tick several → one rule each */
.pk.vp .pk-l { padding-top: 4px; }
.vp-i { align-items: center; }
.vp-i .vp-b { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vp-i .pk-lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.vp-i .vp-c { min-width: 0; margin-left: auto; text-align: right; }
.vp-cb { flex: 0 0 18px; width: 18px; height: 18px; border: 1.5px solid #9aa6b6; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: #fff; background: #fff; }
.vp-i.on .vp-cb { background: var(--blue); border-color: var(--blue); }
.vp-i.on { background: #eef4ff; } .vp-i.on.act, .vp-i.act { background: var(--sel); }
.vp-ms { display: flex; flex-wrap: wrap; column-gap: 8px; }
.vp-m { font-size: 11.5px; color: var(--muted); }
.vp-m.warn { color: #b45309; font-weight: 600; }
.vp-i.dim .pk-lb { color: var(--muted); font-weight: 400; } .vp-i.dim .vp-m { font-style: italic; }
.vp-f { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fafbfd; }
.vp-f .vp-cnt { margin-right: auto; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 10px; }
.vp-chips[hidden] { display: none; }
.vp-chips .vp-note { flex-basis: 100%; }
.ent .eqChips { margin: 8px 0 0; }
@media (max-width: 860px) {
  .pk.vp .pk-i { padding: 10px 10px; font-size: 15px; }
  .vp-cb { flex-basis: 22px; width: 22px; height: 22px; font-size: 14px; }
  .vp-f { padding: 10px 12px; } .vp-f .btn { min-height: 38px; }
  .vp-chip { font-size: 14px; padding: 5px 6px 5px 12px; } .vp-chip button { width: 26px; height: 26px; }
}

/* owner approval of new users */
.uncat-pill.pend-pill { background: #dc2626; color: #fff; margin-right: 6px; }
.uncat-pill.pend-pill[hidden] { display: none; }
.badge-pend { display: inline-block; background: #fef3c7; color: #92400e; border: 1px solid #f6c344; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.pend-banner { display: block; background: #fff7e6; border: 1px solid #f6c344; color: #3d2c00; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; text-decoration: none; }
a.pend-banner:hover { background: #fff1d1; }
.pend-row td { background: #fffbeb; }
.pending-note { background: #fff7e6; border: 1px solid #f6c344; border-radius: 10px; padding: 10px 12px; }

/* Bank connections (Plaid) */
.bank { margin-bottom: 12px; }
.bank-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 8px; }
.bank-h h2 { margin: 0; font-size: 16px; }
.bank-h .right { margin-left: auto; display: flex; gap: 6px; }
.bank-err { margin: 0 14px 10px; padding: 8px 10px; border: 1px solid #f3b4ad; background: #fdecea; color: #b42318; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.bank-err .muted { color: #8a3b33; }
.bank-warn { background: #fff8e6; border: 1px solid #f0d58a; border-radius: 8px; padding: 8px 10px; }
.bank-note { margin: -4px 0 12px; }
select.bank-map { max-width: 100%; min-width: 180px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; }
.btn.busy { opacity: .6; cursor: progress; }
@media (max-width: 860px) { .bank-h .right { margin-left: 0; width: 100%; } select.bank-map { min-width: 0; width: 100%; } }
/* Plaid Link's loader injects this same stylesheet inline, which the strict CSP (style-src 'self') blocks; these rules give its iframe the
   full-screen overlay layout from here instead. Plaid still shows/hides the iframe itself (CSSOM display, allowed by the CSP). */
html#plaid-link-temporary-id, html#plaid-link-temporary-id > body { overflow: hidden !important; }
body > .plaid-link-iframe { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; border: 0 !important;
  overflow: auto !important; height: 100% !important; width: 100% !important; z-index: 2147483000 !important; background-color: rgba(17, 17, 18, 0.16) !important; }

/* card details + statement info (Oct 15 2026) */
.badge.cu { background: #eef2f7; color: #334155; } .badge.cu-business { background: #e0ecff; color: #1d4fd0; } .badge.cu-personal { background: #f1e8ff; color: #6b21a8; }
.stmt-line { margin-top: 2px; color: var(--muted); } .stmt-line .due { color: var(--ink, inherit); } .stmt-line .due-red { color: var(--red); font-weight: 600; }
.primary-holder, .bank-bal { margin-top: 1px; }
.bank-liab { margin: 0 14px 10px; padding: 7px 10px; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.bank-liab.ok { background: #f3faf5; border: 1px solid #cfe9d7; } .bank-liab.warn { background: #fffaeb; border: 1px solid #f6d58a; color: #7a5200; }
.stmt .bank-cur b { font-size: 15px; }

/* account filter on Transactions (msg 173): checkbox dropdown, a bottom sheet on a phone */
.pkf.acf { max-width: 260px; } .pkf.acf.on { border-color: var(--blue); background: #eef4ff; } .pkf.acf.on span { color: #1d4fd0; font-weight: 600; }
.acfp .acf-g { display: flex; align-items: center; cursor: pointer; }
.acfp .acf-gb { margin-left: auto; border: 0; background: none; color: var(--blue); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 0 2px; }
.acfp .acf-all .pk-lb { font-weight: 600; }
.acfp .pk-lb .muted { font-weight: 400; }
.acfp:focus { outline: none; }
@media (max-width: 860px) {
  .filters .pkf.acf { flex: 1 1 100%; max-width: none; width: 100%; padding: 7px 10px; font-size: 14px; }
  .acfp.sheet .pk-l { padding-bottom: 4px; }
  .acfp .vp-f .btn { padding: 8px 12px; }
}
.card-ent { display: inline-block; font-size: 11px; font-weight: 600; color: #1d4fd0; margin-left: 4px; vertical-align: 1px; }

/* Payees (Oct 15 2026): merged / clean payee names */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; }
.py-intro { margin: 0 0 12px; max-width: 70ch; line-height: 1.45; }
.py-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; border-bottom: 1px solid var(--line2); }
.py-tools input[type=search] { flex: 1 1 220px; min-width: 0; max-width: 360px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.py-bar { position: sticky; top: 0; z-index: 3; border-left: 0; border-right: 0; }
.py-t .ckc { width: 28px; }
.py-t td { vertical-align: middle; }
.py-vr td { background: #fafbfd; padding-top: 4px; padding-bottom: 8px; }
.py-vl { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 6px; }
.py-vl li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.py-raw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.py-sugg { margin-bottom: 12px; } .py-sugg > h2 { flex-wrap: wrap; }
.py-s { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.py-s:last-child { border-bottom: 0; }
.py-s-b { display: flex; gap: 6px; }
.py-al { margin-top: 12px; }
.qr-raw { font-size: 11px; }
.py-sub { font-weight: 400; }
.pstore { color: var(--muted, #64748b); font-size: 12px; margin-left: 6px; white-space: nowrap; }
.card .p .pstore { display: inline; }
.qr-h { font-size: 13px; margin: 4px 0 6px; color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .04em; }
.qr-st { margin-bottom: 14px; }

/* ---------- calendar of card due dates (msg 200) ---------- */
.cal-nav { align-items: center; }
.cal-nav .cal-m { min-width: 140px; text-align: center; font-weight: 600; font-size: 15px; }
.cal-nav .btn.on { border-color: var(--blue); color: var(--blue); }
.cal-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cal-tot .kpi.est { border-style: dashed; }
.cal-tot .kpi .v.muted { color: var(--muted); }
.cal-f { border-radius: 10px 10px 0 0; }
.cal-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.cal-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; border: 1px solid; }
.lg.cal-due { background: #e8f0fe; border-color: #9db8f2; } .lg.cal-paid { background: #eef1f5; border-color: #c5ccd6; }
.lg.cal-overdue { background: #fdecea; border-color: #e7b7b1; } .lg.cal-est { background: #fff; border-color: #9aa5b1; border-style: dashed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 0 0 10px 10px; overflow: hidden; margin-bottom: 10px; }
.cal-w { background: #e9edf3; color: #3b4652; font-size: 12px; font-weight: 600; padding: 6px 8px; }
.cal-c { background: #fff; min-height: 104px; padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-c.out { background: #f6f8fb; }
.cal-c.past .cal-dn { color: #9aa5b1; }
.cal-dn { font-size: 12px; font-weight: 600; color: #3b4652; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.cal-c.today .cal-dn { background: var(--blue); color: #fff; }
.cal-c.today { background: #f7faff; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; min-width: 0; border: 1px solid #9db8f2; background: #e8f0fe; border-radius: 6px; padding: 3px 6px; cursor: pointer; line-height: 1.2; }
.cal-chip:hover { filter: brightness(.97); }
.cal-chip .cc-n { font-size: 11.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip .cc-a { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-chip .cc-m { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-chip.cal-soon { border-color: var(--amber); }
.cal-chip.cal-paid, .cal-chip.cal-nothing_due { background: #f1f3f6; border-color: #d3d9e1; color: #7b8794; }
.cal-chip.cal-paid .cc-a { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); font-weight: 600; }
.cal-chip.cal-overdue { background: #fdecea; border-color: var(--red); color: var(--red); }
.cal-chip.cal-overdue .cc-m { color: var(--red); }
.cal-chip.cal-est { background: #fff; border: 1px dashed #9aa5b1; color: var(--muted); }
.cal-chip.cal-est .cc-a { font-size: 11px; font-weight: 600; font-style: italic; }
.cal-dots, .cal-sum { display: none; }
.cal-noinfo { margin: 0 0 10px; }
.cal-list > h2 .right { margin-left: auto; }
.cal-list .empty.sm { padding: 18px; font-size: 13px; }
.cal-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line2); border-left: 4px solid #9db8f2; padding: 9px 12px; cursor: pointer; }
.cal-row:last-child { border-bottom: 0; border-radius: 0 0 10px 10px; }
.cal-row:hover { background: #f7faff; }
.cal-row.flash { animation: calflash 1.4s ease-out; }
@keyframes calflash { 0% { background: #fff3c4; } 100% { background: #fff; } }
.cal-row .cl-d { display: flex; flex-direction: column; line-height: 1.15; } .cal-row .cl-d b { font-size: 11px; text-transform: uppercase; color: var(--muted); } .cal-row .cl-d span { font-weight: 600; }
.cal-row .cl-b { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.cal-row .cl-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-row .cl-s { font-size: 12px; }
.cal-row .cl-r { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.cal-row .cl-a { font-weight: 700; font-size: 15px; } .cal-row .cl-m { font-size: 12px; color: var(--muted); }
.cal-row.cal-soon { border-left-color: var(--amber); }
.cal-row.cal-paid, .cal-row.cal-nothing_due { border-left-color: #c5ccd6; color: #7b8794; } .cal-row.cal-paid .cl-a { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.cal-row.cal-overdue { border-left-color: var(--red); background: #fffafa; } .cal-row.cal-overdue .cl-a, .cal-row.cal-overdue .cl-n { color: var(--red); }
.cal-row.cal-est { border-left: 4px dashed #9aa5b1; } .cal-row.cal-est .cl-n { color: var(--muted); font-weight: 500; } .cal-row.cal-est .cl-a { font-style: italic; font-size: 13px; font-weight: 600; }
.cal-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #e8f0fe; color: #1d4fd0; }
.cal-tag.paid, .cal-tag.nothing_due { background: #e6f4ee; color: var(--green); } .cal-tag.overdue { background: #fdecea; color: var(--red); }
.cal-tag.est { background: #fff; color: var(--muted); border: 1px dashed #9aa5b1; }
.cal-dt th { text-align: left; color: var(--muted); font-weight: 500; white-space: nowrap; padding-right: 14px; width: 1%; } .cal-dt td, .cal-dt th { padding: 6px 4px; border-bottom: 1px solid var(--line2); }
.cal-note.est { margin: 0; padding: 10px 12px; border: 1px dashed #9aa5b1; border-radius: 8px; background: #fafbfc; }
.cal-foot { margin-top: 10px; }
@media (max-width: 860px) {
  .cal-page .page-h h1 { font-size: 18px; } .cal-page .page-h .sub { display: none; }
  .cal-nav { margin-left: auto; gap: 4px; flex-wrap: nowrap; } .cal-nav .cal-m { min-width: 0; font-size: 14px; padding: 0 2px; }
  .cal-nav .btn { padding: 6px 10px; min-height: 36px; }
  .cal-tot { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .cal-tot .kpi.est { display: none; }
  .cal-tot .kpi { padding: 8px 8px; } .cal-tot .kpi .l { font-size: 11px; line-height: 1.25; } .cal-tot .kpi .v { font-size: 15px; } .cal-tot .kpi .s { font-size: 11px; }
  .cal-legend { margin-left: 0; width: 100%; font-size: 11px; } .cal-f select { flex: 1 1 45%; }
  .cal-w { font-size: 11px; padding: 4px 0; text-align: center; }
  .cal-c { min-height: 54px; padding: 3px 1px 4px; align-items: center; gap: 2px; }
  .cal-c.has { cursor: pointer; }
  .cal-chips { display: none; }
  .cal-dn { width: 24px; height: 24px; font-size: 13px; }
  .cal-dots { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
  .cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); display: block; }
  .cal-dots i.cal-soon { background: var(--amber); } .cal-dots i.cal-paid, .cal-dots i.cal-nothing_due { background: #b8c1cc; }
  .cal-dots i.cal-overdue { background: var(--red); } .cal-dots i.cal-est { background: #fff; border: 1.5px dashed #7b8794; width: 8px; height: 8px; }
  .cal-sum { display: block; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; color: #3b4652; letter-spacing: -.2px; }
  .cal-sum.est { color: var(--muted); font-style: italic; font-weight: 500; }
  .cal-row { grid-template-columns: 48px 1fr auto; padding: 11px 10px; min-height: 56px; }
}
.warn-text { color: #b45309; font-weight: 600; }
