/* Wahat 360: teal and gold theme, IBM Plex Sans. Deep teal menu, ruled sheets, gold accents, double rule under totals. */
/* IBM Plex Sans and IBM Plex Sans Arabic (SIL Open Font License, see fonts/OFL-IBM-Plex.txt) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }

:root {
  --paper: #EEF5F4;
  --sheet: #FFFFFF;
  --ink: #0B3C45;
  --ink-2: #4A6670;
  --ink-3: #7D949A;
  --brand: #0B5563;
  --brand-dk: #0A3F49;
  --brand-lt: #E6F4F3;
  --teal: #1A8C8C;
  --rule: #D6E7E5;
  --rule-2: #A8CBC8;
  --money-rule: #EADBB4;
  --red: #B3261E;
  --red-lt: #FBEAE8;
  --gold: #F2B84B;
  --gold-dk: #B97A12;
  --gold-lt: #FDF3DD;
  --ui: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --num: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --green: #1E7B45;
  --green-lt: #E3F1E8;
  --line: #CFE3E1;
  --head-bg: #E6F4F3;
  --spine-w: 240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 var(--ui);
  color: var(--ink);
  background: var(--paper);
  display: flex;
  min-height: 100vh;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dk); }
:focus-visible { outline: 2px solid var(--gold-dk); outline-offset: 1px; }
.spine :focus-visible { outline-color: var(--gold); }
h1, h2, h3 { font-family: var(--num); font-weight: 600; letter-spacing: .1px; margin: 0; }
h2 { font-size: 17px; margin: 22px 0 10px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
p { margin: 0 0 10px; max-width: 78ch; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.num, td.num, th.num { font-family: var(--num); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.neg { color: var(--red); }

/* ---------- spine (sidebar) ---------- */
.spine {
  width: var(--spine-w);
  flex: 0 0 var(--spine-w);
  background: #0A3F49;
  color: #D3ECE9;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
  border-right: 4px solid #08343C;
}
.brand { display: block; padding: 18px 18px 6px; }
.brand img { width: 100%; max-width: 196px; height: auto; display: block; }
.brand:hover { color: #fff; }
.co {
  margin: 6px 12px 10px; padding: 8px 10px;
  background: rgba(0,0,0,.16); border-radius: 4px;
  font-size: 12.5px; line-height: 1.35;
}
.co b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; }
.co a { color: #9AD8D3; }
.spine a.nav, .spine summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 16px 5px 18px;
  color: #D3ECE9; text-decoration: none; cursor: pointer;
  border-left: 3px solid transparent;
}
.spine a.nav:hover { background: rgba(255,255,255,.07); color: #fff; }
.spine a.nav.on { background: rgba(255,255,255,.13); color: #fff; border-left-color: var(--gold); }
.spine summary {
  list-style: none; margin-top: 6px;
  font: 600 14.5px var(--num); color: #fff; padding-top: 8px; padding-bottom: 6px;
}
.spine summary::-webkit-details-marker { display: none; }
.spine summary::after { content: "+"; font-weight: 400; opacity: .6; }
.spine details[open] summary::after { content: "–"; }
.spine details a.nav { padding-left: 28px; font-size: 13.5px; }
.spine kbd { font: 11px var(--num); opacity: .55; }
.spine .home { margin-top: 2px; font: 600 14.5px var(--num); color: #fff; }
.spine a.nav.section { margin-top: 6px; padding-top: 8px; padding-bottom: 6px; font: 600 14.5px var(--num); color: #fff; }
.spine .foot { margin-top: auto; padding: 14px 16px; font-size: 12px; opacity: .8; display: flex; justify-content: space-between; align-items: center; }
.spine .foot a { color: #D3ECE9; }
body.nonav .spine { display: none; }

/* ---------- page ---------- */
main { flex: 1; min-width: 0; padding: 0 28px 48px; }
.top {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 18px 0 12px; margin-bottom: 18px;
  border-bottom: 2px solid var(--rule-2);
}
.top .ttl { flex: 1; min-width: 200px; }
.top h1 { font-size: 24px; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.flash, .error, .notice, .good {
  padding: 10px 14px; border-radius: 4px; margin: 0 0 16px; max-width: 980px;
  border-left: 4px solid;
}
.flash { background: var(--brand-lt); border-color: var(--brand); }
.good { background: var(--brand-lt); border-color: var(--brand); }
.error { background: var(--red-lt); border-color: var(--red); color: #7A1B15; }
.notice { background: var(--gold-lt); border-color: var(--gold); }

/* ---------- buttons ---------- */
.btn, button {
  font: 600 13.5px var(--ui);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 4px;
  border: 1px solid var(--rule-2); background: var(--sheet); color: var(--brand-dk);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover, button:hover { border-color: var(--brand); color: var(--brand-dk); background: #F4FAF9; }
.btn.primary, button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover, button.primary:hover { background: var(--brand-dk); }
.btn.danger, button.danger { color: var(--red); border-color: #E3B5B0; }
.btn.danger:hover, button.danger:hover { background: var(--red-lt); border-color: var(--red); }
button.armed { background: var(--red); color: #fff; border-color: var(--red); }
.btn.small, button.small { padding: 3px 9px; font-size: 12.5px; }
.btn kbd, button kbd { font: 11px var(--num); opacity: .7; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 400; text-decoration: underline; cursor: pointer; }
.linkbtn:hover { background: none; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* ---------- forms ---------- */
form.card, .card {
  background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 4px;
  padding: 18px 20px; max-width: 980px; margin-bottom: 18px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.grid .wide { grid-column: span 2; }
.grid .full { grid-column: 1 / -1; }
label.f, div.mobf { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
label.f small, div.mobf small { font-weight: 400; color: var(--ink-3); }
input, select, textarea {
  font: 14px var(--ui); color: var(--ink);
  padding: 6px 8px; border: 1px solid #B3CFCC; border-radius: 3px; background: #fff;
  width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(242,184,75,.45); }
input.num { text-align: right; }
textarea { resize: vertical; min-height: 60px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
label.check input { width: auto; }
.req::after { content: " *"; color: var(--red); }
fieldset { border: 0; padding: 0; margin: 0; }
.sep { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }
.inline { display: flex; gap: 6px; align-items: center; }
.inline select { width: auto; }

/* ---------- ledger sheets (tables) ---------- */
.sheetwrap { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 4px; overflow-x: auto; margin-bottom: 18px; }
table.sheet { width: 100%; border-collapse: collapse; }
.sheet th {
  font: 600 12.5px var(--ui); color: var(--ink-2); text-align: left;
  padding: 9px 10px 7px; border-bottom: 2px solid var(--brand); background: #F8FBFB;
  position: sticky; top: 0; white-space: nowrap;
}
.sheet td { padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.sheet td.num, .sheet th.num { border-left: 1px solid var(--money-rule); text-align: right; }
.sheet tr[data-href] { cursor: pointer; }
.sheet tr[data-href]:hover td { background: #EAF4F3; }
.sheet td a.rowlink { color: inherit; text-decoration: none; }
.sheet tr[data-href]:hover a.rowlink { color: var(--brand-dk); text-decoration: underline; }
.sheet tr.head td { font: 600 15px var(--num); padding-top: 16px; background: #F3F9F8; color: var(--brand); }
.sheet tr.group td { font-weight: 600; }
.sheet tr.sub td { font-weight: 600; color: var(--ink-2); }
.sheet tr.total td { font-weight: 700; border-top: 1px solid var(--ink); }
.sheet tr.grand td { font-weight: 700; font-size: 15px; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); background: #F6FAFA; }
.sheet tr.det td { color: var(--ink-2); font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
.sheet td.neg, .sheet tr.sub td.neg, .sheet tr.det td.neg { color: var(--red); }
.sheet tr.muted td { color: var(--ink-2); font-size: 12.5px; border-bottom: 0; }
.sheet tr.warn td { color: var(--red); }
.sheet tr.lowstock td { background: var(--gold-lt); }
.sheet .empty td { color: var(--ink-2); text-align: center; padding: 28px; }
.sheet td.nw { white-space: nowrap; }
.sheet td.act { white-space: nowrap; text-align: right; width: 1%; }
.sub2 { display: block; font-size: 12px; color: var(--ink-3); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--brand-lt); color: var(--brand-dk); }
.badge.due { background: var(--gold-lt); color: #7A4F0A; }
.badge.overdue { background: var(--red-lt); color: var(--red); }
.badge.grey { background: #ECF1F1; color: var(--ink-2); }

.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar label.f { min-width: 140px; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search] { width: 360px; max-width: 100%; }
.toolbar label.f input[type=search] { width: 100%; }

/* ---------- report ---------- */
.rephead { display: none; }
.report-sub { color: var(--ink-2); margin: -10px 0 14px; }
.filters { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 4px; padding: 10px 12px; }
.filters label.f { min-width: 150px; }

/* ---------- dashboard ---------- */
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.quick .btn { padding: 9px 14px; }
.dash { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr); gap: 18px; max-width: 1180px; align-items: start; }
.dash .card { margin: 0; max-width: none; }
.position { width: 100%; border-collapse: collapse; }
.position td { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.position td.num { font-size: 17px; }
.position tr:last-child td { border-bottom: 0; }
.position a { color: inherit; text-decoration: none; }
.position a:hover { color: var(--brand); text-decoration: underline; }
.position .lbl small { display: block; color: var(--ink-3); font-size: 12px; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 170px; padding-top: 8px; border-bottom: 1px solid var(--ink-3); }
.bars .m { display: flex; gap: 2px; align-items: flex-end; justify-content: center; height: 100%; position: relative; cursor: default; }
.bars .m:hover, .bars .m:focus { background: #EEF5F4; outline: none; }
.bars .b { width: 40%; max-width: 26px; border-radius: 4px 4px 0 0; min-height: 1px; }
.bars .b.s { background: #00918E; }
.bars .b.p { background: #C47F1A; }
.bars .tip { display: none; position: absolute; bottom: calc(100% - 30px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 4px; white-space: nowrap; z-index: 5; font-family: var(--num); }
.bars .m:hover .tip, .bars .m:focus .tip { display: block; }
.barlbl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; text-align: center; font-size: 12px; color: var(--ink-2); padding-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mini td { padding: 5px 0; border-bottom: 1px solid var(--rule); }
.mini tr[data-href] { cursor: pointer; }
.mini tr[data-href]:hover td { background: #EAF4F3; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; padding: 8px 0 8px 34px; position: relative; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font: 600 12px/22px var(--num); text-align: center; }

/* ---------- voucher entry ---------- */
.vhead { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 1.2fr; gap: 12px 14px; }
.vhead.acct { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
.vhead.journal { grid-template-columns: 1fr 1fr 2fr; }
.partyinfo { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; min-height: 18px; font-weight: 400; }
.partyinfo .linkbtn { background: none; border: 0; padding: 0; min-height: 0; height: auto; color: var(--brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.lines { width: 100%; border-collapse: collapse; margin-top: 16px; }
.lines th { font: 600 12px var(--ui); color: var(--ink-2); text-align: left; padding: 6px 4px; border-bottom: 2px solid var(--brand); white-space: nowrap; }
.lines th.num { text-align: right; }
.lines td { padding: 4px 4px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.lines td.n { color: var(--ink-3); font: 12px var(--num); padding-top: 11px; width: 26px; text-align: right; }
.lines td.out { font-family: var(--num); text-align: right; padding-top: 10px; white-space: nowrap; }
.lines input, .lines select { padding: 5px 6px; }
.lines .hint { font-size: 11.5px; color: var(--ink-3); display: block; margin-top: 2px; }
.lines .hint.warn { color: var(--red); }
.lines .x { border: 0; background: none; color: var(--ink-3); font-size: 18px; padding: 4px 6px; }
.lines .x:hover { color: var(--red); }
.vfoot { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-top: 16px; }
.vadj { display: grid; gap: 8px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.vadj .inline { display: flex; gap: 6px; align-items: center; }
.vadj .inline input { flex: 1; min-width: 0; }
.vadj small { color: var(--ink-3); font-weight: 400; }
.totals { width: 100%; border-collapse: collapse; }
.totals td { padding: 5px 0; }
.totals td.num { font-size: 15px; }
.totals tr.big td { font: 700 19px var(--num); border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding: 8px 0; }
.words { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.diff { color: var(--red); font-weight: 600; }
.savedbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vatchk { display: flex; align-items: center; gap: 4px; padding-top: 7px; font-size: 12.5px; white-space: nowrap; }
.vatchk input { width: auto; }

/* combo box */
.combo-wrap { position: relative; }
.combo-list {
  position: absolute; z-index: 50; background: #fff; border: 1px solid var(--brand);
  border-radius: 3px; max-height: 300px; overflow-y: auto; box-shadow: 0 6px 18px rgba(10,63,73,.18);
  min-width: 260px;
}
.combo-list div { padding: 6px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.combo-list div small { color: var(--ink-3); white-space: nowrap; }
.combo-list div.on { background: var(--brand-lt); }
.combo-list div.new { color: var(--brand); font-weight: 600; border-top: 1px solid var(--rule); }
.combo-list .none { color: var(--ink-3); cursor: default; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10,40,46,.45); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; z-index: 100; }
.modal { background: #fff; border-radius: 6px; padding: 20px 22px; width: 460px; max-width: calc(100vw - 32px); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.modal h3 { margin-top: 0; }

/* voucher view */
.vmeta { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 18px; margin-bottom: 4px; }
.vmeta div small { display: block; color: var(--ink-3); font-size: 12px; }
.vmeta div b { font-weight: 600; }

/* lists */
.chart td.g { font-weight: 600; }
.pill { font-size: 11.5px; color: var(--ink-3); }

.closed { justify-content: center; align-items: center; }
.closed-box { text-align: center; }
.closed-box h1 { font-size: 26px; margin-bottom: 10px; color: var(--brand-dk); }

@media (max-width: 1100px) {
  .dash { grid-template-columns: 1fr; }
  .vhead, .vhead.acct { grid-template-columns: 1fr 1fr; }
  .vfoot { grid-template-columns: 1fr; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; display: block; font-size: 12px; }
  .spine, .top .actions, .filters, .toolbar, .noprint, .flash, .btnrow { display: none !important; }
  main { padding: 0; }
  .top { border-bottom: 1px solid #000; padding-top: 0; }
  .rephead { display: block; font: 600 13px var(--num); color: var(--ink-2); margin-bottom: 2px; }
  .sheetwrap { border: 0; overflow: visible; }
  .sheet th { position: static; background: none; }
  .sheet td, .sheet th { padding: 4px 6px; }
  .sheet tr[data-href]:hover td { background: none; }
  .card { border: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- added in 1.1 ---------- */
.field-err input, .field-err select, .field-err textarea { border-color: var(--red); background: #FFF8F7; }
.field-err .msg { color: var(--red); font-weight: 400; font-size: 12px; }
.opt { display: grid; grid-template-columns: 260px 1fr; gap: 10px 24px; padding: 16px 0; border-top: 1px solid var(--rule); }
.opt:first-of-type { border-top: 0; padding-top: 4px; }
.opt h3 { margin: 0 0 4px; font-size: 15px; }
.opt p { color: var(--ink-2); font-size: 13px; margin: 0; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 4px; cursor: pointer; background: #fff; }
.choice input { width: auto; margin-top: 3px; }
.choice b { display: block; font-weight: 600; }
.choice small { color: var(--ink-2); font-size: 12.5px; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-lt); }
.yn { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 4px; overflow: hidden; }
.yn label { padding: 6px 18px; cursor: pointer; font-weight: 600; font-size: 13.5px; background: #fff; }
.yn input { position: absolute; opacity: 0; width: 1px; }
.yn label:has(input:checked) { background: var(--brand); color: #fff; }
.yn label:has(input:focus-visible) { outline: 2px solid var(--gold-dk); outline-offset: -2px; }
.sjkind { display: flex; gap: 8px; margin-top: 14px; }
.lines .sub-row { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.lines .sub-row input, .lines .sub-row select { font-size: 13px; }
.lines .sub-row .desc { flex: 1 1 100%; }
.lines .sub-row .note { flex: 1 1 160px; }
.lines .sub-row select { flex: 1 1 0; min-width: 0; }
.lines h4 { margin: 18px 0 4px; font: 600 14px var(--num); color: var(--brand); }
.welcome-logo { width: 360px; max-width: 100%; display: block; margin: 4px 0 14px; }

/* ---------- added in 1.2 ---------- */
.vwrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; max-width: 1500px; }
.vwrap .card { margin: 0; max-width: none; }
.vwrap.norecent { grid-template-columns: minmax(0, 1fr); }
.vwrap.norecent .recent { display: none; }
.recent { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; padding: 14px 14px 8px; }
.recent-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.recent-head h3 { margin: 0; font-size: 15px; }
.recent input[type=search] { margin-bottom: 8px; font-size: 13px; }
.recent #recentList { display: block; overflow-y: auto; flex: 1; }
.recent #recentList tbody { display: table; width: 100%; }
.recent #recentList td { font-size: 13px; vertical-align: top; padding: 6px 4px; }
.recent .r1, .recent .r2 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.recent .r1 a { font-weight: 600; }
.recent .ramt { font-family: var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent .ramt small { color: var(--ink-2); }
.recent .r2 { font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.recent .rdate { white-space: nowrap; }
.recent .rparty { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; min-width: 0; }
.recent tr.current td { background: var(--gold-lt); }
.sheet tr.group td, .sheet tr.sub td { color: var(--brand); }
.sheet tr.group td { font-weight: 700; background: #F4F9F9; }
.sheet tr.sub td { font-weight: 700; }
.sheet tr.total td, .sheet tr.grand td { color: var(--brand-dk); }
.fxbar { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.fxbar label.f { min-width: 140px; }
.fxnote { font-size: 12.5px; color: var(--ink-2); }
.repgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; max-width: 1280px; }
.repgrid .card { margin: 0; max-width: none; }
.repgrid h2 { margin: 0 0 6px; }
@media (max-width: 1250px) { .vwrap { grid-template-columns: minmax(0, 1fr); } .recent { position: static; max-height: 360px; } }
.customdates { display: contents; }
.customdates.dim label.f { opacity: .6; }
.customdates.dim label.f:focus-within { opacity: 1; }
.repcard { padding: 16px 16px 10px; }
.repcard h2 { font-size: 15px; color: var(--brand); text-transform: none; padding-bottom: 8px; border-bottom: 2px solid var(--gold); margin-bottom: 4px !important; }
.reptile { display: block; padding: 9px 10px; margin: 0 -6px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.reptile b { display: block; font-weight: 600; color: var(--brand-dk); }
.reptile span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.reptile:hover, .reptile:focus-visible { background: var(--paper); }
.reptile:hover b { text-decoration: underline; }
.cmpbox .inline { display: flex; gap: 6px; align-items: center; }
.cmpbox input { width: 76px; }
.cmpbox small { color: var(--ink-2); }
.ccapply { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; }
.ccapply .lbl { font-size: 13px; color: var(--ink-2); width: 100%; }
.spine summary, .spine a.nav.home, .spine a.nav.section { justify-content: flex-start; }
.spine summary::after { margin-left: auto; }
.fromtag { display: inline-block; margin: 4px 0 0; font-size: 12px; color: var(--brand); background: var(--paper); border-radius: 3px; padding: 1px 6px; }
.pendlist { max-height: 60vh; overflow-y: auto; margin-top: 8px; }
.pendv { border-top: 1px solid var(--rule-2); padding: 10px 0; }
.pendv table { width: 100%; margin-top: 6px; }
.pendv .pq { width: 100px; }
.modal:has(.pendlist) { width: 680px; }
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: " ▾"; font-size: 11px; }
details.menu .menu-list { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--rule-2); border-radius: 4px; box-shadow: 0 8px 22px rgba(0,0,0,.14); z-index: 20; min-width: 230px; padding: 4px 0; }
details.menu .menu-list a { display: block; padding: 8px 14px; color: var(--ink); text-decoration: none; white-space: nowrap; }
details.menu .menu-list a:hover { background: var(--paper); }
.fromtag[hidden] { display: none; }
.pendv th, .pendv td { padding: 4px 8px; }

/* ---------- 1.3 theme: teal and gold through every screen ---------- */
/* menu */
.spine .ico { width: 18px; height: 18px; margin-right: 10px; flex: none; color: #8FD0CA; transition: color .12s; }
.spine a.nav:hover .ico, .spine summary:hover .ico, .spine a.nav.on .ico, .spine details[open] > summary .ico { color: var(--gold); }
.spine summary, .spine a.nav.home, .spine a.nav.section { font-weight: 600; font-size: 14px; letter-spacing: .1px; }
.spine details a.nav { font-size: 13.5px; }
.co { background: #08333B; border: 1px solid rgba(255,255,255,.06); }
/* page title with a gold rule, as on the home page */
.top { border-bottom: 2px solid var(--gold); }
.top h1 { color: var(--brand-dk); font-weight: 600; }
h2, h3 { color: var(--brand-dk); }
/* cards: white with a teal (or gold) top edge */
form.card, .card { border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 6px; }
.dash > .card:first-child, .dash > section.card:first-child { border-top-color: var(--gold); }
.repcard { border-top-color: var(--teal); }
.recent { border-top-color: var(--gold); }
.filters { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 6px; }
.sheetwrap { border-color: var(--line); border-radius: 6px; }
/* table headings tinted teal */
.sheet th { background: var(--head-bg); color: var(--brand-dk); border-bottom: 2px solid var(--teal); }
.lines th { background: var(--head-bg); color: var(--brand-dk); border-bottom: 2px solid var(--teal); padding: 7px 6px; }
.sheet tr.head td { background: var(--head-bg); color: var(--brand-dk); }
.sheet tr[data-href]:hover td, .mini tr[data-href]:hover td { background: var(--gold-lt); }
/* buttons: dark teal main button, teal-edged others */
.btn.primary, button.primary { background: var(--brand-dk); border-color: var(--brand-dk); }
.btn.primary:hover, button.primary:hover { background: var(--brand); border-color: var(--brand); }
.btn, button { border-color: #7FBDB8; }
.btn:hover, button:hover { border-color: var(--teal); background: var(--brand-lt); }
.quick .btn.primary kbd { color: var(--gold); opacity: 1; }
/* badges */
.badge.due { background: var(--gold); color: #5C3D06; }
.badge.ok { background: var(--green-lt); color: #1E5B35; }
.pos { color: var(--green); }
/* notices */
.flash, .good { background: var(--brand-lt); border-color: var(--teal); }
.notice { background: var(--gold-lt); border-color: var(--gold); color: #5C3D06; }
/* forms */
.opt h3 { color: var(--brand-dk); }
.yn label:has(input:checked) { background: var(--brand-dk); }
.choice:has(input:checked) { border-color: var(--teal); }
label.f { color: var(--ink-2); }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
/* voucher screen */
.vmeta div small { color: var(--teal); font-weight: 600; text-transform: none; }
.totals tr.big td { color: var(--brand-dk); border-top-color: var(--brand-dk); border-bottom-color: var(--brand-dk); }
.modal { border-top: 4px solid var(--teal); }
.modal h3 { color: var(--brand-dk); }
/* dashboard */
.position td.num { color: var(--brand-dk); font-weight: 600; }
.position td.num.neg { color: var(--red); }
.position td.num.pos { color: var(--green); }
.steps li::before { background: var(--gold); color: #5C3D06; }
.bars .b.s { background: var(--teal); }
.bars .b.p { background: var(--gold); }
form.card > h2, form.card > h3 { border-left: 3px solid var(--gold); padding-left: 10px; border-radius: 0; }
/* ---------- 1.4: flat menu, section pages, back button, about ---------- */
.spine a.nav.section { margin-top: 2px; }
.spine .about-link { margin-top: auto; }
.spine .foot { margin-top: 0; }
.top { align-items: center; }
.backbtn { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; flex: none; color: var(--brand-dk); border-color: #7FBDB8; }
.backbtn .ico { width: 18px; height: 18px; }
.backbtn:hover { background: var(--gold-lt); border-color: var(--gold); color: var(--brand-dk); }
.hubtile { display: flex; align-items: flex-start; gap: 4px; }
.hubtile .reptile { flex: 1; min-width: 0; }
.hubtile .reptile kbd { font: 500 11px var(--num); color: var(--gold-dk); background: var(--gold-lt); border-radius: 3px; padding: 0 5px; margin-left: 4px; }
.hublist { font-size: 12px; color: var(--teal); text-decoration: none; padding: 10px 6px; white-space: nowrap; }
.hublist:hover { color: var(--brand-dk); text-decoration: underline; }
.about { max-width: 760px; }
.about-logo { width: 300px; max-width: 100%; display: block; margin: 4px 0 18px; }
.about-tab { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
.about-tab td { padding: 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.about-tab td:first-child { width: 150px; color: var(--teal); font-weight: 600; }
/* bank reconciliation */
.brs { max-width: 760px; }
.brs h2 { margin-top: 0; }
.brs-tab td:last-child { width: 200px; }
.sheet tr.cleared td { color: var(--ink-2); background: #F7FBFA; }
@media print { .noprint-form .btnrow, .noprint-form .toolbar input, .hublist { display: none; } }
/* day book search and detailed views */
.search-box { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; }
.sb-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.sb-head b { color: var(--brand-dk); }
.sb-match { width: auto; display: inline-block; margin: 0 4px; padding: 3px 6px; }
.cond { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.cond .cf { width: 190px; } .cond .cop { width: 170px; } .cond .cv { width: 240px; } .cond .cw { width: 140px; }
.cond .cwrap { display: inline-flex; gap: 6px; align-items: center; }
.cond .cwrap[hidden] { display: none; }
.cond .x { color: var(--red); padding: 2px 8px; }
.sb-foot { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.sheet tr.vh td { background: #F3F9F8; font-weight: 600; color: var(--brand-dk); border-top: 1px solid var(--line); }

/* 1.5 */
.vatq { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.vatq .muted { margin-right: 4px; }
.vatq .btn.on, .fmtsw .btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.repsearch { margin: 0 0 16px; max-width: 760px; }
.repsearch input[type=search] { flex: 1; font-size: 15px; padding: 9px 12px; }
.sheet.compact td, .sheet.compact th { padding: 5px 10px; }
.autosrc { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; margin: 6px 0 4px; }
.autosrc .check { align-items: flex-start; }
.sheet.periods input, .sheet.periods select { min-width: 0; width: 100%; }
.helpwrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 1180px; }
.helpnav { position: sticky; top: 12px; padding: 14px 14px 10px; }
.helpnav input { width: 100%; margin-bottom: 8px; }
.helpnav ol { list-style: none; margin: 0; padding: 0; }
.helpnav li a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; }
.helpnav li a:hover { background: var(--brand-lt); }
.helptopic { scroll-margin-top: 12px; }
.helptopic h2 { margin-top: 0; }
.helptopic ul { margin: 6px 0 0; padding-left: 20px; }
.helptopic li { margin: 5px 0; line-height: 1.5; }
.helptopic p { line-height: 1.55; }
.helptopic table { margin: 8px 0 10px; }
@media (max-width: 860px) { .helpwrap { grid-template-columns: 1fr; } .helpnav { position: static; } }
#sp, #fmt { min-width: 190px; }

/* ---------- 1.6 ---------- */
.popup .spine, .popup header.top .actions { display: none; }
body.popup { background: var(--sheet); }
body.popup main { padding: 14px 18px; }
.framebg { align-items: flex-start; padding-top: 3vh; }
.mlinks { display: inline-flex; gap: 10px; margin: 3px 0 0 2px; font-size: 12px; font-weight: 600; }
.mlinks a { color: var(--brand); text-decoration: none; }
.mlinks a:hover { text-decoration: underline; }
.mlinkbtn { align-self: center; font-size: 12px; font-weight: 600; color: var(--brand); margin-left: 6px; }
label.f > .mlinks { display: flex; }
.framebox { background: var(--sheet); width: min(1040px, 94vw); height: 92vh; border-radius: 8px; box-shadow: 0 18px 50px rgba(5, 40, 46, .35); display: flex; flex-direction: column; overflow: hidden; }
.framehead { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--brand); color: #fff; }
.framehead .x { color: #fff; font-size: 22px; background: transparent; border: 0; }
.framebox iframe { flex: 1; border: 0; width: 100%; }

.lockline { margin: 0 0 10px; }
.paidbox { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--rule-2); border-radius: 6px; background: var(--gold-lt); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.paidbox .paidfields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.paidbox .paidfields .f { margin: 0; min-width: 160px; }
.totals tr.paidrow td { color: var(--gold-dk); }
.bwbox { margin-top: 14px; display: grid; gap: 12px; }
.bwparty { border: 1px solid var(--rule-2); border-left: 4px solid var(--teal); border-radius: 6px; padding: 10px 12px; background: #FBFEFE; }
.bwhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.bwparty table.mini { width: 100%; margin-bottom: 8px; }
.bwparty table.mini input, .bwparty table.mini select { width: 100%; }
.bwparty td.due { color: var(--red); }
.bwfoot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bwsum { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.bwsum.ok { color: var(--green); }
.bwsum.warn { color: var(--gold-dk); }
.bwsum.diff { color: var(--red); }
.vfiles { display: flex; gap: 10px; align-items: center; margin: 10px 0 0; }
.fileadd { cursor: pointer; }
.files .fileshead { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.filelist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.filelist li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; }
.filelist li > a:first-of-type { font-weight: 600; }
.filelist li .muted { flex: 1; }
.ficon { display: inline-grid; place-items: center; width: 40px; height: 26px; border-radius: 4px; background: var(--brand-lt); color: var(--brand); font: 700 10px var(--num); }
.attachform { display: flex; gap: 12px; align-items: center; }
.dropzone { flex: 1; display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; padding: 14px; border: 2px dashed var(--rule-2); border-radius: 8px; color: var(--ink-2); cursor: pointer; background: var(--paper); }
.dropzone input { max-width: 100%; }
.reasonline { margin: 12px 0 0; padding: 8px 10px; background: var(--gold-lt); border-radius: 6px; }

.loginwrap { min-height: 80vh; display: grid; place-items: center; }
.loginbox { width: min(420px, 92vw); }
.loginlogo { width: 220px; display: block; margin: 0 auto 14px; }
.loginbox h2 { text-align: center; margin-top: 4px; }
.loginbox > p { text-align: center; }
.statushead { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--paper); margin-bottom: 14px; }
.statushead .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); margin-top: 5px; flex: 0 0 auto; }
.statushead.ok .dot { background: var(--green); }
.statushead.lockd { background: var(--gold-lt); }
.statushead.lockd .dot { background: var(--gold-dk); }
.lockform { display: flex; gap: 12px; align-items: flex-end; margin: 6px 0 12px; }
.lockform .f { margin: 0; }
.twocol { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; max-width: 1280px; align-items: start; }
@media (max-width: 1000px) { .twocol { grid-template-columns: 1fr; } }
table.rights td.acts { font-family: var(--num); letter-spacing: 2px; }
table.rights th.c { font-size: 11.5px; max-width: 90px; white-space: normal; }
td.c, th.c { text-align: center; }
.whoami { margin: 10px 12px 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; gap: 8px; align-items: center; color: #DDEFEF; font-size: 12.5px; }
.whoami b { display: block; color: #fff; font-weight: 600; }
.whoami small { color: #A9CFCF; }
.whoami div { flex: 1; min-width: 0; }
.whoami a { color: var(--gold); font-size: 12px; }
.whoami b, .whoami small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami .whoacts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--brand-dk); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.secbox { padding: 12px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--paper); }
.qchips { display: flex; gap: 8px; flex-wrap: wrap; }
.qchip { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 6px; background: var(--brand-lt); border: 1px solid var(--rule-2); font-weight: 600; }
.qchip small { font-weight: 400; color: var(--ink-2); font-size: 11px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--ink-2); font-size: 12px; }
.kpi b { font: 600 20px var(--num); }
.kpi span { font-size: 12px; color: var(--ink-3); }
.kpi.accent { background: var(--brand); color: #fff; border-color: var(--brand); }
.kpi.accent small, .kpi.accent span { color: #CDE7E7; }
.matchgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; }
@media (max-width: 1100px) { .matchgrid { grid-template-columns: 1fr; } }
tr.undone td { color: var(--ink-3); text-decoration: line-through; }
tr.undone td:nth-child(5) { text-decoration: none; }
.billsbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; }
.seg .btn:first-child { border-radius: 4px 0 0 4px; }
.seg .btn:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.seg .btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
form.inline { display: inline-flex; gap: 8px; align-items: center; }
form.inline select { width: auto; }

/* invoice formats */
.fmtwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); gap: 16px; max-width: 1500px; align-items: start; }
@media (max-width: 1200px) { .fmtwrap { grid-template-columns: 1fr; } }
.fmtprev { position: sticky; top: 12px; padding: 12px; }
.fmtprev-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.fmtprev-head .btn { margin-left: auto; }
.pvframe { overflow: hidden; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.pvframe iframe { width: 820px; height: 1180px; border: 0; transform-origin: 0 0; display: block; }
h3.formsec { margin: 18px 0 10px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--brand); }
form > h3.formsec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.laypick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.layopt { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1.5px solid var(--rule); border-radius: 8px; cursor: pointer; background: var(--sheet); }
.layopt input { position: absolute; opacity: 0; }
.layopt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-lt); }
.layopt:has(input:focus-visible) { outline: 2px solid var(--gold-dk); }
.layopt small { color: var(--ink-2); font-size: 11.5px; line-height: 1.3; }
.laythumb { height: 64px; border-radius: 4px; background: #fff; border: 1px solid var(--rule); position: relative; overflow: hidden; margin-bottom: 4px; }
.laythumb i { position: absolute; display: block; background: var(--rule-2); border-radius: 2px; }
.lt-classic i:nth-child(1) { left: 6px; top: 6px; width: 16px; height: 12px; background: var(--brand); }
.lt-classic i:nth-child(2) { left: 26px; top: 8px; width: 40px; height: 4px; }
.lt-classic i:nth-child(3) { right: 6px; top: 8px; width: 30px; height: 6px; background: var(--ink); }
.lt-classic i:nth-child(4) { left: 6px; right: 6px; top: 30px; height: 8px; background: var(--brand); }
.lt-band i:nth-child(1) { left: 0; right: 0; top: 0; height: 22px; background: var(--brand); border-radius: 0; }
.lt-band i:nth-child(2) { left: 6px; top: 28px; width: 50px; height: 14px; background: var(--brand-lt); }
.lt-band i:nth-child(3) { right: 8px; top: 7px; width: 30px; height: 6px; background: #fff; }
.lt-band i:nth-child(4) { left: 6px; right: 6px; top: 48px; height: 6px; background: var(--brand-lt); }
.lt-centre i:nth-child(1) { left: 50%; top: 5px; width: 14px; height: 10px; margin-left: -7px; background: var(--gold-dk); }
.lt-centre i:nth-child(2) { left: 30%; right: 30%; top: 19px; height: 4px; }
.lt-centre i:nth-child(3) { left: 35%; right: 35%; top: 28px; height: 5px; background: var(--gold-dk); }
.lt-centre i:nth-child(4) { left: 6px; right: 6px; top: 40px; height: 2px; background: var(--gold-dk); box-shadow: 0 4px 0 var(--gold-dk); }
.lt-bold i:nth-child(1) { left: 6px; top: 8px; width: 60px; height: 14px; background: #7A1F2B; }
.lt-bold i:nth-child(2) { right: 6px; top: 8px; width: 16px; height: 12px; }
.lt-bold i:nth-child(3) { left: 6px; right: 6px; top: 30px; height: 4px; background: #7A1F2B; }
.lt-bold i:nth-child(4) { left: 6px; right: 6px; top: 40px; height: 14px; background: #F6ECEE; }
.lt-boxed i:nth-child(1) { left: 5px; right: 5px; top: 5px; height: 20px; background: transparent; border: 1.5px solid var(--ink); }
.lt-boxed i:nth-child(2) { left: 5px; top: 30px; width: 55px; height: 14px; background: transparent; border: 1px solid var(--rule-2); }
.lt-boxed i:nth-child(3) { right: 5px; top: 30px; width: 55px; height: 14px; background: transparent; border: 1px solid var(--rule-2); }
.lt-boxed i:nth-child(4) { left: 5px; right: 5px; top: 48px; height: 10px; background: var(--ink); }
.lt-compact i:nth-child(1) { left: 6px; top: 6px; width: 30px; height: 4px; background: var(--brand); }
.lt-compact i:nth-child(2) { right: 6px; top: 6px; width: 20px; height: 4px; background: var(--ink); }
.lt-compact i:nth-child(3) { left: 6px; right: 6px; top: 16px; height: 3px; background: var(--brand); box-shadow: 0 6px 0 var(--rule-2), 0 12px 0 var(--rule-2), 0 18px 0 var(--rule-2), 0 24px 0 var(--rule-2); }
.lt-compact i:nth-child(4) { right: 6px; bottom: 6px; width: 30px; height: 5px; background: var(--ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.sw { position: relative; cursor: pointer; }
.sw input[type=radio] { position: absolute; opacity: 0; }
.sw span { display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--rule-2); }
.sw:has(input:checked) span { box-shadow: 0 0 0 2.5px var(--ink); }
.sw.custom input { width: 34px; height: 30px; padding: 0; border: 1px solid var(--rule-2); border-radius: 6px; background: none; }
.cdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* reports page 1.6 */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; max-width: 1280px; margin-bottom: 16px; }
.gl { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 10px; border-radius: 10px; background: var(--sheet); border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; }
.gl:hover { border-color: var(--teal); box-shadow: 0 4px 14px rgba(11, 85, 99, .10); }
.gl small { color: var(--ink-2); font-size: 12px; }
.gl b { font: 600 21px var(--num); font-variant-numeric: tabular-nums; }
.gl span { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.gl span .ico { width: 15px; height: 15px; }
.gl em.due { font-style: normal; color: var(--red); font-weight: 600; }
.gl-sales { background: linear-gradient(135deg, var(--brand) 0%, #0E6B7B 100%); color: #fff; border-color: var(--brand); }
.gl-sales small, .gl-sales span { color: #CDE7E7; }
.gl-sales:hover { border-color: var(--gold); }
.gl-vat { border-top: 3px solid var(--gold); }
.spark { position: absolute; right: 10px; top: 12px; width: 92px; height: 26px; }
.spark polyline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.spark circle { fill: var(--gold); }
.repquick { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; max-width: 1280px; margin: 0 0 14px; }
.rq h3 { display: flex; gap: 6px; align-items: center; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.rqlist { display: flex; flex-wrap: wrap; gap: 6px; }
.rqchip { padding: 5px 10px; border-radius: 16px; background: var(--sheet); border: 1px solid var(--rule-2); text-decoration: none; font-size: 13px; font-weight: 600; color: var(--brand-dk); }
.rqchip:hover { border-color: var(--brand); background: var(--brand-lt); }
.repcard h2 { display: flex; align-items: center; gap: 8px; }
.repcard h2 .ico { width: 20px; height: 20px; padding: 4px; box-sizing: content-box; border-radius: 6px; background: var(--brand-lt); color: var(--brand); }
.rc-tax { border-top-color: var(--gold) !important; }
.rc-tax h2 .ico { background: var(--gold-lt); color: var(--gold-dk); }
.rc-books { border-top-color: #2453A6 !important; }
.rc-books h2 .ico { background: #E8EEFA; color: #2453A6; }
.rc-sales { border-top-color: var(--green) !important; }
.rc-sales h2 .ico { background: var(--green-lt); color: var(--green); }
.rc-parties { border-top-color: #6B4BA1 !important; }
.rc-parties h2 .ico { background: #F0EBF8; color: #6B4BA1; }
.rc-exp { border-top-color: #A0442C !important; }
.rc-exp h2 .ico { background: #FBEDE8; color: #A0442C; }
.rc-stock { border-top-color: #8A6212 !important; }
.rc-stock h2 .ico { background: #F7EFDD; color: #8A6212; }
.reptile { position: relative; padding-right: 34px; }
.reptile .pin { position: absolute; right: 4px; top: 8px; border: 0; background: transparent; padding: 3px; color: var(--ink-3); opacity: 0; cursor: pointer; }
.reptile:hover .pin, .reptile .pin:focus-visible, .reptile.pinned .pin { opacity: 1; }
.reptile.pinned .pin { color: var(--gold-dk); }
.reptile.pinned .pin svg { fill: var(--gold); }
.chartcard { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 8px; margin: 12px 0; max-width: 1180px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--rule); stroke-width: 1; }
svg.chart .zero { stroke: var(--ink-3); stroke-width: 1; }
svg.chart .ax { font: 11px var(--num); fill: var(--ink-2); }
svg.chart .s1, .legend .s1 { fill: var(--brand); background: var(--brand); }
svg.chart .s2, .legend .s2 { fill: var(--gold); background: var(--gold); }
svg.chart .s3, .legend .s3 { fill: var(--green); background: var(--green); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
tr.accr td { color: var(--gold-dk); font-style: italic; }
tr.settle td { color: var(--ink-2); }
.devby { margin: 18px 0 6px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: grid; gap: 10px; justify-items: start; }
.devlbl { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.alwahat-logo { width: min(420px, 100%); height: auto; display: block; }
.devtext { font-size: 13.5px; line-height: 1.55; }
.brand img { max-width: 204px; }
.bwparty table.mini th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.bwparty table.mini th.num, .bwparty table.mini td.num { text-align: right; }
.ach { display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 1px; border-radius: 4px; font: 700 10.5px var(--num); background: var(--paper); color: var(--ink-3); border: 1px solid var(--rule); }
.ach.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chipkey .ach { margin-left: 8px; }
table.rights td.acts { white-space: nowrap; letter-spacing: 0; }

/* ---------- 2.1 point of sale ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; margin-top: 16px; }
.pos-items { min-width: 0; }
.pos-q { width: 100%; font-size: 16px; padding: 10px 12px; }
.pos-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pos-groups button { padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.pos-groups button.on { background: var(--brand-dk); border-color: var(--brand-dk); color: #fff; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.pos-grid > p { grid-column: 1 / -1; }
.pos-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 96px; padding: 10px 12px; text-align: left; background: #fff; border: 1px solid var(--rule-2); border-radius: 6px; }
.pos-tile b { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.pos-tile small { color: var(--ink-3); font-size: 11.5px; }
.pos-tile small.neg { color: var(--red); }
.pos-tile .num { margin-top: auto; font: 700 15px var(--num); color: var(--brand-dk); }
.pos-tile:hover { border-color: var(--teal); background: var(--brand-lt); }
.pos-bill { position: sticky; top: 12px; background: #fff; border: 1px solid var(--rule-2); border-top: 3px solid var(--gold); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pos-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.pos-lines { max-height: 38vh; overflow-y: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pos-empty { padding: 14px 0; margin: 0; }
.pos-line { display: grid; grid-template-columns: auto minmax(64px, 1fr) 92px 26px; gap: 4px 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--rule); }
.pos-line .pl-name { grid-column: 1 / -1; }
.pos-line:last-child { border-bottom: 0; }
.pl-name { min-width: 0; }
.pl-name b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.pl-name small { display: block; font-size: 11.5px; }
.pl-qty { display: flex; align-items: center; }
.pl-qty input { width: 46px; padding: 4px; text-align: center; }
.pl-qty button { padding: 3px 8px; }
.pl-rate { width: 100%; min-width: 0; padding: 4px 6px; }
.pl-amt { font-weight: 600; text-align: right; }
.pl-x { padding: 2px 6px; color: var(--red); border-color: transparent; background: transparent; font-size: 16px; line-height: 1; }
.pos-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pos-modes button { padding: 10px 0; font-weight: 600; justify-content: center; text-align: center; }
.pos-modes button.on { background: var(--brand-dk); border-color: var(--brand-dk); color: #fff; }
.pos-tender { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.pos-tender input { font-size: 16px; }
.pos-change { font: 700 16px var(--num); color: var(--green); text-align: right; padding-bottom: 6px; }
.pos-change.neg { color: var(--red); }
.pos-bill > p { margin: 0; }
.pos-bill .error { margin: 0; }
.pos-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.pos-actions button.primary { padding: 12px; font-size: 16px; font-weight: 600; }
.pos-done { position: fixed; inset: 0; background: rgba(10,63,73,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.pos-done-box { background: #fff; border-top: 4px solid var(--gold); border-radius: 8px; padding: 22px 26px; width: min(440px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.pos-done-box h2 { margin-top: 0; color: var(--brand-dk); }
.pos-done-change { font: 700 26px var(--num); color: var(--green); margin: 6px 0; }
.pos-today { margin-top: 22px; }
@media (max-width: 1150px) { .pos { grid-template-columns: 1fr; } .pos-bill { position: static; } }

/* 2.3: AI assistant */
.ai-fab { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px 9px 12px; border: 0; border-radius: 22px; background: var(--brand); color: #fff; font: 600 14px var(--ui); box-shadow: 0 4px 14px rgba(11, 60, 69, .28); cursor: pointer; }
.ai-fab:hover { background: var(--brand-dk); }
.ai-fab .ico { stroke: var(--gold); width: 20px; height: 20px; }
body:has(#pos) .ai-fab { bottom: auto; top: 14px; right: 14px; padding: 7px 12px 7px 10px; }
.ai-panel { position: fixed; right: 18px; bottom: 18px; z-index: 901; width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule-2); border-top: 3px solid var(--gold); border-radius: 8px; box-shadow: 0 12px 40px rgba(11, 60, 69, .25); }
.ai-panel header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--head-bg); border-radius: 6px 6px 0 0; }
.ai-ttl { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.ai-ttl small { color: var(--ink-3); font-size: 11.5px; }
.ai-panel header button { padding: 3px 9px; font-size: 12.5px; }
.ai-panel header .x { font-size: 18px; line-height: 1; padding: 2px 8px; }
.ai-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-m { max-width: 92%; padding: 8px 11px; border-radius: 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.ai-m p { margin: 0 0 6px; } .ai-m p:last-child { margin-bottom: 0; }
.ai-m ul { margin: 4px 0 6px; padding-left: 20px; } .ai-m li { margin: 2px 0; }
.ai-user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 3px; white-space: pre-wrap; }
.ai-ai { align-self: flex-start; background: var(--brand-lt); color: var(--ink); border-bottom-left-radius: 3px; }
.ai-step { align-self: flex-start; padding: 0 4px; font-size: 11.5px; color: var(--ink-3); }
.ai-step::before { content: "✓ "; color: var(--teal); }
.ai-err { align-self: stretch; max-width: none; background: var(--red-lt); color: var(--red); }
.ai-typing { align-self: flex-start; color: var(--ink-3); font-size: 12.5px; background: none; }
.ai-typing::after { content: "…"; display: inline-block; animation: aiDots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; width: 0; }
@keyframes aiDots { to { width: 1.2em; } }
.ai-open { align-self: flex-start; }
.ai-card { margin: 0 12px 10px; padding: 10px 12px; border: 1px solid var(--gold); background: var(--gold-lt); border-radius: 6px; max-height: 45%; overflow-y: auto; font-size: 13px; }
.ai-card p { margin: 4px 0; color: var(--ink-2); }
.ai-card ul { margin: 4px 0 8px; padding-left: 18px; }
.ai-card .btnrow { margin: 0; }
#aiForm { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); }
#aiForm textarea { flex: 1; resize: none; font: 13.5px var(--ui); padding: 7px 9px; border: 1px solid var(--rule-2); border-radius: 4px; min-height: 40px; max-height: 120px; }
.ai-note { padding: 10px 12px; border: 1px solid var(--money-rule); background: var(--gold-lt); border-radius: 4px; color: var(--ink-2); }
.badge.ai { background: #EDE7F6; color: #4527A0; margin-left: 4px; }
.ai-tools { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ai-mic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.ai-mic .ico { width: 19px; height: 19px; }
.ai-mic.on { background: var(--red); border-color: var(--red); color: #fff; animation: aiPulse 1.2s ease-in-out infinite; }
@keyframes aiPulse { 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, .18); } }
#aiLang { width: 52px; padding: 1px 2px; font-size: 11px; }
.ai-voice { margin: 0 12px 6px; padding: 6px 9px; font-size: 12px; color: var(--ink-2); background: var(--brand-lt); border-radius: 4px; }
.ai-voice.bad { background: var(--red-lt); color: var(--red); }
.ai-ask { margin: 0 12px 10px; padding: 10px 12px; border: 1px solid var(--rule-2); border-left: 3px solid var(--teal); background: #fff; border-radius: 6px; max-height: 72%; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.ai-ask > b { font-size: 13.5px; }
.ai-f { display: flex; flex-direction: column; gap: 3px; }
.ai-f > span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.ai-f input, .ai-f select { width: 100%; font: 13px var(--ui); padding: 4px 7px; }
.ai-pick { display: flex; flex-direction: column; gap: 4px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip { padding: 5px 12px; border-radius: 14px; font-size: 12.5px; }
.ai-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ai-missing, .ai-missing select, .ai-missing input { outline: 2px solid var(--red); outline-offset: 1px; }
.ai-ask .btnrow { margin: 2px 0 0; position: sticky; bottom: -10px; background: #fff; padding: 6px 0 4px; }
.ai-ask small { font-size: 11.5px; }
@media print { .ai-fab, .ai-panel { display: none !important; } }

/* 2.4: licence */
.licbar { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--gold); background: var(--gold-lt); border-radius: 4px; color: #5C3D06; font-size: 13px; }
.licbar a { color: var(--brand-dk); }
.licbox { width: min(480px, 94vw); }
.licbox .notice { margin: 10px 0; }
.licsec { margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 15px; }
.lickey { font-family: Consolas, "IBM Plex Mono", monospace; letter-spacing: .5px; text-transform: uppercase; }
.licsys { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); }
.licsys summary, .liclog summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.licsys form { margin-top: 10px; }
.liclog { margin-top: 14px; }
.liclog table { margin-top: 8px; font-size: 12.5px; }
.licfoot { margin-top: 16px; justify-content: center; }
.licbox .btnrow form { display: inline; margin: 0; }.poscounter { border: 1px solid var(--rule-2); border-radius: 6px; padding: 8px 14px 4px; margin: 0 0 12px; }
.poscounter legend { font-weight: 600; padding: 0 6px; }

/* 2.5: business type cards */
.indgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.indcard { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 6px; background: #fff; cursor: pointer; }
.indcard input { position: absolute; opacity: 0; pointer-events: none; }
.indcard .ini { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-lt, #E3F1EF); color: var(--brand-dk, #0A3F49); font-weight: 700; }
.indcard small { display: block; font-size: 11px; }
.indcard.on, .indcard:has(input:checked) { border-color: var(--brand, #0E6B73); box-shadow: inset 0 0 0 1px var(--brand, #0E6B73); background: var(--brand-lt, #E3F1EF); }
.indcard:focus-within { outline: 2px solid var(--gold, #E6B341); }
.modtable td { padding-top: 5px; padding-bottom: 5px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--rule-2); }
.tabs a { padding: 8px 14px; color: var(--brand-dk); text-decoration: none; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; }
.tabs a.on { background: #fff; border-color: var(--rule-2); font-weight: 600; margin-bottom: -1px; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; padding: 8px 0; }
.optpic { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; border: 1px solid var(--rule-2); }
td.pic { white-space: nowrap; }
.photo-pv { display: block; max-width: 160px; max-height: 120px; margin-top: 6px; border-radius: 4px; border: 1px solid var(--rule-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border: 1px solid var(--rule-2); border-radius: 999px; background: #fff; color: var(--brand-dk); text-decoration: none; font-size: 13px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.dashed { border-style: dashed; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.mbox { border: 1px solid var(--rule-2); border-radius: 6px; padding: 6px 10px; background: #fff; }
.mbox small { display: block; color: var(--ink-3, #5b6b70); font-size: 11px; }
.mbox b { font-size: 17px; font-variant-numeric: tabular-nums; }
.mbox.chg { background: #FFF6DD; border-color: #E6B341; }
.mbox input { width: 100%; border: 0; font-size: 16px; font-weight: 600; padding: 2px 0; background: transparent; }
.chgcell { background: #FFF6DD; font-weight: 600; }
details.inline { display: inline-block; }
details.inline > summary { list-style: none; cursor: pointer; }
details.inline > summary::-webkit-details-marker { display: none; }
.tablewrap { overflow-x: auto; }
/* 2.5: orders and job cards */
.jobstrip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.jobstrip a { display: flex; gap: 8px; align-items: baseline; padding: 6px 12px; border: 1px solid var(--rule-2); border-radius: 6px; background: #fff; color: var(--brand-dk); text-decoration: none; }
.jobstrip a b { font-size: 16px; }
.jobstrip a.alert { border-color: #C0392B; color: #A02622; background: #FDECEA; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.bcol { background: var(--brand-lt); border-radius: 8px; padding: 8px; min-height: 120px; }
.bcol h3 { margin: 2px 4px 8px; font-size: 14px; }
.bcard { display: block; background: #fff; border: 1px solid var(--rule-2); border-left: 4px solid var(--brand); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; color: inherit; text-decoration: none; }
.bcard b { display: block; } .bcard span { display: block; font-size: 13px; } .bcard small { color: #5b6b70; }
.bcard.late { border-left-color: #C0392B; }
.jobhead { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.stagebar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
form.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.joblines input, .joblines select { min-width: 0; }

.paperpick { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.paperpick .primary { margin-left: 8px; }

/* 2.7: the country code in front of a mobile number */
.mobrow { display: flex; position: relative; }
.mobrow .dialbtn { flex: none; min-width: 84px; padding: 0 8px; border: 1px solid var(--rule-2); border-right: 0; border-radius: 4px 0 0 4px; background: var(--paper); color: var(--ink); font: 600 13px var(--num, inherit); cursor: pointer; white-space: nowrap; }
.mobrow .dialbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mobrow input[type=tel] { flex: 1; min-width: 0; border-radius: 0 4px 4px 0; margin: 0; }
.dialpop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; width: 300px; max-width: 86vw; background: #fff; border: 1px solid var(--rule-2); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px; }
.dialpop input { width: 100%; margin: 0 0 6px; }
.dialpop ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.dialpop li { display: flex; gap: 6px; align-items: baseline; padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.dialpop li b { width: 24px; flex: none; font-size: 11px; color: var(--ink-3, #6b7f86); }
.dialpop li span { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dialpop li.on, .dialpop li:hover { background: var(--paper); }
.dialpop li.none { color: var(--ink-2); cursor: default; }

/* 2.7: the narration of a credit / debit note, across the head of the entry */
.vhead .vnar { grid-column: 1 / -1; }
.vhead .vref2 { grid-column: span 2; }
