/* ==========================================================================
   ERP Smart 2026 – interface styles
   Palette: cerulean blue, ledger green, azure accents, cool paper. Figures use tabular numerals.
   Totals use the accounting double rule. Edit the tokens below to rebrand.
   ========================================================================== */
:root {
  --ink: #0b2a3d;            /* text: deep cerulean-navy */
  --ink-2: #1f4459;
  --ink-soft: #557085;
  --paper: #f2f7fa;          /* light azure paper */
  --sheet: #ffffff;
  --rule: #d5e4ec;
  --rule-strong: #adc7d5;
  --green: #138a4f;          /* ledger green (buttons, posted, success) */
  --green-dark: #0e6e3e;
  --green-tint: #e3f5eb;
  --green-bright: #3ccf84;
  --cerulean: #007ba7;       /* Cerulean Blue */
  --cerulean-dark: #005f84;
  --cerulean-deep: #063d57;
  --azure: #007fff;          /* Azure Blue */
  --azure-tint: #e3f1ff;
  --red: #b0413e;
  --red-tint: #f8e9e8;
  --amber: #a86d0e;
  --amber-tint: #fbf1de;
  --blue: #0069c2;
  --blue-tint: #e3f1ff;
  --focus: #007fff;
  --radius: 6px;
  --radius-sm: 4px;
  --sidebar: 236px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: var(--ux-link, var(--cerulean)); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 600; color: var(--ux-head, inherit); }
h1 { font-size: 1.55rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--ink-soft); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--red); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--cerulean-deep) 0%, var(--cerulean-dark) 55%, #0a6a5a 100%); color: #d6ebf5; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1rem .9rem; color: #fff; font-weight: 600; font-size: 1.05rem; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 5px; background: var(--green); display: grid; place-items: center;
  color: #fff; font-size: .8rem; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.nav { padding: .25rem .5rem 1.5rem; }
.nav-group { margin-top: .35rem; }
.nav-group > span { display: block; padding: 0 .6rem .3rem; font-size: .78rem; color: #8fc3dc; font-weight: 600; }
/* drop-list menu: CAPITAL groups and sub-menus that open / close */
.nav summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; border-radius: var(--radius-sm); user-select: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: '▸'; margin-left: auto; font-size: .75rem; opacity: .7; transition: transform .15s; }
.nav details[open] > summary::after { transform: rotate(90deg); }
.nav-group > summary { padding: .5rem .6rem; font-size: .78rem; letter-spacing: .04em; color: #bfe0ef; font-weight: 700; text-transform: uppercase; }
.nav-group > summary:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-group[open] > summary { color: #fff; }
.nav-group > a, .nav-group > details { margin-left: .35rem; }
.nav-sub > summary { padding: .38rem .6rem; color: #e1f0f7; font-size: .93rem; }
.nav-sub > summary:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-sub[open] > summary { color: #fff; font-weight: 600; }
.nav .nav-sub > a { padding-left: 1.5rem; font-size: .9rem; }
.nav .nav-sub[open] { border-left: 2px solid rgba(255,255,255,.12); margin-bottom: .2rem; }
.nav a {
  display: flex; align-items: center; gap: .55rem; padding: .38rem .6rem; border-radius: var(--radius-sm);
  color: #e1f0f7; font-size: .93rem;
}
.nav a:hover { background: rgba(255,255,255,.10); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(19,138,79,.45); color: #fff; box-shadow: inset 3px 0 0 var(--green-bright); }
.nav kbd { margin-left: auto; font-size: .7rem; opacity: .55; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: .75rem; padding: .55rem 1.25rem; background: var(--sheet);
  border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30;
}
.menu-toggle { display: none; }
.company-switch { position: relative; }
.company-btn {
  display: flex; align-items: center; gap: .5rem; border: 1px solid var(--rule); background: var(--paper);
  padding: .35rem .7rem; border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--ink); max-width: 340px;
}
.company-btn strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-btn .code { font-size: .75rem; color: var(--ink-soft); }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(6,61,87,.14); padding: .35rem; z-index: 50;
}
.dropdown.right { left: auto; right: 0; min-width: 220px; }
.dropdown button, .dropdown a {
  display: flex; width: 100%; text-align: left; gap: .5rem; align-items: center; justify-content: space-between;
  background: none; border: 0; padding: .5rem .6rem; border-radius: var(--radius-sm); font: inherit; color: var(--ink); cursor: pointer;
}
.dropdown button:hover, .dropdown a:hover { background: var(--paper); text-decoration: none; }
.dropdown .current { background: var(--green-tint); }
.dropdown hr { border: 0; border-top: 1px solid var(--rule); margin: .3rem 0; }
.search { flex: 1; max-width: 460px; position: relative; }
.search input[type=search] { width: 100%; padding-left: 2rem; background: var(--paper); }
.search::before { content: "⌕"; position: absolute; left: .65rem; top: 50%; transform: translateY(-52%); color: var(--ink-soft); font-size: 1.1rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; position: relative; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink-2); color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: .85rem; border: 0; cursor: pointer;
}
.content { padding: 1.25rem 1.5rem 3rem; max-width: 1480px; width: 100%; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head p { margin: .2rem 0 0; color: var(--ink-soft); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: .25rem; }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .48rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); font: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--paper); text-decoration: none; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger { color: var(--red); border-color: #e2bcbb; }
.btn-danger:hover { background: var(--red-tint); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: .28rem .6rem; font-size: .88rem; }
.btn kbd { font-size: .7rem; opacity: .7; font-family: var(--mono); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); cursor: pointer; font: inherit; }

/* ---------- panels ---------- */
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); gap: .75rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-body { padding: 1rem; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem 1rem; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-4 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label { font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.field .help { font-size: .8rem; }
.field.check label { display: flex; align-items: center; gap: .45rem; font-weight: 400; color: var(--ink); padding-top: 1.55rem; }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  padding: .45rem .6rem; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(0,127,255,.20); }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
input[readonly] { background: var(--paper); }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; padding: .9rem 1rem; border-top: 1px solid var(--rule); background: #fafbfb; border-radius: 0 0 var(--radius) var(--radius); align-items: center; flex-wrap: wrap; }
.form-actions .hint { margin-right: auto; font-size: .82rem; color: var(--ink-soft); }
fieldset { border: 0; padding: 0; margin: 0; }

/* lookup / combobox */
.lookup { position: relative; }
.lookup-menu {
  position: absolute; left: 0; top: calc(100% + 2px); z-index: 60; background: var(--sheet); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm); box-shadow: 0 10px 24px rgba(6,61,87,.15); max-height: 290px; overflow-y: auto; min-width: 100%; width: max-content; max-width: 480px;
}
.lookup-menu div { padding: .42rem .6rem; cursor: pointer; display: flex; gap: .6rem; justify-content: space-between; }
.lookup-menu div small { color: var(--ink-soft); }
.lookup-menu div.active, .lookup-menu div:hover { background: var(--green-tint); }
.lookup-menu .empty { color: var(--ink-soft); cursor: default; }
.lookup-text.invalid { border-color: var(--red); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.table th, .table td { padding: .5rem .7rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.table thead th { font-size: .82rem; font-weight: 600; color: var(--ink-soft); background: #fafbfb; position: sticky; top: 0; z-index: 1; }
.table tbody tr:hover { background: #f8fbfa; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.table.compact th, .table.compact td { padding: .32rem .55rem; }
.table tr.clickable { cursor: pointer; }
.table td.actions-cell { text-align: right; white-space: nowrap; }
.table .sub td { color: var(--ink-soft); font-size: .9rem; }
.empty-state { padding: 2.5rem 1rem; text-align: center; color: var(--ink-soft); }
.empty-state p { margin-bottom: 1rem; }

.table th.num, .sheet thead th.num, .print-table th.num, .fs th.amt { text-align: right; }

/* status pills */
.pill { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid transparent; }
.pill-draft { background: var(--amber-tint); color: var(--amber); border-color: #efd9ad; }
.pill-approved { background: var(--blue-tint); color: var(--blue); border-color: #b8dafc; }
.pill-posted, .pill-completed, .pill-active, .pill-open { background: var(--green-tint); color: var(--green-dark); border-color: #b5e3c9; }
.pill-void, .pill-reversed, .pill-disposed, .pill-closed, .pill-inactive { background: #eef0f3; color: #6b7385; border-color: #dfe2e8; }
.pill-overdue { background: var(--red-tint); color: var(--red); border-color: #ebc9c8; }
.pill-in_progress { background: var(--blue-tint); color: var(--blue); }
.pill-fully_depreciated { background: #eef0f3; color: var(--ink-2); }

/* filters */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); }
.filters .field { min-width: 140px; }
.filters .field.grow { flex: 1; min-width: 200px; }

/* ---------- flash ---------- */
.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; display: flex; justify-content: space-between; gap: 1rem; }
.flash-success { background: var(--green-tint); border-color: #b5e3c9; color: #0b5530; }
.flash-error { background: var(--red-tint); border-color: #e6c3c2; color: #7d2a28; }
.flash-warning { background: var(--amber-tint); border-color: #ecd6a6; color: #6f4806; }
.flash-info { background: var(--blue-tint); border-color: #b8dafc; color: #003f7a; }
.flash button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 1.1rem; line-height: 1; }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: .9rem 1rem; }
.kpi span { font-size: .85rem; color: var(--ink-soft); }
.kpi strong { display: block; font-size: 1.45rem; font-variant-numeric: tabular-nums; margin-top: .2rem; font-weight: 600; }
.kpi small { display: block; margin-top: .15rem; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.quick a {
  display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--sheet); color: var(--ink);
}
.quick a:hover { border-color: var(--green); text-decoration: none; background: #fbfdfc; }
.quick a small { color: var(--ink-soft); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: .5rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .bar div { display: flex; gap: 2px; align-items: flex-end; height: calc(100% - 20px); width: 100%; justify-content: center; }
.bars .bar i { display: block; width: 42%; border-radius: 2px 2px 0 0; min-height: 1px; }
.bars .bar i.in { background: var(--green); }
.bars .bar i.out { background: #c9a35a; }
.bars .bar span { font-size: .72rem; color: var(--ink-soft); }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }

/* ---------- document entry: the ledger sheet ---------- */
.doc-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem 1rem; padding: 1rem; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet thead th {
  font-size: .8rem; color: var(--ink-soft); font-weight: 600; text-align: left; padding: .45rem .4rem;
  border-top: 1px solid var(--rule); border-bottom: 2px solid var(--ink); background: #fafbfb;
}
.sheet td { padding: .2rem .3rem; border-bottom: 1px solid #e7edea; vertical-align: middle; }
.sheet tbody tr:nth-child(even) td { background: #fbfcfc; }
.sheet tbody tr:focus-within td { background: #f1f8f5; }
.sheet input, .sheet select { border-color: transparent; background: transparent; padding: .38rem .4rem; }
.sheet input:hover, .sheet select:hover { border-color: var(--rule); }
.sheet input:focus, .sheet select:focus { background: #fff; border-color: var(--focus); }
.sheet .ln { width: 34px; text-align: center; color: var(--ink-soft); font-size: .8rem; }
.sheet .amount { width: 130px; }
.sheet .qty { width: 90px; }
.sheet .pct { width: 70px; }
.sheet .tax { width: 150px; }
.sheet .del { width: 34px; text-align: center; }
.sheet .del button { border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-size: 1.1rem; border-radius: 4px; width: 26px; height: 26px; }
.sheet .del button:hover { background: var(--red-tint); color: var(--red); }
.sheet td.calc { text-align: right; font-variant-numeric: tabular-nums; padding-right: .7rem; color: var(--ink-2); }
.sheet-foot { display: flex; justify-content: space-between; gap: 1.5rem; padding: .8rem 1rem; align-items: flex-start; flex-wrap: wrap; }
.totals { min-width: 300px; }
.totals div { display: flex; justify-content: space-between; gap: 2rem; padding: .25rem 0; font-variant-numeric: tabular-nums; }
.totals div.grand { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding: .35rem 0; margin-top: .2rem; }
.totals .diff { color: var(--red); }
.totals .ok { color: var(--green); }
.add-line { display: flex; gap: .5rem; align-items: center; }
.keys { font-size: .8rem; color: var(--ink-soft); }
kbd { font-family: var(--mono); font-size: .75rem; background: var(--paper); border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 3px; padding: 0 .3rem; }

/* document view */
.doc-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem 1.2rem; padding: 1rem; }
.doc-meta div span { display: block; font-size: .8rem; color: var(--ink-soft); }
.doc-meta div strong { font-weight: 500; }
.journal-box { font-size: .9rem; }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--rule); padding: 0 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .8rem; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--green); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* ---------- reports ---------- */
.report-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.report-list section h3 { font-size: .95rem; margin-bottom: .5rem; }
.report-list a { display: block; padding: .32rem 0; }
.report { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.6rem 2rem 2rem; }
.report-title { text-align: center; margin-bottom: 1.4rem; }
.report-title h2 { font-size: 1.05rem; margin: 0; font-weight: 600; }
.report-title h1 { font-size: 1.35rem; margin: .2rem 0; }
.report-title p { margin: 0; color: var(--ink-soft); }
.fs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fs td, .fs th { padding: .3rem .5rem; }
.fs th { font-size: .82rem; color: var(--ink-soft); font-weight: 600; text-align: right; border-bottom: 1px solid var(--ink); }
.fs th:first-child { text-align: left; }
.fs .note { width: 60px; text-align: center; color: var(--ink-soft); }
.fs td.amt { text-align: right; width: 160px; white-space: nowrap; }
.fs tr.section td { font-weight: 700; padding-top: 1rem; }
.fs tr.group td { font-weight: 600; padding-top: .55rem; }
.fs tr.line td:first-child { padding-left: 1.4rem; }
.fs tr.line.deep td:first-child { padding-left: 2.6rem; color: var(--ink-2); }
.fs tr.subtotal td.amt { border-top: 1px solid var(--ink); font-weight: 600; }
.fs tr.total td { font-weight: 700; }
.fs tr.total td.amt { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.fs tr.spacer td { height: .6rem; }
.fs tr.check td { color: var(--ink-soft); font-size: .85rem; }
.report-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-bottom: .75rem; flex-wrap: wrap; }
.report-filters { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.report-filters .field { min-width: 150px; }
.signatures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.signatures div { border-top: 1px solid var(--ink); padding-top: .3rem; font-size: .85rem; color: var(--ink-soft); }
.balance-ok { color: var(--green); font-weight: 600; }
.balance-bad { color: var(--red); font-weight: 600; }

/* accounting cycle */
.cycle { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; counter-reset: step; }
.cycle a { position: relative; display: block; padding: .9rem 1rem .9rem 3rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); }
.cycle a::before {
  counter-increment: step; content: counter(step); position: absolute; left: .9rem; top: .9rem; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; background: var(--green-tint); color: var(--green); display: grid; place-items: center; font-weight: 700; font-size: .8rem;
}
.cycle a:hover { border-color: var(--green); text-decoration: none; }
.cycle strong { display: block; }
.cycle small { display: block; margin-top: .15rem; }
.cycle .state { margin-top: .4rem; font-size: .8rem; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 460px); }
.auth-side {
  color: #e4f2f8; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; background-color: var(--cerulean-deep);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(255,255,255,.06) 31px 32px),
    linear-gradient(150deg, var(--cerulean-deep) 0%, var(--cerulean) 55%, var(--green) 100%);
}
.auth-side h1 { color: #fff; font-size: 2rem; max-width: 18ch; font-weight: 600; }
.auth-side p { max-width: 46ch; color: #cfe7f2; }
.auth-side ul { padding-left: 1.1rem; color: #cfe7f2; }
.auth-form { background: var(--sheet); padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.auth-form .field { margin-bottom: .2rem; }
.auth-form .btn { justify-content: center; padding: .65rem; }
.qr { width: 200px; height: 200px; border: 1px solid var(--rule); padding: 8px; background: #fff; }
.secret { font-family: var(--mono); background: var(--paper); padding: .4rem .6rem; border-radius: var(--radius-sm); letter-spacing: .08em; word-break: break-all; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(6,61,87,.45); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal { background: var(--sheet); border-radius: var(--radius); width: min(520px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal .panel-body { max-height: 70vh; overflow-y: auto; }
.shortcut-list { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }

/* ---------- print ---------- */
.print-page { max-width: 820px; margin: 0 auto; background: #fff; padding: 2rem 2.2rem; }
.print-toolbar { display: flex; justify-content: center; gap: .5rem; padding: .75rem; background: var(--paper); border-bottom: 1px solid var(--rule); }
.letterhead { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .9rem; margin-bottom: 1.1rem; }
.letterhead img { max-height: 70px; max-width: 200px; }
.letterhead .co h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.letterhead .co div, .letterhead .doc div { font-size: .85rem; color: var(--ink-2); }
.letterhead .doc { text-align: right; }
.letterhead .doc h1 { font-size: 1.5rem; margin: 0 0 .3rem; letter-spacing: .02em; }
.to-box { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; font-size: .9rem; }
.to-box h4 { font-size: .8rem; color: var(--ink-soft); margin-bottom: .2rem; font-weight: 600; }
.print-table th { background: #dcebf8; color: #10243a; font-weight: 600; font-size: .82rem; padding: .4rem .5rem; text-align: left; }
.print-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.words { margin-top: .75rem; padding: .5rem .7rem; background: var(--paper); border-left: 3px solid var(--green); font-size: .88rem; }
.stamp { display: inline-block; border: 2px solid var(--red); color: var(--red); padding: .2rem .8rem; font-weight: 700; transform: rotate(-4deg); }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .no-print, .print-toolbar, .report-actions, .report-filters, .actions, .flash { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .report, .panel { border: 0; padding: 0; }
  .print-page { padding: 0; max-width: none; }
  .print-table th { background: #e9edf2 !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
  .table thead th { position: static; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .doc-head, .doc-meta, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .grid-2, .grid-3, .grid-4, .report-list, .kpis { grid-template-columns: 1fr; }
  .doc-head, .doc-meta, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: auto; }
  .search { display: none; }
  .report { padding: 1rem; }
  .signatures { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- green + azure/cerulean accents ---------- */
.topbar { background: linear-gradient(90deg, var(--azure), var(--cerulean) 45%, var(--green)) top / 100% 3px no-repeat, var(--sheet); }
.brand-mark { background: linear-gradient(135deg, var(--green) 0%, var(--cerulean) 100%); }
.panel-head h3 { color: var(--cerulean-deep); }
.auth-side small, .auth-side .muted { color: #cfe7f2; }

/* ---------- company logo ---------- */
.brand-logo { padding: .8rem .8rem .7rem; }
.brand-img { display: flex; align-items: center; justify-content: center; width: 100%; background: #fff; border-radius: 6px; padding: .45rem .6rem; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.brand-img img { max-width: 100%; max-height: 56px; object-fit: contain; display: block; }
.report-logo { display: block; margin: 0 auto .5rem; max-height: 70px; max-width: 240px; object-fit: contain; }
.logo-preview { display: flex; align-items: center; gap: .8rem; margin-top: .5rem; padding: .5rem; border: 1px dashed var(--rule); border-radius: 6px; background: #fff; }
.logo-preview img { max-height: 60px; max-width: 220px; object-fit: contain; }

/* ---------- working year ---------- */
.year-switch .company-btn { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; padding-top: .25rem; padding-bottom: .25rem; }
.year-switch .company-btn small { font-size: .68rem; }
.year-switch .company-btn > span[aria-hidden] { display: none; }
.year-switch .company-btn.past { background: #fff4dc; border-color: #e7b54a; }
.year-banner { background: #fff4dc; border: 1px solid #e7b54a; color: #6b4a00; border-radius: var(--radius-sm); padding: .55rem .8rem; margin-bottom: 1rem; font-size: .92rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--ux-link, var(--cerulean)); text-decoration: underline; cursor: pointer; font: inherit; }
.pill-fy { background: #e6f3f9; color: var(--cerulean-dark); }
.fy-tag { display: inline-block; font-size: .72rem; color: var(--cerulean-dark); background: #e6f3f9; border-radius: 3px; padding: 0 .3rem; margin-left: .3rem; }

/* ---------- letterhead on every printed page / PDF ---------- */
.print-brand, .print-footer { display: none; }
.report-co { font-size: .82rem; color: var(--ink-soft); margin: -.1rem 0 .35rem; }
@media print {
  .print-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--cerulean-dark); }
  .print-brand img { max-height: 60px; max-width: 220px; object-fit: contain; }
  .print-brand strong { font-size: 1.15rem; }
  .print-brand small { color: #444; }
  body:has(.report-title) .print-brand { display: none; }
  .print-footer { display: block; position: fixed; bottom: 0; left: 0; right: 0; text-align: center; font-size: 9px; color: #777; }
  .report-logo { max-height: 60px; }
  .year-banner, .year-switch { display: none !important; }
}

/* ---------- printed documents (invoice layout v2) ---------- */
.lh-center { text-align: center; border-bottom: 3px solid var(--cerulean-dark); padding-bottom: .7rem; margin-bottom: .8rem; }
.lh-center img { max-height: 80px; max-width: 260px; object-fit: contain; display: block; margin: 0 auto .35rem; }
.lh-center h2 { margin: 0 0 .2rem; font-size: 1.45rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.lh-center div { font-size: .85rem; color: var(--ink-2); line-height: 1.45; }
.doc-title { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: .4rem 0 1rem; }
.doc-title h1 { margin: 0; font-size: 1.35rem; letter-spacing: .12em; color: var(--cerulean-dark); }
.doc-info { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; margin-bottom: 1rem; font-size: .9rem; }
.party-box { border: 1px solid var(--rule); border-radius: 4px; padding: .6rem .8rem; line-height: 1.45; }
.party-box h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 .25rem; }
.meta-table { width: 100%; border-collapse: collapse; font-size: .88rem; align-self: start; }
.meta-table th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: .22rem .5rem; width: 42%; border-bottom: 1px solid var(--rule); }
.meta-table td { padding: .22rem .5rem; text-align: right; border-bottom: 1px solid var(--rule); }
.totals-wrap { display: flex; justify-content: flex-end; margin-top: .9rem; }
.totals-table { min-width: 330px; border-collapse: collapse; font-size: .92rem; }
.totals-table th { text-align: left; font-weight: 500; padding: .3rem .7rem; }
.totals-table td { text-align: right; padding: .3rem .7rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals-table tr.grand th, .totals-table tr.grand td { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); background: #eef6fa; }
.totals-table tr.due th, .totals-table tr.due td { font-weight: 700; color: var(--cerulean-dark); }
.words { margin-top: .9rem; }
.pay-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; font-size: .86rem; }
.pay-terms h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 .25rem; border-bottom: 1px solid var(--rule); padding-bottom: .2rem; }
.pay-terms p { margin: 0; line-height: 1.45; }
@media print {
  .lh-center h2 { color: #000; }
  .totals-table tr.grand th, .totals-table tr.grand td { background: #eef6fa !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- management report ---------- */
.mgmt .mg-h { font-size: 1rem; margin: 1.4rem 0 .6rem; color: var(--cerulean-dark); border-bottom: 1px solid var(--rule); padding-bottom: .25rem; }
.mg-kpis .kpi strong { font-size: 1.2rem; }
.mg-kpis small.up { color: var(--green); } .mg-kpis small.down { color: var(--red); }
.mg-ratios td { padding: .35rem .6rem; border-bottom: 1px solid var(--rule); }
.mg-chart { display: flex; align-items: flex-end; gap: .4rem; height: 190px; padding: .5rem .2rem 0; border-bottom: 1px solid var(--ink-soft); margin-bottom: .3rem; }
.mg-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.mg-col small { font-size: .68rem; color: var(--ink-soft); margin-top: .2rem; white-space: nowrap; }
.mg-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.mg-bars .b { width: 28%; min-height: 1px; border-radius: 2px 2px 0 0; }
.b.rev, .mg-legend i.rev { background: var(--cerulean); }
.b.exp, .mg-legend i.exp { background: #c9d6df; }
.b.net, .mg-legend i.net { background: var(--green); }
.b.net.loss, .mg-legend i.net.loss { background: var(--red); }
.mg-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); margin-bottom: .6rem; }
.mg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }
.mg-month tr.strong td { font-weight: 600; background: #f3f8fb; }
.mg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 800px) { .mg-two { grid-template-columns: 1fr; } }
@media print {
  .mg-chart .b { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mgmt .kpis { grid-template-columns: repeat(4, 1fr); }
  .mg-two { grid-template-columns: 1fr 1fr; }
  .mgmt .mg-h { break-after: avoid; }
  .mgmt table { break-inside: auto; }
}
/* ---------- tax computation ---------- */
.taxcomp td.amt input, .taxcomp input.num { width: 9rem; text-align: right; }
.taxcomp .adj-row input[type=text] { width: 100%; }
.taxcomp .edit-only { }
@media print { .taxcomp .edit-only, .taxcomp .no-print { display: none !important; } .taxcomp input { border: 0; background: none; } }
/* ---------- bank statements ---------- */
.bs-lines tr.suggested td { background: #f0faf4; }
.bs-lines tr.done td { color: var(--ink-soft); }
.bs-lines .lookup { min-width: 240px; }
.bs-lines select[data-vat] { min-width: 80px; }
/* ---------- payroll ---------- */
.tabs-nav { display: flex; gap: .2rem; border-bottom: 1px solid var(--rule); margin: 0 0 1rem; overflow-x: auto; }
.tabs-nav a { padding: .55rem .9rem; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-nav a.active { color: var(--ink); border-color: var(--green); font-weight: 600; }
.tabs-nav a:hover { text-decoration: none; color: var(--ink); }
.payroll-grid input.num { padding: .25rem .35rem; }
.payroll-grid tfoot td { font-weight: 600; }
.inline-pay { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.inline-pay select, .inline-pay input { font-size: .82rem; padding: .2rem .3rem; }
.payslip { max-width: 760px; margin: 0 auto 2rem; }
.slip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.slip-cols table { width: 100%; }
.slip-total td { font-weight: 700; border-top: 2px solid var(--ink); }
.mg-month td:first-child, .mg-month th:first-child { white-space: nowrap; }
@media print {
  .mgmt .table-wrap { overflow: visible; }
  .mg-month { font-size: 8.5px; }
  .mg-month td, .mg-month th { padding: .2rem .25rem; }
}

.tax-sched td.num, .tax-sched th.num { text-align: right; white-space: nowrap; }
.tax-sched { break-inside: avoid; }
.tax-sched-wrap { break-inside: avoid; page-break-inside: avoid; }

/* ---------- duplicate customers / suppliers ---------- */
.dup-warning { margin: .8rem 1rem 0; padding: .6rem .8rem; border: 1px solid #e7b54a; background: #fff4dc; color: #6b4a00; border-radius: var(--radius-sm); font-size: .92rem; }
.dup-group { border-top: 1px solid var(--rule); }
/* ---------- bulk actions ---------- */
.bulk-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .5rem .8rem; background: #e6f3f9; border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.bulk-bar input[type=text] { width: auto; flex: 0 1 340px; min-width: 200px; padding: .3rem .5rem; }
th.chk, td.chk { width: 30px; text-align: center; }
.details { max-width: 420px; }
.lookup.searchable { position: relative; } .report-filters .lookup.searchable input { min-width: 280px; }
/* ---------- DD/MM/YYYY date fields ---------- */
.date-box { position: relative; display: inline-flex; align-items: stretch; width: 100%; }
.date-box .date-text { flex: 1; min-width: 7.5rem; padding-right: 2rem; }
.date-box .date-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.date-box .date-btn { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: .9rem; padding: .1rem .25rem; line-height: 1; opacity: .75; }
.date-box .date-btn:hover { opacity: 1; }
.date-text.invalid { border-color: var(--red); background: #fff5f5; }
@media print { .date-btn { display: none; } }
/* statements & notes: rules only under the amount columns, not across the descriptions */
.fs thead th:first-child, .fs thead th:empty { border-bottom: 0; }
.fs tr.subtotal td:not(.amt), .fs tr.total td:not(.amt) { border-top: 0; border-bottom: 0; }

/* ---------------------------------------------------------------- budget control (2.1) */
.budget-sheet td { vertical-align: top; }
.budget-sheet tbody.bl + tbody.bl tr:first-child td { border-top: 1px solid var(--rule); }
.budget-sheet tfoot td { padding: .45rem .5rem; border-top: 1px solid var(--rule-strong); }
.bl-months td { background: #fafbfb; }
.bl-mgrid { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: .45rem .6rem; padding: .4rem 0 .6rem; align-items: end; }
.bl-mgrid label { display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; color: var(--ink-soft); }
.bl-mgrid .btn { grid-column: span 2; justify-self: start; }
@media (max-width: 760px) { .bl-mgrid { grid-template-columns: repeat(3, 1fr); } }
.budget-table td.amt, .budget-periods td.amt { width: 118px; }
.budget-table th small { font-weight: 400; }
.budget-table th, .budget-periods th { vertical-align: bottom; }
.budget-table td { vertical-align: top; }
.use-cell { min-width: 120px; white-space: nowrap; }
.use-bar { display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: var(--rule); vertical-align: middle; overflow: hidden; margin-right: .35rem; }
.use-bar i { display: block; height: 100%; background: var(--green); }
.use-bar.near i { background: var(--amber); }
.use-bar.over i { background: var(--red); }
.use-pct { font-size: .82rem; font-variant-numeric: tabular-nums; }
.use-pct.over { color: var(--red); font-weight: 600; }
.use-pct.near { color: var(--amber); }
.seg { display: flex; gap: .25rem; flex-wrap: wrap; }
.seg .btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.budget-note { font-size: .8rem; margin-top: 1rem; }
.budget-check { display: grid; gap: .3rem; font-size: .86rem; }
.budget-check > div { padding: .35rem .6rem; border-radius: var(--radius-sm); border: 1px solid var(--rule); }
.budget-check .ok { background: var(--green-tint); border-color: #b5e3c9; }
.budget-check .over { background: var(--red-tint); border-color: #e6c3c2; color: #7d2a28; }
@media print {
  .use-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .budget-table, .budget-periods { font-size: 8.5pt; }
  .budget-table td.amt, .budget-periods td.amt { width: auto; }
}
.budget-table tr.untagged td { color: var(--amber); }
.budget-sheet tbody.bl > tr:first-child > td { vertical-align: middle; }
.budget-sheet select[name$="[priority]"] { min-width: 6.5rem; }
.bl-mgrid label { text-align: right; }
.fs th.use-h { text-align: left; }
.budget-table td:nth-child(2) { min-width: 220px; }

.budget-table th:nth-child(2), .budget-table th:nth-child(3), .budget-periods th.use-h { text-align: left; }
.budget-table td.amt { width: auto; }
.budget-table td, .budget-table th { padding: .3rem .4rem; }
.budget-table .use-bar { width: 44px; }
.budget-table .use-cell { min-width: 96px; }
.budget-table td:nth-child(2) { min-width: 190px; }
@page budgetwide { size: A4 landscape; margin: 10mm 10mm 18mm; }
@media print {
  .budget-report { page: budgetwide; }
  .budget-report .table-wrap { overflow: visible !important; }
  .budget-table td:nth-child(2), .budget-report .use-cell { min-width: 0; }
  .budget-report .use-bar { width: 34px; }
  .budget-report .kpis { grid-template-columns: repeat(5, 1fr); }
}

/* ---------------------------------------------------------------- proforma invoices (2.2) */
.pf-confirm { border-color: #b5e3c9; background: var(--green-tint); }
.pf-confirm .panel-body { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.pf-confirm .panel-body > div:first-child { flex: 1; min-width: 260px; }
.pf-confirm .field { min-width: 170px; }
.pf-confirm .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- chart of accounts: delete / lock icons */
.coa-del { border: 0; background: none; cursor: pointer; font-size: 1rem; padding: 0 .25rem; margin-left: .4rem; opacity: .65; }
.coa-del:hover { opacity: 1; filter: drop-shadow(0 0 1px var(--red)); }
.coa-lock { margin-left: .5rem; font-size: .85rem; opacity: .45; cursor: help; }
.coa-del-ico { font-size: .9rem; }
.std-list td { vertical-align: middle; }

/* ---------------------------------------------------------------- external audit (2.3) */
.nav-badge { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .35rem; border-radius: 999px; background: #e0a526; color: #1d2a20; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.3rem; }
.ro-banner { background: #eef4fb; border: 1px solid #b8dafc; color: #003f7a; padding: .55rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.risk { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.risk-high { background: var(--red-tint); color: #8a2e2b; border: 1px solid #e6c3c2; }
.risk-medium { background: var(--amber-tint); color: #6f4806; border: 1px solid #ecd6a6; }
.risk-low { background: var(--green-tint); color: #0b5530; border: 1px solid #b5e3c9; }
.obs-block { margin: 0 0 1rem; }
.obs-block h4 { margin: 0 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.obs-block p { margin: 0; white-space: pre-wrap; }
.obs-response { border-left: 3px solid var(--green); padding-left: .8rem; }
.obs-notes .note { border-bottom: 1px solid var(--rule); padding: .55rem 0; }
.obs-notes .note.event { color: var(--ink-soft); font-size: .85rem; }
.letter-item { break-inside: avoid; border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }
.letter-item h3 { margin: 0 0 .4rem; font-size: 1rem; }
.letter-item .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 700px) { .letter-item .grid2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- locations (2.4) */
.loc-table td.amt { width: auto; min-width: 110px; }
.loc-table th.amt { text-align: right; white-space: nowrap; }
.loc-table td.amt small { font-size: .72rem; }
@media print { .loc-report { page: budgetwide; } .loc-table { font-size: 8pt; } }
.fs.cc th { text-align: left; }
.fs.cc th.amt { text-align: right; }
@media print {
  .report .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: .5rem; }
  .report .kpi { padding: .45rem .6rem; }
  .report .kpi strong { font-size: 1.05rem; }
  .cashbook-report { page: budgetwide; }
  .cashbook-report .fs td.amt { width: auto; }
  .cashbook-report td.details { min-width: 220px; }
  .report .grid-2 { grid-template-columns: 1fr 1fr !important; }
}
@media print {
  .pvimport-report { page: budgetwide; }
  .pvimport-report .fs td.amt { width: auto; }
}

/* ---------------------------------------------------------------- signature boxes (vouchers, notes) */
.signatures div.sig { border-top: 0; padding-top: 0; display: flex; flex-direction: column; }
.signatures .sig-label { font-weight: 600; color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.signatures .sig-name { color: var(--ink); font-size: .9rem; min-height: 1.2rem; margin-top: .15rem; }
.signatures .sig-space { height: 2.4rem; border-bottom: 1px solid var(--ink); }
.signatures .sig-foot { font-size: .75rem; color: var(--ink-soft); margin-top: .2rem; }

/* ---------------------------------------------------------------- opening balance box (2.6) */
.ob-box { border: 1px solid var(--rule); background: #f7fbf9; border-radius: var(--radius); padding: .7rem .9rem; }
.ob-box h4 { margin: 0 0 .5rem; font-size: .9rem; }
.ob-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: .6rem; }
@media (max-width: 760px) { .ob-grid { grid-template-columns: 1fr 1fr; } }
.ob-table input.num { width: 100%; padding: .3rem .45rem; }
.ob-table td { vertical-align: middle; }
/* assets awaiting registration */
.fa-reg { display: inline-block; position: relative; }
.fa-reg summary { list-style: none; cursor: pointer; }
.fa-reg summary::-webkit-details-marker { display: none; }
.fa-reg[open] .fa-reg-form { position: static; width: 320px; background: var(--surface, #fff); border: 1px solid var(--border, #d9e2ea); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .8rem; display: grid; gap: .5rem; margin-top: .3rem; white-space: normal; }
.fa-reg-form .field { margin: 0; }
@media print { .fa-reg { display: none; } }
#fa-bulk { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; }
#fa-bulk select { width: auto; min-width: 240px; }
.lh-center .lh-contact { font-size: .92rem; color: var(--ink); font-weight: 500; }
@media print { .lh-center .lh-contact { color: #000; } }
.ob-finder .panel-body { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.ob-finder input[type=search] { font-size: 1.05rem; }
.report-list a[hidden], .report-list section[hidden], [hidden] { display: none !important; }
.lookup-menu .group { padding: .35rem .7rem .15rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3, #6b7c86); background: #f3f6f5; cursor: default; }
.lookup-menu div.group:hover { background: #f3f6f5; }
/* numbers (Debit / Credit / DR / CR / amounts) line up under their headings everywhere */
.table td.num, .table th.num, .sheet td.num, .print-table td.num, table td.num, table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num, .table td.num { padding-right: .8rem; }
.table.compact th.num, .table.compact td.num { padding-right: .65rem; }

/* ---- Fuel station (Sheli) */
.inline-form { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.fuel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.fuel-grid > .panel { margin-bottom: 0; }
.tank-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.tank { position: relative; width: 112px; height: 120px; border: 2px solid #9fb3c8; border-radius: 10px 10px 14px 14px; overflow: hidden; background: #f4f7fa; color: var(--ink); text-decoration: none; }
.tank-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#7cc6a4, #3f9f75); opacity: .55; }
.tank.low { border-color: var(--red); }
.tank.low .tank-fill { background: linear-gradient(#f2a29c, #d9534f); }
.tank-label { position: relative; display: block; padding: .45rem .5rem; font-size: .8rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.level-bar { display: inline-block; width: 110px; height: 10px; border-radius: 6px; background: #e8edf2; vertical-align: middle; overflow: hidden; }
.level-bar > span { display: block; height: 100%; background: #3f9f75; }
.level-bar.low > span { background: var(--red); }
.trend-bar { display: inline-block; height: 10px; border-radius: 5px; background: var(--cerulean, #2b7bb9); min-width: 2px; }
.share-text { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: #f7f9fb; }
.share-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.btn-wa { background: #25d366; border-color: #1fb457; color: #fff; }
.btn-wa:hover { background: #1fb457; color: #fff; }
.fuel-meters input[data-closing] { font-weight: 600; }
@media (max-width: 700px) { .fuel-grid { grid-template-columns: 1fr; } .tank { width: 96px; } }
@media print { .share-box { display: none; } }
@media (max-width: 700px) { .fuel-meters .sm-hide { display: none; } .fuel-meters input[data-closing] { width: 110px !important; } }
.report-filter { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; }
.report-filter select, .report-filter input { width: auto; min-width: 150px; }
.fuel-actions { white-space: normal; min-width: 150px; }
.fuel-actions > * { margin: .15rem 0; }
.fuel-actions .inline-form { flex-wrap: wrap; }

/* ---- School */
.att-col { text-align: center; width: 70px; }
.att input { position: absolute; opacity: 0; }
.att span { display: inline-block; width: 34px; height: 30px; line-height: 30px; border-radius: 8px; border: 1px solid var(--rule); color: var(--ink-soft); cursor: pointer; font-weight: 600; }
.att-P input:checked + span { background: #2f9e6b; border-color: #2f9e6b; color: #fff; }
.att-A input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.att-L input:checked + span { background: #e0a100; border-color: #e0a100; color: #fff; }
.att-E input:checked + span { background: #5b7fa6; border-color: #5b7fa6; color: #fff; }
.broadsheet td, .broadsheet th { white-space: nowrap; }
.kid-card { color: inherit; text-decoration: none; display: block; }
.kid-card:hover { border-color: var(--cerulean, #2b7bb9); }
.report-card { padding: 1.4rem 1.6rem; page-break-after: always; }
.rc-head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: .6rem; margin-bottom: .8rem; }
.rc-head h2 { margin: 0; } .rc-head h3 { margin: .3rem 0 0; font-size: 1rem; letter-spacing: .03em; } .rc-head p { margin: 0; color: var(--ink-soft); }
.rc-logo { max-height: 70px; max-width: 120px; }
.rc-info { width: 100%; margin: .6rem 0; border-collapse: collapse; } .rc-info td { padding: .3rem .2rem; vertical-align: top; }
.rc-sign { float: right; color: var(--ink-soft); }
.rc-foot { font-size: .8rem; margin-top: .6rem; }
@media print { .no-print { display: none !important; } .report-card { border: 0; box-shadow: none; margin: 0; } }
.fuel-grid > * { min-width: 0; }
@media (max-width: 700px) { .kpis.kpis-2 { grid-template-columns: 1fr 1fr; gap: .6rem; } .kpis.kpis-2 .kpi strong { font-size: 1.15rem; } }
@media (max-width: 560px) { .topbar .year-switch { display: none; } .topbar .company-btn small { display: none; } .topbar-right { gap: .3rem; } }
@media (max-width: 560px) { .topbar .company-btn strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; } .topbar .company-btn .code { display: none; } }

/* construction 2.27: printable engineering reports, vouchers and certificates */
.sign-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.sign-box { border: 1px solid var(--rule); border-radius: 6px; padding: .6rem .8rem; line-height: 1.9; font-size: .88rem; }
.total-row td { font-weight: 700; border-top: 2px solid var(--rule); }
@media print { .no-print { display: none !important; } .report-sheet { border: 0; box-shadow: none; } }

/* transport 2.30: fleet compliance */
.cmp-ok { background: #e7f6ec; color: #1d6b3a; }
.cmp-due { background: #fff4d6; color: #8a5a00; }
.cmp-bad { background: #fde8e6; color: #a32518; font-weight: 600; }
.cmp-na { color: var(--ink-soft); }
.cmp-table td { white-space: nowrap; }
.cmp-summary { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.cmp-box { display: inline-block; padding: .45rem .8rem; border-radius: 6px; text-decoration: none; }
.cmp-box strong { font-size: 1.2rem; margin-right: .25rem; }
a.kpi { text-decoration: none; color: inherit; }

/* 2.31: notifications in colour – bank & cash, fuel stations */
.cmp-info { background: #e6f0fb; color: #1f4f8a; }
.cmp-tag { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .78rem; white-space: nowrap; }
.watch-list { list-style: none; margin: 0; padding: 0; }
.watch-list li { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .8rem; border-left: 4px solid transparent; border-bottom: 1px solid var(--rule); }
.watch-list li:last-child { border-bottom: 0; }
.watch-list li.cmp-bad { border-left-color: #d9534f; font-weight: 400; }
.watch-list li.cmp-due { border-left-color: #e0a100; }
.watch-list li.cmp-info { border-left-color: #3b7dd8; }
.watch-list li .w-who { font-weight: 600; white-space: nowrap; }
.watch-list li .w-what { flex: 1; }
.watch-list li a.w-open { white-space: nowrap; }
.watch-issues { margin: 0; padding: 0; list-style: none; }
.watch-issues li { padding: .15rem .45rem; border-radius: 4px; margin: .1rem 0; font-size: .86rem; }
tr.row-bad td:first-child { box-shadow: inset 4px 0 0 #d9534f; }
tr.row-due td:first-child { box-shadow: inset 4px 0 0 #e0a100; }
tr.row-ok td:first-child { box-shadow: inset 4px 0 0 #3f9f75; }
.tank.warn { border-color: #e0a100; }
.tank.warn .tank-fill { background: linear-gradient(#ffe08a, #e0a100); }
@media (max-width: 700px) { .watch-list li { flex-wrap: wrap; } }
.is-invalid { border-color: #d9534f !important; background: #fde8e6 !important; }
/* school 2.33: timetable and parent chat */
.tt-table td, .tt-table th { vertical-align: top; }
.tt-break td { background: var(--paper); }
.tt-today { background: #eef6ff; }
.chat-box { display: flex; flex-direction: column; gap: .55rem; padding: 1rem; max-height: 62vh; overflow-y: auto; }
.chat-msg { max-width: 78%; padding: .55rem .8rem; border-radius: 12px; white-space: pre-line; line-height: 1.45; }
.chat-msg small { display: block; opacity: .7; font-size: .74rem; margin-bottom: .15rem; }
.chat-parent { align-self: flex-end; background: #dcf3e5; border-bottom-right-radius: 3px; }
.chat-bot { align-self: flex-start; background: #eef2f7; border-bottom-left-radius: 3px; }
.chat-staff { align-self: flex-start; background: #fff4d6; border-bottom-left-radius: 3px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .8rem; }
.chat-quick button { border-radius: 999px; }
.chat-form { display: flex; gap: .5rem; padding: .8rem 1rem; border-top: 1px solid var(--rule); }
.chat-form input[type=text] { flex: 1; }
@media (max-width: 700px) { .chat-msg { max-width: 92%; } }
/* 2.34: public admission page, boarding, mail */
.public-page { background: var(--paper); }
.public-wrap { max-width: 920px; margin: 0 auto; padding: 1.2rem 16px; }
.public-head { text-align: center; margin: 1rem 0 1.4rem; }
.public-head h1 { margin: 0 0 .3rem; }
.bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; padding: 1rem; }
.bed-room { border: 1px solid var(--rule); border-radius: 8px; padding: .55rem .7rem; font-size: .86rem; }
.bed-room strong { display: block; }
.mail-list tr.unread td { font-weight: 600; }
.mail-msg { border-bottom: 1px solid var(--rule); padding: 1rem; }
.mail-msg:last-child { border-bottom: 0; }
.mail-body { white-space: pre-wrap; margin-top: .6rem; line-height: 1.5; }
/* 2.35: centred sign-in for phone and laptop, languages, right-to-left */
.login-page { min-height: 100vh; margin: 0; background: linear-gradient(160deg, #0b3d5c 0%, #0f6b4a 100%); }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; }
.login-card { width: 100%; max-width: 420px; background: var(--sheet, #fff); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.25); padding: 28px 24px; box-sizing: border-box; display: flex; flex-direction: column; gap: .9rem; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.login-title { text-align: center; margin: .2rem 0 0; font-size: 1.4rem; }
.login-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.login-langs form { margin: 0; }
.login-langs button { border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: .25rem .7rem; font-size: .85rem; cursor: pointer; color: var(--ink); }
.login-langs button.on { background: var(--green, #0f6b4a); border-color: var(--green, #0f6b4a); color: #fff; }
.login-form { display: flex; flex-direction: column; gap: .7rem; }
.login-form select, .login-form input { width: 100%; box-sizing: border-box; min-height: 44px; font-size: 1rem; }
.login-btn { width: 100%; justify-content: center; min-height: 46px; font-size: 1rem; box-sizing: border-box; text-align: center; }
.login-or { display: flex; align-items: center; gap: .6rem; color: var(--ink-soft); font-size: .85rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.login-note { text-align: center; }
.login-foot { color: #cfe7f2; font-size: .8rem; margin: 1rem 0 0; text-align: center; }
.lang-row { display: flex; flex-wrap: wrap; gap: .25rem; padding: 0 .5rem .4rem; }
.lang-row form { margin: 0; }
.lang-row button { width: auto !important; padding: .2rem .55rem !important; border: 1px solid var(--rule) !important; border-radius: 999px; font-size: .8rem; }
.lang-row button.current { background: var(--green, #0f6b4a); color: #fff; }
.guest-list { display: grid; gap: .6rem; }
.guest-list a { display: block; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); }
.guest-list a strong { display: block; }
[dir="rtl"] body, [dir="rtl"] .content, [dir="rtl"] .panel, [dir="rtl"] .table th, [dir="rtl"] .table td { text-align: right; }
[dir="rtl"] .num, [dir="rtl"] td.num, [dir="rtl"] th.num { text-align: left; direction: ltr; }
[dir="rtl"] .shell { direction: rtl; }
[dir="rtl"] .nav-group summary::after { transform: scaleX(-1); }
[dir="rtl"] .watch-list li { border-left: 0; border-right: 4px solid transparent; }
[dir="rtl"] .watch-list li.cmp-bad { border-right-color: #d9534f; } [dir="rtl"] .watch-list li.cmp-due { border-right-color: #e0a100; } [dir="rtl"] .watch-list li.cmp-info { border-right-color: #3b7dd8; }
@media (max-width: 480px) { .login-card { padding: 22px 16px; border-radius: 12px; } }
/* 2.36: internal mail – list and reading pane, recipient chips */
.mail-wrap { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 1rem; align-items: start; }
.mail-listpane { padding: 0; overflow: hidden; }
.mail-tabs { padding: 0 .6rem; margin: 0; }
.mail-search { padding: .5rem .8rem; border-bottom: 1px solid var(--rule); }
.mail-search input { width: 100%; box-sizing: border-box; }
.mail-items { max-height: calc(100vh - 260px); overflow-y: auto; }
.mail-item { display: grid; grid-template-columns: 40px 1fr auto; gap: .6rem; padding: .7rem .8rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); align-items: start; }
.mail-item:hover { background: var(--paper); }
.mail-item.on { background: #e8f3ee; box-shadow: inset 3px 0 0 var(--green, #0f6b4a); }
.mail-item.unread .mail-who, .mail-item.unread .mail-subj { font-weight: 700; }
.mail-mid { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.mail-who { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-subj { font-size: .9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-snip { font-size: .8rem; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail-date { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.mail-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.mail-avatar.c0 { background: #0f6b4a; } .mail-avatar.c1 { background: #1f5f9e; } .mail-avatar.c2 { background: #8a4fb0; } .mail-avatar.c3 { background: #c0632b; } .mail-avatar.c4 { background: #2b8a8a; } .mail-avatar.c5 { background: #a33a5b; }
.mail-readpane { padding: 0; min-height: 300px; }
.mail-empty { padding: 3rem 1rem; text-align: center; }
.mail-readhead { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); }
.mail-readhead h2 { margin: 0; flex: 1; font-size: 1.15rem; min-width: 200px; }
.mail-readhead .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.mail-readhead form { margin: 0; }
.mail-back { display: none; }
.mail-from { display: flex; gap: .7rem; align-items: flex-start; }
.mail-att { margin: .6rem 0 0; }
.mail-quick { display: flex; gap: .5rem; padding: .8rem 1rem; border-top: 1px solid var(--rule); background: var(--paper); }
.mail-quick textarea { flex: 1; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; border: 1px solid var(--rule); border-radius: 8px; padding: .35rem .45rem; background: var(--sheet); position: relative; min-height: 44px; box-sizing: border-box; }
.chips .chip { display: inline-flex; align-items: center; gap: .3rem; background: #e8f3ee; color: #0f5137; border-radius: 999px; padding: .2rem .55rem; font-size: .85rem; }
.chips .chip.group { background: #e6f0fb; color: #1f4f8a; }
.chips .chip button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; color: inherit; padding: 0; }
.chips input { border: 0 !important; outline: none; flex: 1; min-width: 160px; padding: .3rem; background: transparent; box-shadow: none !important; }
.chips .chip-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; max-height: 260px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.chips .chip-list div { padding: .45rem .7rem; cursor: pointer; font-size: .9rem; }
.chips .chip-list div.hl, .chips .chip-list div:hover { background: var(--paper); }
.chips .chip-list small { color: var(--ink-soft); }
@media (max-width: 900px) {
  .mail-wrap { grid-template-columns: 1fr; }
  .mail-wrap.reading .mail-listpane { display: none; }
  .mail-wrap:not(.reading) .mail-readpane { display: none; }
  .mail-back { display: inline-flex; }
  .mail-items { max-height: none; }
}
.mail-item, .mail-item:hover, .mail-item * { text-decoration: none !important; }

/* 2.37 casual labour pay list */
.paylist-table { font-size: .82rem; }
.paylist-table td { height: 2.1rem; vertical-align: middle; }
.paylist-table tfoot th { border-top: 2px solid #000; }
@media print { .paylist-table td:last-child { border-left: 1px solid #999; } }
.paylist-meta th { width: 13%; white-space: nowrap; }
.paylist-meta td { width: 37%; text-align: left; }

/* 2.39 staff register: official duty, sick, on leave */
.att-O input:checked + span { background: #3b7dd8; border-color: #3b7dd8; color: #fff; }
.att-S input:checked + span { background: #c2185b; border-color: #c2185b; color: #fff; }
.att-V input:checked + span { background: #7b61c4; border-color: #7b61c4; color: #fff; }

/* procurement 2.41 – approval steps, comparison */
.appr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; counter-reset: st; }
.appr-steps li { position: relative; padding: .4rem .6rem .4rem 2.1rem; border: 1px solid var(--border, #e3e6ea); border-radius: 8px; counter-increment: st; }
.appr-steps li::before { content: counter(st); position: absolute; left: .55rem; top: .45rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--muted-bg, #eef0f3); font-size: .72rem; display: grid; place-items: center; }
.appr-steps li.done { border-color: #9fd3b0; background: rgba(46, 160, 90, .07); }
.appr-steps li.done::before { content: '✓'; background: #2ea05a; color: #fff; }
.appr-steps li.now { border-color: #e2b24a; background: rgba(226, 178, 74, .1); }
.appr-steps li.now::before { background: #e2b24a; color: #fff; }
td.best { background: rgba(46, 160, 90, .12); font-weight: 600; }
.cmp-table th, .cmp-table td { white-space: nowrap; }
.prc-print h2 { margin: .2rem 0; }
.prc-print .sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.prc-print .sign div { border-top: 1px solid #333; padding-top: .3rem; font-size: .85rem; }
details.panel > summary { cursor: pointer; padding: .7rem 1rem; font-weight: 600; list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: '＋ '; color: var(--accent, #0b6e99); }
details.panel[open] > summary::before { content: '− '; }
details.panel > form, details.panel > .panel-body { padding: 0 1rem 1rem; }

/* HR 2.42 – leave calendar */
.leave-cal th, .leave-cal td { text-align: center; padding: .25rem .2rem; min-width: 1.4rem; }
.leave-cal td:first-child, .leave-cal th:first-child { text-align: left; }
.leave-cal .on, .leave-key.on { background: rgba(46, 160, 90, .55); }
.leave-cal .wait, .leave-key.wait { background: rgba(226, 178, 74, .45); }
.leave-cal .off, .leave-key.off { background: rgba(120, 130, 140, .12); }
.leave-key { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: middle; }
.rating-pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: rgba(11, 110, 153, .1); font-size: .8rem; }

/* Engineering 2.43 – estimates */
.est-lines .est-sec-head td { background: var(--muted-bg, #f3f5f7); }
.est-lines input.typed, .est-sec input.typed { background: rgba(11, 110, 153, .08); border-color: #7fb3cc; font-weight: 600; }
.est-sec td { padding: .2rem .25rem; }
.risk-cell { display: inline-block; min-width: 2rem; text-align: center; border-radius: 6px; padding: .1rem .3rem; font-weight: 600; }
.risk-hi { background: rgba(200, 50, 50, .18); } .risk-md { background: rgba(226, 178, 74, .25); } .risk-lo { background: rgba(46, 160, 90, .15); }
.report-sec { break-inside: avoid; margin-bottom: 1rem; }
.report-sec h3 { border-bottom: 2px solid #005f84; padding-bottom: .2rem; margin: 1rem 0 .4rem; font-size: 1rem; }
.duty-list{margin:.2rem 0 .4rem 1.2rem;padding:0}.duty-list li{margin:.25rem 0;line-height:1.45}
.slip-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:1rem}.slip{border:1px dashed #94a3b8;border-radius:10px;padding:.9rem 1rem;background:var(--card,#fff);break-inside:avoid}.slip-co{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:#64748b}.slip-name{font-size:1.1rem;font-weight:700;margin:.2rem 0 .5rem}.slip table td{padding:.15rem .6rem .15rem 0;vertical-align:top}.slip .mono{font-family:ui-monospace,Consolas,monospace;font-size:1.05rem}.slip-foot{font-size:.85rem;margin-top:.5rem}
@media print{.slip-grid{grid-template-columns:1fr 1fr}}
@media (max-width:640px){table[data-pos-lines] [data-price],table[data-pos-lines] thead th:nth-child(4){display:none}table[data-pos-lines] select{min-width:5.2rem!important;max-width:5.6rem}table[data-pos-lines] input[name="qty[]"]{width:3.4rem!important}table[data-pos-lines] td,table[data-pos-lines] th{padding-left:.25rem;padding-right:.25rem}table[data-pos-lines] td:first-child{font-size:.82rem}table[data-pos-lines]{min-width:0!important;width:100%}table[data-pos-lines] tfoot td{font-size:.85rem}table[data-pos-lines] tfoot small{display:none}table[data-pos-lines] [data-pos-disc]{width:3rem!important}table[data-pos-lines] .pos-x{display:none}}.pos-phone-only{display:none}@media (max-width:640px){.pos-phone-only{display:block}}
.dist-filters>input,.dist-filters>select{width:auto;max-width:16rem}.dist-filters>input[type=search]{min-width:12rem}
.dist-filters>input[type=date],.dist-filters>input[type=month]{width:10.5rem!important;flex:0 0 auto}
.dist-filters>.date-box{width:10.5rem;flex:0 0 10.5rem}

/* 2.49 engineering report centre */
.eng-rep-filters .field input[type=date] { width: 10.5rem; }
.eng-rep-group { margin: 1.2rem 0 .5rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.eng-rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.eng-rep-card { display: flex; flex-direction: column; gap: .3rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: .85rem 1rem; color: inherit; text-decoration: none; }
.eng-rep-card:hover { border-color: var(--cerulean, #1b7fb5); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.eng-rep-card strong { font-size: 1rem; }
.eng-rep-card small { color: var(--ink-soft); line-height: 1.35; }
.eng-rep-card span { font-size: .8rem; margin-top: auto; }
.eng-rep-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.eng-rep-kpis div { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem .8rem; }
.eng-rep-kpis span { display: block; font-size: .8rem; color: var(--ink-soft); }
.eng-rep-kpis strong { display: block; font-size: 1.05rem; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.eng-rep-bad td { color: var(--neg, #b42318); }
@media print { .eng-rep-kpis { grid-template-columns: repeat(4, 1fr); } .eng-rep-kpis div { padding: .3rem .4rem; } }

/* 2.50 earlier PAYE tables */
.paye-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1rem; }
.paye-hist-table { border: 1px solid var(--rule); border-radius: var(--radius); padding: .7rem; }
.paye-hist-table input.num { width: 100%; }
.paye-hist-table .field { margin-bottom: .5rem; }

/* 2.52 SHE dashboard */
.she-filters .field input[type=date] { width: 10.5rem; }
.she-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: .7rem; margin-bottom: 1rem; }
.she-kpi { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--green); border-radius: var(--radius); padding: .65rem .85rem; display: flex; flex-direction: column; gap: .15rem; }
.she-kpi span { font-size: .8rem; color: var(--ink-soft); }
.she-kpi strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.she-kpi small { color: var(--ink-soft); font-size: .78rem; }
.she-kpi.she-bad { border-left-color: var(--neg, #b42318); }
.she-kpi.she-bad strong { color: var(--neg, #b42318); }
.she-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: .7rem; padding: .9rem; }
.she-form { border: 1px solid var(--rule); border-radius: var(--radius); padding: .7rem .8rem; display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; }
.she-form strong { display: block; }
.she-form small { display: block; color: var(--ink-soft); line-height: 1.35; margin-top: .2rem; }
.she-form-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; flex-wrap: wrap; }
.she-duties details { margin-bottom: .6rem; }
.she-duties summary { cursor: pointer; font-weight: 600; }
.she-duties ul { margin: .4rem 0 0 1.1rem; padding: 0; }
.she-duties li { margin-bottom: .35rem; line-height: 1.4; }
.she-grid > * { min-width: 0; }

/* 2.53 poultry */
.pf-grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: .6rem; }
.pf-grades input { font-size: 1.15rem; text-align: right; }
.pf-mini { display: grid; gap: .35rem; margin-top: .4rem; min-width: 220px; }
.print-only { display: none !important; }
@media print { .print-only { display: flex !important; } }
.pf-l-store { display: none; }
@media (max-width: 640px) {
  .pf-kpis { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .pf-kpis .kpi { padding: .55rem .7rem; }
  .pf-kpis .kpi strong { font-size: 1.15rem; }
  .pf-kpis .kpi small { font-size: .75rem; }
  .pf-lines thead, .pf-lines .pf-l-hide { display: none; }
  .pf-lines, .pf-lines tbody, .pf-lines tfoot { display: block; width: 100%; }
  .pf-lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .7rem; padding: .7rem .9rem; border-bottom: 1px solid var(--rule); }
  .pf-lines td, .pf-lines th { border: 0 !important; padding: 0 !important; text-align: left; }
  .pf-lines .pf-l-name { grid-column: 1 / -1; }
  .pf-lines .pf-l-store { display: inline; }
  .pf-lines td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; color: var(--ink-soft); margin-bottom: .15rem; }
  .pf-lines td input { width: 100% !important; }
  .pf-lines td[data-pf-amt] { align-self: end; font-weight: 600; font-size: 1.05rem; }
  .pf-lines tfoot tr { grid-template-columns: 1fr auto; font-size: 1.1rem; }
}

/* 2.54 daily cash & expenditure report */
.dcr-pick { flex-basis: 100%; }
.dcr-loc { min-width: 300px; }
.dcr-loc small { display: block; max-width: 30rem; margin-top: .2rem; }
.dcr-checks { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.dcr-checks .check { font-weight: 400; }
.dcr-hint { font-size: .85rem; }
.dcr-day { margin-bottom: 2rem; }
.dcr-wrap { overflow-x: auto; }
table.dcr { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.dcr th, table.dcr td { border: 1px solid #9aa7b0; padding: .28rem .45rem; vertical-align: top; text-align: left; }
table.dcr .amt { text-align: right; white-space: nowrap; }
table.dcr .num-c { text-align: center; width: 3.5rem; }
.dcr-acc { background: #fff3b0; font-weight: 600; }
.dcr-strong th, .dcr-strong td { font-weight: 700; background: #f2f5f7; }
.dcr-close th, .dcr-close td { font-weight: 700; font-size: 1rem; background: #e6eef3; border-top: 2px solid #0b2a3d; }
.dcr-colhead th { background: #dcebf8; color: #10243a; text-align: center; }
.dcr-band th { background: #dfe8ee; text-align: center; letter-spacing: .02em; }
.dcr-in td:first-child { padding-left: 1rem; }
table.dcr-sign { width: 100%; margin-top: 1.4rem; border-collapse: collapse; font-size: .88rem; }
table.dcr-sign td, table.dcr-sign th { width: 33%; padding: .3rem .4rem; text-align: left; }
.dcr-sign-line td { height: 2.2rem; border-bottom: 1px dotted #555; }
@media print {
  .dcr-day { page-break-after: always; break-after: page; }
  .dcr-day:last-child { page-break-after: auto; }
  .dcr-wrap { overflow: visible; }
  table.dcr { font-size: 9pt; }
  .dcr-colhead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dcr-acc, .dcr-strong th, .dcr-strong td, .dcr-close th, .dcr-close td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen and (max-width: 640px) {
  table.dcr, table.dcr tbody { display: block; font-size: .82rem; }
  table.dcr colgroup, table.dcr tr.dcr-colhead { display: none; }
  table.dcr tr { display: flex; flex-wrap: wrap; }
  table.dcr th, table.dcr td { display: block; border-width: 0 0 1px 0; }
  .dcr-info th { flex: 0 0 40%; } .dcr-info td { flex: 1 1 60%; }
  .dcr-strong th, .dcr-close th, .dcr-band th { flex: 1 1 0; min-width: 0; }
  .dcr-strong td, .dcr-close td { flex: 0 0 auto; }
  table.dcr { border: 1px solid #9aa7b0; }
  .dcr-row { padding: .3rem 0; border-bottom: 1px solid #9aa7b0; }
  table.dcr .dcr-row td { border: 0; padding: .1rem .5rem; }
  .dcr-row .c-sr { flex: 0 0 auto; width: auto; font-weight: 700; }
  .dcr-row .c-sr::after { content: '.'; }
  .dcr-row .c-payee { flex: 1 1 70%; font-weight: 700; }
  .dcr-row .c-wide { flex: 1 1 100%; }
  .dcr-in .c-wide:first-child { font-weight: 700; }
  .dcr-row .c-ledger { flex: 1 1 100%; }
  .dcr-row .c-no, .dcr-row .c-amt { flex: 1 1 50%; }
  .dcr-row td[data-label]::before { content: attr(data-label) ': '; color: var(--ink-soft); font-size: .75rem; }
  .dcr-row .c-amt { font-weight: 700; }
  table.dcr-sign { font-size: .78rem; }
}

/* 2.55 signatures */
.sig-pad-wrap { position: relative; border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: #fff; }
.sig-pad { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; touch-action: none; cursor: crosshair; }
.sig-pad-line { position: absolute; left: 6%; right: 6%; bottom: 22%; border-bottom: 1px solid #c9d6de; pointer-events: none; }
.sig-pad-empty { outline: 2px solid var(--red); }
.sig-current { border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; padding: .6rem; margin-bottom: .6rem; max-width: 320px; }
.sig-current img, .sig-img { max-width: 100%; max-height: 70px; display: block; }
.signoff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.signoff-box { border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem .7rem; background: #fff; display: flex; flex-direction: column; gap: .2rem; min-height: 9rem; }
.signoff-box .so-label { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.signoff-box .so-sig { height: 60px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--ink); }
.signoff-box .so-sig img { max-height: 58px; max-width: 100%; }
.signoff-box .so-name { font-weight: 600; }
.signoff-box .so-date { font-size: .8rem; color: var(--ink-soft); }
.signoff-box form { margin-top: auto; }
.signoff-box .so-role { font-size: .8rem; color: var(--ink-soft); }
.so-warn { margin: .6rem 0 0; }
.dcr-signoffs { margin-top: 1.2rem; }
.so-changed { padding: .5rem .8rem; border: 1px solid #ecd6a6; background: var(--amber-tint); color: #6f4806; border-radius: var(--radius); font-size: .88rem; }
.signatures .sig-img-box { height: 3rem; border-bottom: 1px solid var(--ink); display: flex; align-items: flex-end; }
.signatures .sig-img-box img { max-height: 2.9rem; max-width: 100%; }
@media (max-width: 640px) { .signoff-grid { grid-template-columns: 1fr; } .signoff-box { min-height: 0; } }
@media print {
  .signoff-box { border: 0; padding: 0; min-height: 0; }
  .signoff-box form, .signoff-box .no-sig-btn { display: none; }
  .dcr-signoffs, .signoff-grid { break-inside: avoid; page-break-inside: avoid; }
  .dcr-signoffs .signoff-grid { grid-template-columns: repeat(3, 1fr); }
  table.dcr th, table.dcr td { padding: .12rem .3rem; line-height: 1.2; }
  table.dcr { font-size: 8.3pt; }
  .dcr-day .report-title { margin-bottom: .5rem; }
  .dcr-day .report-title h1 { font-size: 13pt; margin: .1rem 0; }
  .dcr-signoffs { margin-top: .6rem; }
  .signoff-box .so-sig { height: 42px; } .signoff-box .so-sig img { max-height: 40px; }
  .signoff-box .so-date, .signoff-box .so-role { font-size: 7.5pt; }
}
/* 2.55: document page columns may shrink on a phone (wide tables scroll inside their box) */
.split > * { min-width: 0; }

/* 2.56 custom engineering reports */
.ecr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.ecr-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .6rem; }
.ecr-row .field { min-width: 170px; flex: 1 1 170px; }
.ecr-row .field.grow { flex: 2 1 260px; }
.ecr-measures { border: 1px solid var(--rule); border-radius: var(--radius); padding: .5rem .8rem; margin: .4rem 0 .8rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .15rem .8rem; }
.ecr-measures legend { font-weight: 600; padding: 0 .3rem; }
.ecr-measures .check { font-weight: 400; font-size: .9rem; }
.ecr-filters { margin: 0 0 .8rem; }
.ecr-filters summary { cursor: pointer; font-weight: 600; margin-bottom: .5rem; }
.ecr-side .panel { margin-bottom: 1rem; }
.ecr-list { display: grid; gap: .45rem; max-height: 420px; overflow: auto; }
.ecr-item { display: flex; flex-direction: column; line-height: 1.25; }
.ecr-item.on a { font-weight: 700; }
.ecr-report { margin-top: 1rem; }
.ecr-applied { text-align: center; margin: -.6rem 0 .8rem; }
.ecr-table td.num, .ecr-table th.num { white-space: nowrap; }
.ecr-table tr.ecr-first td { border-top: 2px solid var(--rule-strong); }
.ecr-barcell { position: relative; min-width: 9rem; }
.ecr-bar { position: absolute; left: 0; top: 20%; bottom: 20%; background: var(--azure-tint); border-right: 2px solid var(--cerulean); z-index: 0; }
.ecr-v { position: relative; z-index: 1; }
.ecr-note { margin-top: .6rem; }
.ecr-save { margin-top: 1rem; align-items: flex-end; }
.eng-rep-custom { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.ecr-card { border-color: var(--cerulean) !important; background: var(--azure-tint) !important; }
.ecr-jump { display: none; }
@media (max-width: 900px) { .ecr-layout { grid-template-columns: minmax(0, 1fr); } .ecr-jump { display: block; text-align: center; margin-bottom: .8rem; } .ecr-list { max-height: 220px; } }
@media print { .ecr-bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

/* 2.57 manufacturing */
.pill-released, .pill-submitted, .pill-pending, .pill-conditional, .pill-repair { background: var(--amber-tint); color: var(--amber); border-color: #efd9ad; }
.pill-accepted, .pill-done { background: var(--green-tint); color: var(--green-dark); border-color: #b5e3c9; }
.pill-rejected, .pill-hold, .pill-rework { background: var(--red-tint); color: var(--red); border-color: #ebc9c8; }
.pill-cancelled, .pill-archived, .pill-retired, .pill-idle { background: #eef0f3; color: #6b7385; border-color: #dfe2e8; }
.tabs-nav.sub { margin-top: -.4rem; }
.tabs-nav.sub a { padding: .4rem .75rem; font-size: .9rem; }
.mf-bars { display: flex; align-items: flex-end; gap: .25rem; height: 150px; }
.mf-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.mf-bars i { display: block; width: 100%; max-width: 26px; background: var(--green); border-radius: 3px 3px 0 0; min-height: 1px; }
.mf-bars small { font-size: .7rem; color: var(--ink-soft); margin-top: .2rem; }
.mf-prog { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--rule); vertical-align: middle; overflow: hidden; }
.mf-prog i { display: block; height: 100%; background: var(--green); }
.mf-inline { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.mf-inline input[type=text] { flex: 1 1 8rem; }
.mf-trace label { display: block; margin-bottom: .35rem; }
.mf-waste { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem .8rem; }
.mf-waste label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .9rem; }
.mf-waste input { width: 6rem; }
.mf-note { background: var(--azure-tint, #eef6fb); border-top: 1px solid var(--rule); font-size: .9rem; }
.mf-finish summary { list-style: none; cursor: pointer; display: inline-block; }
.mf-finish summary::-webkit-details-marker { display: none; }
.mf-finish[open] { padding: .6rem; border: 1px solid var(--rule); border-radius: var(--radius); margin-top: .4rem; background: var(--sheet); }
.mf-ncr-edit { display: grid; gap: .25rem; }
.mf-ncr-edit textarea { min-height: 2rem; }
.mf-stmt { max-width: 760px; }
.mf-stmt tr.head th { text-align: left; padding-top: .8rem; }
.mf-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.mf-sign > div { display: flex; flex-direction: column; gap: .2rem; }
.mf-sign span { font-size: .8rem; color: var(--ink-soft); }
.mf-sign img { max-height: 54px; max-width: 200px; object-fit: contain; }
.mf-sign i { display: block; height: 40px; border-bottom: 1px solid var(--ink-soft); }
.kv th { width: 34%; font-weight: 500; color: var(--ink-soft); }
@media (max-width: 700px) {
  table.mf-cards thead { display: none; }
  table.mf-cards, table.mf-cards tbody, table.mf-cards tr, table.mf-cards td { display: block; width: 100%; }
  table.mf-cards tr { border: 1px solid var(--rule); border-radius: var(--radius); margin: 0 0 .6rem; padding: .45rem .6rem; }
  table.mf-cards td { border: 0; padding: .15rem 0; text-align: left !important; }
  table.mf-cards td[data-label]:not([data-label=""])::before { content: attr(data-label) ': '; color: var(--ink-soft); font-size: .75rem; }
  .mf-sign { grid-template-columns: 1fr; }
  .mf-waste { grid-template-columns: 1fr; }
}
@media print { .mf-bars i, .mf-prog i { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

/* 2.60 attachments & evidence */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; padding: .8rem 1rem; }
.att-img { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--sheet); display: flex; flex-direction: column; }
.att-img img { display: block; width: 100%; height: 130px; object-fit: cover; background: #eef0f3; }
.att-img figcaption { padding: .4rem .5rem; display: flex; flex-direction: column; gap: .1rem; font-size: .85rem; }
.att-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .5rem .8rem; align-items: end; border-top: 1px solid var(--rule); }
.att-form .att-file { grid-column: 1 / -1; }
.att-edit summary { list-style: none; display: inline-block; cursor: pointer; }
.att-edit summary::-webkit-details-marker { display: none; }
.att-edit[open] form { display: grid; gap: .3rem; margin-top: .35rem; text-align: left; min-width: 0; }
.att-edit input { width: 100%; min-width: 0; box-sizing: border-box; }
td .att-edit[open] form { min-width: 220px; }
.att-form .btn { justify-self: start; }
.att-edit-btns { display: flex; gap: .3rem; }
@media print { .att-form, .att-edit { display: none; } .att-img img { height: 110px; } }

/* 2.61 – construction planning, Gantt, documents, alerts */
.cp-scurve { width: 100%; height: auto; max-height: 320px; font-size: 11px; fill: var(--ink-soft); }
.cp-scurve .grid { stroke: var(--rule); stroke-width: 1; }
.cp-scurve polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.cp-scurve .pv { stroke: #8a94a6; stroke-dasharray: 6 4; }
.cp-scurve .ev { stroke: var(--green); }
.cp-key { display: inline-block; width: 18px; height: 0; border-top: 3px solid; vertical-align: middle; margin: 0 .2rem 0 .6rem; }
.cp-key.cp-pv { border-color: #8a94a6; border-top-style: dashed; }
.cp-key.cp-ev { border-color: var(--green); }
.cp-sched input[type=date] { width: 9.5rem; }
.cp-peak { font-weight: 700; color: var(--amber); }
tr.group-row td { background: var(--paper-2, #f4f6f5); }
.dl-grid { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: .45rem 1rem; margin: 0; }
.dl-grid dt { color: var(--ink-soft); }
.dl-grid dd { margin: 0; }
.cp-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .35rem 1rem; margin-top: .5rem; }
.cp-checks label.check, .form-actions label.check { display: flex; gap: .45rem; align-items: baseline; font-weight: 400; }
.cp-review { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.cp-review input { min-width: 0; flex: 1 1 8rem; }
.sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.cp-dot { width: 18px; }
.cp-lvl { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--blue, #2a6fb0); }
.cp-lvl.cp-bad { background: var(--red); } .cp-lvl.cp-due { background: #e0a100; }
.flash-danger { background: var(--red-tint); border-color: #e6c3c2; color: #7d2a28; }
/* Gantt */
.cp-gantt-wrap { overflow-x: auto; }
.cp-gantt { --namew: 260px; position: relative; min-width: calc(var(--namew) + var(--n) * 34px); font-size: .82rem; }
.cp-g-head, .cp-g-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--rule); }
.cp-g-name { flex: 0 0 var(--namew); padding: .35rem .6rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-right: 1px solid var(--rule); background: var(--card, #fff); position: sticky; left: 0; z-index: 1; }
.cp-g-time { flex: 1 1 auto; position: relative; display: flex; min-height: 28px; }
.cp-g-head .cp-g-time span { flex: 0 0 auto; text-align: center; color: var(--ink-soft); font-size: .72rem; padding: .35rem 0; border-left: 1px solid var(--rule); overflow: hidden; }
.cp-g-head { background: var(--paper-2, #f4f6f5); font-weight: 600; }
.cp-g-bar { position: absolute; top: 7px; height: 14px; border-radius: 3px; background: #a9c8b6; overflow: hidden; }
.cp-g-bar b { display: block; height: 100%; background: var(--green); }
.cp-g-row.crit .cp-g-bar { background: #e9b3b1; } .cp-g-row.crit .cp-g-bar b { background: var(--red); }
.cp-g-row.done .cp-g-bar { opacity: .55; }
.cp-g-row.late .cp-g-name a { color: var(--red); }
.cp-g-ms { position: absolute; top: 7px; width: 12px; height: 12px; margin-left: -6px; background: var(--amber); transform: rotate(45deg); }
.cp-g-ms.ok { background: var(--green); }
.cp-g-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--red); opacity: .6; pointer-events: none; z-index: 2; }
@media (max-width: 700px) { .cp-gantt { --namew: 140px; } .dl-grid { grid-template-columns: max-content 1fr; } .sign-row { grid-template-columns: 1fr; } }
@media print { .cp-gantt-wrap { overflow: visible; } .cp-g-name { position: static; } }
.cp-inputs input, .cp-inputs select { border: 1px solid var(--rule); border-radius: 6px; padding: .35rem .45rem; font: inherit; background: var(--card, #fff); color: inherit; box-sizing: border-box; }
.cp-inputs td { vertical-align: middle; }

/* 2.63 – work tasks board and branded sign-in */
.wb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.wb-table th:first-child { width: 100%; }
.wb-label { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.wb-label:hover span { text-decoration: underline; }
.wb-ic { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--ink-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wb-n { font-weight: 600; color: var(--blue, #1f5f99); }
.wb-late { color: var(--red); font-weight: 700; }
.wb-late i { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: .15rem; border-radius: 3px; background: #e0802b; color: #fff; font-style: normal; font-size: .7rem; clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 3px; box-sizing: border-box; }
.wb-ok { color: var(--green); font-weight: 600; }
@media (max-width: 900px) { .wb-grid { grid-template-columns: 1fr; } }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.login-logo img { max-width: 200px; max-height: 96px; object-fit: contain; }
.login-logo strong { font-size: 1.15rem; color: var(--ink); }
.login-logo small { color: var(--ink-soft); }
.login-as { position: relative; margin: .2rem 0 .1rem; }
.login-as label { display: block; text-align: center; color: var(--ink-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; }
.login-form .login-as select { appearance: none; -webkit-appearance: none; text-align: center; text-align-last: center; font-size: 1.35rem; font-weight: 700; color: var(--ink);
  border: 1px solid transparent; border-radius: 10px; background: var(--paper-2, #f2f5f4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23567' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding: .5rem 2.4rem; cursor: pointer; }
.login-form .login-as select:focus { border-color: var(--green); outline: none; }
.login-switch { text-align: center; font-size: .82rem; }

/* 2.65 access by menu */
.acc-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--rule); }
.acc-search { flex: 1 1 14rem; max-width: 22rem; }
.acc-legend { font-size: .85rem; color: var(--muted, #667); margin-left: auto; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .7rem; padding: 1rem 1.1rem; align-items: start; }
.acc-group { border: 1px solid var(--rule); border-radius: 10px; background: var(--panel, #fff); }
.acc-group[open] { box-shadow: 0 2px 10px rgba(0, 30, 60, .06); }
.acc-group summary { display: flex; align-items: center; gap: .5rem; padding: .65rem .8rem; cursor: pointer; list-style: none; }
.acc-group summary::-webkit-details-marker { display: none; }
.acc-group summary::after { content: '▸'; margin-left: .3rem; color: var(--muted, #889); transition: transform .15s; }
.acc-group[open] summary::after { transform: rotate(90deg); }
.acc-gl { display: flex; align-items: center; gap: .5rem; flex: 0 1 auto; min-width: 0; }
.acc-gl strong { font-size: .86rem; letter-spacing: .03em; text-transform: uppercase; }
.acc-count { margin-left: auto; font-size: .8rem; color: var(--muted, #778); background: var(--bg, #f1f5f9); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
.acc-body { padding: .2rem .8rem .7rem; border-top: 1px solid var(--rule); max-height: 26rem; overflow: auto; }
.acc-sub + .acc-sub { border-top: 1px dashed var(--rule); }
.acc-sub { padding: .3rem 0; }
.acc-sl { display: flex; gap: .5rem; align-items: center; font-weight: 600; padding: .25rem 0; }
.acc-pl { display: flex; gap: .5rem; align-items: center; padding: .18rem 0; font-size: .92rem; }
.acc-pl.acc-in { padding-left: 1.45rem; }
.acc-plus { font-size: .72rem; font-weight: 600; color: #0a7a3d; background: #e3f6ea; border-radius: 4px; padding: 0 .35rem; margin-left: auto; white-space: nowrap; }
.acc-tree input[type=checkbox] { width: 1.05rem; height: 1.05rem; flex: none; }
@media (max-width: 640px) { .acc-grid { grid-template-columns: 1fr; padding: .8rem; } .acc-legend { margin-left: 0; } }
/* 2.65 SHE forms table */
.she-table td small { line-height: 1.35; }
.she-table .she-act { text-align: right; width: 1%; }
.she-table .btn + .btn { margin-left: .3rem; }
/* 2.66 ledgers: debit / credit totals of the period */
.table tfoot tr.ledger-tot td { font-weight: 700; color: var(--ink, #10243a); border-top: 1px solid var(--rule); }

/* 2.68 staff profile & CV */
.prof-card { display: flex; gap: 1.1rem; align-items: center; padding: 1rem 1.2rem; flex-wrap: wrap; }
.prof-photo { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; flex: none; background: #e6eef6; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 30, 60, .15); }
.prof-photo img { width: 100%; height: 100%; object-fit: cover; }
.prof-photo span { font-size: 2.2rem; font-weight: 700; color: #3a5a7a; }
.prof-main { flex: 1 1 16rem; min-width: 0; }
.prof-main h2 { margin: 0; font-size: 1.3rem; }
.prof-main p { margin: .15rem 0 .5rem; }
.prof-bar { height: 8px; background: #e6eef6; border-radius: 999px; overflow: hidden; max-width: 22rem; margin-bottom: .25rem; }
.prof-bar span { display: block; height: 100%; background: linear-gradient(90deg, #1f9d55, #2bb673); }
.prof-upload { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.emp-photo-sm { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: .6rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 30, 60, .2); }
.cv { max-width: 820px; margin: 0 auto; color: #14263a; font-size: .95rem; line-height: 1.45; }
.cv-head { display: flex; gap: 1.2rem; align-items: center; border-bottom: 3px solid #0d5c8c; padding-bottom: .9rem; margin-bottom: .9rem; }
.cv-photo { width: 110px; height: 130px; object-fit: cover; border-radius: 6px; flex: none; }
.cv-initials { background: #e6eef6; display: grid; place-items: center; font-size: 2.4rem; font-weight: 700; color: #3a5a7a; }
.cv h1 { margin: 0; font-size: 1.7rem; letter-spacing: .01em; }
.cv-role { margin: .2rem 0; font-weight: 600; color: #0d5c8c; }
.cv-contact { margin: 0; color: #4a5f74; font-size: .88rem; }
.cv section { margin: 0 0 1rem; break-inside: avoid-page; }
.cv h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: #0d5c8c; border-bottom: 1px solid #c9d7e4; padding-bottom: .2rem; margin: 0 0 .5rem; }
.cv-info { border-collapse: collapse; width: 100%; }
.cv-info th { text-align: left; font-weight: 600; width: 34%; padding: .15rem .5rem .15rem 0; color: #4a5f74; vertical-align: top; }
.cv-info td { padding: .15rem 0; }
.cv-item { display: grid; grid-template-columns: 9rem 1fr; gap: .8rem; padding: .35rem 0; border-bottom: 1px dashed #e1e8ef; break-inside: avoid; }
.cv-item:last-child { border-bottom: 0; }
.cv-when { color: #4a5f74; font-size: .88rem; white-space: nowrap; }
.cv-item ul { margin: .25rem 0 0 1.1rem; padding: 0; }
.cv-skills { columns: 2; margin: 0 0 .4rem 1.1rem; padding: 0; }
.cv-refs p { margin: 0 0 .3rem; }
.cv-foot { margin-top: 1.2rem; font-size: .75rem; color: #8a9aab; text-align: center; }
.cv-preview { background: #fff; }
@media (max-width: 640px) { .cv-head { flex-direction: column; align-items: flex-start; } .cv-item { grid-template-columns: 1fr; gap: .1rem; } .cv-skills { columns: 1; } }
.certs { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.cert-chip { font-size: .8rem; background: #eef4fa; border: 1px solid #d3e1ee; border-radius: 999px; padding: .1rem .55rem; text-decoration: none; }
.cert-up { display: inline; margin: 0; }

/* 2.69 factory: simple forms */
.mf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; margin: 0 0 1rem; }
.mf-tile { display: flex; gap: .75rem; align-items: center; padding: .85rem 1rem; background: var(--panel, #fff); border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.mf-tile:hover { box-shadow: 0 4px 14px rgba(0, 40, 80, .12); transform: translateY(-1px); }
.mf-tile-ic { width: 42px; height: 42px; border-radius: 10px; background: #e7f4ec; color: #157347; display: grid; place-items: center; flex: none; }
.mf-tile-ic svg { width: 22px; height: 22px; }
.mf-tile strong { display: block; font-size: .98rem; }
.mf-tile small { display: block; color: var(--muted, #667); font-size: .8rem; line-height: 1.3; }
.mf-step { border-left: 4px solid #1f9d55; }
.mf-num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #1f9d55; color: #fff; font-size: .85rem; margin-right: .35rem; vertical-align: middle; }
.mf-find { min-width: 16rem; margin: 0; }
.mf-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; padding: 1rem; }
.mf-ocard { display: flex; flex-direction: column; gap: .2rem; padding: .8rem .9rem; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: inherit; background: #fbfdff; }
.mf-ocard:hover { border-color: #1f9d55; box-shadow: 0 2px 10px rgba(31, 157, 85, .15); }
.mf-ocard-no { font-weight: 700; color: #0d5c8c; display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.mf-bar { height: 6px; background: #e6eef6; border-radius: 999px; overflow: hidden; margin-top: .3rem; }
.mf-bar span { display: block; height: 100%; background: #1f9d55; }
.mf-more { border-top: 1px dashed var(--rule); }
.mf-more > summary { cursor: pointer; font-weight: 600; color: #0d5c8c; padding: .2rem 0 .6rem; }
.mf-all > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.mf-all > summary::-webkit-details-marker { display: none; }
.mf-all > summary h3::after { content: ' ▸'; color: var(--muted, #889); }
.mf-all[open] > summary h3::after { content: ' ▾'; }
@media (max-width: 640px) { .mf-tiles { grid-template-columns: 1fr 1fr; } .mf-tile { flex-direction: column; align-items: flex-start; } .mf-cards-grid { padding: .7rem; } }
.mf-all > summary h3 { margin-right: auto; }

/* 2.70 debtors & creditors reconciliation */
.rec-verdict { padding: .6rem .9rem; border-radius: 8px; margin: .6rem 0 1rem; font-weight: 600; }
.rec-ok { background: #e3f6ea; color: #0a6b35; }
.rec-bad { background: #fdecea; color: #a1281c; }
.rec-h { margin: 1.4rem 0 .4rem; font-size: 1rem; }
.rec-st td { vertical-align: top; }
.rec-grp td { background: #f3f7fb; padding-top: .5rem; }
.rec-item { padding-left: 1.4rem !important; }
.rec-diff td { color: #a1281c; }
.rec-zero td { color: #0a6b35; }
.rec-split { align-items: start; }
.bulk-hint { margin: .2rem 0 .5rem; font-size: .85rem; }
.bank-redirect { display: inline-block; vertical-align: top; }
.bank-redirect[open] { display: block; margin-top: .3rem; padding: .4rem; border: 1px solid var(--rule); border-radius: 8px; background: #f7fafc; min-width: 16rem; }
.bank-redirect > summary { list-style: none; display: inline-block; }
.bank-redirect > summary::-webkit-details-marker { display: none; }
.bank-redirect .lookup { margin: .3rem 0; }

/* 2.73 – menus as boxes */
.nav-main { margin-top: .2rem; }
.nav .nav-main-link { padding: .5rem .6rem; font-size: .78rem; letter-spacing: .04em; color: #bfe0ef; font-weight: 700; text-transform: uppercase; }
.nav .nav-main-link::after { content: '›'; margin-left: auto; font-size: .95rem; opacity: .6; }
.nav-main.on > .nav-main-link { color: #fff; background: rgba(255,255,255,.06); }
.nav .nav-sec { margin-left: .6rem; padding: .34rem .6rem; font-size: .9rem; border-left: 2px solid rgba(255,255,255,.12); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.nav-mode { margin: 1rem .6rem 0; }
.nav-mode button { background: none; border: 1px solid rgba(255,255,255,.18); color: #bfe0ef; border-radius: var(--radius-sm); padding: .3rem .55rem; font: inherit; font-size: .78rem; cursor: pointer; width: 100%; }
.nav-mode button:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.mb-crumb { margin: 0 0 .2rem; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.mb-crumb a { color: var(--ink-soft); }
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin-bottom: 1.2rem; }
.mb-tile { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 76px; padding: .85rem 1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px;
  color: var(--ink); font-weight: 600; line-height: 1.3; box-shadow: 0 1px 2px rgba(11,42,61,.05); transition: border-color .12s, box-shadow .12s, transform .12s; }
.mb-tile:hover { text-decoration: none; border-color: var(--cerulean); box-shadow: 0 4px 14px rgba(0,123,167,.14); transform: translateY(-1px); }
.mb-ic { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--azure-tint); color: var(--cerulean-dark); }
.mb-ic .wb-ic { width: 22px; height: 22px; flex-basis: 22px; stroke: currentColor; }
.mb-l { display: flex; flex-direction: column; }
.mb-l small { font-weight: 400; color: var(--ink-soft); font-size: .8rem; margin-top: .15rem; }
.mb-sec .mb-ic { background: var(--green-tint); color: var(--green-dark); }
.mb-sec { min-height: 86px; }
.mb-tile .nav-badge { position: absolute; top: .45rem; right: .5rem; }
.mb-h { margin: .4rem 0 .6rem; font-size: .95rem; color: var(--ink-2); }
.mb-other { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.mb-other .chip { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--sheet); color: var(--ink-2); font-size: .88rem; }
.mb-other .chip:hover { border-color: var(--cerulean); text-decoration: none; }
@media (max-width: 600px) { .mb-grid { grid-template-columns: 1fr 1fr; gap: .55rem; } .mb-ic { flex: none; width: 38px; height: 38px; } .mb-tile { flex-direction: column; align-items: flex-start; gap: .45rem; min-height: 0; padding: .75rem; font-size: .92rem; } }

/* 2.74 – colours of the main menus, short lines, waiting counts, find a page */
.tone-slate { --tone: #475569; --tone-bg: #eef1f5; } .tone-cerulean { --tone: #005f84; --tone-bg: #e3f1f8; } .tone-indigo { --tone: #4338ca; --tone-bg: #ebeafd; }
.tone-teal { --tone: #0f766e; --tone-bg: #e0f4f1; } .tone-rose { --tone: #be185d; --tone-bg: #fce8f1; } .tone-red { --tone: #b0413e; --tone-bg: #f8e9e8; }
.tone-amber { --tone: #a86d0e; --tone-bg: #fbf1de; } .tone-violet { --tone: #6d28d9; --tone-bg: #f0e9fd; } .tone-grey { --tone: #57534e; --tone-bg: #efeeec; }
.tone-blue { --tone: #1d4ed8; --tone-bg: #e5edff; } .tone-green { --tone: #15803d; --tone-bg: #e4f5e9; } .tone-orange { --tone: #c2410c; --tone-bg: #fdece2; }
.tone-gold { --tone: #92650a; --tone-bg: #fbf3d6; } .tone-brown { --tone: #8a4b1f; --tone-bg: #f6ebe1; } .tone-purple { --tone: #7e22ce; --tone-bg: #f3e8fd; } .tone-mint { --tone: #047857; --tone-bg: #dff5ec; }
.mb-tile[class*="tone-"] .mb-ic { background: var(--tone-bg); color: var(--tone); }
.mb-tile[class*="tone-"] { border-top: 3px solid var(--tone); }
.mb-tile[class*="tone-"]:hover { border-color: var(--tone); }
.mb-head[class*="tone-"] h1 { color: var(--tone); }
.mb-head[class*="tone-"] .mb-crumb a { color: var(--tone); font-weight: 600; }
.mb-tile { align-items: flex-start; }
.mb-l > span { line-height: 1.25; }
.mb-l small { font-weight: 400; line-height: 1.3; }
.mb-l small.mb-g { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--tone, var(--ink-soft)); margin-top: .3rem; }
.mb-wait { display: inline-block; align-self: flex-start; margin-top: .4rem; padding: .05rem .5rem; border-radius: 999px; background: var(--amber-tint); color: var(--amber); font-style: normal; font-size: .75rem; font-weight: 700; }
.mb-finder { margin: 0 0 1rem; }
.mb-finder input.mb-search { width: 100%; max-width: 560px; padding: .7rem .9rem .7rem 2.3rem; font: inherit; font-size: 1rem; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--sheet) no-repeat .85rem 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23557085' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E"); }
.mb-finder input.mb-search:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--azure-tint); }
.mb-found { margin-top: .9rem; }
.mb-most { margin-bottom: 1.2rem; }
.mb-tile[hidden], [data-finder-hide][hidden] { display: none !important; }
.mb-l small.mb-prev { color: var(--ink-2); }
.mb-l small + small { margin-top: .2rem; }

/* 2.75 – pictures on the main menus; boxes in the system colours: green and deep blue-green */
:root { --lp-g1: #16a34a; --lp-g2: #0d6e5f; --lp-g3: #0a4f55; --lp-gt: #e2f4ec; }
.nav-ic { flex: 0 0 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 7px; background: linear-gradient(135deg, rgba(34,197,94,.30), rgba(13,110,95,.45)); color: #d9fbe9; }
.nav-ic .wb-ic { width: 16px; height: 16px; flex-basis: 16px; stroke: currentColor; stroke-width: 2; }
.nav-gl { flex: 1 1 auto; min-width: 0; }
.nav .nav-main-link, .nav-group > summary { gap: .55rem; }
.nav-main.on > .nav-main-link .nav-ic, .nav-group[open] > summary .nav-ic, .nav .nav-main-link.active .nav-ic { background: linear-gradient(135deg, var(--lp-g1), var(--lp-g2)); color: #fff; }
.nav .nav-sec { margin-left: 1.55rem; }
.mb-tile[class*="tone-"] { border-top: 0; }
.mb-tile { border: 1px solid var(--rule); box-shadow: inset 0 3px 0 var(--lp-g1), 0 1px 2px rgba(11,42,61,.05); }
.mb-tile:hover, .mb-tile[class*="tone-"]:hover { border-color: var(--lp-g2); box-shadow: inset 0 3px 0 var(--lp-g2), 0 6px 16px rgba(13,110,95,.16); }
.mb-tile .mb-ic, .mb-tile[class*="tone-"] .mb-ic { background: linear-gradient(135deg, var(--lp-g1), var(--lp-g3)); color: #fff; }
.mb-sec .mb-ic, .mb-tile.mb-sec[class*="tone-"] .mb-ic { background: var(--lp-gt); color: var(--lp-g2); box-shadow: inset 0 0 0 1px rgba(13,110,95,.18); }
.mb-tile.mb-sec { box-shadow: inset 0 3px 0 var(--lp-g3), 0 1px 2px rgba(11,42,61,.05); }
.mb-l small.mb-g { color: var(--lp-g2); }
.mb-head[class*="tone-"] h1, .mb-title { color: var(--lp-g3); display: flex; align-items: center; gap: .6rem; }
.mb-head[class*="tone-"] .mb-crumb a { color: var(--lp-g2); }
.mb-title-ic { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--lp-g1), var(--lp-g3)); color: #fff; }
.mb-title-ic .wb-ic { width: 24px; height: 24px; flex-basis: 24px; stroke: currentColor; }
.mb-finder input.mb-search:focus { border-color: var(--lp-g2); box-shadow: 0 0 0 3px var(--lp-gt); }
.mb-other .chip:hover { border-color: var(--lp-g2); color: var(--lp-g3); }
/* 2.75 – box names in the same blue as the report names on All reports */
.mb-tile .mb-l > span:first-child { color: var(--ux-link, var(--cerulean)); }
.mb-tile:hover .mb-l > span:first-child { color: var(--ux-link-dark, var(--cerulean-dark)); text-decoration: underline; text-underline-offset: 3px; }
.mb-head[class*="tone-"] h1, .mb-title, .mb-h { color: var(--ux-link, var(--cerulean)); }
.mb-head[class*="tone-"] .mb-crumb a { color: var(--ux-link, var(--cerulean)); }

/* 2.77 – each person's own look (My profile) */
.ux-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.ux-row { border: 0; padding: 0; margin: 0 0 1rem; }
.ux-row legend { font-weight: 600; padding: 0; }
.ux-sw { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.ux-pick { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem .3rem .45rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); cursor: pointer; font-size: .88rem; }
.ux-pick:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-tint); font-weight: 600; }
.ux-pick input[type=radio] { margin: 0; accent-color: var(--green); }
.ux-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.ux-pick input[type=color] { width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.ux-preview { border: 1px dashed var(--rule-strong); border-radius: 10px; padding: 1rem; background: var(--paper); position: sticky; top: 1rem; }
.ux-preview h2 { margin-top: .3rem; }
.ux-preview .mb-tile { pointer-events: none; }
@media (max-width: 800px) { .ux-grid { grid-template-columns: 1fr; } .ux-preview { position: static; } }

/* 2.77 – whole look chosen by the person: calm light, plain grey, night (dark), high contrast */
.ux-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-top: .45rem; }
.ux-theme { display: flex; flex-direction: column; gap: .2rem; padding: .55rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); cursor: pointer; position: relative; }
.ux-theme input { position: absolute; top: .55rem; right: .55rem; margin: 0; accent-color: var(--green); }
.ux-theme:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-tint); }
.ux-theme small { color: var(--ink-soft); font-size: .78rem; line-height: 1.25; }
.ux-mini { display: grid; grid-template-columns: 28% 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 52px; padding: 4px; border-radius: 6px; margin-bottom: .2rem; }
.ux-mini i { grid-row: 1 / 3; border-radius: 3px; } .ux-mini b { border-radius: 3px; }
.ux-mini-standard { background: #f2f7fa; } .ux-mini-standard i { background: linear-gradient(#063d57, #0a6a5a); } .ux-mini-standard b { background: #fff; box-shadow: inset 0 2px 0 #16a34a; }
.ux-mini-calm { background: #f5f7f6; } .ux-mini-calm i { background: #e7eeeb; } .ux-mini-calm b { background: #fff; box-shadow: inset 0 2px 0 #9cc9b6; }
.ux-mini-plain { background: #f3f4f6; } .ux-mini-plain i { background: #3f4448; } .ux-mini-plain b { background: #fff; box-shadow: inset 0 2px 0 #9ca3af; }
.ux-mini-dark { background: #12171a; } .ux-mini-dark i { background: #0b0f11; } .ux-mini-dark b { background: #1d252a; box-shadow: inset 0 2px 0 #2f8f74; }
.ux-mini-contrast { background: #fff; border: 1px solid #000; } .ux-mini-contrast i { background: #000; } .ux-mini-contrast b { background: #fff; border: 1.5px solid #000; }
.ux-note { margin: -.4rem 0 .8rem; font-size: .85rem; }

/* calm light */
html.ux-calm { --paper: #f6f8f7; --rule: #dfe7e3; --lp-g1: #6fb592; --lp-g2: #4d8f78; --lp-g3: #3f7d72; --lp-gt: #edf5f1; }
html.ux-calm .sidebar { background: #eef3f1; color: #2b3d38; border-right: 1px solid #dfe7e3; }
html.ux-calm .brand { color: #1f3a33; }
html.ux-calm .nav a, html.ux-calm .nav summary, html.ux-calm .nav .nav-main-link, html.ux-calm .nav-group > summary, html.ux-calm .nav-sub > summary { color: #2b3d38; }
html.ux-calm .nav a:hover, html.ux-calm .nav summary:hover { background: #e1ebe6; color: #13312a; }
html.ux-calm .nav a.active { background: #d7eadf; color: #13312a; box-shadow: inset 3px 0 0 #4d8f78; }
html.ux-calm .nav-main.on > .nav-main-link, html.ux-calm .nav-group[open] > summary { background: #e1ebe6; color: #13312a; }
html.ux-calm .nav-ic { background: #dbe8e2; color: #3f7d72; }
html.ux-calm .nav .nav-sec { border-left-color: #cfdcd6; }
html.ux-calm .nav-mode button { color: #3f5a52; border-color: #cbd8d2; }
html.ux-calm .topbar { background: var(--sheet); }
html.ux-calm .mb-tile .mb-ic { background: var(--lp-gt); color: var(--lp-g3); }

/* plain grey */
html.ux-plain { --paper: #f4f5f6; --rule: #e1e3e6; --lp-g1: #9ca3af; --lp-g2: #6b7280; --lp-g3: #4b5563; --lp-gt: #f0f1f3; --green: #4b5563; --green-dark: #374151; --green-tint: #eceef1; }
html.ux-plain .sidebar { background: #3a3f44; color: #e5e7eb; }
html.ux-plain .nav a.active { background: rgba(255,255,255,.14); box-shadow: inset 3px 0 0 #d1d5db; }
html.ux-plain .nav-ic, html.ux-plain .nav-main.on > .nav-main-link .nav-ic, html.ux-plain .nav-group[open] > summary .nav-ic, html.ux-plain .nav .nav-main-link.active .nav-ic { background: rgba(255,255,255,.12); color: #f3f4f6; }
html.ux-plain .topbar { background: var(--sheet); }
html.ux-plain .mb-tile .mb-ic { background: #eceef1; color: #374151; }
html.ux-plain .mb-title-ic { background: #4b5563; }

/* night (dark) */
html.ux-dark { color-scheme: dark; --paper: #12171a; --sheet: #1b2226; --rule: #2d373c; --rule-strong: #415056; --ink: #e2e8ea; --ink-2: #c9d3d6; --ink-soft: #97a7ad;
  --ux-link: #6fc6e8; --ux-link-dark: #9ad8f0; --ux-head: #eef3f4; --cerulean: #5bb8dc; --azure-tint: #1d3340; --green-tint: #173a2b; --amber-tint: #3b2f14; --red-tint: #3d1f1e; --blue-tint: #1d3340;
  --lp-gt: #1d3a32; }
html.ux-dark body { background: var(--paper); }
html.ux-dark .sidebar { background: #0c1113; color: #c9d5d8; border-right: 1px solid #1f282c; }
html.ux-dark .topbar { background: var(--sheet); }
html.ux-dark input[type=text], html.ux-dark input[type=email], html.ux-dark input[type=password], html.ux-dark input[type=date], html.ux-dark input[type=number], html.ux-dark input[type=search],
html.ux-dark select, html.ux-dark textarea, html.ux-dark .sheet input, html.ux-dark .sheet select { background-color: #141b1e; color: var(--ink); border-color: var(--rule-strong); }
html.ux-dark .table thead th { background: #20292d; }
html.ux-dark .btn { background: #232c31; color: var(--ink); border-color: var(--rule-strong); }
html.ux-dark .btn-primary { background: #1f7a52; border-color: #1f7a52; color: #fff; }
html.ux-dark .company-btn, html.ux-dark .year-switch .company-btn { background: #232c31; color: var(--ink); }
html.ux-dark .mb-tile .mb-ic { background: linear-gradient(135deg, #1f7a52, #155e63); }
html.ux-dark .mb-sec .mb-ic { background: #1d3a32; color: #8fd8b8; }
html.ux-dark .print-page, html.ux-dark .signoff-box, html.ux-dark .sig-current, html.ux-dark .cv-preview { background: #fff; color: #0b2a3d; }
html.ux-dark .flash { filter: brightness(.85); }

/* high contrast */
html.ux-contrast { --paper: #ffffff; --sheet: #ffffff; --rule: #000000; --rule-strong: #000000; --ink: #000000; --ink-2: #000000; --ink-soft: #222222; --ux-link: #0000c8; --ux-link-dark: #00007a; --ux-head: #000000; --cerulean: #0000c8; }
html.ux-contrast .sidebar { background: #000; color: #fff; }
html.ux-contrast .nav a, html.ux-contrast .nav summary, html.ux-contrast .nav .nav-main-link { color: #fff; }
html.ux-contrast .nav a.active { background: #fff; color: #000; box-shadow: none; }
html.ux-contrast .nav-ic, html.ux-contrast .nav-main.on > .nav-main-link .nav-ic { background: #fff; color: #000; }
html.ux-contrast a { text-decoration: underline; }
html.ux-contrast .nav a, html.ux-contrast .btn, html.ux-contrast .mb-tile { text-decoration: none; }
html.ux-contrast .mb-tile { border: 2px solid #000; box-shadow: none; }
html.ux-contrast .mb-tile .mb-ic, html.ux-contrast .mb-title-ic { background: #000; color: #fff; }
html.ux-contrast .muted, html.ux-contrast .mb-l small { color: #222; }
html.ux-dark .panel-head h3, html.ux-dark .panel-head h2 { color: var(--ux-head); }
html.ux-dark .form-actions, html.ux-dark .sheet thead th { background: #20292d; }
html.ux-dark .sheet thead th { border-bottom-color: var(--rule-strong); }
html.ux-dark .sheet td { border-bottom-color: var(--rule); }
html.ux-dark .sheet tbody tr:nth-child(even) td { background: #182024; }
html.ux-dark .sheet tbody tr:focus-within td { background: #1c3029; }
html.ux-dark .cmp-bad { background: #3d1f1e; color: #f4b9b5; } html.ux-dark .cmp-due { background: #3b2f14; color: #f1d08a; }
html.ux-dark .cmp-ok { background: #173a2b; color: #9fe0bf; } html.ux-dark .cmp-info { background: #1d3340; color: #9cc8f0; }
html.ux-dark .year-banner, html.ux-dark .dup-warning { background: #3b2f14; color: #f1d08a; }
html.ux-dark .mb-finder input.mb-search { background-color: #141b1e; }

/* 2.78 – chart of accounts in panels by classification (like All reports) */
.coa-type { margin-bottom: 1.2rem; }
.coa-type-h { font-size: 1.05rem; margin: .4rem 0 .6rem; color: var(--ux-head, var(--ink)); }
.coa-list .coa-a { display: flex; align-items: baseline; gap: .6rem; padding: .32rem 0; }
.coa-list .coa-n { flex: 1 1 auto; min-width: 0; }
.coa-list .coa-c { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: .88rem; }
.coa-list .coa-b { flex: 0 0 auto; color: var(--ink-2); font-size: .85rem; font-variant-numeric: tabular-nums; }
.coa-list .coa-off { opacity: .6; }
.coa-list .coa-hd { display: block; padding: .32rem 0; font-weight: 600; }
.coa-list h3 small { font-weight: 400; }
.coa-type[hidden] { display: none !important; }
.coa-foot { margin-top: .4rem; }

/* 2.79 – own groups of accounts */
.coa-own { border-top: 3px solid var(--lp-g2, #0d6e5f); }
.coa-own-tag { display: inline-block; margin-left: .35rem; padding: 0 .45rem; border-radius: 999px; background: var(--green-tint); color: var(--green-dark); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.coa-own-edit { float: right; font-size: .82rem; font-weight: 400; }
.grp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .15rem 1rem; }
.grp-acc { display: flex; gap: .5rem; align-items: baseline; padding: .3rem .2rem; border-radius: 4px; cursor: pointer; }
.grp-acc:hover { background: var(--paper); }
.grp-acc input { margin: 0; }
.grp-acc:has(input:checked) { background: var(--green-tint); }

/* 2.80 – electrical line works on the daily site report */
.elec-works > summary { list-style: none; cursor: pointer; }
.elec-works > summary::-webkit-details-marker { display: none; }
.elec-works > summary h3::after { content: ' ▾'; color: var(--ink-soft); font-size: .8rem; }
.elec-kind { margin: .4rem 1rem .9rem; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.elec-kind-h { display: flex; justify-content: space-between; align-items: center; padding: .45rem .7rem; background: var(--green-tint); }
.elec-table th { white-space: nowrap; font-size: .8rem; }
.elec-table td { vertical-align: middle; }
.elec-table select { min-width: 140px; }
.elec-table td:first-child select { min-width: 190px; }

/* 2.82 – VAT exemptions */
.vx-bar { height: 7px; border-radius: 4px; background: var(--rule); overflow: hidden; margin-bottom: .15rem; }
.vx-bar span { display: block; height: 100%; background: var(--green); }
.vx-bar.warn span { background: #e0a100; }
.vx-bar.full span { background: var(--red); }
/* 2.85 – VAT categories report */
.vc-h { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.vc-sum td:first-child { font-weight: 600; }

/* 2.86: every report gets ruled lines like the ledger – boxed cells, a dark header band, light striping and a double rule under totals */
.report table.table { border-collapse: collapse; border: 1px solid #9aa7b0; }
.report table.table th, .report table.table td { border: 1px solid #c3ccd3; }
.report table.table thead th { background: #dcebf8; color: #10243a; border-color: #b7d0e8; font-weight: 600; }   /* 3.15: light blue band */
.report table.table tbody tr:nth-child(even) > td { background: #f5f8fa; }
.report table.table tbody tr:hover > td { background: #eaf3f0; }
.report table.table tfoot td, .report table.table tfoot th { background: #eef5fb; border-top: 2px solid #6f95b8; border-bottom: 3px double #6f95b8; }
table.dcr > tbody > tr:not(.dcr-strong):not(.dcr-close):not(.dcr-colhead):nth-child(even) > td { background: #f5f8fa; }
@media print {
  .report table.table thead th { background: #dcebf8 !important; color: #10243a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report table.table tbody tr:nth-child(even) > td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
html.ux-dark .report table.table th, html.ux-dark .report table.table td { border-color: #33424a; }
html.ux-dark .report table.table tbody tr:nth-child(even) > td { background: #1f282c; }
html.ux-dark .report table.table thead th, html.ux-dark .dcr-colhead th { background: #1d3340; color: #cfe3f5; border-color: #2b4a5e; }
html.ux-dark .report table.table tbody tr:hover > td { background: #24323a; }
html.ux-dark .report table.table tfoot td, html.ux-dark .report table.table tfoot th { background: #20292d; border-top-color: #9fb3bb; border-bottom-color: #9fb3bb; }

/* 2.87 – My HR as boxes */
.mh-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: 1rem; border-radius: 12px;
  background: linear-gradient(135deg, #0b5d4b, #0e4f63); color: #fff; box-shadow: 0 4px 16px rgba(11, 79, 75, .18); }
.mh-who { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.mh-photo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.75); }
.mh-ini { display: grid; place-items: center; background: rgba(255,255,255,.18); font-weight: 700; font-size: 1.35rem; letter-spacing: .03em; }
.mh-name { display: block; font-size: 1.25rem; }
.mh-line { display: block; font-size: .88rem; opacity: .92; margin-top: .15rem; }
.mh-card .cmp-tag { background: rgba(255,255,255,.2); color: #fff; border: 0; }
.mh-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.mh-links .btn { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.45); }
.mh-links .btn:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.mh-links .wb-ic { width: 18px; height: 18px; stroke: currentColor; }
.mh-bal { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.mh-b { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid #0f766e; border-radius: 10px; padding: .7rem .9rem; }
.mh-bt { display: block; font-size: .8rem; color: var(--ink-soft); }
.mh-b strong { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: #0b5d4b; line-height: 1.2; margin-top: .1rem; }
.mh-b small { display: block; font-size: .78rem; }
.mh-bar { display: block; height: 6px; margin-top: .45rem; border-radius: 4px; background: #e0ecea; overflow: hidden; }
.mh-bar i { display: block; height: 100%; background: linear-gradient(90deg, #12a37f, #0e7490); border-radius: 4px; }
.mh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.mh-tile { cursor: pointer; }
.mh-tile.on { border-color: var(--tone); box-shadow: 0 0 0 2px var(--tone) inset, 0 4px 14px rgba(0,0,0,.08); background: var(--tone-bg); }
.mh-sec[hidden] { display: none; }
.mh-sec > .panel, .mh-sec > details.panel, .mh-sec > form.panel { margin-bottom: 1rem; }
@media (max-width: 640px) {
  .mh-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .mh-grid .mb-tile { flex-direction: column; align-items: flex-start; gap: .4rem; min-height: 0; padding: .7rem; }
  .mh-grid .mb-l small { display: none; }
  .mh-grid .mb-l .mb-wait { display: inline-block; }
  .mh-bal { grid-template-columns: 1fr 1fr; gap: .5rem; } .mh-b { padding: .5rem .7rem; } .mh-b strong { font-size: 1.2rem; }
  .mh-links { width: 100%; } .mh-links .btn { flex: 1 1 auto; justify-content: center; }
}
html.ux-dark .mh-b strong { color: #8fd8b8; }
html.ux-dark .mh-bar { background: #24323a; }

/* 2.88 – company subscription & status */
.pill-warn { white-space: nowrap; background: var(--amber-tint); color: #6f4806; border-color: #ecd6a6; }
.co-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.co-step { display: flex; gap: .55rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); font-size: .85rem; color: var(--ink-soft); }
.co-step b { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #e0ecea; color: #0b5d4b; font-size: .85rem; }
.co-step.on { border-color: #0f766e; color: var(--ink); box-shadow: 0 0 0 1px #0f766e inset; } .co-step.on b { background: #0f766e; color: #fff; }
.co-step.on.warn { border-color: #a86d0e; box-shadow: 0 0 0 1px #a86d0e inset; } .co-step.on.warn b { background: #a86d0e; }
.co-step.on.bad { border-color: #b0413e; box-shadow: 0 0 0 1px #b0413e inset; } .co-step.on.bad b { background: #b0413e; }
.co-ext { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .2rem 0 .8rem; }
.co-danger { border-top: 3px solid #b0413e; } .co-ok { border-top: 3px solid #0f766e; }
.co-list { margin: .3rem 0 .8rem 1.2rem; } .co-list li { margin: .25rem 0; }
@media (max-width: 760px) { .co-steps { grid-template-columns: 1fr 1fr; } }
/* 2.90 data clean-up */
.dc-modes { display: grid; gap: .5rem; margin-bottom: .8rem; }
.dc-mode { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; }
.dc-mode:has(input:checked) { border-color: #b0413e; box-shadow: 0 0 0 1px #b0413e inset; }
.dc-mode input { margin-top: .25rem; }
/* 2.93 VAT registers */
.vr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.vr-bar .vr-sp { flex: 1; }
.vr-kpis { display: grid; grid-template-columns: 1fr 2fr; gap: .75rem; margin: 0 0 1rem; max-width: 640px; }
.vr-kpi { border: 1px solid var(--rule); border-radius: 10px; padding: .7rem .9rem; background: var(--sheet); }
.vr-kpi span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.vr-kpi strong { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.vr-kpi small { color: var(--ink-soft); }
.vr-kpi.vr-main { border-color: #10243a; box-shadow: inset 4px 0 0 #10243a; } .vr-kpi.vr-main strong { font-size: 1.6rem; }
.vr-codes { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; margin: -.3rem 0 .8rem; }
.vr-warn { background: var(--amber-tint); border: 1px solid #ecd6a6; color: #6f4806; border-radius: 8px; padding: .45rem .75rem; font-size: .88rem; }
.vr-miss { font-size: .78rem; color: #a86d0e; background: var(--amber-tint); border-radius: 4px; padding: 0 .3rem; }
.vr-table tr.vr-cn td { color: #8a2f2c; }
.vr-table { font-size: .9rem; } .vr-table td:nth-child(2) { min-width: 120px; } .vr-table td:nth-child(6) { min-width: 150px; }
@media print { .vr-kpis { grid-template-columns: 1fr 2fr; } .vr-kpi { padding: .35rem .5rem; } .vr-kpi strong { font-size: 1rem; } }
/* 2.96 smoother: a soft fade between pages (browsers that support it), a thin progress line while the next page loads */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.lp-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999; background: linear-gradient(90deg, #0f766e, #1e9bd7); box-shadow: 0 0 6px rgba(30,155,215,.5); opacity: 0; transition: width .4s ease, opacity .2s; pointer-events: none; }
.lp-progress.go { opacity: 1; width: 70%; transition: width 6s cubic-bezier(.1,.7,.2,1), opacity .15s; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* 2.98 payment details on invoices */
.pay-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; margin-top: .35rem; }
.pay-opt { display: flex; gap: .55rem; align-items: flex-start; border: 1px solid var(--rule); border-radius: 10px; padding: .55rem .7rem; cursor: pointer; font-weight: 400; }
.pay-opt:has(input:checked) { border-color: #0f766e; box-shadow: 0 0 0 1px #0f766e inset; background: rgba(15,118,110,.05); }
.pay-opt input { margin-top: .2rem; }
.pay-opt small { display: block; color: var(--ink-soft); line-height: 1.35; margin-top: .15rem; }

/* 3.06 reports list: three boxes per row (as before 3.00), group titles in capital letters, report names in normal letters */
.report-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; columns: auto; align-items: stretch; }
.report-list > section { margin: 0; }
.report-list > section .panel-body { padding: .95rem 1.1rem .8rem; height: 100%; }
.report-list section h3 { margin: 0 0 .45rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.report-list a { padding: .26rem 0; line-height: 1.35; text-transform: none; }
@media (max-width: 1100px) { .report-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .report-list { grid-template-columns: 1fr; } }
/* 3.04 budget by quarter */
.report .table-wrap { overflow-x: auto; }
.bq-table { font-size: .85rem; }
.bq-table th, .bq-table td, .table.compact.bq-table th.num, .table.compact.bq-table td.num { padding: .38rem .42rem; }
.bq-table td:nth-child(2) { min-width: 150px; }
.bq-table th.bq-q { text-align: center; border-left: 1px solid var(--rule); }
.bq-table th.bq-q small { display: block; font-weight: 400; opacity: .8; }
.bq-table td:nth-child(2n+3), .bq-table thead tr:nth-child(2) th:nth-child(2n+1) { border-left: 1px solid var(--rule); }

/* ---------- 3.09 audit firm ---------- */
.af-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: .6rem; }
.af-head h1 { margin: 0 0 .15rem; }
.af-sub { color: var(--ink-soft); font-size: .92rem; }
.af-steps { display: flex; gap: 0; margin: .4rem 0 .8rem; overflow-x: auto; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); width: fit-content; max-width: 100%; }
.af-steps span { padding: .3rem .8rem; font-size: .8rem; color: var(--ink-soft); white-space: nowrap; border-right: 1px solid var(--rule); }
.af-steps span:last-child { border-right: 0; }
.af-steps span.done { color: var(--green-dark); }
.af-steps span.now { background: var(--green); color: #fff; font-weight: 600; }
.af-tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--rule); margin: 0 0 1rem; overflow-x: auto; }
.af-tabs a { padding: .55rem .8rem; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: .93rem; }
.af-tabs a.active { color: var(--ink); border-color: var(--green); font-weight: 600; }
.af-tabs a:hover { text-decoration: none; color: var(--ink); }
.af-tabs b { display: inline-block; min-width: 1.3em; padding: 0 .35em; margin-left: .25rem; border-radius: 999px; background: var(--amber-tint); color: var(--amber); font-size: .75rem; text-align: center; }
.af-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.af-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(11,42,61,.04); }
.af-card-top { display: flex; gap: .7rem; align-items: center; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); margin-bottom: .2rem; }
.af-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--cerulean-deep); color: #6ee7c8; display: grid; place-items: center; flex: none; }
.af-ico svg { width: 22px; height: 22px; }
.af-card-top strong { display: block; font-size: 1.05rem; }
.af-card-top small { color: var(--ink-soft); }
.af-row { display: flex; align-items: center; gap: .6rem; padding: .62rem 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.af-row:last-of-type { border-bottom: 0; }
.af-row::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: #17b897; flex: none; }
.af-row span { flex: 1; }
.af-row:hover { text-decoration: none; background: var(--paper); }
.af-badge { padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e2f6ef; color: #0e7a5c; white-space: nowrap; }
.af-badge.warn { background: #fdecdc; color: #b4531a; }
.af-badge.grey { background: var(--paper); color: var(--ink-soft); }
.af-bar { height: 7px; border-radius: 999px; background: #e3ecf1; overflow: hidden; }
.af-bar i { display: block; height: 100%; background: linear-gradient(90deg, #17b897, #138a4f); border-radius: 999px; }
.af-prog { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-soft); margin: .8rem 0 .3rem; }
.af-prog b { color: var(--ink); }
.af-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.af-chip { display: inline-flex; flex-direction: column; gap: .25rem; min-width: 128px; padding: .45rem .8rem .5rem; border-radius: 12px; background: #e2f6ef; color: #0b4f3c; border: 1px solid #c6ecdf; font-weight: 600; font-size: .9rem; }
.af-chip:hover { text-decoration: none; border-color: #17b897; }
.af-chip small { font-weight: 400; color: #3f7464; font-size: .75rem; }
.af-chip .af-bar { height: 4px; background: #c6ecdf; }
.af-chip.done { background: #0f9d7a; color: #fff; border-color: #0f9d7a; }
.af-chip.done small { color: #d9fff3; }
.af-chip.done .af-bar { background: #5cc9ae; }
.af-chip.done .af-bar i { background: #fff; }
.af-chip.empty { background: var(--paper); color: var(--ink-soft); border-style: dashed; border-color: var(--rule-strong); }
.af-chip.flag { box-shadow: inset 3px 0 0 #e07b39; }
.af-papers { width: 100%; border-collapse: collapse; }
.af-papers td { padding: .45rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.af-papers td.ref { width: 62px; font-weight: 700; color: var(--cerulean-dark); }
.af-papers tr.area td { background: var(--paper); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); padding-top: .7rem; }
.af-papers .af-bar { width: 90px; display: inline-block; vertical-align: middle; }
.af-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.af-side { position: sticky; top: .8rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: .5rem; max-height: calc(100vh - 2rem); overflow: auto; }
.af-side a { display: flex; gap: .4rem; align-items: center; padding: .38rem .5rem; border-radius: 8px; color: var(--ink); font-size: .88rem; }
.af-side a b { min-width: 42px; color: var(--cerulean-dark); }
.af-side a.on { background: #e2f6ef; font-weight: 600; }
.af-side a:hover { text-decoration: none; background: var(--paper); }
.af-side .st { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); flex: none; }
.af-side .st.prepared { background: #e0a43b; }
.af-side .st.reviewed { background: #17b897; }
.af-test { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: .85rem 1rem .9rem; margin-bottom: .7rem; scroll-margin-top: 1rem; }
.af-test:target { box-shadow: 0 0 0 3px #b9eedf; }
.af-test.sub { margin-left: 1.6rem; border-radius: 12px; }
.af-test-h { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.af-state { padding: .1rem .55rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); font-size: .72rem; }
.af-state.yes { background: #e2f6ef; color: #0e7a5c; border-color: #bfe9da; }
.af-state.no { background: var(--red-tint); color: var(--red); border-color: #ecc9c7; }
.af-state.na { background: #eef1f4; color: #5b6b78; }
.af-q { font-size: 1.02rem; font-weight: 600; color: var(--cerulean-deep); margin: .4rem 0 .6rem; line-height: 1.4; }
.af-yn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 560px; }
.af-yn button { padding: .55rem .4rem; border-radius: 10px; border: 1.5px solid var(--rule-strong); background: #fff; font-weight: 600; color: var(--ink-2); cursor: pointer; font-size: .95rem; }
.af-yn button:hover { border-color: #17b897; }
.af-yn button.on[data-a="yes"] { border-color: #17b897; background: #e2f6ef; color: #0e7a5c; box-shadow: 0 0 0 2px #c6ecdf; }
.af-yn button.on[data-a="no"] { border-color: var(--red); background: var(--red-tint); color: var(--red); }
.af-yn button.on[data-a="na"] { border-color: #8a9aa6; background: #eef1f4; color: #44525d; }
.af-yn button:disabled { cursor: default; opacity: .7; }
.af-more { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: .5rem; margin-top: .55rem; }
.af-more textarea { min-height: 38px; resize: vertical; }
.af-drop { margin-top: .6rem; border: 1.5px dashed var(--rule-strong); border-radius: 12px; padding: .7rem; text-align: center; color: var(--ink-soft); font-size: .9rem; cursor: pointer; transition: background .15s, border-color .15s; }
.af-drop.over { background: #e2f6ef; border-color: #17b897; color: #0e7a5c; }
.af-drop input { display: none; }
.af-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.af-file { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 8px; background: #fff4f2; border: 1px solid #f3d5cf; font-size: .82rem; color: #8a3b2c; max-width: 100%; }
.af-file.client { background: #eef5ff; border-color: #cfe0f7; color: #1f4f8a; }
.af-file a { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.af-file small { color: inherit; opacity: .7; }
.af-file form { display: inline; }
.af-file button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 0 0 .2rem; font-size: 1rem; line-height: 1; }
.af-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.af-tools summary { list-style: none; cursor: pointer; font-size: .82rem; color: var(--cerulean); padding: .15rem .5rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); }
.af-tools summary::-webkit-details-marker { display: none; }
.af-tools details[open] { flex-basis: 100%; }
.af-tools details[open] > summary { margin-bottom: .45rem; width: fit-content; }
.af-note { border-left: 3px solid #e0a43b; background: #fffaf0; padding: .45rem .7rem; border-radius: 0 8px 8px 0; margin-top: .5rem; font-size: .9rem; }
.af-note.cleared { border-color: #17b897; background: #f2fbf8; opacity: .8; }
.af-note.answered { border-color: var(--blue); background: #f2f8ff; }
.af-h { margin: 1.1rem 0 .5rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.af-n { color: var(--ink-soft); font-size: .9rem; margin: .3rem 0 .7rem; }
.af-sign { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.af-sign .who { padding: .6rem .8rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); font-size: .9rem; }
.af-sign .who b { display: block; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.af-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.af-kpi { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: .7rem .9rem; color: var(--ink); }
.af-kpi:hover { text-decoration: none; border-color: #17b897; }
.af-kpi span { display: block; font-size: .78rem; color: var(--ink-soft); }
.af-kpi strong { font-size: 1.45rem; }
.af-kpi.warn strong { color: #b4531a; }
.af-thread { display: flex; flex-direction: column; gap: .5rem; max-height: 460px; overflow-y: auto; padding: .3rem; }
.af-msg { max-width: 82%; padding: .5rem .75rem; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); font-size: .92rem; white-space: pre-wrap; }
.af-msg.firm { align-self: flex-end; background: #e2f6ef; border-color: #c6ecdf; }
.af-msg small { display: block; color: var(--ink-soft); font-size: .75rem; margin-bottom: .15rem; white-space: normal; }
.af-lead td.num { min-width: 95px; }
.af-lead .chg-bad { color: #b4531a; font-weight: 600; }
.af-mat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.af-mat div { background: var(--paper); border-radius: 10px; padding: .6rem .8rem; }
.af-mat b { display: block; font-size: 1.3rem; }
.af-risk-significant { border-left: 4px solid var(--red); }
.af-risk-high { border-left: 4px solid #e07b39; }
.af-risk-moderate { border-left: 4px solid #e0a43b; }
.af-risk-low { border-left: 4px solid #17b897; }
.af-report h3 { font-size: 1rem; margin: 1.1rem 0 .4rem; }
.af-report p { text-align: justify; }
.af-tail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; }
.af-tail label { display: flex; gap: .45rem; align-items: flex-start; font-size: .9rem; padding: .25rem 0; }
.af-portal-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0 1rem; }
.af-portal-tabs a { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font-size: .9rem; }
.af-portal-tabs a.active { background: var(--cerulean-deep); color: #fff; border-color: var(--cerulean-deep); }
.af-portal-tabs b { margin-left: .3rem; padding: 0 .4rem; border-radius: 999px; background: #e07b39; color: #fff; font-size: .75rem; }
.af-pcard { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .7rem; scroll-margin-top: 1rem; }
.af-pcard h4 { margin: 0 0 .25rem; font-size: 1rem; }
.af-letter { max-width: 820px; margin: 0 auto; font-size: 11pt; line-height: 1.5; }
.af-letter h2 { text-align: center; font-size: 13pt; margin: .5rem 0 1rem; }
.af-letter h3 { font-size: 11pt; margin: 1rem 0 .3rem; }
.af-letter p { text-align: justify; margin: 0 0 .55rem; }
.af-letter table { width: 100%; border-collapse: collapse; font-size: 10pt; }
.af-letter th, .af-letter td { border: 1px solid #999; padding: .25rem .4rem; text-align: left; vertical-align: top; }
.af-letter .sig { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.af-letter .sig div { border-top: 1px solid #333; padding-top: .3rem; }
.af-lh { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--cerulean-deep); padding-bottom: .5rem; margin-bottom: 1rem; }
.af-lh strong { font-size: 14pt; color: var(--cerulean-deep); }
@media (max-width: 900px) {
  .af-grid, .af-layout { grid-template-columns: 1fr; }
  .af-side { position: static; max-height: 260px; }
  .af-more, .af-sign, .af-mat, .af-tail { grid-template-columns: 1fr; }
  .af-test.sub { margin-left: .6rem; }
  .af-msg { max-width: 95%; }
}
@media print { .af-tabs, .af-steps, .af-drop, .af-tools, .af-yn button:not(.on) { display: none !important; } }
.af-more input, .af-more textarea { width: 100%; border: 1px solid var(--rule-strong); border-radius: 8px; padding: .45rem .6rem; font: inherit; background: #fff; }
.af-grid .form-grid input:not([type=checkbox]):not([type=radio]):not([type=file]), .af-grid .form-grid select, .af-grid .form-grid textarea { width: 100%; }

/* ---------- 3.10 audit firm client portal (CPA look) ---------- */
.afp { background: #eef3f6; margin: 0; }
.afp-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.afp-top { background: linear-gradient(120deg, #062b40 0%, #0b3d57 60%, #0f5a6e 100%); color: #fff; box-shadow: 0 2px 10px rgba(6,43,64,.25); }
.afp-top .afp-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap; }
.afp-brand { display: flex; align-items: center; gap: .75rem; }
.afp-brand img { height: 46px; max-width: 140px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.afp-mono { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: #6ee7c8; color: #062b40; font-weight: 800; font-size: 1.1rem; letter-spacing: .02em; }
.afp-brand strong { display: block; font-size: 1.15rem; letter-spacing: .01em; }
.afp-brand small { color: #b9d7e3; font-size: .8rem; }
.afp-who { text-align: right; display: flex; flex-direction: column; gap: .2rem; align-items: flex-end; }
.afp-lock { background: rgba(110,231,200,.15); border: 1px solid rgba(110,231,200,.45); color: #c9fbec; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.afp-who small { color: #d5e6ee; font-size: .85rem; }
.afp-main { padding-top: 1.2rem; padding-bottom: 1.5rem; min-height: 60vh; }
.afp-foot { border-top: 1px solid var(--rule); background: #fff; font-size: .82rem; color: var(--ink-2); }
.afp-foot .afp-in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .9rem; padding-bottom: .9rem; }
.afp-hero { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 1.1rem 1.2rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; box-shadow: 0 1px 3px rgba(11,42,61,.05); }
.afp-hero h1 { font-size: 1.35rem; margin: 0; color: var(--cerulean-deep); }
.afp-hero .sub { color: var(--ink-soft); font-size: .9rem; margin: .15rem 0 .8rem; }
.afp-steps { display: flex; gap: 0; margin: .2rem 0 .9rem; flex-wrap: wrap; }
.afp-steps span { position: relative; flex: 1; min-width: 74px; text-align: center; font-size: .72rem; color: var(--ink-soft); padding-top: 22px; }
.afp-steps span::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #d3e0e7; z-index: 1; }
.afp-steps span::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: #d3e0e7; }
.afp-steps span:first-child::after { display: none; }
.afp-steps span.done::before, .afp-steps span.done::after, .afp-steps span.now::after { background: #17b897; }
.afp-steps span.now::before { background: #fff; border: 3px solid #17b897; width: 14px; height: 14px; margin-left: -7px; top: 5px; }
.afp-steps span.now { color: var(--cerulean-deep); font-weight: 700; }
.afp-team { background: #f5f9fb; border-radius: 12px; padding: .8rem .9rem; font-size: .9rem; }
.afp-team b { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .35rem; }
.afp-team div { display: flex; gap: .55rem; align-items: center; padding: .3rem 0; }
.afp-av { width: 32px; height: 32px; border-radius: 50%; background: #0b3d57; color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; }
.afp-team small { display: block; color: var(--ink-soft); font-size: .78rem; }
.afp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; }
.afp-stat { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: .65rem .8rem; color: var(--ink); }
.afp-stat:hover { text-decoration: none; border-color: #17b897; }
.afp-stat span { display: block; font-size: .76rem; color: var(--ink-soft); }
.afp-stat strong { font-size: 1.35rem; color: var(--cerulean-deep); }
.afp-stat.todo strong { color: #c0571b; }
.afp-list { background: #fff; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.afp-req { border-bottom: 1px solid var(--rule); padding: .7rem 1rem; scroll-margin-top: 1rem; }
.afp-req:last-child { border-bottom: 0; }
.afp-req-h { display: flex; gap: .7rem; align-items: center; }
.afp-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0a43b; flex: none; }
.afp-dot.answered { background: var(--blue); }
.afp-dot.accepted { background: #17b897; }
.afp-dot.reopened { background: var(--red); }
.afp-req-t { flex: 1; min-width: 0; }
.afp-req-t strong { display: block; font-weight: 600; color: var(--ink); }
.afp-req-t small { color: var(--ink-soft); }
.afp-req details summary { list-style: none; }
.afp-req details summary::-webkit-details-marker { display: none; }
.afp-req form { margin: .6rem 0 .2rem 1.6rem; }
.afp-chip { font-size: .74rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; background: var(--amber-tint); color: var(--amber); }
.afp-chip.answered { background: var(--blue-tint); color: var(--blue); }
.afp-chip.accepted { background: #e2f6ef; color: #0e7a5c; }
.afp-chip.reopened { background: var(--red-tint); color: var(--red); }
.afp-section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 1.2rem 0 .5rem; }
.afp-section-h h2 { font-size: 1.05rem; margin: 0; color: var(--cerulean-deep); }
.afp .af-portal-tabs a.active { background: #0b3d57; border-color: #0b3d57; }
@media (max-width: 760px) { .afp-hero { grid-template-columns: 1fr; } .afp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .afp-who { align-items: flex-start; text-align: left; } }
.afp-steps { flex-wrap: nowrap; }
.afp-steps span { min-width: 0; }
@media (max-width: 760px) { .afp-steps span { font-size: .6rem; } .afp-steps span.now { font-size: .66rem; } }
.afp input:not([type=checkbox]):not([type=radio]):not([type=file]), .afp textarea, .afp select { border: 1px solid var(--rule-strong); border-radius: 8px; padding: .45rem .6rem; font: inherit; background: #fff; width: 100%; box-sizing: border-box; }
.afp input:focus, .afp textarea:focus { outline: 2px solid #6ee7c8; border-color: #17b897; }

/* 3.13 – expenditure plans */
.ep-table .ep-sec td { background: var(--paper); }
.ep-table .ep-sub td { border-top: 1px solid var(--rule); }
.ep-table .ep-dropped td { color: var(--ink-soft); text-decoration: line-through; }
.ep-table .ep-dropped td:last-child, .ep-table .ep-dropped td input { text-decoration: none; }
.ep-sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin: 1rem 0; }
.ep-sigs > div { border: 1px solid var(--rule); border-radius: 8px; padding: .7rem .9rem; display: flex; flex-direction: column; gap: .15rem; background: var(--sheet); }
.ep-sigs span { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.ep-sigs small { color: var(--ink-soft); }
.ep-print { font-family: "Times New Roman", Georgia, serif; color: #000; max-width: 190mm; margin: 0 auto; font-size: 11pt; }
.ep-print h1 { text-align: center; font-size: 15pt; margin: .2rem 0; letter-spacing: .02em; }
.ep-print h2 { text-align: center; font-size: 12pt; margin: .1rem 0; text-decoration: underline; }
.ep-print .ep-meta { text-align: center; font-size: 9pt; color: #555; margin: .2rem 0 .6rem; }
.ep-ptable { width: 100%; border-collapse: collapse; }
.ep-ptable th, .ep-ptable td { border: 1px solid #000; padding: 3px 6px; }
.ep-ptable th { background: #d9e2f3; text-align: center; }
.ep-ptable .c { text-align: center; } .ep-ptable .n { text-align: right; white-space: nowrap; }
.ep-ptable .sec td { font-weight: 700; background: #f2f2f2; }
.ep-ptable .sub td { font-weight: 700; }
.ep-ptable .grand td { font-weight: 700; background: #fff2cc; }
.ep-sign { width: 100%; margin-top: 1.2rem; border-collapse: collapse; }
.ep-sign td { padding: 4px 6px; border: 0; }

/* 3.16 – lines: accounts or items */
.line-mode { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .55rem .9rem; border-bottom: 1px solid var(--rule); background: var(--paper); font-size: .9rem; }
.line-mode > span { font-weight: 600; color: var(--ink-soft); }
.line-mode label { display: inline-flex; gap: .35rem; align-items: center; cursor: pointer; }
