/* Cirro System — design system (brand palette from cirro/src/assets/scss/theme/colors.scss) */
:root {
  --navy: #0C385F;
  --blue: #1A5C96;
  --sky: #05B3D7;
  --yellow: #F2C643;
  --white: #FFFFFF;
  --canvas: #F5F7F9;
  --mist: #E6ECF2;
  --ink: #26323E;
  --slate: #5E6A78;
  --line: #DCE3EA;
  --line-soft: #EBEFF4;
  --green: #3BD297;
  --green-text: #1E7F55;
  --green-bg: #E3F5EC;
  --red: #EE4F6F;
  --red-text: #C8364F;
  --red-bg: #FBE7EB;
  --amber-text: #7A5A00;
  --amber-bg: #FDF4D6;
  --sky-bg: #E1F4F9;
  --blue-bg: #E8F0F8;
  /* surfaces and heading text have their own names, so a dark theme can change them without touching the brand colours */
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --head: #0C385F;
  --link: #1A5C96;
  /* what an item looks like under the pointer: a row or tile, the edge of a field, and a remove control */
  --hover: #F5F9FC;
  --hover-line: #9FB2C4;
  --danger-strong: #B42318;
  --danger-bg: #FEF3F2;
  /* quieter greys (labels, icons, disabled), and the edges of the tinted boxes */
  --faint: #8A96A3;
  --faint-2: #7C8B9A;
  --faint-3: #A3AFBB;
  --amber-line: #F0DE9E;
  --green-line: #BFE7D2;
  --red-line: #F2C3CD;
  --accent-line: #C9DAEB;
  --accent-text: #0C385F;
  /* shadows are a tint of the main colour, and the ring round a field in focus a tint of the accent */
  --shadow-rgb: 12, 56, 95;
  --ring: rgba(26, 92, 150, .15);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(var(--shadow-rgb), .06), 0 4px 16px rgba(var(--shadow-rgb), .05);
  --shadow-lg: 0 12px 40px rgba(var(--shadow-rgb), .22);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sidebar: 240px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
/* Sinhala and Tamil letters: Noto Sans Sinhala and Tamil (SIL Open Font License, fonts/noto-OFL.txt), the same on
   every device. "Cirro Scripts" covers only those letters, so everything else keeps the organisation's own font. */
@font-face { font-family: "Cirro Scripts"; font-weight: 400 700; font-display: swap; src: url("../fonts/noto-sans-sinhala.woff2") format("woff2"); unicode-range: U+0D81-0DF4, U+0964-0965, U+200C-200D; }
@font-face { font-family: "Cirro Scripts"; font-weight: 400 700; font-display: swap; src: url("../fonts/noto-sans-tamil.woff2") format("woff2"); unicode-range: U+0B82-0BFA, U+20B9; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.5 "Cirro Scripts", var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
/* Links are never underlined. A text link answers the pointer the way iOS does: it dims while the pointer is on it and
   dims further while it is pressed. Links that are whole rows, tiles or buttons have their own hover and are left alone. */
a:hover { text-decoration: none; }
a:not([class]), a.mono, .linkish, .le-link, .le-desc-toggle, .cell-link { transition: opacity .12s ease; }
a:not([class]):hover, a.mono:hover, .linkish:hover, .le-link:hover, .le-desc-toggle:hover, .cell-link:hover { opacity: .6; }
a:not([class]):active, a.mono:active, .linkish:active, .le-link:active, .le-desc-toggle:active, .cell-link:active { opacity: .35; }
@media (prefers-reduced-motion: reduce) { a:not([class]), a.mono, .linkish, .le-link, .le-desc-toggle, .cell-link { transition: none; } }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ms { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; user-select: none; }
.ms.sm { font-size: 18px; } .ms.xs { font-size: 16px; }
/* Icons written inside a line of text sit on the baseline by default, 3–4px above the text. Centre them on the text instead (no effect in flex rows). */
.ms { vertical-align: middle; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--slate); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

.pos { color: var(--green-text); }
.neg { color: var(--red-text); }
.hidden { display: none !important; }

/* ---------------- App shell ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100%; }
.sidebar { background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }

.nav { overflow-y: auto; padding: 6px 10px 16px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); padding: 0 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 12px; border-radius: 7px; color: rgba(255, 255, 255, .88); font-weight: 500; font-size: 13.5px; text-decoration: none; position: relative; }
.nav a .ms { font-size: 19px; color: rgba(255, 255, 255, .75); }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: rgba(5, 179, 215, .16); color: #fff; }
.nav a.active .ms { color: var(--sky); }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sky); }
.nav a .badge-count { margin-left: auto; background: var(--yellow); color: var(--navy); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.nav a .lock { margin-left: auto; font-size: 15px; color: rgba(255,255,255,.55); }
.sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: rgba(255, 255, 255, .7); display: grid; gap: 8px; }
.integrity { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 12.5px; }
.integrity .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(59, 210, 151, .2); }
.integrity.bad .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(238, 79, 111, .25); }
.side-profile { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.side-profile .avatar { flex: none; }
.side-profile-text { display: grid; min-width: 0; line-height: 1.3; }
.side-profile-text strong, .side-profile-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-profile-text strong { font-size: 13px; font-weight: 600; }
.side-profile-text span { font-size: 11.5px; }
.sidebar-foot button { background: none; border: 0; color: rgba(255,255,255,.8); padding: 0; cursor: pointer; text-align: left; font-size: 12px; }
.sidebar-foot button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 60px; }
.topbar .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--canvas); border-radius: 8px; padding: 8px 12px 8px 36px; }
.search .ms { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--slate); font-size: 19px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; padding: 6px; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a.focus { background: var(--blue-bg); }
.search-results .kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); width: 70px; flex: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-select { display: flex; flex-direction: column; gap: 1px; }
.top-select label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.top-select select { border: 1px solid var(--line); border-radius: 7px; padding: 5px 28px 5px 9px; background: var(--surface); font-weight: 600; font-size: 13px; color: var(--head); max-width: 230px; }
/* The organisation, at the top right: its logo (or initials) in a circle, like a profile picture; opens the organisation's menu */
.org-card { display: inline-grid; place-items: center; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.org-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.org-card .avatar img { object-fit: contain; background: var(--surface); }
@media (max-width: 420px) { .topbar-right .top-select .dd-btn { max-width: 132px; } } /* the two pickers and the organisation share one row on a phone */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.avatar-xs { width: 22px; height: 22px; font-size: 9.5px; }
/* A person in a list or a detail: picture (or initials), then the name */
.person { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; max-width: 100%; }
.person > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.person-list { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; }
.acc-pic { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.acc-pic-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* My account: what sits under the text in the two-factor and leave-or-delete cards keeps clear of it */
#acc-mfa > * + *, #acc-close > * + * { margin-top: 12px; }
/* A card that takes the whole row of a two-column grid, so a long list in it never stretches a neighbour */
.grid > .card-wide { grid-column: 1 / -1; }
/* My account › Devices */
/* A value with a copy button right beside it */
.copy-row { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy-row > span { overflow: hidden; text-overflow: ellipsis; }
/* the button is no taller than the text, so the row keeps the height of the rows around it and lines up with its label */
.copy-row .btn.btn-icon { padding: 0; width: 20px; min-width: 0; height: 20px; min-height: 0; flex: none; display: inline-grid; place-items: center; }
.copy-row .btn .ms { font-size: 15px; }
/* The picture is the button: click it to choose an image; hovering (or reaching it with the keyboard) shows what it does */
.acc-pic-btn { position: relative; display: inline-block; border-radius: 50%; cursor: pointer; line-height: 0; }
.acc-pic-btn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border-radius: 50%; }
.acc-pic-over { position: absolute; inset: 0; border-radius: 50%; background: rgba(var(--shadow-rgb), .78); color: #fff; display: grid; place-content: center; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; line-height: 1.2; opacity: 0; transition: opacity .12s; pointer-events: none; }
.acc-pic-over .ms { font-size: 20px; }
.acc-pic-btn:hover .acc-pic-over, .acc-pic-btn:focus-within .acc-pic-over { opacity: 1; }
.acc-pic-btn:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }

.content { padding: 24px 28px 64px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--head); line-height: 1.2; }
.page-head .sub { color: var(--slate); margin-top: 4px; max-width: 70ch; }
.crumbs { font-size: 12.5px; color: var(--slate); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--slate); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 7px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; line-height: 1.2; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn .ms { font-size: 18px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue); }
.btn-accent { background: var(--sky); color: var(--navy); }
.btn-accent:hover { background: var(--blue); }

.btn-secondary { background: var(--surface); color: var(--head); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--blue); color: var(--link); }
.btn-ghost { background: transparent; color: var(--link); }
.btn-ghost:hover { background: var(--blue-bg); }
.btn-danger { background: var(--surface); color: var(--red-text); border-color: var(--red-line); }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-icon { padding: 6px; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- Cards, grids ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--head); }
.card-head .hint { font-size: 12.5px; color: var(--slate); }
.card-body { padding: 14px 18px 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.span2 { grid-column: span 2; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.dash .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1320px) { .dash .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dash .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .value { font-size: 20px; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--slate); letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 23px; font-weight: 800; color: var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .delta { font-size: 12.5px; font-weight: 600; }
.kpi.dark { background: var(--navy); border-color: var(--navy); }
.kpi.dark .label { color: rgba(255,255,255,.75); }
.kpi.dark .value { color: #fff; }
.kpi.dark .delta { color: var(--sky); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
/* List tables: one line per row; a wide table scrolls sideways (first column stays put). Long text is cut with … (full text on hover). */
.dt-tbl th, .dt-tbl td { white-space: nowrap; }
.dt-tbl td .clip { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--head); }
.tbl th .arrow { font-size: 10px; margin-left: 4px; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: var(--surface-2); }
.tbl .sub-row td { padding-left: 28px; color: var(--slate); }
.tbl .group-row td { font-weight: 700; color: var(--head); background: var(--surface-2); }
.tbl .total-row td { font-weight: 800; color: var(--head); border-top: 2px solid var(--navy); }
.tbl-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl-tools .search-inline { position: relative; min-width: 220px; flex: 1; max-width: 320px; }
.tbl-tools .search-inline input { width: 100%; padding: 7px 10px 7px 32px; border: 1px solid var(--line); border-radius: 7px; }
.tbl-tools .search-inline .ms { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--slate); font-size: 18px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--slate); }
.empty { padding: 40px 20px; text-align: center; color: var(--slate); }
.empty .ms { font-size: 36px; color: var(--line); display: block; margin: 0 auto 8px; }

/* Tabs & segmented */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; border: 0; background: none; font-weight: 600; font-size: 13.5px; color: var(--slate); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover, .tabs button:hover { color: var(--head); }
.tabs .active { color: var(--head); border-bottom-color: var(--blue); }
.tabs .count { background: var(--mist); color: var(--link); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.seg { display: inline-flex; background: var(--mist); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; font-weight: 600; font-size: 12.5px; color: var(--slate); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--head); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .12); }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.pill-green { background: var(--green-bg); color: var(--green-text); }
.pill-red { background: var(--red-bg); color: var(--red-text); }
.pill-amber { background: var(--amber-bg); color: var(--amber-text); }
.pill-sky { background: var(--sky-bg); color: var(--head); }
.pill-blue { background: var(--blue-bg); color: var(--link); }
.pill-grey { background: var(--mist); color: var(--slate); }
.pill-navy { background: var(--navy); color: #fff; }
.tag-beta { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--yellow); color: var(--navy); padding: 2px 6px; border-radius: 4px; vertical-align: middle; margin-left: 6px; }

/* ---------------- Forms ---------------- */
.form { display: grid; gap: 14px; }
.form.form-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* in a window: short fields two to a row (ui.pairFields) */
.form.form-two > .form-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form.form-two { grid-template-columns: minmax(0, 1fr); } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.top { align-items: start; } /* a one-line box beside a taller one keeps to the top of its row */
.field { display: grid; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .label { font-size: 12.5px; font-weight: 600; color: var(--head); }
.field .help { font-size: 12px; color: var(--slate); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field select, .field textarea, select.input {
  width: 100%; border: 1px solid var(--field-line); border-radius: 7px; padding: 8px 10px; background: var(--surface); min-height: 38px;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.field.error input, .field.error select { border-color: var(--red-text); }
.field .err { color: var(--red-text); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }
.check input { margin-top: 3px; accent-color: var(--blue); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 400; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; background: var(--field-line); border-radius: 999px; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }
input[type=range] { accent-color: var(--blue); width: 100%; }

/* Document line editor */
.lines-editor .tbl td { padding: 6px 6px; }
.lines-editor input, .lines-editor select { width: 100%; border: 1px solid var(--field-line); border-radius: 6px; padding: 6px 8px; min-height: 34px; background: var(--surface); }
.lines-editor .num input { text-align: right; }

/* Definition lists / summaries */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13.5px; }
.dl dt { color: var(--slate); }
.dl dd { margin: 0; font-weight: 400; }
.stat-row { display: flex; flex-wrap: wrap; gap: 24px; }
.stat-row > div { display: grid; gap: 2px; }
.stat-row .l { font-size: 12px; color: var(--slate); font-weight: 600; }
.stat-row .v { font-size: 18px; font-weight: 800; color: var(--head); font-variant-numeric: tabular-nums; }

/* Notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 13.5px; background: var(--blue-bg); color: var(--head); border: 1px solid var(--accent-line); }
.notice .ms { color: var(--link); }
.notice.warn { background: var(--amber-bg); border-color: var(--amber-line); }
.notice.warn .ms { color: var(--amber-text); }
.notice.bad { background: var(--red-bg); border-color: var(--red-line); }
.notice.bad .ms { color: var(--red-text); }
.notice.good { background: var(--green-bg); border-color: var(--green-line); }
.notice.good .ms { color: var(--green-text); }

/* Progress / bars */
.bar { height: 8px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.bar.sky > span { background: var(--sky); }
.bar.yellow > span { background: var(--yellow); }
.bar.red > span { background: var(--red); }

/* Lists */
.list { display: grid; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line-soft); }
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { font-size: 12.5px; color: var(--slate); }

/* Charts */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 200px; }

/* ---------------- Modal & drawer ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(var(--shadow-rgb), .45); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .08s ease-out; }
.overlay { overscroll-behavior: contain; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { width: min(880px, 100%); }
.modal.xwide { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--head); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; flex-wrap: wrap; }
.close-x { background: none; border: 0; cursor: pointer; color: var(--slate); padding: 4px; border-radius: 6px; }
.close-x:hover { background: var(--mist); color: var(--head); }
@keyframes fade { from { opacity: 0; } }
.overlay.is-drawer { place-items: stretch end; padding: 0; }
.modal.drawer { width: min(460px, 100%); height: 100%; max-height: none; border-radius: 0; animation: drawer-in .18s ease; }
.modal.drawer .modal-body { flex: 1; }
.modal.drawer .modal-head { height: 64px; padding-top: 0; padding-bottom: 0; box-sizing: border-box; flex: none; } /* same height as the top bar */
.modal.drawer .modal-foot { border-radius: 0; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-weight: 500; max-width: 420px; animation: slideup .2s ease; }
.toast .ms { color: var(--sky); }
.toast.bad { background: #7D1D30; }
.toast.bad .ms { color: #FFB3C1; }
@keyframes slideup { from { transform: translateY(8px); opacity: 0; } }

/* Invoice document preview */
.doc-paper { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 36px 40px; box-shadow: var(--shadow); color: #1f2a36; }

.doc-paper h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; color: var(--doc-accent, var(--blue)); }
.doc-logo { font-weight: 800; font-size: 20px; color: var(--head); }

/* Upgrade gate */
.gate { max-width: 560px; margin: 40px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }
.gate .ms { font-size: 44px; color: var(--link); }

/* Code */
pre.code { background: #0B2440; color: #E6ECF2; border-radius: 8px; padding: 14px 16px; overflow: auto; font: 12.5px/1.55 var(--mono); max-height: 420px; margin: 0; }
pre.code .k { color: #7FD8EB; } pre.code .s { color: #F2C643; } pre.code .n { color: #9BE3C1; }

/* Report sheet */
.report-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.report-sheet .report-title { padding: 18px 20px 6px; }
.report-sheet .report-title h2 { margin: 0; font-size: 18px; color: var(--head); }
.report-sheet .report-title p { margin: 2px 0 0; color: var(--slate); font-size: 13px; }

/* Checklist */
.checklist { display: grid; }
.checklist .item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.checklist .item:first-child { border-top: 0; }
.checklist .item .ms.done { color: var(--green-text); }
.checklist .item .ms.todo { color: var(--faint-3); }

/* Mobile */
@media (max-width: 1100px) {

  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s ease; }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(var(--shadow-rgb), .4); z-index: 80; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .content { padding: 18px 16px 48px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .top-select select { max-width: 150px; }
  .page-head h1 { font-size: 21px; }
  .doc-paper { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------- Dashboard ---------------- */
.dash-grid { align-items: start; }
.attn { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.attn-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none !important; color: var(--ink); background: var(--surface); transition: border-color .15s, background .15s; }
.attn-item:hover { border-color: var(--blue); background: var(--hover); }
.attn-item > .ms:first-child { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.attn-item span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.attn-item strong { color: var(--head); font-weight: 600; }
.attn-item small { color: var(--slate); font-size: 12px; }
.attn-item > .ms:last-child { color: var(--slate); }
.attn-red > .ms:first-child { background: var(--red-bg); color: var(--red-text); }
.attn-amber > .ms:first-child { background: var(--amber-bg); color: var(--amber-text); }
.attn-sky > .ms:first-child { background: var(--sky-bg); color: var(--head); }
.attn-blue > .ms:first-child { background: var(--blue-bg); color: var(--link); }
.bva { display: grid; gap: 14px; }
.bva-row { display: grid; gap: 6px; }
.bva-row .row { gap: 8px; }

/* ===== Money & people module (views-money.js) — selectors prefixed .mv / mv- ===== */
.mv-mt { margin-top: 16px; }
.mv-mb { margin-bottom: 16px; }
.mv-bank-card .stat-row { gap: 18px; }
.mv-bank-card .stat-row .v { font-size: 17px; }
.mv-sugg-inline { display: flex; gap: 8px; align-items: flex-start; max-width: 380px; }
.mv-sugg-inline > .ms { color: var(--link); margin-top: 2px; }
.mv-sugg-inline .title { font-weight: 600; font-size: 13px; color: var(--head); }
.mv-h3 { font-size: 13px; font-weight: 700; color: var(--head); margin: 18px 0 8px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .04em; }
.mv-line-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--canvas); border-radius: 8px; }
.mv-line-head .title { font-weight: 700; color: var(--head); }
.mv-line-head .mv-amt { font-size: 18px; font-weight: 800; }
.mv-sugg-list { display: grid; gap: 8px; }
.mv-sugg { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.mv-sugg .grow { flex: 1; min-width: 0; }
.mv-sugg .title { font-weight: 600; color: var(--head); }
.mv-ai { border: 1px dashed var(--hover-line); background: var(--blue-bg); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; }
.mv-receipt-thumb { max-width: 160px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); margin-top: 8px; object-fit: contain; }
.mv-receipt { display: block; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.mv-calc { margin-top: 12px; font-size: 13.5px; color: var(--head); font-variant-numeric: tabular-nums; min-height: 20px; }
.mv-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mv-timeline li { display: flex; gap: 10px; align-items: flex-start; color: var(--slate); }
.mv-timeline li .title { font-weight: 600; }
.mv-timeline li > .ms { margin-top: 2px; }
.mv-timeline li.done > .ms { color: var(--green-text); }
.mv-timeline li.done .title { color: var(--head); }
.mv-timeline li.bad > .ms, .mv-timeline li.bad .title { color: var(--red-text); }
.mv-num-input { width: 96px; text-align: right; border: 1px solid var(--field-line); border-radius: 6px; padding: 5px 8px; font-variant-numeric: tabular-nums; }
.mv-num-input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.mv-payslip { color: #1f2a36; }
.mv-payslip-top { display: flex; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--blue); padding-bottom: 12px; }
.mv-payslip-title { font-size: 22px; font-weight: 800; color: var(--link); letter-spacing: -.02em; }
.mv-date-chip { width: 44px; flex: none; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 3px 0; line-height: 1.15; }
.mv-date-chip span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--slate); }
.mv-date-chip strong { font-size: 17px; color: var(--head); }
.mv-conv-out { margin-top: 14px; padding: 12px 14px; background: var(--canvas); border-radius: 8px; }
.mv-conv-big { font-size: 22px; font-weight: 800; color: var(--head); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .mv-sugg-inline { max-width: none; } .mv-line-head { flex-direction: column; } }
/* ===== end Money & people module ===== */

/* ==========================================================================
   views-sales.js — Sales, Purchases & Inventory (all selectors prefixed .sales-)
   ========================================================================== */
.sales-view .sales-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.sales-view .tabs { margin-bottom: 0; }
.sales-view .tabs + .card { border-top-left-radius: 0; border-top-right-radius: 0; }
/* one column no wider than the card: a long label (with a Coming soon tag, say) wraps inside its button rather than
   pushing the button out past the card's edge */
.sales-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sales-actions .btn { justify-content: flex-start; width: 100%; min-width: 0; white-space: normal; text-align: left; height: auto; min-height: 38px; }
.sales-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sales-timeline li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.sales-timeline li > .ms { color: var(--link); margin-top: 2px; }
.sales-paper .doc-logo { letter-spacing: -.01em; }

.sales-paper .tbl th { background: transparent; position: static; }


.sales-paper-pay { margin-top: 18px; padding: 14px 16px; background: var(--canvas); border-radius: 8px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.sales-swatch-opt { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-right: 12px; }
.sales-swatch-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sales-swatch { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); display: inline-block; }
.sales-swatch-opt input:checked + .sales-swatch { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy); }
.sales-swatch-opt input:focus-visible + .sales-swatch { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 1100px) { .sales-view .sales-split, .sales-view .sales-split-wide { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Module: Reporting, tax, accounting & settings (js/views-reports.js)
   All selectors are rp-* prefixed except .tbl .subtotal-row (report subtotals).
   ========================================================================== */
.tbl .subtotal-row td { font-weight: 700; color: var(--head); border-top: 1px solid var(--line); }
.tbl tr.rp-drill { cursor: pointer; }
.tbl tr.rp-drill:hover td { background: var(--hover); }
.tbl tr.rp-low td { background: var(--amber-bg); }
.tbl tr.rp-muted td { opacity: .6; }
.rp-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin-bottom: 16px; }
.rp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rp-custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rp-custom .input { width: auto; min-height: 34px; padding: 5px 8px; }
.rp-period-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--head); }
.rp-entity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-opt { display: inline-flex; align-items: center; gap: 6px; }
.rp-opt .input { width: auto; max-width: 260px; min-height: 34px; padding: 5px 28px 5px 8px; }
.rp-sheet { overflow: hidden; }
.rp-sheet .report-title p.small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rp-pad { padding: 12px 20px; }
.rp-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.rp-kpis .kpi { box-shadow: none; }
.rp-kpis .kpi .value { font-size: clamp(14px, 11cqi, 20px); }
.rp-note { padding: 10px 20px 14px; font-size: 12.5px; color: var(--slate); border-top: 1px solid var(--line-soft); display: flex; gap: 6px; align-items: flex-start; }
.rp-libbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 18px; }
.rp-search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.rp-search input { width: 100%; padding: 8px 10px 8px 34px; border: 1px solid var(--field-line); border-radius: 7px; background: var(--surface); }
.rp-search .ms { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--slate); font-size: 19px; }
.rp-count { color: var(--head); font-size: 13.5px; }
.rp-group { margin-bottom: 22px; }
.rp-group h2 { font-size: 15px; color: var(--head); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.rp-group h2 .count { background: var(--mist); color: var(--link); border-radius: 999px; font-size: 11px; padding: 1px 8px; font-weight: 700; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 6px; align-content: start; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rp-card:hover, .rp-card:focus-within { border-color: var(--blue); box-shadow: var(--shadow); }
.rp-card p { margin: 0; font-size: 12.5px; color: var(--slate); }
.rp-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rp-card-name { font-weight: 700; color: var(--head); }
.rp-card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--slate); }
.rp-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.rp-star { border: 0; background: none; padding: 2px; border-radius: 6px; color: var(--faint-3); cursor: pointer; line-height: 0; }
.rp-star:hover { background: var(--mist); color: var(--head); }
.rp-star.on { background: var(--yellow); color: var(--navy); }
.rp-star.on .ms, .rp-star-btn.on .ms { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.rp-star-btn.on { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.rp-budget-grid .tbl td, .rp-budget-grid .tbl th { padding: 7px 8px; }
.rp-budget-grid .tbl td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.rp-budget-grid .tbl tr.group-row td:first-child, .rp-budget-grid .tbl tr.subtotal-row td:first-child { background: var(--surface-2); }
.rp-cell { width: 86px; border: 1px solid var(--field-line); border-radius: 5px; padding: 4px 6px; text-align: right; font-variant-numeric: tabular-nums; background: var(--surface); }
.rp-cell:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.rp-fc-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.rp-out { font-weight: 700; color: var(--link); margin-left: 4px; font-variant-numeric: tabular-nums; }
.rp-wk { padding: 2px 6px; }
.rp-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rp-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.rp-box.strong { background: var(--navy); border-color: var(--navy); color: #fff; }
.rp-box-n { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.rp-box.strong .rp-box-n, .rp-box.strong .rp-box-l { color: rgba(255, 255, 255, .8); }
.rp-box-l { font-size: 12.5px; color: var(--slate); }
.rp-box-v { font-size: 19px; font-weight: 800; color: var(--head); font-variant-numeric: tabular-nums; }
.rp-box.strong .rp-box-v { color: #fff; }
.rp-unfiled { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.rp-unfiled:first-child { border-top: 0; }
.rp-close-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
.rp-progress { display: flex; align-items: center; gap: 12px; }
.rp-progress .bar { flex: 1; height: 10px; }
.rp-close-grid .bar { min-width: 60px; flex: 1; }
.rp-int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rp-int-name { color: var(--head); }
.rp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.rp-plan h2 { margin: 0; font-size: 17px; color: var(--head); }
.rp-plan.current { border: 2px solid var(--blue); }
.rp-price { font-size: 28px; font-weight: 800; color: var(--head); margin: 6px 0 4px; }
.rp-price span { font-size: 13px; font-weight: 600; color: var(--slate); }
.rp-feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.rp-feat li { display: flex; gap: 6px; align-items: center; }
.rp-feat .ms { color: var(--green-text); }
@media (max-width: 1100px) { .rp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-fc-grid, .rp-close-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .rp-plans { grid-template-columns: 1fr; } .rp-controls { align-items: flex-start; } .rp-toolbar .seg { flex-wrap: wrap; } }
/* ==== end module: views-reports.js ==== */

/* ---------------- Small-screen fixes ---------------- */
.kpi { min-width: 0; }
.kpi .label, .kpi .delta { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .dash .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .value { font-size: 18px; }
  .kpi .delta { font-size: 11.5px; }
}
/* Grid children may shrink below their content width (prevents page-wide overflow on phones) */
.stack > *, .grid > *, .kpis > * { min-width: 0; }
.list > * { min-width: 0; }
@media (max-width: 520px) { .list-item { flex-wrap: wrap; } .list-item .grow { flex-basis: 60%; } }

/* ---------------- Table polish ---------------- */
/* Pin the first column while wide tables scroll sideways */
.table-wrap .tbl th:first-child, .table-wrap .tbl td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.table-wrap .tbl th:first-child { z-index: 2; background: var(--surface-2); }
.table-wrap .tbl tr.group-row td:first-child, .table-wrap .tbl tfoot td:first-child { background: var(--surface-2); }
.table-wrap .tbl td:first-child::after, .table-wrap .tbl th:first-child::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: var(--line-soft); }
/* Compact numeric tables on laptops */
@media (max-width: 1500px) { .tbl th, .tbl td { padding-left: 10px; padding-right: 10px; } }
.tbl th.num { text-align: right; }
.card-body.flush > .table-wrap, .card-body.flush > .tbl-tools { border-radius: 0 0 var(--radius) var(--radius); }

/* Split layouts that hold a table: table side gets more room, stack on laptops */
.rp-split-bud { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
.rp-split-fc { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1500px) { .rp-split-bud, .rp-split-fc { grid-template-columns: 1fr; } }

/* ---------------- Header & control wrapping ---------------- */
.card-head { flex-wrap: wrap; row-gap: 8px; }
.card-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.card-head > .actions { flex: none; margin-left: auto; } /* header links / buttons stay on the right of the title */
.card-head h2, .card-head h3 { text-wrap: balance; }
.seg { max-width: 100%; flex-wrap: wrap; }
.seg button { white-space: nowrap; flex: none; }
.page-head > div:first-child { min-width: 0; }
/* KPI tiles: labels stay on one line where possible, values line up across a row */
.kpi { grid-template-rows: auto auto 1fr; align-content: start; }
.kpi .label { white-space: normal; line-height: 1.3; } /* long titles wrap instead of being cut off */

/* KPI values scale with their tile so long amounts (e.g. Rs 79,045,310) always fit */
.kpi { container-type: inline-size; }
.kpi .value { font-size: clamp(15px, 11.5cqi, 23px); white-space: nowrap; }
.stat-row .v { white-space: nowrap; }
.rp-kpis { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.rp-kpis > * { min-width: 0; }
.kpi { grid-template-columns: minmax(0, 1fr); }
.kpi .label > span:last-child, .kpi .label { min-width: 0; }

.rp-kpis { grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr)); }

/* ==========================================================================
   Approvals (ui.approvalPanel, /approvals, /settings/approvals) — selectors prefixed .appr-
   ========================================================================== */
.appr-panel .appr-actions { margin-bottom: 12px; gap: 8px; }
.appr-log { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.appr-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appr-timeline li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.appr-timeline li > .ms { color: var(--link); margin-top: 2px; }
.appr-timeline li.appr-approved > .ms { color: var(--green-text); }
.appr-timeline li.appr-rejected > .ms { color: var(--red-text); }
.appr-timeline li.appr-recalled > .ms { color: var(--slate); }
.appr-ref { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.appr-party { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.appr-split { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1100px) { .appr-split { grid-template-columns: 1fr; } }
/* ===== end Approvals ===== */

/* ==========================================================================
   Printing (ui.print): a clean A4 business document rendered into #print-root.
   On screen #print-root is hidden; body.print-mode + @media print shows only it.
   Inside the artifact viewer the same document is shown on an A4 sheet in .print-preview.
   Ink is near-black on white; navy/dark blue only for the document title, the top rule and table header rules.
   Page size, running footer and "Page X of Y" are injected per document by ui.printPageCss().
   ========================================================================== */
#print-root { display: none; }
.pdoc { --pink: #1f2a36; --pmuted: #5e6a78; --phair: #e3e8ee; background: var(--surface); color: var(--pink); font: 400 10pt/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pdoc * { box-sizing: border-box; }
.pdoc strong { font-weight: 700; color: var(--pink); }
/* Header band: issuer (left), document type + key facts (right) */
.pdoc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 18px; }
.pdoc-issuer { min-width: 0; max-width: 55%; }
.pdoc-logo { font-size: 17pt; font-weight: 800; letter-spacing: -.02em; color: var(--pink); line-height: 1.15; margin-bottom: 6px; }
.pdoc-doc { text-align: right; min-width: 0; }
.pdoc-type { margin: 0 0 6px; font-size: 19pt; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pdoc-accent, var(--navy)); line-height: 1.1; }
.pdoc-stamp { display: inline-block; margin: 0 0 8px; padding: 2px 8px; border: 1px solid var(--pink); border-radius: 3px; font-size: 7.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); }
.pdoc-kv { margin-left: auto; border-collapse: collapse; font-size: 8.5pt; }
.pdoc-kv th { text-align: left; font-weight: 500; color: var(--pmuted); padding: 1.5px 14px 1.5px 0; white-space: nowrap; }
.pdoc-kv td { text-align: right; color: var(--pink); font-weight: 600; padding: 1.5px 0; }
.pdoc-subhead { margin: -6px 0 14px; padding: 6px 0; border-bottom: 1px solid var(--phair); font-size: 8.5pt; color: var(--pmuted); }
/* Party blocks */
.pdoc-parties { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 12px; margin-bottom: 16px; break-inside: avoid; }
.pdoc-party { border: 1px solid var(--phair); border-radius: 4px; padding: 9px 11px; font-size: 9pt; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.pdoc-label { font-size: 7pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pmuted); margin-bottom: 4px; }
.pdoc-big { font-size: 14pt; font-weight: 800; }
.pdoc-muted { font-size: 7.5pt; color: var(--pmuted); margin-top: 1px; }
.pdoc-mono { font-family: var(--mono); font-size: 8.5pt; }
/* Tables */
.pdoc .ptbl { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 0; }
.pdoc .ptbl thead { display: table-header-group; }
.pdoc .ptbl tfoot { display: table-row-group; }
.pdoc .ptbl th { text-align: left; font-size: 7pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); border-bottom: 1px solid var(--pdoc-rule, var(--navy)); padding: 6px 7px; white-space: nowrap; }
.pdoc .ptbl td { padding: 6px 7px; border-bottom: 1px solid var(--phair); vertical-align: top; color: var(--pink); }
.pdoc .ptbl tr { break-inside: avoid; page-break-inside: avoid; }
.pdoc .ptbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdoc .ptbl th:first-child, .pdoc .ptbl td:first-child { padding-left: 11px; } /* inset as the From and Bill to boxes are, so the text lines up with theirs */
.pdoc .ptbl th:last-child, .pdoc .ptbl td:last-child { padding-right: 11px; }
.pdoc .ptbl .pdoc-idx { color: var(--pmuted); }
.pdoc .ptbl .pnw { white-space: nowrap; }
.pdoc .ptbl .pdoc-empty { color: var(--pmuted); text-align: center; padding: 18px 0; }
.pdoc .ptbl-compact td, .pdoc .ptbl-compact th { padding-top: 4px; padding-bottom: 4px; }
.pdoc .ptbl-compact td { font-size: 8.5pt; }
.pdoc .pdoc-aging { margin-top: 10px; }
.pdoc .ptbl a { color: inherit; text-decoration: none; }
.pdoc .ptbl .pill { background: none !important; color: var(--pink) !important; padding: 0; font-weight: 600; font-size: inherit; }
.pdoc .ptbl .pill::before { display: none; }
.pdoc .ptbl .ms { display: none; }
/* Financial statement formatting */
.pdoc .ptbl-fin td { border-bottom-color: transparent; padding-top: 3.5px; padding-bottom: 3.5px; }
.pdoc .ptbl-fin tbody tr:not(.group-row):not(.subtotal-row):not(.total-row) td { border-bottom: 1px solid #f0f3f6; }
.pdoc .ptbl .group-row td { font-weight: 700; padding-top: 10px; border-bottom: 0; color: var(--pink); }
.pdoc .ptbl .sub-row td:first-child { padding-left: 14px; }
.pdoc .ptbl .subtotal-row td { font-weight: 700; border-top: 1px solid #aeb8c3; border-bottom: 0; }
.pdoc .ptbl .total-row td { font-weight: 800; border-top: 1px solid var(--pink); border-bottom: 3px double var(--pink); }
.pdoc .ptbl .pos, .pdoc .ptbl .neg { color: inherit; }
.pdoc .ptbl-fin th.pdoc-first { width: 26%; }
.pdoc-landscape .ptbl-fin th.pdoc-first { width: 19%; }
.pdoc-landscape .ptbl-fin { font-size: 8pt; }
.pdoc-landscape .ptbl-fin td, .pdoc-landscape .ptbl-fin th { padding-left: 5px; padding-right: 5px; }
/* Totals */
.pdoc-totals { margin: 12px 0 0 auto; width: 45%; min-width: 250px; display: grid; gap: 0; font-size: 9.5pt; break-inside: avoid; }
.pdoc-totals div { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.pdoc-totals div span:last-child { text-align: right; white-space: nowrap; }
.pdoc-totals .grand { font-weight: 700; font-size: 11pt; border-top: 1px solid var(--pink); margin-top: 3px; padding-top: 6px; }
.pdoc-totals .due { font-weight: 700; font-size: 11pt; border: 1.5px solid var(--pink); padding: 6px 9px; margin-top: 6px; }
/* After the lines: VAT summary, payment instructions, notes */
.pdoc-after { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; break-inside: avoid; }
.pdoc-after > div { min-width: 0; }
.pdoc-terms, .pdoc-section { margin-top: 16px; }
.pdoc-terms { break-inside: avoid; }
.pdoc-section > .pdoc-label, .pdoc-after .pdoc-label { break-after: avoid; page-break-after: avoid; }
.pdoc-note { font-size: 8.5pt; color: var(--pmuted); margin: 8px 0 0; line-height: 1.5; }
.pdoc-note strong { color: var(--pink); }
.pdoc-sign { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-top: 30px; font-size: 8pt; color: var(--pmuted); break-inside: avoid; }
.pdoc-sign div { border-top: 1px solid var(--pink); padding-top: 4px; }
.pdoc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pdoc-netpay { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px; border: 1.5px solid var(--pink); border-radius: 4px; break-inside: avoid; }
.pdoc-netpay span { font-size: 8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pmuted); }
.pdoc-netpay strong { font-size: 16pt; font-weight: 800; }
.pdoc-netpay small { margin-left: auto; font-size: 8.5pt; color: var(--pmuted); }
.pdoc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; break-inside: avoid; }
.pdoc-kpis div { border: 1px solid var(--phair); border-radius: 4px; padding: 6px 8px; display: grid; gap: 1px; }
.pdoc-kpis span, .pdoc-kpis small { font-size: 7pt; color: var(--pmuted); text-transform: uppercase; letter-spacing: .06em; }
.pdoc-kpis small { text-transform: none; letter-spacing: 0; }
.pdoc-kpis strong { font-size: 11pt; }
/* In-flow footer (the running footer on every printed page comes from @page margin boxes) */
/* On an invoice with something still to pay, the boxed Balance due leads; the total above it steps back to an ordinary
   semibold line, so one figure stands out, not two. Where there is no balance line the total leads as before. */
.pdoc-totals:has(.due) .grand { font-weight: 600; font-size: inherit; }
.pdoc-foot { margin-top: 26px; padding-top: 7px; border-top: 1px solid var(--phair); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 7.5pt; color: var(--pmuted); }
.pdoc-foot span:empty { display: none; }
/* Preview (artifact viewer): the page as a white A4 sheet on a grey backdrop */
.modal.print-modal { width: min(1000px, 100%); }
.modal-head-actions { margin-left: auto; display: flex; gap: 8px; }
.modal-head-actions + .close-x { margin-left: 4px; }
.print-blocked { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--amber-bg); border: 1px solid #F0DE9E; color: var(--head); font-size: 13px; }
.print-blocked p { margin: 0; }
.print-blocked .ms { color: var(--amber-text); }
.print-preview { margin-top: 14px; background: #8a96a3; border-radius: 8px; padding: 18px; overflow: auto; max-height: 72vh; }
.print-sheet { background: var(--surface); width: 210mm; min-height: 297mm; margin: 0 auto; padding: 16mm 14mm 18mm; box-shadow: 0 3px 18px rgba(0, 0, 0, .28); }
.print-sheet.landscape { width: 297mm; min-height: 210mm; }
@media (max-width: 860px) { .print-preview { padding: 10px; } }
@media print {
  body.print-mode { background: var(--surface) !important; margin: 0; }
  /* an open window pins the page (position: fixed, shifted by the scroll) — undo that so the document prints from the top */
  body.print-mode { position: static !important; top: auto !important; width: auto !important; }
  body.print-mode > *:not(#print-root) { display: none !important; }
  body.print-mode #print-root { display: block !important; }
  body.print-mode .pdoc, body.print-mode .pdoc * { box-shadow: none !important; text-shadow: none !important; }
  body.print-mode .pdoc { font-size: 10pt; }
  body.print-mode .pdoc-head, body.print-mode .pdoc-parties, body.print-mode .pdoc-totals, body.print-mode .pdoc-after, body.print-mode .pdoc-sign { break-inside: avoid; page-break-inside: avoid; }
  body.print-mode .pdoc-label, body.print-mode .pdoc-type { break-after: avoid; page-break-after: avoid; }
  body.print-mode .pdoc-foot { break-inside: avoid; page-break-inside: avoid; } /* same footer as on screen: company line and footer text */
}
/* ===== end Printing ===== */

/* ==========================================================================
   Document editor & pages (views-sales.js): header card, approval stepper, form card with the line
   items table (one visual block per line), Payment + Summary cards. Light theme, brand tokens.
   ========================================================================== */

.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sales-view textarea[name="notes"] { display: block; width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); resize: vertical; }
.sales-view textarea[name="notes"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
.le-sum-row[hidden], .le-sum-note[hidden] { display: none; }

/* Line table: small muted header, one hairline under it, a single hairline between line blocks, no fills or verticals */
.le-scroll { overflow-x: auto; }
.le-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.le-table col.c-desc { width: auto; }
.le-table col.c-qty { width: 72px; }
.le-table col.c-price { width: 128px; }
.le-table col.c-disc { width: 196px; }
.le-table col.c-tax { width: 88px; }
.le-table col.c-amt { width: 128px; }
.le-table th { padding: 0 6px 8px; font-size: 11.5px; font-weight: 600; color: var(--slate); text-align: left; background: none; border-bottom: 1px solid var(--line); white-space: nowrap; }
.le-table th.num, .le-table td.num { text-align: right; }
.le-table td { padding: 4px 6px; border: 0; vertical-align: top; background: none; }
.le-table tbody.le-block + tbody.le-block tr:first-child td { border-top: 1px solid var(--line-soft); }
.le-table tr.le-fields td { padding-top: 12px; }
.le-table tr.le-actions td { padding-top: 2px; padding-bottom: 10px; }
.le-table .le-amt { padding-top: 21px !important; font-weight: 600; color: var(--ink); white-space: nowrap; }
.le-in { display: block; width: 100%; height: 36px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); transition: background .12s, border-color .12s, box-shadow .12s; }
.le-in.num { text-align: right; }
select.le-in { padding-right: 4px; cursor: pointer; }
.le-in:hover { background: var(--canvas); border-color: var(--line); }
.le-in:focus { outline: none; background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
.le-title { font-weight: 500; }
.le-disc { display: flex; align-items: center; gap: 4px; }
.le-disc .le-in { min-width: 0; flex: 1 1 auto; }
.le-disc-toggle, .le-offer-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--head); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.le-disc-toggle:hover, .le-offer-btn:hover { border-color: var(--blue); background: var(--blue-bg); }
.le-disc-toggle:focus-visible, .le-offer-btn:focus-visible, .le-ib:focus-visible, .le-desc-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.le-offer-btn { color: var(--slate); }
.le-offer-btn .ms { font-size: 16px; }
.le-offer-btn.on { color: var(--head); background: var(--sky-bg); border-color: var(--accent-line); }
.le-offer-tag { display: flex; align-items: center; gap: 4px; margin: 3px 0 0 9px; font-size: 11.5px; color: var(--slate); }
.le-offer-tag .ms { font-size: 14px; }
.le-offer-tag { color: var(--head); font-weight: 500; }
.le-link { border: 0; background: none; padding: 0 2px; color: var(--link); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }

.le-notes td { padding-top: 0 !important; }
textarea.le-desc { display: block; width: 100%; min-height: 44px; resize: vertical; overflow: hidden; border: 1px solid transparent; border-radius: 7px; padding: 8px 9px; font: inherit; font-size: 13px; line-height: 1.45; color: var(--ink); background: var(--canvas); }
textarea.le-desc:hover { border-color: var(--line); }
textarea.le-desc:focus { outline: none; background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
.le-actions-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.le-actions-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.le-desc-toggle { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; margin-left: 5px; border: 0; background: none; color: var(--link); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; border-radius: 4px; }

.le-desc-toggle .ms { font-size: 15px; }
.le-acct { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--slate); }
.le-acct select { height: 28px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; font-size: 12px; color: var(--ink); padding: 0 4px; cursor: pointer; }
.le-acct select:hover { border-color: var(--line); background: var(--canvas); }
.le-acct select:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.le-ibs { display: flex; gap: 4px; }
.le-ib { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--faint); cursor: pointer; }
.le-ib .ms { font-size: 16px; }
.le-ib:hover:not(:disabled) { background: var(--mist); color: var(--head); }
.le-ib.danger:hover:not(:disabled) { background: var(--red-bg); color: var(--red-text); }
.le-ib:disabled { opacity: .35; cursor: default; }
/* Summary card */
.le-summary { display: grid; gap: 2px; }
.le-sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; font-size: 14px; color: var(--ink); }
.le-sum-row .num { font-variant-numeric: tabular-nums; }
.le-sum-row.total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; color: var(--head); }
.le-sum-amt { color: var(--slate); font-size: 12.5px; margin-left: 4px; }
.le-disc-doc { width: 176px; }
.le-disc-doc .le-in { border-color: var(--line); background: var(--surface); height: 32px; }
.le-sum-offer { margin: 0 0 4px; justify-content: flex-end; }
.le-sum-note { font-size: 12px; color: var(--slate); margin: 4px 0 0; }
/* Suggestion menu (items, customers, offers) — fixed, so card overflow never clips it */
.le-menu { position: fixed; z-index: 400; display: none; max-height: 320px; overflow-y: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); }
.le-menu.open { display: block; }
.le-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.le-menu-item small { display: block; font-size: 11.5px; color: var(--slate); margin-top: 1px; }
.le-menu-item:hover, .le-menu-item.active { background: var(--blue-bg); }
.le-menu-price { flex: none; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; }
.le-menu-empty { padding: 10px; font-size: 13px; color: var(--slate); }
/* Read-only lines */
.pdoc-line-title { font-weight: 500; }
.pdoc-line-desc { font-size: 8pt; color: var(--pmuted, #5e6a78); white-space: pre-line; margin-top: 1px; line-height: 1.45; }

@media (max-width: 640px) {

  .form-grid.two { grid-template-columns: minmax(0, 1fr); }

   .le-disc-doc { width: 150px; }
}
/* ===== end Document editor ===== */
/* Toggle lists (API scopes, webhook events): one switch per option instead of a multi-select */
.rp-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.rp-toggles .switch, .appr-roles .switch { font-size: 13px; }
/* ==========================================================================
   Catalog: services & discounts / offers (views-sales.js)
   ========================================================================== */
.of-value { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.of-radios { display: flex; gap: 18px; flex-wrap: wrap; margin: 2px 0 8px; }
.of-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.of-radio input { accent-color: var(--blue); width: 16px; height: 16px; }
.of-items, .of-custs { margin-top: 8px; max-height: 180px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--canvas); }
.of-items [hidden], .of-custs[hidden], .of-line-only[hidden] { display: none !important; }
[data-ship-own][hidden] { display: none !important; } /* delivery address fields behind Same as billing address */
/* ===== end Catalog ===== */
/* Small paper (A5): tighter type so a document fits half an A4 sheet */
.pdoc.pdoc-small { font-size: 8.5pt; }
.pdoc.pdoc-small .pdoc-type { font-size: 16pt; }
.pdoc.pdoc-small .pdoc-parties { gap: 8px; }
@media print { body.print-mode .pdoc.pdoc-small { font-size: 8.5pt; } }
