/* =====================================================================
   Ranma design system. All colours are tokens: change the brand here.
   Works in RTL (Kurdish, Arabic) and LTR (English) through logical
   properties (inline-start / inline-end) instead of left / right.
   ===================================================================== */

@font-face {
    font-family: "Inter";
    src: url("../lib/fonts/inter.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Noto Sans Arabic";
    src: url("../lib/fonts/noto-sans-arabic.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* Brand: Ranma blue (#114987) and Ranma amber (#F9AA33). Everything else is derived from these. */
    --rn-primary: #114987;
    --rn-primary-hover: #0c3768;
    --rn-primary-soft: #e8eef7;
    /* The brand colour as numbers, for its see-through shades (rgba). */
    --rn-primary-rgb: 17, 73, 135;
    /* The brand colour as text and links: the same in the light mode, a light tint of it in the dark mode. */
    --rn-primary-text: var(--rn-primary);
    --rn-primary-text-rgb: var(--rn-primary-rgb);
    --rn-accent: #f9aa33;
    --rn-accent-hover: #e8951a;
    --rn-accent-soft: #fff4e0;
    --rn-accent-text: #8a5300;

    /* Meaning */
    --rn-success: #15803d;
    --rn-success-soft: #dcfce7;
    /* As text: the same here, lighter in the dark mode. */
    --rn-success-text: var(--rn-success);
    --rn-danger: #b91c1c;
    --rn-danger-soft: #fee2e2;
    --rn-danger-text: var(--rn-danger);

    /* Surfaces and text */
    --rn-bg: #f5f7fb;
    --rn-surface: #ffffff;
    --rn-border: #e2e8f0;
    --rn-text: #1b2636;
    --rn-text-muted: #64748b;
    /* The menu is a deeper shade of the brand blue, so the white logo and the amber marker stand out. */
    --rn-sidebar: #0b2f57;
    --rn-sidebar-text: #c5d3e6;
    --rn-sidebar-active: #ffffff;

    --rn-radius: 12px;
    --rn-radius-sm: 8px;
    --rn-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --rn-sidebar-width: 260px;
    --rn-topbar-height: 60px;
    --rn-bottomnav-height: 64px;

    /* Latin letters and digits use Inter; Arabic-script letters fall through to Noto Sans Arabic. */
    --rn-font: "Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

    /* Bootstrap integration */
    --bs-primary: var(--rn-primary);
    --bs-primary-rgb: var(--rn-primary-rgb);
    --bs-link-color: var(--rn-primary-text);
    --bs-link-color-rgb: var(--rn-primary-text-rgb);
    --bs-link-hover-color: var(--rn-primary-hover);
    --bs-body-font-family: var(--rn-font);
    --bs-body-bg: var(--rn-bg);
    --bs-body-color: var(--rn-text);
    --bs-border-color: var(--rn-border);
    --bs-border-radius: var(--rn-radius-sm);
}

html { font-size: 15px; }
body { font-family: var(--rn-font); background: var(--rn-bg); color: var(--rn-text); -webkit-font-smoothing: antialiased; }

/* Kurdish / Arabic script reads better a little larger and with more line height. */
html[dir="rtl"] body { font-size: 1.02rem; line-height: 1.75; }

/* Numbers always line up in columns. */
.num, .table td.num, .kpi-value { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
/* An item's held bonus rule on a return, as a reminder (2026-11-30): amber when another held bonus goes back than the rule's. */
.rs-rule { display: inline-block; font-size: .76rem; font-weight: 400; color: var(--rn-primary-text); }
.rs-rule-other { color: var(--k-fg-92400e, #92400e); background: var(--k-bg-fef3c7, #fef3c7); border-radius: .4rem; padding: .05rem .4rem; }
.rs-lines .rs-rule { display: table; margin-top: .1rem; }
.rs-held-list { margin: 0 0 .75rem; padding-inline-start: 1.1rem; }
.rs-held-choice { display: flex; gap: .65rem; align-items: center; width: 100%; text-align: start; padding: .6rem .75rem; margin-bottom: .5rem; border: 1px solid var(--rn-border); border-radius: .6rem; background: var(--rn-surface); color: var(--rn-text); }
.rs-held-choice:hover, .rs-held-choice:focus-visible { border-color: var(--rn-primary); background: var(--rn-primary-soft); }
.rs-held-choice[hidden] { display: none; }
.rs-held-choice > i { font-size: 1.25rem; color: var(--rn-primary-text); }
.rs-held-choice small { display: block; color: var(--bs-secondary-color); }
/* A day and the time under it, everywhere both are shown (2026-11-30, the user's rule; Format.When, RanmaWhen). Its first line sits on the
   line of the words beside it; the time keeps under the day, as the cell is aligned. */
.dt-stack { display: inline-flex; flex-direction: column; line-height: 1.25; vertical-align: baseline; text-align: inherit; white-space: nowrap; }
.dt-time { font-size: .86em; font-weight: 400; opacity: .8; }
.justify-content-between > .dt-stack:last-child, .rp-row > .dt-stack:last-child { text-align: end; }
.receipt .dt-time, [data-strip] .dt-time, .rb .dt-time { opacity: 1; font-size: .92em; }
/* A number cell is written left-to-right, but it still lines up with its column heading on the page's side. */
[dir="rtl"] td.num:not(.text-end):not(.text-center), [dir="rtl"] th.num:not(.text-end):not(.text-center) { text-align: right; }

/* ---------------------------------------------------------------- buttons */
.btn { border-radius: var(--rn-radius-sm); font-weight: 600; padding: .55rem 1.1rem; }
.btn-primary { --bs-btn-bg: var(--rn-primary); --bs-btn-border-color: var(--rn-primary); --bs-btn-hover-bg: var(--rn-primary-hover);
               --bs-btn-hover-border-color: var(--rn-primary-hover); --bs-btn-active-bg: var(--rn-primary-hover); --bs-btn-disabled-bg: var(--rn-primary); }
.btn-outline-primary { --bs-btn-color: var(--rn-primary-text); --bs-btn-border-color: var(--rn-primary); --bs-btn-hover-bg: var(--rn-primary);
                       --bs-btn-hover-border-color: var(--rn-primary); --bs-btn-active-bg: var(--rn-primary); }
.btn-lg { padding: .75rem 1.4rem; }
.form-control, .form-select { border-radius: var(--rn-radius-sm); padding: .6rem .85rem; border-color: var(--rn-border); }
.form-control:focus, .form-select:focus { border-color: var(--rn-primary); box-shadow: 0 0 0 .2rem rgba(var(--rn-primary-rgb), .15); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }

/* ---------------------------------------------------------------- cards */
.card { border: 1px solid var(--rn-border); border-radius: var(--rn-radius); box-shadow: var(--rn-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--rn-border); font-weight: 700; padding: .9rem 1.1rem; }

/* ---------------------------------------------------------------- app shell */
.app { min-height: 100vh; }

.app-sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--rn-sidebar-width);
    background: var(--rn-sidebar); color: var(--rn-sidebar-text); flex-direction: column; z-index: 1030;
}
.app-brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.1rem 1.25rem .9rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.app-brand-logo { display: block; width: 220px; height: auto; margin-inline: auto; } /* the whole logo with its taglines */
.app-brand-business {
    display: inline-flex; align-items: center; gap: .35rem; margin-top: .55rem; font-size: .78rem; color: #fff; opacity: .85; line-height: 1.3;
}
.app-brand-business::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rn-accent); }
.offcanvas .app-brand { border-bottom: 0; padding: 0; }

.app-nav { list-style: none; margin: 0; padding: .5rem .75rem; overflow-y: auto; flex: 1; }
.app-nav-link {
    display: flex; align-items: center; gap: .75rem; padding: .62rem .85rem; margin-bottom: 2px;
    border-radius: var(--rn-radius-sm); color: var(--rn-sidebar-text); text-decoration: none; font-weight: 500;
}
.app-nav-link i { font-size: 1.15rem; width: 1.3rem; text-align: center; }
.app-nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.app-nav-link { position: relative; }
.app-nav-link.active { background: rgba(255, 255, 255, .10); color: var(--rn-sidebar-active); font-weight: 700; }
.app-nav-link.active::before {
    content: ""; position: absolute; inset-inline-start: -.75rem; top: 20%; bottom: 20%; width: 4px;
    border-start-end-radius: 4px; border-end-end-radius: 4px; background: var(--rn-accent);
}
.app-nav-link.active i { color: var(--rn-accent); }
.app-nav-link.disabled { opacity: .45; pointer-events: none; }
.app-nav-soon { margin-inline-start: auto; font-size: .68rem; padding: .1rem .45rem; border-radius: 99px; background: rgba(255, 255, 255, .12); }

.app-main { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .app-main { margin-inline-start: var(--rn-sidebar-width); } }

.app-topbar {
    position: sticky; top: 0; z-index: 1020; height: var(--rn-topbar-height);
    display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
    background: var(--k-bg-ffffffeb, rgba(255, 255, 255, .92)); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rn-border);
}
.app-topbar-title { font-weight: 700; font-size: 1.05rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar .btn-icon { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 10px; }

.app-content { flex: 1; padding: .5rem 1rem calc(var(--rn-bottomnav-height) + 1rem); max-width: 1400px; width: 100%; }
@media (min-width: 992px) { .app-content { padding: .5rem 1.5rem 1.5rem; } }

/* Mobile bottom navigation: the five things done most, one thumb away. */
.app-bottomnav {
    position: fixed; inset-inline: 0; bottom: 0; height: var(--rn-bottomnav-height); z-index: 1030;
    display: flex; background: var(--rn-surface); border-top: 1px solid var(--rn-border);
    padding-bottom: env(safe-area-inset-bottom);
}
.app-bottomnav a, .app-bottomnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--rn-text-muted); text-decoration: none; font-size: .72rem; font-weight: 600; border: 0; background: none;
}
.app-bottomnav i { font-size: 1.3rem; }
.app-bottomnav .active { color: var(--rn-primary-text); }
.app-bottomnav .app-bottomnav-sell i {
    width: 48px; height: 48px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center;
    background: var(--rn-primary); color: #fff; box-shadow: 0 4px 12px rgba(var(--rn-primary-rgb), .35);
}

.offcanvas.app-menu { background: var(--rn-sidebar); color: var(--rn-sidebar-text); width: 280px; }

/* ---------------------------------------------------------------- page parts */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.page-header h1 { font-size: 1.45rem; font-weight: 800; margin: 0; }
.page-header p { margin: .15rem 0 0; color: var(--rn-text-muted); }

.kpi { padding: 1.1rem 1.2rem; height: 100%; }
.kpi-label { color: var(--rn-text-muted); font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: .45rem; }
.kpi-value { font-size: 1.6rem; font-weight: 800; margin-top: .35rem; display: block; text-align: start; }
.kpi-sub { font-size: .8rem; color: var(--rn-text-muted); }
.kpi-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1.05rem; }
.kpi-icon.primary { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.kpi-icon.success { background: var(--rn-success-soft); color: var(--rn-success-text); }
.kpi-icon.danger { background: var(--rn-danger-soft); color: var(--rn-danger-text); }
.kpi-icon.accent { background: var(--rn-accent-soft); color: var(--k-fg-b45309, #b45309); }

.quick-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center;
    padding: 1.1rem .5rem; border-radius: var(--rn-radius); background: var(--rn-surface); border: 1px solid var(--rn-border);
    color: var(--rn-text); text-decoration: none; font-weight: 600; font-size: .9rem; height: 100%;
    transition: border-color .15s, transform .15s;
}
.quick-action i { font-size: 1.6rem; color: var(--rn-primary-text); }
.quick-action:hover { border-color: var(--rn-primary); transform: translateY(-1px); color: var(--rn-text); }
.quick-action.disabled { opacity: .5; pointer-events: none; }

.text-success-strong { color: var(--rn-success-text) !important; }
.text-danger-strong { color: var(--rn-danger-text) !important; }
/* Amber that reads on white (a cheque due within the week). */
.text-warning-strong { color: var(--k-fg-b45309, #b45309) !important; }
/* The cheque window's supplier list, under its search box. */
.chq-results { z-index: 5; max-height: 16rem; overflow-y: auto; }

/* ---------------------------------------------------------------- sign-in / setup */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem;
        background: radial-gradient(1200px 600px at 100% 0%, var(--rn-primary-soft), transparent 60%), var(--rn-bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 720px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .65rem; margin-bottom: 1.5rem; text-decoration: none; }
.auth-brand .app-brand-logo { width: 220px; height: auto; }
.auth .card-body { padding: 1.75rem; }
@media (min-width: 576px) { .auth .card-body { padding: 2.25rem; } }

.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label {
    display: block; padding: .9rem 1rem; border: 2px solid var(--rn-border); border-radius: var(--rn-radius-sm);
    cursor: pointer; height: 100%; transition: border-color .15s, background .15s;
}
.choice label strong { display: block; }
.choice label small { color: var(--rn-text-muted); }
.choice input:checked + label { border-color: var(--rn-primary); background: var(--rn-primary-soft); }
.choice input:focus-visible + label { box-shadow: 0 0 0 .2rem rgba(var(--rn-primary-rgb), .25); }

.section-title { font-weight: 800; font-size: 1rem; margin: 1.5rem 0 .85rem; display: flex; align-items: center; gap: .5rem; }
.section-title:first-child { margin-top: 0; }
.section-title .step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
                       background: var(--rn-primary); color: #fff; }

.lang-switch .btn { padding: .3rem .7rem; font-size: .85rem; }

/* ---------------------------------------------------------------- point of sale */
.pos-search { position: relative; }
.pos-search .form-control { font-size: 1.1rem; }
.pos-results { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 1010; max-height: 60vh; overflow-y: auto; }
.pos-results .active-hint { background: var(--rn-primary-soft); }
/* the chosen customer's debt, inside the customer box at its far end (the name keeps its room: pos.js pads the box) */
.pos-debt { position: absolute; inset-inline-end: .35rem; top: 50%; transform: translateY(-50%); display: flex; gap: .25rem;
    max-width: 70%; overflow: hidden; white-space: nowrap; pointer-events: none; }
.pos-debt > span { font-size: .75rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; }
.pos-debt-owes { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.pos-debt-credit { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
/* the customer's markup, beside the customer box */
.pos-markup-w { width: 6rem; flex: 0 0 auto; }
/* sale footer: the customer's old debt plus this sale; on phones one thin line above the other figures */
#pos-debt-total-sum:not(:empty) + #pos-debt-total-after:not(:empty)::before { content: "·"; margin-inline: .3rem; }
@media (max-width: 767.98px) {
    #pos #pos-debt-total { order: -1; flex-basis: 100%; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .35rem; }
    #pos #pos-debt-total-value { font-size: .9rem !important; }
    #pos #pos-debt-total-sum { display: none; }
    #pos #pos-debt-total-after:not(:empty)::before { content: "·"; margin-inline: 0 .3rem; }
}

/* The sale page now uses the shared document layout (.doc-page): table lines and the bottom totals bar. */
.pos-qty .btn { width: 2rem; }

/* ---------------------------------------------------------------- reports */
.report-card { transition: border-color .15s, transform .15s; }
.report-card:hover { border-color: var(--rn-primary); transform: translateY(-1px); }

/* Printing a page of the app (reports): only the content, no menus. */
@media print {
    .app-sidebar, .app-topbar, .app-bottomnav, .pos-mobilebar, .no-print, .alert-dismissible .btn-close { display: none !important; }
    .app-main { margin: 0 !important; }
    .app-content { padding: 0 !important; max-width: none; }
    .card { box-shadow: none; break-inside: avoid; }
    body { background: #fff; }
    a { text-decoration: none; color: inherit !important; }
}

/* ---------------------------------------------------------------- receipt (80 mm thermal paper) */
.receipt { width: 76mm; margin: 0 auto; padding: 4mm 2mm; font-size: 12px; line-height: 1.5; color: #000; background: #fff; }
.receipt h1 { font-size: 16px; font-weight: 800; text-align: center; margin: 0 0 2mm; }
.receipt .muted { color: #444; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt th, .receipt td { padding: 1mm 0; vertical-align: top; }
.receipt thead th { border-bottom: 1px dashed #000; font-weight: 700; }
.receipt .totals td { padding: .5mm 0; }
/* The supermarket till (2026-11-13): the sale's number as a barcode on the receipt; each way it was paid. */
.receipt-number-bars svg { display: block; width: 100%; max-width: 62mm; height: 11mm; margin: 0 auto; }
.receipt .totals .receipt-way td { font-size: .92em; color: #333; }
.receipt .grand td { border-top: 1px dashed #000; font-size: 15px; font-weight: 800; padding-top: 1.5mm; }
.receipt .end { text-align: end; }
.receipt td + td, .receipt th + th { padding-inline-start: 3mm; }
.receipt-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin: 1rem 0; padding: 0 1rem; }
/* the 80 mm receipt's head: branch line and the kind of invoice in a band */
.receipt .rc-branch { text-align: center; font-size: 11px; color: #333; margin-bottom: 2mm; }
.receipt .rc-title { text-align: center; font-weight: 800; letter-spacing: .04em; border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 1mm 0; margin: 0 0 2mm; }
/* the 80 mm head and foot with a print design (2026-11-07): second name, line about the work, phones with names, contacts, footer */
.rh-name { font-size: 16px; font-weight: 800; text-align: center; margin: 0 0 1mm; line-height: 1.3; }
.rh-design { text-align: center; font-size: 11px; color: #222; margin-bottom: 2mm; line-height: 1.45; }
.rh-name2 { font-size: 12px; font-weight: 700; }
.rh-tagline { font-weight: 600; }
.rh-phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 3mm; }
.rh-phones > span { white-space: nowrap; }
.rh-phones b { font-weight: 700; margin-inline-end: 1mm; }
.rh-branch { margin-top: .5mm; font-size: 10.5px; color: #333; }
.rh-foot { text-align: center; margin-top: 3mm; padding-top: 1.5mm; border-top: 1px dashed #000; font-size: 11px; }
@media print {
    @page { size: 80mm auto; margin: 0; }
    body { background: #fff; }
    .receipt-actions { display: none; }
}

/* ---------- item form: compact, only the units list scrolls, save always visible ---------- */
/* .row pulls itself up by the gutter; cancelling that leaves exactly one gutter (.5rem) between units. */
.item-form #unit-rows .unit-row { margin-top: 0; }
/* One line per unit on tablets and up: three fit, a fourth makes only this list scroll. */
@media (min-width: 768px) {
    .item-form .unit-scroll { max-height: calc(3 * 2.375rem + 2 * .5rem + 2px); overflow-y: auto; overflow-x: hidden; padding-inline-end: .25rem; }
}
/* On phones a unit wraps onto two lines, so units are separated by a line instead. */
@media (max-width: 767.98px) {
    .item-form #unit-rows .unit-row { border-top: 1px solid var(--bs-border-color); padding-top: .5rem; }
}
/* ---------- item page: a record page as in Zoho / Odoo ----------
   Wide screens: the fields (the picture beside the name) in the main column with the stock cards under them; status and the
   stock settings in a side column. Narrower: the fields first, then status, then the stock cards. */
.item-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "top" "side"; }
.item-main, .item-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.item-main { grid-area: main; }
.item-side { grid-area: side; }
.item-side:empty { display: none; }
.item-top { grid-area: top; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-content: start; }
.item-layout .card { margin: 0; }
@media (min-width: 1200px) {
    /* 2026-11-25 (the user's choice "C", the page in one screen): the status and the stock settings in the narrow column, the stock
       cards (stock now, expiry, held bonus, recipe…) side by side under the units, where the wide column had room. */
    .item-layout { grid-template-columns: minmax(0, 1fr) 21rem; grid-template-rows: auto 1fr; grid-template-areas: "main top" "side top"; align-items: start; }
    .item-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); align-items: start; }
}
.item-form .form-label { font-size: .8rem; font-weight: 600; color: var(--rn-text-muted); margin-bottom: .3rem; }
.item-form .form-label .bi-info-circle { opacity: .7; }
.item-form .input-group-text { background: var(--bs-tertiary-bg); color: var(--rn-text-muted); }
.item-name { font-size: 1.1rem; font-weight: 700; }
.unit-head { font-size: .75rem; font-weight: 700; color: var(--rn-text-muted); border-bottom: 1px solid var(--rn-border); padding-bottom: .4rem; margin-bottom: .5rem; }
/* Status switches: small text, one line each (the full text is in the title when it is cut). */
.item-flag { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .5rem 0; cursor: pointer; font-size: .8rem; font-weight: 600; }
.item-flag + .item-flag { border-top: 1px solid var(--rn-border); }
.item-flag-icon { width: 1.75rem; height: 1.75rem; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-size: .9rem; }
.item-flag-active { background: var(--rn-success-soft); color: var(--rn-success-text); }
.item-flag-favorite { background: var(--rn-accent-soft); color: var(--rn-accent); }
.item-flag-serial { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.item-flag-field { cursor: default; }
.item-flag-field .item-warranty { width: 4.5rem; flex-shrink: 0; text-align: center; }
/* Real weight of each piece: the two choices keep their names beside them. */
.item-flag-field .item-catch-select { width: 8.5rem; flex-shrink: 0; }
.item-flag-field .catch-unit { flex-shrink: 0; }
#catch-more > .item-flag { border-top: 1px solid var(--rn-border); }
.item-flag-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-flag .form-switch { margin: 0; padding: 0; min-height: 0; flex-shrink: 0; }
.item-flag .form-check-input { float: none; margin: 0; width: 2.4em; height: 1.3em; cursor: pointer; }
/* Label-and-value lines: stock now, held bonus. */
.item-stats { display: grid; gap: .4rem; margin: 0; }
.item-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .45rem .75rem;
    border-radius: var(--rn-radius-sm); background: var(--bs-tertiary-bg); }
.item-stats dt { font-size: .8rem; font-weight: 500; color: var(--rn-text-muted); }
.item-stats dd { margin: 0; font-weight: 800; }
.item-stats dd small { font-weight: 500; color: var(--rn-text-muted); }

.save-bar {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; justify-content: flex-end;
    padding: .75rem 0;
    background: linear-gradient(to top, var(--rn-bg) 75%, transparent);
}

/* ---------- pager under every list (100 rows a page) ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .75rem; }
.pager-info { font-size: .85rem; color: var(--rn-text-muted); }
.pager .pagination {
    --bs-pagination-color: var(--rn-primary-text); --bs-pagination-hover-color: var(--rn-primary-hover);
    --bs-pagination-active-bg: var(--rn-primary); --bs-pagination-active-border-color: var(--rn-primary);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--rn-primary) 25%, transparent);
    gap: .25rem;
}
.pager .page-link { min-width: 2.1rem; text-align: center; border-radius: var(--rn-radius-sm) !important; margin: 0 !important; }
@media print { .pager { display: none; } }

/* ---------- item pictures ---------- */
.item-picture { position: relative; width: 8.5rem; flex-shrink: 0; align-self: center; }
@media (min-width: 768px) { .item-picture { align-self: flex-start; } }
.item-picture-frame {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    aspect-ratio: 1; margin: 0; overflow: hidden; cursor: pointer;
    border: 1px dashed var(--bs-border-color); border-radius: var(--bs-border-radius-lg);
    background: var(--bs-tertiary-bg); color: var(--bs-secondary-color);
}
.item-picture-frame:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.item-picture-frame img { width: 100%; height: 100%; object-fit: contain; background: var(--k-bg-ffffff, #fff); }
.item-picture-empty { display: flex; flex-direction: column; align-items: center; }
.item-picture-empty[hidden], .item-picture-frame img[hidden] { display: none; }
/* A customer's or supplier's picture (2026-11-19): beside its name in the list, beside the heading of its statement. */
/* A party's kind written before its name (2026-11-19: «دەرمانخانەی» Shifa): lighter than the name. */
/* A report filter made small (ViewData["FilterClass"] = "rp-compact"; the sales report, 2026-11-19, the user's request): smaller boxes, labels
   and buttons, less room between them, every box in one row where the screen has room. Phones keep the usual sizes (16px boxes: no zoom). */
@media (min-width: 768px) {
    .rp-compact { padding: .35rem .55rem !important; }
    .rp-compact > .row { --bs-gutter-x: .25rem; --bs-gutter-y: .3rem; }
    .rp-compact .form-label { font-size: .68rem; margin-bottom: .05rem; color: var(--rn-text-muted); white-space: nowrap; }
    .rp-compact .form-control, .rp-compact .form-select { font-size: .8rem; height: 1.9rem; min-height: 0; padding-top: .15rem; padding-bottom: .15rem; }
    .rp-compact .form-control { padding-inline: .4rem; }
    .rp-compact .form-select { padding-inline-start: .4rem; padding-inline-end: 1.5rem; background-size: 11px 9px; }
    .rp-compact input[type=date], .rp-compact input[data-dg=date] { width: 7.1rem; padding-inline: .3rem; }
    .rp-compact .btn { font-size: .78rem; height: 1.9rem; padding: .2rem .5rem; display: inline-flex; align-items: center; white-space: nowrap; }
    .rp-compact > .row > .rp-grow { flex: 1 1 4.6rem; min-width: 4.2rem; max-width: 10rem; width: auto; }
    .rp-compact > .row > .rp-wide { flex-basis: 6.5rem; max-width: 13rem; }
    .rp-compact [data-field="ranges"] { gap: .2rem !important; flex-wrap: nowrap !important; }
    .rp-compact [data-field="ranges"] .btn { padding-inline: .4rem; }
    /* Print as an icon (its name on hover). */
    .rp-compact .rp-print-text { display: none; }
    .rp-compact [data-field="print"] .bi-printer { margin: 0 !important; }
}
/* The sales report's returns (2026-11-19, the user's sample): each return's facts on a tinted row, its lines' heading small, under it. */
.sr-returns tbody + tbody { border-top: 3px solid var(--rn-border); }
.sr-returns .sr-return-head > td { background: var(--k-bg-eef3fa, #eef3fa); border-bottom-color: var(--k-bd-c9d6e8, #c9d6e8); }
.sr-returns .sr-return-cols > th { font-size: .75rem; color: var(--rn-text-muted); font-weight: 600; background: var(--k-bg-ffffff, #fff); position: static; }
/* The sales report's company / representative tabs (the user's sample): the company's row with its total, then each customer's with the area. */
.sr-groups .sr-label { width: 1%; white-space: nowrap; font-size: .8rem; font-weight: 600; color: var(--rn-text-muted); position: static; }
.sr-groups .sr-group-head > * { background: var(--k-bg-fff4d6, #fff4d6); border-top: 3px solid #f1d38a; }
.sr-groups .sr-group-head .sr-group-name { font-weight: 800; font-size: 1.05rem; }
.sr-groups .sr-group-total { font-weight: 800; font-size: 1.05rem; color: var(--k-fg-7a4b00, #7a4b00); }
.sr-groups .sr-customer-head > * { background: var(--k-bg-e9f6ee, #e9f6ee); border-bottom-color: var(--k-bd-c3e4cf, #c3e4cf); }
.sr-groups .sr-area { color: var(--k-fg-1f6b3a, #1f6b3a); }
.sr-groups .sr-return-row .num { color: var(--k-fg-b42318, #b42318); }
.party-prefix { color: var(--rn-text-muted); font-weight: 600; margin-inline-end: .3em; }
.party-thumb { width: 2rem; height: 2rem; object-fit: cover; border-radius: .4rem; border: 1px solid var(--rn-border); margin-inline-end: .45rem; vertical-align: middle; background: var(--k-bg-ffffff, #fff); }
.party-photo { flex: none; display: block; width: 4.25rem; height: 4.25rem; }
.party-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: .6rem; border: 1px solid var(--rn-border); background: var(--k-bg-ffffff, #fff); }
.item-picture-clear { position: absolute; top: .25rem; inset-inline-end: .25rem; padding: .1rem .35rem; }
.item-thumb {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 2.5rem; height: 2.5rem; border-radius: var(--bs-border-radius);
    object-fit: cover; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color-translucent);
}
.item-thumb-empty { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }

/* ---------- document header in one row (purchase) ---------- */
@media (min-width: 1200px) {
    .doc-head .dh-date { width: 9.5rem; }
    .doc-head .dh-currency { width: 6.5rem; }
    .doc-head .dh-rate { width: 7rem; }
    .doc-head .dh-notes { width: 8rem; }
    .doc-head .dh-place { width: 9.5rem; }
    .doc-head .col-xl { min-width: 11rem; }
}

/* ---------- focus mode: sale / purchase entry use the whole screen ---------- */
.app-focus .app-main { margin-inline-start: 0 !important; }
/* A slimmer top bar with the page's title in the middle, larger and bold (user's request, 2026-10-20). */
.app-focus { --rn-topbar-height: 46px; }
.app-focus .app-topbar { padding: 0 .6rem; gap: .5rem; }
.app-focus .app-topbar .btn-icon { width: 34px; height: 34px; border-radius: 8px; }
.app-topbar-center {
    position: absolute; inset-inline: 6rem; text-align: center; pointer-events: none;
    font-size: 1.3rem; font-weight: 800; letter-spacing: 0;
}
/* Phones: the title keeps between the close button and the buttons on the other side (account, language, the offline
   dot), cut with … rather than running under them. */
@media (max-width: 575.98px) {
    .app-topbar-center { font-size: 1.1rem; inset-inline: 3.25rem 9.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* The back button (2026-11-03) beside the close button: the centred title keeps clear of both. */
@media (max-width: 575.98px) {
    .app-focus .app-topbar:has(.app-back:not([hidden])) .app-topbar-center { inset-inline-start: 5.6rem; }
}
.app-focus .app-content { max-width: none; padding: .5rem .75rem; }
@media (max-width: 991.98px) {
    .app-focus .app-content { padding: .5rem .5rem 0; }
}

/* ---------- document footer: totals and save always visible at the bottom ---------- */
.doc-footer {
    position: sticky; bottom: 0; z-index: 20;
    box-shadow: 0 -6px 20px rgba(16, 24, 40, .10);
}
.doc-footer-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1.5rem; }
.doc-footer .df-amount { width: 8rem; }
.doc-footer .df-cashbox { width: 10rem; }
.doc-footer-save { margin-inline-start: auto; min-width: 12rem; }
/* The return slip's footer (2026-11-30): the total, the old debt and the balance after the return, a thin line between them. */
.doc-footer-row .rs-sum + .rs-sum:not([hidden]) { padding-inline-start: 1.5rem; border-inline-start: 1px solid var(--rn-border); }
@media (max-width: 767.98px) {
    .doc-footer { bottom: 0; border-radius: 0; margin-inline: -.75rem; }
    .doc-footer-row { gap: .5rem .75rem; }
    .doc-footer .df-amount { width: 6.5rem; }
    .doc-footer .df-cashbox { width: 8rem; }
    .doc-footer-save { width: 100%; }
}

/* ---------- purchase page: compact ---------- */
/* The app-wide .form-control padding (.6rem) also hits the -sm controls; give them their real small size here. */
.doc-page .form-control-sm { padding: .25rem .5rem; }
.doc-page .form-select-sm { padding-top: .25rem; padding-bottom: .25rem; padding-inline-start: .5rem; }
.doc-page .doc-head .form-control, .doc-page .doc-head .form-select, .doc-page .pos-search .form-control { padding-top: .4rem; padding-bottom: .4rem; }
.doc-page .pos-search .form-control { font-size: 1rem; }
.doc-page .doc-head .btn-group .btn { padding-top: .4rem; padding-bottom: .4rem; }
/* 3: a slim heading row in a soft tint of the brand colour */
.doc-lines thead th {
    padding: .4rem .5rem; font-size: .8rem; font-weight: 700; white-space: nowrap;
    background: color-mix(in srgb, var(--rn-primary) 9%, var(--rn-surface)); color: var(--rn-primary-text);
    border-bottom: 2px solid color-mix(in srgb, var(--rn-primary) 25%, transparent);
}
.doc-lines thead th:first-child { border-start-start-radius: var(--rn-radius-sm); }
.doc-lines thead th:last-child { border-start-end-radius: var(--rn-radius-sm); }
/* 4: low rows */
.doc-lines tbody td { padding: .2rem .5rem; }
.doc-lines tbody .btn-sm { padding: .15rem .45rem; }

/* 1: transport / customs costs, one small line each */
.doc-page .cost-row { display: flex; align-items: center; gap: .3rem; padding: .3rem 0; border-bottom: 1px solid var(--rn-border); }
.doc-page .cost-row .form-control-sm, .doc-page .cost-row .form-select-sm { font-size: .8rem; min-height: 0; }
.doc-page .cost-row .cost-desc { flex: 1 1 5rem; min-width: 0; }
.doc-page .cost-row .cost-amount { flex: 0 0 5.5rem; }
.doc-page .cost-row .cost-select { flex: 0 1 7.5rem; min-width: 0; padding-inline-end: 1.6rem; background-position: left .4rem center; }
[dir="ltr"] .doc-page .cost-row .cost-select { background-position: right .4rem center; }
.doc-page .cost-row .btn-sm { padding: .1rem .4rem; font-size: .8rem; }

/* 2: the page fills the screen, so the totals bar sits at the bottom even when there are few lines */
.app-focus .app-content { display: flex; flex-direction: column; }
.doc-page { flex: 1; display: flex; flex-direction: column; }
.doc-page .doc-footer { margin-top: auto; }

/* 5: the line list scrolls in its own box; its heading row stays at the top of that box */
.doc-lines-scroll { overflow: auto; max-height: 55vh; }
.doc-lines thead th { position: sticky; top: 0; z-index: 2; }
.doc-costs-scroll { overflow-y: auto; max-height: 40vh; }
.doc-side { display: flex; flex-direction: column; gap: .5rem; }
/* The two cards beside the purchase lines: slim headings with small buttons. */
.doc-side > .card > .card-header { padding: .3rem .6rem; font-size: .875rem; min-height: 2.25rem; }
.doc-side > .card > .card-header .btn-sm { padding: .1rem .5rem; font-size: .75rem; }
/* ---------- purchase page on phones and upright tablets (below 992px), like Zoho / Odoo on a phone ---------- */
/* The lines are cards (a tap opens the line's window); the header folds behind one line; the footer keeps the total and
   Save on one line with the rest behind "Details"; the last purchases are in the line's window instead of beside it. */
.pc-list { display: flex; flex-direction: column; gap: .5rem; }
.pc-card {
    display: flex; flex-direction: column; gap: .15rem; width: 100%; text-align: start; padding: .6rem .8rem;
    border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--rn-surface); color: var(--rn-text);
}
.pc-card:active { background: color-mix(in srgb, var(--rn-primary) 6%, var(--rn-surface)); }
.pc-card.pos-row-new { animation: pos-flash .8s ease; }
.pc-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.pc-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.pc-total { font-weight: 800; color: var(--rn-primary-text); white-space: nowrap; }
.pc-sub { font-size: .85rem; color: var(--rn-text-muted); }
.pc-meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
.pc-meta:empty { display: none; }
.dh-summary { display: flex; align-items: center; text-align: start; border: 1px solid var(--rn-border); font-size: .9rem; }
.dh-chevron { transition: transform .15s; }
.doc-head.dh-open .dh-chevron { transform: rotate(180deg); }
.df-toggle { font-size: .75rem; text-decoration: none; vertical-align: baseline; }
.doc-footer.df-open .df-toggle .bi { transform: rotate(180deg); display: inline-block; }
@media (min-width: 992px) { #pur-cards { display: none; } }
@media (max-width: 991.98px) {
    #purchase .doc-lines { display: none; }
    #purchase .doc-side > [data-field="lastPurchases"] { display: none !important; }
    #purchase .doc-head:not(.dh-open) .dh-more { display: none !important; }
    #purchase .doc-footer:not(.df-open) .df-more { display: none !important; }
    #purchase .doc-footer-row { align-items: center; }
    #purchase .doc-footer-save { width: auto; flex: 1 1 10rem; min-width: 0; }
    #purchase .doc-lines-scroll { max-height: none; }
}

/* A window that rises from the bottom on phones (a "sheet"); a normal window on wider screens. */
.sheet .form-control, .sheet .form-select { min-height: 2.6rem; }
/* The stock count's number pad after a camera scan (2026-11-19): the number large, twelve keys a finger can hit. */
.cp-value { font-size: 2.4rem; font-weight: 800; text-align: center; line-height: 1.2; padding: .25rem .5rem; margin-bottom: .5rem;
    border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--k-bg-f8fafc, #f8fafc); direction: ltr; }
.cp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; direction: ltr; }
.cp-key { font-size: 1.5rem; font-weight: 700; padding: .55rem 0; border: 1px solid var(--rn-border); }
.cp-key:active { background: var(--k-bg-e2e8f0, #e2e8f0); }
.pl-stepper .btn { min-width: 2.75rem; }
.pl-stepper .form-control { font-weight: 700; }
.pl-total {
    display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; padding: .5rem .7rem;
    border-radius: var(--rn-radius-sm); background: color-mix(in srgb, var(--rn-primary) 7%, var(--rn-surface)); color: var(--rn-primary-text);
}
.pl-hist { margin-top: .75rem; }
.pl-hist-row { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--rn-border); font-size: .85rem; }
.pl-hist-row:last-child { border-bottom: 0; }
@media (max-width: 575.98px) {
    .modal.sheet .modal-dialog { position: fixed; inset-inline: 0; bottom: 0; margin: 0; width: 100%; max-width: none; }
    .modal.sheet.fade .modal-dialog { transform: translateY(100%); transition: transform .22s ease-out; }
    .modal.sheet.show .modal-dialog { transform: none; }
    .modal.sheet .modal-dialog-scrollable { height: auto; max-height: 92vh; }
    .modal.sheet .modal-content { border: 0; border-radius: 1rem 1rem 0 0; max-height: 92vh; }
    .sheet .form-control, .sheet .form-select { font-size: 16px; } /* iPhones zoom into smaller boxes */
}

/* ---------- quick purchase: the purchase page's picture view (like the sale page) ---------- */
#purchase.pur-mode-list #pur-browse { display: none !important; }
#purchase.pur-mode-grid .doc-lines-scroll, #purchase.pur-mode-grid .cols-dd { display: none !important; }
.pos-tab[data-tab="low"] i { color: var(--k-fg-d92d20, #d92d20); }
.pos-tab.active[data-tab="low"] i { color: #ffd2cc; }
.pur-tile { cursor: pointer; }
.pur-tile.pos-tile-out .pos-tile-pic { opacity: 1; } /* nothing in stock is what a purchase is for: not dimmed */
.pur-tile-minus { /* left in every language: the count (a left-to-right .num) is always on the right */
    position: absolute; top: 6px; left: 6px; width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
    border-radius: 999px; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); color: var(--rn-text); box-shadow: 0 1px 3px rgba(16, 24, 40, .14);
}
.pur-tile-minus[hidden] { display: none; }
.pur-lines-count {
    position: absolute; top: -.5rem; inset-inline-end: -.5rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .25rem;
    display: grid; place-items: center; border-radius: 999px; background: var(--rn-accent); color: #2b1a00; font-size: .7rem; font-weight: 800;
}
.pur-lines-count[hidden] { display: none; }

/* The camera window (barcode-scan.js): the camera's picture across the window, black around it. */
.scan-body { background: #000; }
.scan-view { width: 100%; min-height: 18rem; }
.scan-view video { width: 100% !important; height: auto !important; display: block; }
@media (max-width: 575.98px) { .scan-modal .modal-body { display: flex; align-items: center; } }

/* The search's items as a list or as pictures (purchase page). */
.pr-switch { position: sticky; top: 0; z-index: 2; display: flex; gap: .3rem; padding: .35rem; background: var(--rn-surface); border-bottom: 1px solid var(--rn-border); }
.pr-switch button { flex: 1; border: 1px solid var(--rn-border); background: transparent; border-radius: .45rem; padding: .25rem .5rem; font-size: .8rem; color: var(--rn-text); }
.pr-switch button.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.pr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr)); gap: .45rem; padding: .45rem; background: var(--rn-surface); }

/* The item's last purchases: small; the invoice's day under its number. */
.hist-table { font-size: .8rem; }
.hist-table th { font-weight: 600; white-space: nowrap; }
/* Every table head sticks under the top bar; inside this box it sticks to the top of the box, and it is low. */
.app-content .doc-side .table.hist-table > thead > tr > th { top: 0; padding: .25rem .4rem; }
.hist-table td { white-space: nowrap; padding: .2rem .4rem; }
.hist-table .hist-party { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
.hist-table .exp-chip { font-size: .72rem; }
/* Narrow: the supplier may wrap and the expiry chip loses its icon, so the price stays in view. */
@media (max-width: 575.98px), (min-width: 1200px) and (max-width: 1399.98px) {
    .app-content .doc-side .table.hist-table > thead > tr > th, .hist-table td { padding-inline: .25rem; }
    .hist-table .hist-party { white-space: normal; }
    .hist-table .exp-chip i { display: none; }
}
.hist-sub { display: block; font-size: .7rem; color: var(--bs-secondary-color); }
/* Return slip (Returns/Slip): columns with nothing in them close up; goods without an invoice in a box of their own. */
.rs-lines.rs-no-expiry .rs-col-expiry, .rs-lines.rs-no-free .rs-col-free, .rs-lines.rs-no-held .rs-col-held { display: none; }
.rs-sources { font-size: .85rem; }
.rs-sources td { white-space: nowrap; }
.rs-sources .rs-party-cell { white-space: normal; max-width: 12rem; }
.rs-loose { border: 1px dashed var(--rn-border); border-radius: var(--rn-radius-sm); padding: .5rem .6rem; }
/* A table head in a window sticks to the top of the window's own scroll box, not under the page's top bar. */
.app-content .modal .table > thead > tr > th { top: 0; }
.slip-cancelled td { text-decoration: line-through; color: #9ca3af; }
/* A document handed to someone (expired goods sent back): two lines to sign under it. */
.doc-view-sign { display: flex; gap: 3rem; margin-top: 3.5rem; }
.doc-view-sign > div { flex: 1; border-top: 1px solid var(--rn-text-muted); padding-top: .4rem; text-align: center; font-size: .85rem; color: var(--rn-text-muted); }
/* Phones: the window's invoices and the slip's lines are cards (doc-stack); a card's empty cell takes no room. */
@media screen and (max-width: 767.98px) {
    .rs-sources.doc-stack td, .rs-lines.doc-stack td { white-space: normal; text-align: start !important; }
    .rs-sources.doc-stack td:empty, .rs-lines.doc-stack td:empty { display: none; }
    .rs-lines.doc-stack .dl-remove { display: flex; gap: .2rem; }
    .rs-lines.doc-stack .dl-item { padding-inline-end: 5rem; }
}
/* Wide screens: the purchase page is exactly one screen high - header on top, totals at the bottom,
   and the lines and costs share the middle, each scrolling by itself. */
@media (min-width: 1200px) {
    .app-focus .app-main:has(.doc-page) { height: 100vh; height: 100dvh; min-height: 0; }
    .app-focus .app-content:has(.doc-page) { min-height: 0; }
    .doc-page { min-height: 0; }
    .doc-page .doc-body { flex: 1; min-height: 0; }
    .doc-page .doc-body > [class*="col-"] { height: 100%; }
    .doc-page .doc-lines-body, .doc-page .doc-costs-body { display: flex; flex-direction: column; min-height: 0; }
    .doc-page .doc-body .card { min-height: 0; }
    .doc-page .doc-lines-scroll, .doc-page .doc-costs-scroll { flex: 1; max-height: none; min-height: 0; }
    /* The column beside the lines: the last purchases take the room (five rows), transport and customs below keep
       three rows (then they scroll); alone in the column, either takes it all. */
    .doc-page .doc-side > .card { flex: 1 1 0; display: flex; flex-direction: column; }
    .doc-page .doc-side > .card > .card-body { flex: 1; }
    .doc-page .doc-side > [data-field="costs"] { flex: 0 0 auto; }
    .doc-page .doc-side > [data-field="costs"] > .card-body { flex: none; height: calc(3 * var(--cost-row, 2.5rem) + 1rem); }
    .doc-page .doc-side:has(> [data-field="lastPurchases"].field-off) > [data-field="costs"] { flex: 1 1 0; }
    .doc-page .doc-side:has(> [data-field="lastPurchases"].field-off) > [data-field="costs"] > .card-body { flex: 1; height: auto; }
}

/* sale page: the quantity stepper in a table cell */
.doc-page .pos-qty .btn { padding: .15rem .45rem; }
.doc-page .pos-qty .form-control { padding: .2rem .3rem; min-width: 3rem; }

/* sale page: the save / print buttons */
.doc-footer-actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 767.98px) {
    .doc-footer-actions { width: 100%; }
    .doc-footer-actions #pos-save { flex: 1; }
}


/* ---------- invoice lists (sales, purchases, returns) ---------- */
.inv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 991.98px) { .inv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } }
.inv-kpi {
    display: flex; align-items: center; gap: .75rem; padding: .55rem .9rem;
    background: var(--rn-surface); border: 1px solid var(--rn-border); border-radius: var(--rn-radius); box-shadow: var(--rn-shadow);
}
.inv-kpi-icon {
    display: grid; place-items: center; flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: 12px; font-size: 1.2rem;
    background: color-mix(in srgb, var(--rn-primary) 10%, transparent); color: var(--rn-primary-text);
}
.inv-kpi-good .inv-kpi-icon { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.inv-kpi-warn .inv-kpi-icon { background: var(--k-bg-fdf0e3, #fdf0e3); color: var(--k-fg-b25e09, #b25e09); }
.inv-kpi-label { font-size: .8rem; color: var(--rn-text-muted); }
.inv-kpi-value { font-weight: 800; font-size: 1.15rem; line-height: 1.3; }
.inv-kpi-value small { font-size: .7rem; font-weight: 600; color: var(--rn-text-muted); }

/* The heading row stays just under the sticky top bar while the page scrolls. */
.inv-table-card { overflow: visible; }
.inv-table thead th {
    position: sticky; top: var(--rn-topbar-height); z-index: 5;
    padding: .65rem .75rem; font-size: .78rem; font-weight: 700; white-space: nowrap; letter-spacing: .01em;
    background: color-mix(in srgb, var(--rn-primary) 9%, var(--rn-surface)); color: var(--rn-primary-text);
    border-bottom: 2px solid color-mix(in srgb, var(--rn-primary) 25%, transparent);
}
.inv-table thead th:first-child { border-start-start-radius: var(--rn-radius); }
.inv-table thead th:last-child { border-start-end-radius: var(--rn-radius); }
.inv-table tbody td { padding: .4rem .75rem; border-color: var(--rn-border); }
.inv-table tbody tr:hover td { background: color-mix(in srgb, var(--rn-primary) 3%, transparent); }
.inv-table tbody tr:last-child td { border-bottom: 0; }
.inv-cancelled td, .inv-card.inv-cancelled { opacity: .62; }
.inv-cancelled .num.fw-bold { text-decoration: line-through; }

.inv-pill {
    display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.inv-pill-paid { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.inv-pill-partial { background: var(--k-bg-fff4d6, #fff4d6); color: var(--k-fg-8a5a00, #8a5a00); }
.inv-pill-credit { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.inv-pill-cancelled { background: var(--k-bg-eef0f2, #eef0f2); color: var(--k-fg-5b6470, #5b6470); }
.inv-pill-edited { background: var(--k-bg-fff4d6, #fff4d6); color: var(--k-fg-8a5a00, #8a5a00); }
.inv-pill-edited:hover { background: var(--k-bg-ffe9a8, #ffe9a8); color: var(--k-fg-6b4600, #6b4600); }

.inv-actions { display: inline-flex; gap: .25rem; }
.inv-act {
    width: 2rem; height: 2rem; padding: 0; display: inline-grid; place-items: center; border-radius: 8px;
    color: var(--rn-text-muted); background: transparent; border: 1px solid transparent;
}
.inv-act:hover { color: var(--rn-primary-text); background: color-mix(in srgb, var(--rn-primary) 8%, transparent); border-color: color-mix(in srgb, var(--rn-primary) 20%, transparent); }
.inv-act-danger:hover { color: var(--k-fg-b42318, #b42318); background: var(--k-bg-fdecec, #fdecec); border-color: var(--k-bd-f6c9c5, #f6c9c5); }

/* tabs and the new-document button on one line */
.inv-tabs { display: flex; align-items: flex-end; gap: .75rem; border-bottom: 1px solid var(--bs-border-color); }
.inv-tabs .nav-tabs { border-bottom: 0; }
.inv-tabs .inv-new { margin-bottom: .3rem; }

/* free quantity (bonus) column: a soft green so it reads as "given", hidden when the business does not use it */
.doc-lines.no-bonus .col-bonus { display: none; }
.doc-lines.no-expiry .col-expiry { display: none; } /* expiry dates switched off for the business */
.doc-lines.no-expiry .col-batch, .doc-lines.no-batch .col-batch { display: none; } /* batch numbers part off (2026-11-05) */
.doc-lines .input-bonus { background: var(--k-bg-f0faf4, #f0faf4); border-color: var(--k-bd-cfe9da, #cfe9da); color: var(--k-fg-1e7b4a, #1e7b4a); }
.doc-lines .input-bonus[readonly] { background: var(--bs-tertiary-bg); color: var(--rn-text-muted); }

/* ---------- picture point of sale ---------- */
.pos-mode-list .pos-browse, .pos-mode-list .pos-side, .pos-mode-list .pos-cart-button { display: none !important; }
.pos-mode-grid .pos-list { display: none !important; }
.pos-side { display: none; }
@media (min-width: 1200px) {
    .pos-mode-grid .pos-main { width: 66.6667%; }
    .pos-mode-grid .pos-side { display: block; height: 100%; }
    .pos-cart-button { display: none !important; }
}
.pos-mode-switch .btn.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }

.pos-browse { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pos-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.pos-tab {
    flex-shrink: 0; border: 1px solid var(--rn-border); background: var(--rn-surface); color: var(--rn-text);
    border-radius: 999px; padding: .25rem .85rem; font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.pos-tab:hover { border-color: var(--rn-primary); color: var(--rn-primary-text); }
.pos-tab.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.pos-tab[data-tab="fav"] i { color: var(--k-fg-f5b301, #f5b301); }
.pos-tab.active[data-tab="fav"] i { color: #ffe08a; }
.pos-tab[data-tab="top"] i { color: var(--k-fg-e8590c, #e8590c); }
.pos-tab.active[data-tab="top"] i { color: #ffc9a8; }

.pos-grid-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 2px; }
@media (max-width: 1199.98px) { .pos-grid-scroll { overflow: visible; } }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr)); gap: .5rem; }
@media (max-width: 575.98px) { .pos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; } }

.pos-tile {
    display: flex; flex-direction: column; text-align: start; padding: 0; overflow: hidden;
    background: var(--rn-surface); border: 1px solid var(--rn-border); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.pos-tile:hover { border-color: color-mix(in srgb, var(--rn-primary) 45%, transparent); box-shadow: 0 6px 16px rgba(16, 24, 40, .10); transform: translateY(-1px); }
.pos-tile:active { transform: scale(.97); }
.pos-tile-pic { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--k-bg-ffffff, #fff); }
.pos-tile-pic img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 4px; }
.pos-tile-initials { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.4rem; letter-spacing: .03em; }
.pos-tile-name { padding: .25rem .5rem 0; font-weight: 600; font-size: .8rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
/* An item's name on the sale and purchase pages (2026-11-19, the user's request): the lines' table keeps room for it and shows two
   lines (three for a very long one), the cart two, a picture two; the longer the name, the smaller its letters (DocTools.nameClass:
   name-long over 32 letters, name-xlong over 60); the whole name on hover (title) and on the phone's cards. */
.doc-lines .col-item .line-name { min-width: 14rem; } /* a cell's own min-width is not kept in a table: its content's is */
.doc-lines td.col-unit .form-select { min-width: 5.5rem; } /* a crowded table squeezed it to its arrow */
.line-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
    font-weight: 600; line-height: 1.25; }
/* A name in another script than the page (an English name on a Kurdish page) reads in its own direction (dir=auto: its "…" at its end)
   but stays on the column's side. */
html[dir=rtl] :is(.line-name, .pos-cline-name, .pos-tile-name, .pc-name)[dir] { text-align: right; }
html[dir=ltr] :is(.line-name, .pos-cline-name, .pos-tile-name, .pc-name)[dir] { text-align: left; }
.line-name.name-long { font-size: .88em; }
.line-name.name-xlong { font-size: .8em; -webkit-line-clamp: 3; }
.col-item > .col-code { display: inline-block; margin-inline-end: .35rem; font-size: .75rem; }
.pos-cline-name.name-long { font-size: .78rem; }
.pos-cline-name.name-xlong { font-size: .72rem; }
.pos-tile-name.name-long { font-size: .74rem; }
.pos-tile-name.name-xlong { font-size: .68rem; }
.pc-name.name-long { font-size: .92em; }
.pc-name.name-xlong { font-size: .85em; }
.pos-tile-price { padding: 0 .5rem .35rem; font-weight: 800; color: var(--rn-primary-text); font-size: .85rem; }
.pos-tile-stock {
    position: absolute; bottom: 6px; inset-inline-start: 6px; padding: 0 .4rem; border-radius: 999px;
    background: var(--k-bg-ffffffe6, rgba(255, 255, 255, .9)); border: 1px solid var(--rn-border); font-size: .7rem; color: var(--rn-text-muted);
}
.pos-tile-out .pos-tile-pic { opacity: .55; }
.pos-tile-out .pos-tile-stock { background: var(--k-bg-fdecec, #fdecec); border-color: var(--k-bd-f6c9c5, #f6c9c5); color: var(--k-fg-b42318, #b42318); font-weight: 700; }
.pos-tile-count {
    position: absolute; top: 6px; inset-inline-end: 6px; min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem;
    display: grid; place-items: center; border-radius: 999px; background: var(--rn-primary); color: #fff;
    font-size: .8rem; font-weight: 800; box-shadow: 0 2px 6px rgba(var(--rn-primary-rgb), .35);
}
.pos-tile-count[hidden] { display: none; }
@keyframes pos-bump { 0% { transform: scale(1); } 40% { transform: scale(.94); } 100% { transform: scale(1); } }
.pos-bump { animation: pos-bump .25s ease; border-color: var(--rn-primary); }

/* the cart beside the grid, and the same list in the phone sheet */
.pos-cart-card { display: flex; flex-direction: column; min-height: 0; }
.pos-cart-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.pos-cline { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-bottom: 1px solid var(--rn-border); }
.pos-cline .item-thumb { width: 2.2rem; height: 2.2rem; }
.pos-cline-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: start; background: none; border: 0; padding: 0; }
.pos-cline-name { font-weight: 600; font-size: .85rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pos-cline-sub { font-size: .75rem; color: var(--rn-text-muted); }
.pos-cline .pos-qty { width: 6.5rem; flex-shrink: 0; }
.pos-cline .pos-qty .btn { width: 1.7rem; padding: .1rem 0; }
.pos-cline .pos-qty .form-control { padding: .15rem .2rem; }
.pos-cline-total { width: 5rem; text-align: end; font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.pos-cline-remove { color: var(--rn-text-muted); padding: .1rem .3rem; }
.pos-cline-remove:hover { color: var(--k-fg-b42318, #b42318); }
@keyframes pos-flash { from { background: color-mix(in srgb, var(--rn-primary) 14%, transparent); } to { background: transparent; } }
.pos-cline-new { animation: pos-flash .8s ease; }
/* the lines table: the line just added (or added again) flashes */
.pos-row-new > td { animation: pos-flash .8s ease; }
.pos-cart-sheet { height: 70vh; border-radius: 16px 16px 0 0; }

.pos-quick-cash { display: flex; flex-wrap: wrap; gap: .3rem; align-self: flex-end; }
.pos-quick-cash:empty { display: none; }

/* tiles: the picture box keeps its 4:3 shape whatever the image's own size, so all tiles line up */
.pos-tile-pic { overflow: hidden; }
.pos-tile-pic img { position: absolute; inset: 0; }

/* sale page on phones: header in two short rows, footer as compact as it can be, so the tiles keep the screen */
@media (max-width: 767.98px) {
    #pos .doc-head .form-label { display: none !important; }
    #pos .doc-head .card-body { padding: .4rem .5rem; }
    #pos .doc-head .form-control, #pos .doc-head .form-select, #pos .doc-head .btn { padding-top: .35rem; padding-bottom: .35rem; font-size: .9rem; }
    #pos .doc-footer .card-body { padding: .35rem .5rem; }
    #pos .doc-footer-row { gap: .25rem .6rem; align-items: center; }
    #pos .doc-footer-row label, #pos .doc-footer-row .small { font-size: .7rem; line-height: 1.1; }
    #pos .doc-footer-row #pos-total { font-size: 1.15rem !important; }
    #pos .doc-footer .df-amount { width: 5.25rem; padding: .15rem .35rem; }
    #pos .pos-quick-cash { order: 5; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
    #pos .pos-quick-cash .btn { padding: .15rem .55rem; flex-shrink: 0; }
    #pos .doc-footer-actions { order: 6; gap: .35rem; }
    #pos .doc-footer-actions .btn-lg { padding: .4rem .75rem; font-size: 1rem; }
    #pos #pos-saved { width: 100%; order: -1; }
}

/* 1: cart line - price on its own line, the unit under it */
.pos-cline-price { font-size: .8rem; font-weight: 700; color: var(--rn-text); line-height: 1.2; text-align: start; }
.pos-cline-sub { line-height: 1.2; }
[dir="rtl"] .pos-cline-price { text-align: right; }

/* 2: the save / print buttons of the sale page a little smaller */
#pos .doc-footer-actions .btn-lg { padding: .5rem 1rem; font-size: 1rem; border-radius: var(--rn-radius-sm); }
#pos .doc-footer-actions #pos-save { padding-inline: 1.4rem; }

/* ---------- the sale and purchase pages, slimmer (2026-11-28, the user's screenshot: "more items in the list") ----------
   The top bar in the brand's colour with white text and icons (Odoo's, SAP Fiori's and QuickBooks' coloured bar over an entry form);
   on a computer the header and the search row are smaller, the export buttons sit in the search row (data-tx-slot), and the footer is
   one even row: small captions over their figures, the buttons of one height, the less used ones without a border (Fiori's
   "transparent" buttons), the actions apart from the figures by a thin line. Phones and tablets keep their own layout. */
.app-focus-brand .app-topbar { background: var(--rn-primary); border-bottom-color: var(--rn-primary); backdrop-filter: none; color: #fff; }
.app-focus-brand .app-topbar-title { color: #fff; }
.app-focus-brand .app-topbar .btn-light {
    --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .16); --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: rgba(255, 255, 255, .26); --bs-btn-active-border-color: transparent; --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 255, 255, 255;
}
.app-focus-brand .app-topbar .net-pill.on { background: rgba(255, 255, 255, .18); }
/* the export buttons beside the search: icons only, as high as the row's other buttons; not in the pictures view */
.doc-export { display: flex; align-self: stretch; }
.doc-export:empty { display: none; }
.doc-export .tx-bar { flex-wrap: nowrap; align-items: stretch; gap: .2rem; padding: 0; margin: 0; border: 0; background: none; }
.doc-export .tx-btn span { display: none; }
.doc-export .tx-btn { --bs-btn-font-size: .95rem; padding: 0 .55rem; }
.pos-mode-grid #pos-export, #purchase.pur-mode-grid #pur-export { display: none; }
@media (max-width: 991.98px) {
    /* phones and tablets: the export buttons under the search, at the end, as before */
    .doc-search-row { flex-wrap: wrap; }
    .doc-search-row > .doc-export { order: 9; flex: 1 1 100%; justify-content: flex-end; }
}
#purchase .pur-actions { display: contents; }
@media (min-width: 992px) {
    /* the header: small captions, low boxes */
    .doc-page > .doc-head { margin-bottom: .35rem !important; }
    .doc-page .doc-head > .card-body { padding: .3rem .55rem; }
    .doc-page .doc-head > .card-body > .row { --bs-gutter-x: .5rem; --bs-gutter-y: .3rem; }
    .doc-page .doc-head .form-label { font-size: .72rem; line-height: 1.2; margin-bottom: .12rem !important; color: var(--rn-text-muted); }
    .doc-page .doc-head .form-control, .doc-page .doc-head .form-select { padding-top: .24rem; padding-bottom: .24rem; font-size: .9rem; min-height: 0; }
    .doc-page .doc-head .btn-group > .btn, .doc-page .doc-head .btn-group > label.btn { padding-top: .24rem; padding-bottom: .24rem; font-size: .88rem; }
    .doc-page .doc-head .input-group-text { padding-top: .24rem; padding-bottom: .24rem; font-size: .85rem; }
    /* the search row and the lines' card */
    .doc-page > .doc-body { margin-bottom: .35rem !important; }
    .doc-page .doc-lines-body { padding: .35rem !important; }
    .doc-page .doc-search-row { gap: .35rem !important; margin-bottom: .35rem !important; }
    .doc-page .pos-search .form-control { padding-top: .3rem; padding-bottom: .3rem; font-size: .95rem; }
    .doc-page .pos-search .input-group-text { padding-top: .3rem; padding-bottom: .3rem; }
    .doc-page .doc-search-row > .btn, .doc-page .doc-search-row > .btn-group > .btn, .doc-page .doc-search-row > .dropdown > .btn {
        padding-top: .3rem; padding-bottom: .3rem; font-size: .88rem; }
    .doc-page .pos-sale-tabs { margin-bottom: .35rem !important; }
    /* the footer: one even row */
    .doc-page .doc-footer > .card-body { padding: .3rem .6rem; }
    .doc-page .doc-footer-row { align-items: center; gap: .3rem 1.1rem; }
    .doc-page .doc-footer-row label.small, .doc-page .doc-footer-row .small { font-size: .7rem; line-height: 1.2; }
    .doc-page .doc-footer-row label.small { margin-bottom: .1rem; }
    #pos .doc-footer-row #pos-total, #purchase .doc-footer-row #pur-total { font-size: 1.35rem !important; }
    .doc-page .doc-footer .df-amount, .doc-page .doc-footer .disc-box .form-control { padding-top: .16rem; padding-bottom: .16rem; font-size: .88rem; }
    .doc-page .doc-footer .disc-box .btn { padding-top: .16rem; padding-bottom: .16rem; }
    #pos .doc-footer-actions, #purchase .pur-actions {
        display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; padding-inline-start: .9rem; border-inline-start: 1px solid var(--rn-border); }
    #pos .doc-footer .btn-lg, #purchase .doc-footer .btn-lg { padding: .3rem .7rem; font-size: .9rem; border-radius: var(--rn-radius-sm); }
    #pos .doc-footer-actions #pos-save, #purchase .pur-actions #pur-save { padding-inline: 1.25rem; font-weight: 600; }
    #purchase .pur-actions .doc-footer-save { margin-inline-start: 0; min-width: 9rem; }
    .doc-page .doc-footer .df-ghost { --bs-btn-border-color: transparent; --bs-btn-bg: transparent; --bs-btn-color: var(--rn-text-muted);
        --bs-btn-hover-bg: rgba(var(--rn-primary-rgb), .08); --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: var(--rn-primary-text);
        --bs-btn-active-bg: rgba(var(--rn-primary-rgb), .14); --bs-btn-active-border-color: transparent; --bs-btn-active-color: var(--rn-primary-text); }
    /* a line's batches beside its code and expiry date, not on a line of their own: a lower row, more lines in view */
    .doc-lines .col-item .lot-chips { display: inline-flex; margin-top: 0; margin-inline-start: .4rem; vertical-align: middle; }
    /* the quick cash buttons as low as the boxes beside them */
    #pos .pos-quick-cash { align-self: center; gap: .25rem; }
    #pos .pos-quick-cash .btn { padding: .16rem .5rem; font-size: .84rem; }
    /* the batch button of a line: its pencil only (its name in the tooltip) */
    .doc-lines .col-item .lot-pick-btn { font-size: 0; gap: 0; padding: .05rem .4rem; }
    .doc-lines .col-item .lot-pick-btn .bi { font-size: .78rem; }
    /* a line's item on one row in smaller letters (the user's follow-up the same day): its name (cut with … when the column is short,
       the whole name in its tooltip), code, expiry date and batches side by side; what a line may have more (held bonus, IMEIs, weights)
       stays under it */
    .doc-lines .line-one { display: flex; align-items: center; gap: .35rem; flex-wrap: nowrap; min-width: 0; }
    .doc-lines .line-one > .line-name { flex: 0 1 auto; min-width: 5rem; display: block; white-space: nowrap; text-overflow: ellipsis;
        font-size: .84rem; line-height: 1.3; }
    .doc-lines .line-one > :not(.line-name) { flex: none; margin: 0 !important; }
    .doc-lines .line-one > .col-code { font-size: .7rem; }
    .doc-lines .line-one .lot-chips { flex-wrap: nowrap; }
    .doc-lines .line-one :is(.exp-chip, .lot-chip, .promo-chip, .level-chip, .rule-chip, .offer-chip, .med-tag) { font-size: .68rem; white-space: nowrap; }
    /* the item's own expiry chip is left out where the batches taken show theirs */
    .doc-lines .line-one:has(.lot-chip) > .exp-chip { display: none; }
    /* a line's boxes keep one row too (an input group wraps by itself: the − / + of the quantity went under it) */
    .doc-lines .input-group { flex-wrap: nowrap; }
}
@media (max-width: 991.98px) { .doc-lines .line-one { display: contents; } }
@media (min-width: 992px) and (max-width: 1699.98px) {
    /* a narrower computer: the less used footer buttons and the cashier receipt show their icon (and F-key), their names in the tooltip */
    .doc-page .doc-footer .df-ghost > span.ms-1:not(.badge), #pos-print-receipt > span.ms-1 { display: none !important; }
}

/* ---------- every list table: a coloured heading row that stays in view ---------- */
/* The heading sticks just under the top bar while the page scrolls. The document line tables (.doc-lines)
   scroll inside their own box and keep their own rule. */
.app-content .table:not(.doc-lines) > thead > tr > th {
    position: sticky; top: var(--rn-topbar-height); z-index: 5;
    --bs-table-bg: color-mix(in srgb, var(--rn-primary) 9%, var(--rn-surface));
    background: color-mix(in srgb, var(--rn-primary) 9%, var(--rn-surface));
    color: var(--rn-primary-text); font-size: .8rem; font-weight: 700; white-space: nowrap;
    padding-top: .6rem; padding-bottom: .6rem;
    border-bottom: 2px solid color-mix(in srgb, var(--rn-primary) 25%, transparent);
}
/* Every list table: the headings and their figures in the middle of the column, on one level (the user's rule, 2026-11-19).
   Left as they were: tables a line is typed into (a box in them: the document lines, price lists, grids — ticks do not count),
   the accounting statements (.pl-table: their rows are indented under each other), the guide's tables of text, and a phone's
   cards (.doc-stack below 768px). A cell's own flex row (a picture beside a name, row buttons) is centred too. */
.app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    text-align: center !important; vertical-align: middle;
}
.app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) > .d-flex {
    justify-content: center;
}
/* ...and each figure on one line (the user's rule, the same day): a number or a document number (RCV-T4-000002) never breaks, nor an
   amount from its currency (1,000 IQD). */
.app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) .num { white-space: nowrap; }
.app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td):has(> .num + small), .app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) > div:has(> .num + small) { white-space: nowrap; }
/* Room for the names: less padding at the sides of each cell, and a name of a couple of words (a customer, a cashbox) keeps one line. */
.app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) { padding-inline: .45rem; }
.app-content .table:not(.doc-lines, .doc-stack, .pl-table, .help-table .table):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) > :is(.fw-semibold, .fw-bold):not(.num) { min-width: 6.5rem; }
@media print, (min-width: 768px) {
    .app-content .table.doc-stack:not(.doc-lines):not(:has(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
        text-align: center !important; vertical-align: middle;
    }
}
/* A scroll box around a table would hold the heading inside it; on wide screens the tables fit, so it can go. */
@media (min-width: 992px) {
    .app-content .table-responsive { overflow: visible; }
}
@media print {
    /* as specific as the sticky rule above, or the heading stays sticky on paper and covers the first row */
    .app-content .table:not(.doc-lines) > thead > tr > th { position: static; background: #fff; color: #000; }
}

/* ---------- a page of the app printed as it is (reports, statements, a document's view; 2026-11-07, body.rx-letter):
   no buttons or pager on paper, and the print design's letterhead and footer (_PrintLetterhead / _PrintLetterfoot) ---------- */
.print-letterhead, .print-letterfoot { display: none; }
@media print {
    .print-letterhead { display: block; margin-bottom: 2mm; font-size: 12.5px; line-height: 1.45; color: #1f2937; }
    .print-letterhead * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .print-letterhead .ia4-accent { margin: 4mm 0 2mm; }
    .print-letterfoot { display: block; }
    body.rx-letter .btn, body.rx-letter .btn-group, body.rx-letter .pagination { display: none !important; }
    /* A card with a table begins on the sheet it is on and goes on to the next (a card kept whole left the first sheet empty), its rows
       whole, its totals once at its end; nothing of it behind the edge of a scroll box (2026-11-30; a wide one is fitted by paper-dir.js). */
    .app-content .card:has(table.table) { break-inside: auto; }
    .app-content table.table > tbody > tr, .app-content table.table > tfoot > tr { break-inside: avoid; }
    .app-content table.table > tfoot { display: table-row-group; }
    .app-content .table-responsive { overflow: visible !important; }
    .app-content .sum-grid > .card { break-inside: auto; } /* the summary's three columns are taller than a sheet lying across */
    .app-content > :last-child { margin-bottom: 0 !important; } /* no empty sheet after the last line */
}
/* While a page's tables are measured for the paper: as on it, without the buttons. */
body.paper-measure.rx-letter .app-content :is(.btn, .btn-group) { display: none !important; }

/* ---------- brand accent (Ranma amber) where something needs to catch the eye ---------- */
.btn-accent { --bs-btn-bg: var(--rn-accent); --bs-btn-border-color: var(--rn-accent); --bs-btn-color: #2b1a00;
    --bs-btn-hover-bg: var(--rn-accent-hover); --bs-btn-hover-border-color: var(--rn-accent-hover); --bs-btn-hover-color: #2b1a00;
    --bs-btn-active-bg: var(--rn-accent-hover); --bs-btn-active-border-color: var(--rn-accent-hover); font-weight: 700; }
.text-accent { color: var(--rn-accent-text) !important; }
/* the main "do it" buttons: sale save, new sale / purchase */
#pos-save, .inv-new { box-shadow: 0 4px 12px rgba(var(--rn-primary-rgb), .22); }
/* counts on tiles and in the cart: amber, so the eye finds what is already chosen */
.pos-tile-count { background: var(--rn-accent); color: #2b1a00; box-shadow: 0 2px 6px rgba(249, 170, 51, .45); }
[data-cart-count].badge { background: var(--rn-accent) !important; color: #2b1a00 !important; }
.pos-tab.active[data-tab="fav"] i { color: var(--rn-accent); }

/* ---------- the business's own logo ---------- */
.logo-picker { position: relative; width: 9rem; flex-shrink: 0; }
.logo-frame {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    aspect-ratio: 3 / 2; margin: 0; overflow: hidden; cursor: pointer; padding: .4rem;
    border: 1px dashed var(--bs-border-color); border-radius: var(--rn-radius); background: var(--bs-tertiary-bg); color: var(--bs-secondary-color);
}
.logo-frame:hover { border-color: var(--rn-primary); color: var(--rn-primary-text); }
.logo-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-empty { display: flex; flex-direction: column; align-items: center; }
.logo-empty[hidden], .logo-frame img[hidden] { display: none; }
.logo-clear { position: absolute; top: .25rem; inset-inline-end: .25rem; padding: .1rem .35rem; }
/* receipts: the logo at the top, in black on thermal paper */
.receipt-logo { display: block; max-width: 48mm; max-height: 22mm; margin: 0 auto 2mm; object-fit: contain; }
@media print { .receipt-logo { filter: grayscale(1) contrast(1.2); } }

/* ---------- dashboard welcome banner ---------- */
.welcome {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.4rem; border-radius: var(--rn-radius); color: #fff;
    border: 1px solid color-mix(in srgb, var(--rn-primary) 60%, var(--k-bd-000000, #000));
    background: linear-gradient(120deg, var(--rn-primary) 0%, var(--rn-sidebar) 100%);
    box-shadow: 0 8px 24px rgba(var(--rn-primary-rgb), .22);
}
/* rings in the corner, echoing the logo */
.welcome::before, .welcome::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    border: 14px solid rgba(255, 255, 255, .06);
}
.welcome::before { width: 220px; height: 220px; inset-inline-end: -60px; top: -90px; }
.welcome::after { width: 140px; height: 140px; inset-inline-end: 90px; bottom: -95px; border-color: rgba(249, 170, 51, .18); }
.welcome-avatar {
    flex-shrink: 0; width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center;
    font-weight: 800; font-size: 1.2rem; color: var(--rn-primary-text); background: var(--k-bg-ffffff, #fff);
    box-shadow: 0 0 0 3px var(--rn-accent), 0 4px 12px rgba(0, 0, 0, .2);
}
.welcome-text { flex: 1; min-width: 0; position: relative; }
.welcome-greet { font-size: .85rem; opacity: .85; }
.welcome-name { font-size: 1.45rem; font-weight: 800; margin: .1rem 0; color: #fff; }
.welcome-sub { margin: 0; font-size: .85rem; opacity: .8; }
.welcome-date {
    position: relative; display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem;
    border-radius: var(--rn-radius-sm); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px); white-space: nowrap;
}
.welcome-date i { font-size: 1.3rem; color: var(--rn-accent); }
.welcome-day { font-weight: 700; font-size: .9rem; }
.welcome-date .num { font-size: .8rem; opacity: .85; }
@media (max-width: 575.98px) {
    .welcome { flex-wrap: wrap; padding: 1rem; }
    .welcome-date { width: 100%; justify-content: center; }
    .welcome-name { font-size: 1.2rem; }
}

/* ---------- party form: section headers with an icon, role cards with a tick ---------- */
.pf-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem .25rem; }
.pf-head h2 { font-size: 1rem; font-weight: 800; margin: 0; }
.pf-head p { margin: 0; font-size: .8rem; color: var(--rn-text-muted); }
.pf-head-icon {
    width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.15rem;
    background: var(--rn-primary-soft); color: var(--rn-primary-text);
}
.pf-head-icon-accent { background: var(--rn-accent-soft); color: var(--rn-accent-text); }
.party-form .input-group-text { background: var(--bs-tertiary-bg); color: var(--rn-text-muted); }

.pf-roles .choice label { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; }
.pf-role-icon {
    width: 2rem; height: 2rem; border-radius: 8px; display: grid; place-items: center; margin-bottom: .35rem;
    background: var(--bs-tertiary-bg); color: var(--rn-text-muted); transition: background .15s, color .15s;
}
.pf-roles .choice input:checked + label .pf-role-icon { background: var(--rn-primary); color: #fff; }
.pf-check { position: absolute; top: .65rem; inset-inline-end: .7rem; color: var(--rn-primary-text); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.pf-roles .choice input:checked + label .pf-check { opacity: 1; transform: scale(1); }
.pf-roles .choice label:hover { border-color: color-mix(in srgb, var(--rn-primary) 40%, var(--rn-border)); }

.pf-active { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem .9rem; border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--bs-tertiary-bg); }
.pf-active .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }

/* Forms whose fields flow (2026-11-20, the user's request after comparing Odoo / Zoho / QuickBooks / SAP; the party form first): a
   .form-grid inside a .fg-box has one column on a phone, two once the box has room for two of at least 13rem (a phone number or a name
   is never cut), four from 56rem on a .fg-4 grid; .fg-wide takes two. They wrap by the room there is, never by the screen's size. */
.fg-box { container-type: inline-size; }
.form-grid { display: grid; gap: .85rem 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.form-grid > * { min-width: 0; }
.form-grid .form-label { margin-bottom: .3rem; }
.form-grid > .fg-end { align-self: end; }
@container (min-width: 27rem) {
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid > .fg-wide { grid-column: span 2; }
}
@container (min-width: 56rem) { .form-grid.fg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* The party form's header: the picture, the name large, its type and code, the roles as chips. */
.pf-hero .item-picture { width: 7.5rem; }
.pf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pf-chips-label { font-size: .8rem; font-weight: 700; color: var(--rn-text-muted); margin-inline-end: .25rem; }
.pf-chip label { display: inline-flex; align-items: center; gap: .4rem; height: auto; padding: .35rem .95rem; border-width: 1.5px; border-radius: 999px;
    font-weight: 600; font-size: .9rem; }
.pf-chip label > .bi:first-child { color: var(--rn-text-muted); }
.pf-chip label:hover { border-color: color-mix(in srgb, var(--rn-primary) 45%, var(--rn-border)); }
.pf-chip input:checked + label { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.pf-chip input:checked + label .bi { color: #fff; }
.pf-chip-check { display: none; }
.pf-chip input:checked + label .pf-chip-check { display: inline-block; }
/* Active, at the end of the header's row (for every role): a switch with its name, the explanation in its tooltip. */
.pf-active-switch { display: flex; align-items: center; gap: .5rem; min-height: 0; margin: 0; padding: 0; }
.pf-active-switch .form-check-input { float: none; width: 2.4em; height: 1.3em; margin: 0; cursor: pointer; }
.pf-active-switch .form-check-label { font-weight: 600; font-size: .9rem; cursor: pointer; }
/* The sales terms in two columns: the grid's gap spaces them. */
.pf-terms .mb-3 { margin-bottom: 0 !important; }

/* phones: the bottom menu covers the screen's last 64px, so a save bar that stays in view sits above it */
@media (max-width: 991.98px) {
    .app:not(.app-focus) .save-bar { bottom: calc(var(--rn-bottomnav-height) + env(safe-area-inset-bottom)); }
}

/* ---------- cash list ---------- */
.cash-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cash-chip {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px;
    background: var(--rn-surface); border: 1px solid var(--rn-border); box-shadow: var(--rn-shadow); font-size: .85rem;
}
.cash-chip > i { color: var(--rn-primary-text); }
.cash-kinds { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .1rem; }
.cash-kinds .pos-tab { text-decoration: none; }
/* stock documents: what each kind is worth, beside the kind tabs */
.stock-sum { margin-inline-start: .3rem; font-weight: 800; }
.pos-tab.active .stock-sum { color: inherit !important; }
/* stock document lines on phones: every line a card — the item on top (remove in its corner), the stock under it,
   then the fields two by two with their names (data-label) above them; 16px inputs so phones do not zoom in */
@media screen and (max-width: 767.98px) { /* on the screen only: on paper (an A4 is narrower, 2026-11-30) they are tables, fitted by paper-dir.js */
    .doc-stack thead { display: none; }
    .doc-stack, .doc-stack tbody { display: block; }
    .doc-stack tr {
        position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem .6rem;
        padding: .65rem .75rem .75rem; margin-bottom: .6rem;
        border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm);
        background: color-mix(in srgb, var(--rn-primary) 3%, var(--rn-surface));
    }
    .doc-stack > :not(caption) > * > * { display: block; min-width: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
    .doc-stack td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: .2rem;
        font-size: .72rem; font-weight: 600; color: var(--rn-text-muted);
    }
    .doc-stack .dl-item { grid-column: 1 / -1; padding-inline-end: 2.5rem; font-size: .95rem; line-height: 1.35; }
    .doc-stack .dl-stock { grid-column: 1 / -1; margin-top: -.4rem; font-size: .82rem; text-align: start !important; }
    .doc-stack td.dl-stock::before { content: attr(data-label) ":"; display: inline; margin-inline-end: .3rem; font-size: inherit; }
    .doc-stack .dl-wide { grid-column: 1 / -1; }
    .doc-stack .dl-remove { position: absolute; top: .3rem; inset-inline-end: .3rem; }
    .doc-stack .dl-remove .btn { background: transparent; border-color: transparent; font-size: 1rem; }
    .doc-stack .form-control, .doc-stack .form-select { min-height: 2.5rem; font-size: 16px; }
    #stockdoc > .card > .card-body { padding: .75rem; }
}
@media (max-width: 575.98px) { #stockdoc .save-bar .btn { flex: 1; } }
/* the delivery note's save bar: the total and both buttons on one line; on phones the total above, the buttons side by side */
.dl-save-bar { flex-wrap: nowrap; }
@media (max-width: 575.98px) {
    .dl-save-bar { flex-wrap: wrap; }
    .dl-save-bar > .me-auto { flex-basis: 100%; }
    .dl-save-bar > .btn { flex: 1; }
}
.inv-kpi-bad .inv-kpi-icon { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.cash-type { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.cash-type-in { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.cash-type-out { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.cash-type-move { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.cash-table tfoot td { background: color-mix(in srgb, var(--rn-primary) 5%, var(--rn-surface)); border-top: 2px solid color-mix(in srgb, var(--rn-primary) 25%, transparent); padding: .6rem .75rem; }

/* The cash list (the user's rule, 2026-11-23): three rows above the list, so 8 to 10 rows are in view on every computer. */
.cash-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: .45rem; }
.cash-head h1 { margin: 0; font-size: 1.2rem; font-weight: 800; white-space: nowrap; }
.cash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.cash-actions .btn { white-space: nowrap; }
.cash-tools { display: flex; align-items: center; gap: .3rem; margin-inline-start: auto; }
.cash-boxes-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid color-mix(in srgb, var(--rn-primary) 28%, transparent); border-radius: 999px;
    background: var(--rn-primary-soft); color: var(--rn-primary-text); font-weight: 700; padding-inline: .7rem; white-space: nowrap; }
.cash-boxes-btn:hover, .cash-boxes-btn:focus-visible { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.cash-boxes-btn:hover .text-danger-strong, .cash-boxes-btn:focus-visible .text-danger-strong { color: #fff !important; }
.cash-boxes-btn small { font-weight: 500; opacity: .8; }
.cash-foot { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.cash-foot .cash-kinds { flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.cash-sums { display: flex; flex: none; align-items: center; gap: .7rem; font-size: .8rem; }
.cash-sum { display: inline-flex; align-items: center; gap: .25rem; color: var(--rn-text-muted); font-weight: 600; white-space: nowrap; }
.cash-sum .num { font-weight: 800; color: var(--bs-body-color); }
.cash-sum-in > .bi, .cash-sum-in .num { color: var(--k-fg-1e7b4a, #1e7b4a); }
.cash-sum-out > .bi, .cash-sum-out .num { color: var(--k-fg-b42318, #b42318); }
.cash-sum-label { display: none; }
@media (min-width: 1600px) { .cash-sum-label { display: inline; } }
@media (max-width: 991.98px) {
    .cash-tools { margin-inline-start: 0; }
    .cash-foot { flex-wrap: wrap; }
    .cash-sums { flex-wrap: wrap; flex: 1 1 100%; gap: .35rem .8rem; }
    .cash-boxes-label { display: none; }
}
@media (min-width: 992px) {
    .cash-filter { padding: .35rem .55rem !important; margin-bottom: .4rem !important; }
    .cash-filter > .row { --bs-gutter-x: .4rem; --bs-gutter-y: .25rem; }
    .cash-filter .form-control, .cash-filter .btn:not(.tx-btn) { padding-block: .2rem; font-size: .84rem; }
    .cash-filter .inv-periods .btn { padding-inline: .5rem; }
    .cash-filter input[type="date"], .cash-filter input[type="month"] { width: 9.6rem !important; }
    .cash-filter .tx-bar { flex-wrap: nowrap; padding: 0; border: 0; background: none; }
    .cash-filter .tx-btn span { display: none; }
    .cash-filter .tx-btn { --bs-btn-padding-y: .28rem; --bs-btn-padding-x: .42rem; }
    .cash-filter .cash-foot { margin-top: .3rem !important; }
    .cash-filter .pos-tab { padding: .12rem .55rem; font-size: .78rem; }
    .cash-table > :not(caption) > * > * { padding-block: .22rem; font-size: .84rem; }
    .cash-table .cash-type { padding: .06rem .5rem; font-size: .74rem; }
    .cash-table .inv-pill { padding: .02rem .3rem; }
    .cash-clip { max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cash-table .inv-actions { gap: .1rem; }
    .cash-table .inv-act { display: inline-grid; width: 1.55rem; height: 1.55rem; min-width: 0; min-height: 0; padding: 0; place-items: center; font-size: .78rem; }
    .cash-head { margin-bottom: .35rem; }
    .cash-head .cols-btn { padding: .25rem .5rem; font-size: .84rem; }
}
/* The arrows beside Print and PDF (2026-11-30) keep the filter one row on the narrower computer screens. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .cash-filter .tx-bar { gap: .15rem; }
    .cash-filter .tx-btn { --bs-btn-padding-x: .32rem; }
    .cash-filter .tx-caret { padding-inline: .12rem !important; font-size: .68rem !important; }
    .cash-filter .inv-periods .btn { padding-inline: .36rem; }
    .cash-filter .adv-open .d-xl-inline { display: none !important; } /* its icon, as on the other lists */
    .cash-filter input[type="date"], .cash-filter input[type="month"] { width: 9rem !important; }
}
@media (min-width: 1200px) {
    .cash-filter > .row { flex-wrap: nowrap; }
    .cash-filter > .row > .col-auto { flex-wrap: nowrap !important; }
}
/* Laptops: the same three rows, with shorter buttons. */
@media (min-width: 992px) and (max-width: 1599.98px) {
    .cash-head h1 { font-size: 1.05rem; }
    .cash-actions .btn { padding-inline: .45rem; font-size: .8rem; }
    .cash-actions .btn > .bi { margin-inline-end: .15rem !important; }
    .cash-boxes-btn { font-size: .8rem; padding-inline: .5rem; }
    .cash-clip { max-width: 9rem; }
    .cash-filter .inv-periods .btn > .bi { display: none; }
    .cash-filter input[type="date"], .cash-filter input[type="month"] { width: 8.4rem !important; }
    .cash-filter .inv-period-range { font-size: .76rem; }
    .cash-filter .inv-period-name { display: none; }
    .cash-filter #adv-search-btn { padding-inline: .45rem; }
}
@media (min-width: 992px) and (max-width: 1365.98px) {
    .cash-boxes-label { display: none; }
    .cash-clip { max-width: 6.5rem; }
    .cash-table > :not(caption) > * > * { padding-inline: .28rem; font-size: .8rem; }
    .cash-table .cash-type { padding-inline: .35rem; font-size: .7rem; }
    .cash-filter [data-field="cancelled"] .d-md-inline { display: none !important; }
    .cash-filter [data-field="cancelled"] .btn > .bi { margin-inline-end: 0 !important; }
}

/* The cashboxes' window: what each holds, grouped by its kind, the totals on top; a row opens its vouchers. */
.cb-modal .modal-content { overflow: hidden; border: 0; border-radius: 14px; box-shadow: 0 24px 60px rgba(11, 47, 87, .28); }
.cb-head { padding: .7rem 1rem; border: 0; border-radius: 0; background: linear-gradient(135deg, var(--rn-primary), var(--rn-sidebar)); color: #fff; }
.cb-head .modal-title { font-size: 1.05rem; font-weight: 800; }
.cb-head .badge { background: rgba(255, 255, 255, .18); font-size: .72rem; }
.cb-totals { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; padding: .7rem 1rem;
    background: var(--rn-primary-soft); border-bottom: 1px solid var(--rn-border); }
.cb-totals-label { color: var(--rn-text-muted); font-size: .82rem; font-weight: 600; }
.cb-totals-list { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.cb-total { color: var(--rn-primary-text); font-size: 1.3rem; font-weight: 800; white-space: nowrap; }
.cb-total small { font-size: .74rem; font-weight: 600; opacity: .75; }
.cb-search { padding: .5rem 1rem; border-bottom: 1px solid var(--rn-border); }
.cb-group-title { display: flex; align-items: center; gap: .35rem; margin: 0; padding: .45rem 1rem .25rem; color: var(--rn-text-muted); font-size: .74rem; font-weight: 700; }
.cb-row { display: flex; align-items: center; gap: .7rem; padding: .5rem 1rem; border-top: 1px solid color-mix(in srgb, var(--rn-border) 60%, transparent); color: inherit; text-decoration: none; }
.cb-row[hidden] { display: none; }
.cb-row:hover, .cb-row:focus-visible { background: var(--rn-primary-soft); color: inherit; }
.cb-icon { display: grid; flex: none; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: .6rem; background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.cb-icon-card { background: var(--k-bg-eaf1fb, #eaf1fb); color: var(--rn-primary-text); }
.cb-icon-wallet { background: var(--k-bg-fff4e0, #fff4e0); color: var(--k-fg-b45309, #b45309); }
.cb-icon-bank { background: var(--k-bg-f0ecfb, #f0ecfb); color: var(--k-fg-5b3fb5, #5b3fb5); }
.cb-name { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; line-height: 1.25; }
.cb-amounts { display: flex; flex: none; flex-direction: column; align-items: flex-end; line-height: 1.3; white-space: nowrap; }
.cb-go { flex: none; color: var(--rn-text-muted); font-size: .75rem; }
.cb-foot { padding: .45rem 1rem; background: var(--k-bg-eef3f9, #eef3f9); border-top: 1px solid var(--k-bd-d5e0ee, #d5e0ee); }

/* ---------- money voucher form: the main facts in one row on wide screens ---------- */
.voucher-form .input-group-text { background: var(--bs-tertiary-bg); color: var(--rn-text-muted); }
.voucher-form .vf-amount { font-size: 1.15rem; font-weight: 700; }
@media (min-width: 1200px) {
    .voucher-form .vf-amount { width: 11rem; }
    .voucher-form .vf-currency { width: 6.5rem; }
    .voucher-form .vf-rate { width: 8rem; }
    .voucher-form .vf-date { width: 10rem; }
    .voucher-form .vf-cashbox { width: 11rem; }
    .voucher-form .col-xl { min-width: 14rem; }
}

/* ---------- items list ---------- */
.item-pill { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.item-pill-service { background: var(--k-bg-e0f2fe, #e0f2fe); color: var(--k-fg-075985, #075985); }
.item-pill-muted { background: var(--k-bg-eef0f2, #eef0f2); color: var(--k-fg-5b6470, #5b6470); }
.item-pill-model { background: var(--rn-primary-soft); color: var(--rn-primary-text); } /* a size and colour of a model */
/* The sale page's pictures: a model shows once, with a sizes mark; its window lists the sizes by colour. */
/* Cashiers' shifts (Cash/Shift, Cash/Shifts): the count boxes, count by notes, the report's totals; the sale page's pill. */
.inv-pill-open { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.inv-pill-done { background: var(--k-bg-eef1f5, #eef1f5); color: var(--k-fg-475467, #475467); }
.shift-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.shift-count .shift-counted { font-weight: 700; }
.shift-notes { display: grid; gap: .35rem; margin-top: .5rem; padding: .6rem; border: 1px solid var(--rn-border); border-radius: .6rem; background: var(--k-bg-f8fafc, #f8fafc); }
.shift-note { display: grid; grid-template-columns: 5.5rem 1fr 6.5rem; align-items: center; gap: .5rem; margin: 0; }
.shift-note-face { font-weight: 700; text-align: end; }
.shift-note-sum { color: var(--rn-text-muted); text-align: end; }
.shift-table td { padding-top: .45rem; padding-bottom: .45rem; }
.shift-table .shift-total td { font-weight: 800; border-top: 2px solid var(--rn-border); }
.shift-pill { display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: .35rem; padding: 0 .45rem; border-radius: 1rem;
    font-size: .7rem; font-weight: 700; text-decoration: none; white-space: nowrap; vertical-align: middle; }
.shift-pill-on { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.shift-pill-off { background: var(--k-bg-fdf0e3, #fdf0e3); color: var(--k-fg-b25e09, #b25e09); }
/* The printed X / Z report (Cash/ShiftPrint): sections, signature lines; A4 is the same strip, wider. */
.receipt .rc-section { font-weight: 800; border-bottom: 1px dashed #000; margin: 3mm 0 1mm; padding-bottom: .5mm; }
.receipt .rc-signs { display: flex; gap: 6mm; margin-top: 10mm; }
.receipt .rc-signs > div { flex: 1; border-top: 1px solid #000; padding-top: 1mm; text-align: center; font-size: 11px; }
.receipt.receipt-wide { width: 160mm; font-size: 14px; }
/* An alert with Bootstrap's d-flex (display: flex !important) ignored its hidden attribute: the quotation and purchase order
   banners showed empty on every sale and purchase. */
.alert[hidden] { display: none !important; }
/* Bootstrap's d-flex (!important) beat the hidden attribute: the size box, the restaurant's "Paid" row and others showed while hidden. */
.d-flex[hidden], .d-inline-flex[hidden] { display: none !important; }
/* Settings → Restaurant: an area's tables as small chips that open to edit. */
.rt-area { border-bottom: 1px solid var(--rn-border); padding-bottom: .25rem; margin-bottom: .75rem; }
.rt-area:last-child { border-bottom: 0; }
.rt-tables { display: flex; flex-wrap: wrap; gap: .4rem; }
.rt-table { border: 1px solid var(--rn-border); border-radius: .6rem; background: var(--k-bg-ffffff, #fff); }
.rt-table > summary { list-style: none; cursor: pointer; padding: .3rem .65rem; }
.rt-table > summary::-webkit-details-marker { display: none; }
.rt-table[open] { flex-basis: 100%; }
.rt-table.rt-off { opacity: .5; }
.rt-table-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .4rem .65rem .6rem; }
.rt-table-form input[name=name] { max-width: 10rem; }
.rt-table-form input[name=seats] { width: 4rem; }

/* Restaurant floor (Restaurant/Index): a tile per table, its colour by its state; the counter's orders the same way. */
.rf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; }
@media (max-width: 575.98px) { .rf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rf-table { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; min-height: 6.2rem; padding: .6rem .75rem; border-radius: 14px;
    border: 2px solid var(--rn-border); background: var(--k-bg-ffffff, #fff); text-align: start; color: inherit; text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.rf-table:hover { box-shadow: 0 6px 16px rgba(16, 24, 40, .10); transform: translateY(-1px); color: inherit; }
.rf-table:active { transform: scale(.97); }
.rf-name { font-weight: 800; font-size: 1.15rem; }
.rf-sub, .rf-time { font-size: .78rem; color: var(--rn-text-muted); }
.rf-total { font-weight: 700; margin-top: auto; }
.rf-free { border-color: var(--k-bd-b7e4c7, #b7e4c7); background: var(--k-bg-f3fbf6, #f3fbf6); }
.rf-free .rf-total { color: var(--rn-success-text); font-weight: 600; }
.rf-busy { border-color: #f9c784; background: var(--k-bg-fff8ec, #fff8ec); }
.rf-bill { border-color: var(--k-bd-b8c7e8, #b8c7e8); background: var(--k-bg-eef3fc, #eef3fc); }


/* Restaurant order (Restaurant/Order): the menu beside the order on wide screens; on phones the order opens over the menu. */
.ro-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.ro-title { display: flex; flex-direction: column; line-height: 1.2; margin-inline-end: .5rem; }
.ro-title > span { font-size: 1.15rem; }
.ro-body { display: flex; gap: 1rem; flex: 1; min-height: 0; }
.ro-menu { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.ro-cats { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .4rem; scrollbar-width: thin; }
.ro-cats .pos-tab { flex: 0 0 auto; }
.ro-grid-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 2px; }
.ro-order { width: 25rem; flex: 0 0 25rem; display: flex; flex-direction: column; min-height: 0; padding: .75rem; }
.ro-lines { flex: 1; min-height: 6rem; overflow-y: auto; overflow-x: hidden; }
.ro-round { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; color: var(--rn-text-muted); border-bottom: 1px solid var(--rn-border);
    padding: .35rem 0 .2rem; margin-top: .35rem; }
.ro-round-new { color: var(--k-fg-b7791f, #b7791f); }
.ro-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed var(--rn-border); }
.ro-line .ro-qty { font-weight: 700; min-width: 2rem; }
.ro-line .ro-name { min-width: 0; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ro-line .ro-name small { display: block; font-weight: 400; }
.ro-line .ro-amount { font-weight: 700; }
.ro-sent .ro-name, .ro-sent .ro-qty { color: var(--rn-text-muted); }
.ro-void .ro-name > div, .ro-void .ro-amount, .ro-void .ro-qty { text-decoration: line-through; opacity: .6; }
.ro-new { background: var(--k-bg-fffbeb, #fffbeb); }
.ro-step { width: auto; }
.ro-step .input-group-text { min-width: 2.2rem; justify-content: center; font-weight: 700; }
.ro-foot { border-top: 1px solid var(--rn-border); padding-top: .6rem; }
.ro-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ro-actions #ro-send { grid-column: 1 / -1; }
.ro-order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
#ro-mod fieldset.ro-missing legend { color: var(--rn-danger-text); }
.ro-phone-bar { position: fixed; inset-inline: .75rem; bottom: .75rem; z-index: 1030; display: flex; justify-content: space-between; align-items: center;
    padding: .8rem 1.1rem; border: 0; border-radius: 14px; background: var(--rn-primary); color: #fff; font-size: 1.05rem; box-shadow: 0 8px 22px rgba(var(--rn-primary-rgb), .35); }
@media (min-width: 992px) {
    .app-focus .app-main:has(.ro) { height: 100vh; height: 100dvh; min-height: 0; }
    .app-focus .app-content:has(.ro) { min-height: 0; display: flex; flex-direction: column; }
    .ro { min-height: 0; }
}
@media (max-width: 991.98px) {
    .ro-body { display: block; }
    .ro-menu { padding-bottom: 5rem; }
    .ro-grid-scroll { overflow: visible; }
    .ro-order { display: none; }
    .ro-show-order .ro-order { display: flex; position: fixed; inset: 0; z-index: 1040; width: auto; border-radius: 0; }
    .ro-show-order .ro-phone-bar { display: none; }
}
/* Kitchen screen (Kitchen/Index): a card per order, round and station; its top edge by how long it waits, green when ready. */
.ks-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.ks-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: thin; }
.ks-tabs .pos-tab { flex: 0 0 auto; }
.ks-n:not(:empty) { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; margin-inline-start: .25rem; border-radius: 999px;
    background: var(--rn-accent); color: #3b2500; font-size: .75rem; font-weight: 800; text-align: center; }
.ks-clock { font-weight: 800; font-size: 1.1rem; }
.ks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; align-items: start; }
.ks-ticket { display: flex; flex-direction: column; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); border-top: 6px solid var(--rn-primary);
    border-radius: 12px; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); overflow: hidden; }
.ks-ticket.ks-warn { border-top-color: var(--rn-accent); }
.ks-ticket.ks-late { border-top-color: var(--rn-danger); }
.ks-ticket.ks-late .ks-time { color: var(--rn-danger-text); }
.ks-ticket.ks-ready { border-top-color: var(--rn-success); background: var(--k-bg-f3fbf6, #f3fbf6); }
.ks-head { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .75rem .45rem; border-bottom: 1px solid var(--rn-border); }
.ks-head-main { min-width: 0; }
.ks-head small { color: var(--rn-text-muted); }
.ks-where { font-weight: 800; font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.ks-time { display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 800; }
.ks-time .num { font-size: 1.6rem; }
.ks-time small { font-size: .7rem; font-weight: 600; color: var(--rn-text-muted); }
.ks-station { padding: .25rem .75rem; font-size: .78rem; font-weight: 700; color: var(--k-fg-9a3412, #9a3412); background: var(--k-bg-fff7ed, #fff7ed); }
.ks-lines { list-style: none; margin: 0; padding: .25rem 0; }
.ks-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem; align-items: start; width: 100%; padding: .45rem .75rem; border: 0;
    background: transparent; text-align: start; color: inherit; font-size: 1.1rem; touch-action: manipulation; }
.ks-line:hover:not(:disabled) { background: var(--k-bg-f6f8fb, #f6f8fb); }
.ks-qty { font-weight: 800; min-width: 2.2rem; }
.ks-item { font-weight: 700; overflow-wrap: anywhere; }
.ks-item small { display: block; font-size: .85rem; font-weight: 500; color: var(--rn-text-muted); }
.ks-note { display: block; font-style: normal; font-size: .9rem; font-weight: 700; color: var(--rn-danger-text); }
.ks-mark { font-size: 1.2rem; color: #c3cad5; }
.ks-cooking .ks-mark { color: var(--k-fg-ea580c, #ea580c); }
.ks-done .ks-mark { color: var(--rn-success-text); }
.ks-done .ks-item, .ks-done .ks-qty { color: var(--rn-text-muted); text-decoration: line-through; }
.ks-void { opacity: .55; }
.ks-void .ks-item, .ks-void .ks-qty { text-decoration: line-through; }
.ks-foot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .55rem .75rem .7rem; margin-top: auto; border-top: 1px solid var(--rn-border); }
.ks-foot .btn:not(.btn-sm) { flex: 1; padding: .6rem; font-weight: 700; }
.ks-ready-note { flex: 1; font-weight: 700; color: var(--rn-success-text); }
.ks-empty { text-align: center; padding: 4rem 1rem; color: var(--rn-text-muted); }
.ks-empty i { font-size: 3rem; }
/* The floor and the order page: dishes the kitchen made, waiting to be taken to the guests. */
.rf-ready { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .45rem; border-radius: 999px; background: var(--rn-success); color: #fff;
    font-size: .75rem; font-weight: 800; animation: rf-ready-pulse 1.6s ease-in-out infinite; }
@keyframes rf-ready-pulse { 50% { box-shadow: 0 0 0 4px rgba(21, 128, 61, .25); } }
@media (prefers-reduced-motion: reduce) { .rf-ready { animation: none; } }
.ro-state { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ro-state-cooking { color: var(--k-fg-ea580c, #ea580c); }
.ro-state-ready { color: var(--rn-success-text); }
.ro-ready-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .6rem; margin-bottom: .4rem; border-radius: 10px;
    background: var(--rn-success-soft); color: var(--rn-success-text); font-weight: 700; }
/* Deliveries (phase 6b): the order page's delivery card, the floor's state on a counter tile, and Restaurant/Deliveries. */
.ro-delivery { display: flex; flex-direction: column; gap: .4rem; padding: .5rem .6rem; margin-bottom: .5rem; border: 1px solid var(--rn-border); border-radius: 10px; background: var(--k-bg-f8fafc, #f8fafc); }
.ro-d-main { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; border: 0; background: transparent; padding: 0; text-align: start; color: inherit; }
.ro-d-where { font-weight: 700; }
.ro-d-address { overflow-wrap: anywhere; }
.ro-d-status, .dl-status { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--k-bg-e2e8f0, #e2e8f0); color: var(--k-fg-334155, #334155); }
.ro-d-s1, .dl-s1 .dl-status { background: var(--k-bg-fff3d6, #fff3d6); color: var(--k-fg-8a5a00, #8a5a00); }
.ro-d-s2, .dl-s2 .dl-status { background: var(--k-bg-dbeafe, #dbeafe); color: var(--k-fg-1e40af, #1e40af); }
.ro-d-s3, .dl-s3 .dl-status { background: var(--rn-success-soft); color: var(--rn-success-text); }
.ro-d-steps { display: flex; flex-wrap: wrap; gap: .4rem; }
.ro-fee .ro-name, .ro-fee .ro-qty { color: var(--rn-text-muted); }
.rf-delivery { font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--k-bg-fff3d6, #fff3d6); color: var(--k-fg-8a5a00, #8a5a00); }
.rf-delivery.rf-d2 { background: var(--k-bg-dbeafe, #dbeafe); color: var(--k-fg-1e40af, #1e40af); }
.rf-delivery.rf-d3 { background: var(--rn-success-soft); color: var(--rn-success-text); }
.dl-drivers { display: flex; flex-wrap: wrap; gap: .5rem; }
.dl-driver { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .8rem; border: 1px solid var(--rn-border); border-radius: 12px; background: var(--k-bg-ffffff, #fff); min-width: 12rem; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .75rem; align-items: start; }
@media (max-width: 575.98px) { .dl-grid { grid-template-columns: minmax(0, 1fr); } }
.dl-card { display: flex; flex-direction: column; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); border-top: 5px solid #f9c784; border-radius: 12px; overflow: hidden; }
.dl-card.dl-s2 { border-top-color: var(--k-bd-93c5fd, #93c5fd); }
.dl-card.dl-s3 { border-top-color: #86efac; }
.dl-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .75rem; border-bottom: 1px solid var(--rn-border); }
.dl-body { padding: .5rem .75rem; }
.dl-address { overflow-wrap: anywhere; }
.dl-foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem .75rem; border-top: 1px solid var(--rn-border); background: var(--k-bg-fafbfc, #fafbfc); }
/* A split bill (Restaurant/Order's pay window): the dishes paid now, and each guest's share. */
.ro-pay-lines { max-height: 16rem; overflow-y: auto; border: 1px solid var(--rn-border); border-radius: 10px; padding: 0 .5rem; }
.ro-pay-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--rn-border); }
.ro-pay-line:last-child { border-bottom: 0; }
.ro-pay-line .ro-name { font-weight: 600; overflow-wrap: anywhere; }
.ro-pay-line .ro-amount { min-width: 4.5rem; text-align: end; font-weight: 700; }
.ro-pay-on { background: var(--k-bg-f3fbf6, #f3fbf6); }
.ro-split { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--rn-border); }
.ro-state-paid { color: var(--rn-success-text); }
/* Waiters (phase 6b): "My tables" hides the tables others serve; a sent dish's actions (one more, take off). */
.rf-mine-on .rf-theirs { display: none !important; }
.ro-line-acts { display: inline-flex; gap: .25rem; }
/* The sale page's loyalty points: the customer's points as a button; spent, it shows what they took off. */
.pos-points-btn { white-space: nowrap; font-weight: 600; }
/* The dashboard's "Needs attention today" (_TodayAlerts): a tile per alert, its colour by how pressing it is. */
.today-head { font-weight: 700; margin-bottom: .5rem; display: flex; align-items: center; gap: .4rem; }
.today-head > .bi { color: var(--rn-accent); }
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; }
.today-item { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; min-height: 3.6rem; border-radius: .75rem;
    background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); border-inline-start-width: 4px; color: inherit; text-decoration: none;
    transition: box-shadow .15s, transform .15s; }
.today-item:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .08); transform: translateY(-1px); color: inherit; }
.today-icon { flex: 0 0 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; }
.today-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.today-title { font-weight: 600; }
.today-detail { font-size: .82rem; color: var(--rn-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-go { color: var(--rn-text-muted); }
.today-danger { border-inline-start-color: var(--rn-danger); }
.today-danger .today-icon { background: var(--k-bg-fdecec, #fdecec); color: var(--rn-danger-text); }
.today-warn { border-inline-start-color: var(--rn-accent); }
.today-warn .today-icon { background: var(--k-bg-fff4e0, #fff4e0); color: var(--k-fg-b7791f, #b7791f); }
.today-info { border-inline-start-color: var(--rn-primary); }
.today-info .today-icon { background: var(--k-bg-e8f0fa, #e8f0fa); color: var(--rn-primary-text); }
.today-clear { display: flex; align-items: center; gap: .5rem; color: var(--rn-success-text); font-weight: 600; padding: .25rem 0; }
.today-grid .placeholder.today-item { border: 0; }
/* Installments (Sales/Installments, Sales/Installment): a thin paid bar, late rows tinted. */
.inst-progress { height: 6px; min-width: 5rem; border-radius: 3px; background: var(--rn-border, var(--k-bg-e5e7eb, #e5e7eb)); overflow: hidden; }
.inst-progress-bar { height: 100%; background: var(--rn-success); }
.inst-schedule tr.inst-late > td { background: var(--k-bg-fdf0f0, #fdf0f0); }
/* Change history (Items/History, Parties/History): one line per field, the old value struck through. */
.history-field { line-height: 1.6; }
.history-from { color: var(--rn-text-muted); text-decoration: line-through; }
.history-to { font-weight: 600; }
/* Promotions: a small tag with the promotion's name on a sale line, and on the promotions list. */
.promo-chip { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .45rem; border-radius: 1rem; background: var(--k-bg-fdf0e3, #fdf0e3); color: var(--k-fg-b25e09, #b25e09);
    font-size: .72rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
/* The wholesale price (2026-10-26): a line priced at a level, or one whose item has no price there (retail); the sale's switch. */
.level-chip { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .45rem; border-radius: 1rem; background: var(--rn-primary-soft);
    color: var(--rn-primary-text); font-size: .72rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.level-chip-none { background: var(--k-bg-f1f3f5, #f1f3f5); color: var(--rn-text-muted); font-weight: 600; }
/* The sale table: a "Retail / Wholesale" button beside each line's price (whoever may sell at levels; a click takes the next). */
.pos-price-group .pos-price { min-width: 5.5rem; } /* a table cell sized by its content would squeeze it to nothing */
.pos-level-line { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .2rem; padding: 0 .55rem; font-size: .75rem; font-weight: 700;
    white-space: nowrap; border: 1px solid var(--bs-border-color); }
.pos-level-line.lvl-retail { background: var(--k-bg-f8f9fa, #f8f9fa); color: var(--rn-text-muted); }
.pos-level-line.lvl-on { background: var(--rn-primary-soft); color: var(--rn-primary-text); border-color: color-mix(in srgb, var(--rn-primary) 25%, transparent); }
.pos-level-line.lvl-none { background: var(--k-bg-f1f3f5, #f1f3f5); color: var(--rn-text-muted); border-style: dashed; }
.pos-level-line:hover { filter: brightness(.95); }
/* IMEI / serial numbers (2026-10-28): a line's pieces as chips, the button that opens their window, the window's list. */
.sn-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; align-items: center; }
.sn-chip { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .15rem 0 .45rem; border-radius: 1rem; background: var(--k-bg-eef2f7, #eef2f7);
    color: var(--rn-text); font-size: .74rem; line-height: 1.5; }
.sn-x { border: 0; background: none; color: var(--rn-text-muted); padding: 0 .3rem; line-height: 1; font-size: .9rem; }
.sn-x:hover { color: var(--bs-danger); }
.sn-pick-btn { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem; font-size: .74rem; font-weight: 700; border-radius: 1rem;
    border: 1px dashed color-mix(in srgb, var(--rn-primary) 45%, transparent); color: var(--rn-primary-text); background: var(--rn-primary-soft); }
td > .sn-pick-btn { margin-inline-start: .4rem; }
.sn-pick-btn.sn-missing { border-color: var(--bs-danger); color: var(--bs-danger); background: var(--k-bg-fdf0f0, #fdf0f0); }
/* Real weight of each piece (2026-11-07): the line's pieces and weight, a button that opens the weights window (red while the weight is missing). */
.cw-chips { margin-top: .2rem; }
.cw-open { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .55rem; font-size: .74rem; font-weight: 700; border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--rn-primary) 40%, transparent); color: var(--rn-primary-text); background: var(--rn-primary-soft); }
.cw-open.cw-missing { border-style: dashed; border-color: var(--bs-danger); color: var(--bs-danger); background: var(--k-bg-fdf0f0, #fdf0f0); }
.pos-cline .cw-chips, .pc-card .cw-chips { margin-top: 0; flex-shrink: 0; }
#cw-rows .cw-n { min-width: 1.8rem; text-align: end; }
/* Batch numbers (2026-11-05): the lots a sale line takes, the batch box on purchases and opening stock. */
.lot-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; align-items: center; }
.lot-chip { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem; border-radius: 1rem; background: var(--k-bg-eef6f0, #eef6f0);
    color: var(--k-fg-1d5b33, #1d5b33); font-size: .74rem; line-height: 1.5; white-space: nowrap; }
.lot-chip.lot-past { background: var(--k-bg-fdf0f0, #fdf0f0); color: var(--bs-danger); }
.lot-chip.lot-none { background: var(--k-bg-f3f4f6, #f3f4f6); color: var(--rn-text-muted); }
.lot-pick-btn { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem; font-size: .74rem; font-weight: 700; border-radius: 1rem;
    border: 1px dashed color-mix(in srgb, var(--rn-primary) 45%, transparent); color: var(--rn-primary-text); background: var(--rn-primary-soft); }
.lot-pick-btn.lot-chosen { border-style: solid; }
.batch-chip { display: inline-flex; align-items: center; padding: 0 .45rem; border-radius: 1rem; background: var(--k-bg-eef6f0, #eef6f0); color: var(--k-fg-1d5b33, #1d5b33); font-size: .74rem; }
.batch-input { text-transform: uppercase; }
.lot-table td, .lot-table th { white-space: nowrap; }
/* An old debt stops credit sales (2026-11-05): beside the customer box on the sale page. */
.pos-overdue { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 1rem; background: var(--k-bg-fdf0f0, #fdf0f0); color: var(--bs-danger);
    font-size: .74rem; font-weight: 700; white-space: nowrap; }
/* Inside its window the heading stays at the window's top (the lists' sticky heading sits under the top bar and hid the first lot). */
.app-content .table.lot-table > thead > tr > th, .table.lot-table > thead > tr > th { position: sticky; top: 0; z-index: 2; }
.sn-list { max-height: 50vh; overflow: auto; }
.sn-row { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-bottom: 1px solid var(--bs-border-color); }
.sn-row:last-child { border-bottom: 0; }
.sn-pick { cursor: pointer; margin: 0; }
.sn-pick:hover { background: var(--k-bg-f6f8fb, #f6f8fb); }
.sn-no { width: 1.8rem; color: var(--rn-text-muted); font-size: .8rem; }
.sn-imei { flex: 1; font-weight: 600; letter-spacing: .02em; }
.sn-imei small { color: var(--rn-text-muted); font-weight: 400; }
/* The tag beside the name only while the price column (and its button) is hidden. */
.doc-lines:not([data-hide~="price"]) .level-chip-alt { display: none; }
.pos-level .btn { white-space: nowrap; }
.pos-level .btn:disabled.active { opacity: 1; }
.input-wholesale::placeholder { color: #b8c2cf; }
.promo-item { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .35rem .2rem .6rem; border-radius: 1rem;
    background: var(--rn-primary-soft); font-size: .85rem; }
.promo-item .btn-close { font-size: .55rem; }
/* An exchange on the sale page: the search turns red while taking goods back; what comes back is listed above the totals. */
.pos-search-return .input-group-text, .pos-search-return .form-control { border-color: #d92d20; }
.pos-search-return .input-group-text { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.pos-returns { border: 1px solid var(--k-bd-f5c2c0, #f5c2c0); background: var(--k-bg-fff7f6, #fff7f6); border-radius: .6rem; padding: .35rem .6rem; margin-bottom: .5rem; }
.pos-returns-head { font-size: .78rem; font-weight: 800; color: var(--k-fg-b42318, #b42318); margin-bottom: .2rem; }
#pos-returns-list { max-height: 7.5rem; overflow-y: auto; }
.pos-return-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; padding: .2rem 0; border-top: 1px dashed var(--k-bd-f5c2c0, #f5c2c0); }
.pos-return-row:first-child { border-top: 0; }
.pos-return-name { flex: 1 1 12rem; min-width: 0; }
.pos-return-name small { margin-inline-start: .35rem; }
.pos-return-qty { width: 7.5rem; flex-wrap: nowrap; }
/* A scale's label found in the sale page's search: the weight it brings. */
.scale-chip { display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: .4rem; padding: 0 .4rem; border-radius: 1rem;
    background: var(--rn-primary-soft); color: var(--rn-primary-text); font-weight: 700; font-size: .75rem; }
.pos-tile-sizes { position: absolute; bottom: .3rem; right: .3rem; /* the stock (a left-to-right number) is bottom left */ display: grid; place-items: center; width: 1.6rem; height: 1.6rem;
    border-radius: .45rem; background: var(--rn-primary); color: #fff; font-size: .8rem; }
.pv-colour { font-weight: 800; margin: .5rem .25rem .3rem; }
.pv-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); gap: .4rem; }
.pv-size { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .55rem .25rem; border: 1.5px solid var(--rn-border);
    border-radius: .6rem; background: var(--rn-surface); font-weight: 800; font-size: 1.05rem; }
.pv-size:hover, .pv-size:focus-visible { border-color: var(--rn-primary); background: var(--rn-primary-soft); }
.pv-size-stock { font-size: .72rem; font-weight: 600; color: var(--rn-text-muted); }
.pv-size.pv-out { opacity: .5; }
.stock-pill { display: inline-block; min-width: 3rem; padding: .15rem .6rem; border-radius: 999px; font-weight: 700; font-size: .85rem; text-align: center; }
.stock-ok { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.stock-low { background: var(--k-bg-fff4d6, #fff4d6); color: var(--k-fg-8a5a00, #8a5a00); }
.stock-out { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
a.inv-kpi:hover { border-color: color-mix(in srgb, var(--rn-primary) 35%, var(--rn-border)); }
.min-w-0 { min-width: 0; }
/* a row button that cannot be used (a used item's delete): faint, without the disabled-button frame */
.inv-act:disabled, .inv-act.disabled { border-color: transparent; background: transparent; opacity: .3; }
/* the code is a left-to-right number: keep it centred in its cell all the same */
.item-code .num { text-align: center; }

/* ---------- list pages that fit the screen: only the rows scroll ---------- */
@media (min-width: 992px) {
    .app-main:has(.list-page) { height: 100vh; height: 100dvh; min-height: 0; }
    .app-content:has(.list-page) { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding-bottom: .75rem; }
    .list-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
    .list-page > * { flex-shrink: 0; }
    /* a filter form is also a .card-body (flex: 1 1 auto): only the list may take the free height of a short list */
    .list-page > :not(.list-fill) { flex-grow: 0; }
    .list-page > .list-fill { flex: 1 1 auto; min-height: 0; overflow: auto; }
    /* inside its own scroll box the heading sticks to the box's top, the totals to its bottom */
    .app-content .list-page .list-fill .table > thead > tr > th { top: 0; }
    .list-page .list-fill tfoot td { position: sticky; bottom: 0; z-index: 4; }
}

/* ---------- profit and loss ---------- */
.pl-table td { padding: .6rem .25rem; border-color: var(--rn-border); }
.pl-subtotal td { font-weight: 800; background: color-mix(in srgb, var(--rn-primary) 5%, transparent); }
.pl-total td { font-weight: 800; font-size: 1.15rem; border-bottom: 0; }
.pl-total-good td { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-14532d, #14532d); }
.pl-total-bad td { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-7f1d1d, #7f1d1d); }
.pl-total td:first-child { border-start-start-radius: var(--rn-radius-sm); border-end-start-radius: var(--rn-radius-sm); }
.pl-total td:last-child { border-start-end-radius: var(--rn-radius-sm); border-end-end-radius: var(--rn-radius-sm); }
/* Statements (balance sheet, cash flow): section headings, breakdown rows, plain totals, links to the detail report. */
.pl-total-plain td { background: color-mix(in srgb, var(--rn-primary) 9%, transparent); color: var(--rn-primary-text); }
.pl-section td { padding-top: 1rem; border-bottom: 0; font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: var(--rn-text-muted); }
.pl-section:first-child td { padding-top: .35rem; }
.pl-section-hint { font-weight: 500; margin-inline-start: .35rem; }
.pl-sub td { font-size: .82rem; color: var(--rn-text-muted); padding-top: .3rem; padding-bottom: .3rem; }
.pl-link { color: inherit; text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--rn-primary) 40%, transparent); }
.pl-link:hover { color: var(--rn-primary-text); border-bottom-style: solid; }
.pl-empty td { font-size: .82rem; color: var(--rn-text-muted); font-style: italic; }
/* bar list: thin bars, rounded ends, recessive track; values in text ink, never in the bar colour */
.pl-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.pl-bar-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .3rem; font-size: .88rem; }
.pl-bar-value { font-weight: 700; white-space: nowrap; }
.pl-bar-value small { color: var(--rn-text-muted); font-weight: 600; margin-inline-start: .35rem; }
.pl-track { height: 10px; border-radius: 999px; background: var(--bs-tertiary-bg); overflow: hidden; }
.pl-fill { height: 100%; border-radius: 999px; background: var(--rn-primary); min-width: 2px; }
.pl-fill-good { background: #1e7b4a; }
.pl-fill-bad { background: #b42318; }
.pl-bars-total { padding-top: .9rem; border-top: 1px dashed var(--rn-border); }

/* ---------- roles ---------- */
/* One tint per level, the same everywhere: nothing (grey), own (amber), branches (blue), whole business (green). */
.role-level, .role-chip { --lvl-bg: var(--bs-tertiary-bg); --lvl-fg: var(--rn-text-muted); }
.role-level[data-level="1"], .role-chip[data-level="1"] { --lvl-bg: var(--k-bg-fff4dc, #fff4dc); --lvl-fg: var(--k-fg-8a5300, #8a5300); }
.role-level[data-level="2"], .role-chip[data-level="2"] { --lvl-bg: var(--rn-primary-soft); --lvl-fg: var(--rn-primary-text); }
.role-level[data-level="3"], .role-chip[data-level="3"] { --lvl-bg: var(--k-bg-e7f6ee, #e7f6ee); --lvl-fg: var(--k-fg-14532d, #14532d); }
.role-level { background-color: var(--lvl-bg); color: var(--lvl-fg); font-weight: 700; border-color: transparent; min-width: 9.5rem; }
.role-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: var(--lvl-bg); color: var(--lvl-fg); white-space: nowrap; }
.role-legend { display: flex; flex-wrap: wrap; gap: .4rem; }
.role-matrix thead th { font-size: .82rem; white-space: nowrap; }
/* The role page (2026-11-25, the page in one screen): the name, the sections' table and the special permissions one under another;
   on a wide screen the table beside the name and the special permissions. */
.role-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "matrix" "specials"; align-items: start; }
.role-layout > .card { margin: 0; }
.role-name-card { grid-area: name; }
.role-matrix-card { grid-area: matrix; }
.role-specials-card { grid-area: specials; }
@media (min-width: 1400px) {
    .role-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "matrix name" "matrix specials"; }
}
.role-matrix tbody th { font-weight: 700; white-space: nowrap; }
.role-matrix td, .role-matrix th { padding: .45rem .5rem; border-color: var(--rn-border); }
.role-special, .role-pick { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border: 1px solid var(--rn-border);
    border-radius: var(--rn-radius-sm); cursor: pointer; height: 100%; margin: 0; }
.role-special:has(input:checked), .role-pick:has(input:checked) { border-color: var(--rn-primary); background: color-mix(in srgb, var(--rn-primary) 6%, transparent); }
.role-pick .form-check-input { margin: 0; flex-shrink: 0; }
.role-card-name { font-size: 1.05rem; font-weight: 800; margin: 0; }
.role-views { list-style: none; padding: 0; margin: .75rem 0; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.role-views li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.role-badge { background: color-mix(in srgb, var(--rn-primary) 10%, transparent); color: var(--rn-primary-text); font-weight: 700; }

/* ---------- user form ---------- */
.d-contents { display: contents; }
.user-switch, .user-branch { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border: 1px solid var(--rn-border);
    border-radius: var(--rn-radius-sm); cursor: pointer; margin: 0; min-height: calc(1.5em + .75rem + 2px); white-space: nowrap; }
.user-switch { width: 100%; }
.user-branches { display: flex; flex-wrap: wrap; gap: .5rem; }
.user-branch:has(input:checked) { border-color: var(--rn-primary); background: color-mix(in srgb, var(--rn-primary) 6%, transparent); color: var(--rn-primary-text); font-weight: 600; }

/* ---------- user profile ---------- */
.min-w-0 { min-width: 0; }
.user-hero { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--rn-radius);
    background: linear-gradient(120deg, var(--rn-primary), var(--rn-sidebar)); color: #fff; box-shadow: 0 6px 18px rgba(var(--rn-primary-rgb), .18); }
.user-avatar { flex-shrink: 0; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem;
    color: var(--rn-primary-text); background: var(--k-bg-ffffff, #fff); box-shadow: 0 0 0 3px var(--rn-accent); }
.user-hero-name { font-size: 1.3rem; font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-hero-sub { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .88rem; opacity: .95; }
.user-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.user-pill-on { background: var(--k-bg-d1fadf, #d1fadf); color: var(--k-fg-14532d, #14532d); }
.user-pill-off { background: rgba(255, 255, 255, .2); color: #fff; }
.user-pill-owner { background: var(--rn-accent); color: #3b2500; }
.user-hero-stats { display: flex; gap: .5rem; }
.user-hero-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 4.5rem; padding: .35rem .6rem; border-radius: var(--rn-radius-sm);
    background: rgba(255, 255, 255, .12); }
.user-hero-stats span { font-size: 1.25rem; font-weight: 800; }
.user-hero-stats small { font-size: .72rem; opacity: .85; }
.role-option { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm);
    cursor: pointer; margin: 0; height: 100%; transition: border-color .15s, background-color .15s; }
.role-option > .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
.role-option-icon { flex-shrink: 0; width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--bs-tertiary-bg); color: var(--rn-text-muted); }
.role-option-tick { color: var(--rn-border); font-size: 1.2rem; }
.role-option:has(input:checked) { border-color: var(--rn-primary); background: color-mix(in srgb, var(--rn-primary) 6%, transparent); }
.role-option:has(input:checked) .role-option-icon { background: var(--rn-primary); color: #fff; }
.role-option:has(input:checked) .role-option-tick { color: var(--rn-primary-text); }
.role-option:has(input:focus-visible) { outline: 2px solid var(--rn-primary); outline-offset: 2px; }
.access-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.access-list li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px dashed var(--rn-border); font-size: .88rem; }
.access-list li.access-off .access-name { color: var(--rn-text-muted); }
.access-name { flex-grow: 1; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.access-acts { display: inline-flex; gap: .3rem; }
.access-act { color: var(--rn-border); font-size: .95rem; }
.access-act.on { color: var(--rn-primary-text); }
.access-level { min-width: 6.5rem; justify-content: center; }
.access-specials { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.access-special { display: none; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
    background: color-mix(in srgb, var(--rn-primary) 10%, transparent); color: var(--rn-primary-text); }
.access-special.on { display: inline-flex; gap: .25rem; align-items: center; }
@media (max-width: 575.98px) {
    .user-hero { flex-wrap: wrap; }
    .user-hero-stats { width: 100%; }
    .user-hero-stats > div { flex: 1; }
}

/* ---------- sign-in: split screen ---------- */
.auth-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--k-bg-ffffff, #fff); }
@media (min-width: 992px) { .auth-split { grid-template-columns: minmax(460px, 44%) 1fr; } }
.auth-pane { display: flex; flex-direction: column; padding: 1.25rem 1.25rem 1rem; min-height: 100vh; min-height: 100dvh; }
@media (min-width: 576px) { .auth-pane { padding: 1.75rem 3rem 1.25rem; } }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-top-logo img { height: 46px; width: auto; }
.auth-top .lang-switch .btn { border-radius: 999px !important; border: 0; font-weight: 600; padding: .3rem .8rem; }
.auth-top .lang-switch { background: var(--bs-tertiary-bg); border-radius: 999px; padding: .2rem; gap: .1rem; }
.auth-top .lang-switch .btn-outline-primary { color: var(--rn-text-muted); background: transparent; }
.auth-top .lang-switch .btn-outline-primary:hover { color: var(--rn-primary-text); background: var(--k-bg-ffffff, #fff); }
.auth-form { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 400px; margin: 2rem auto; }
.auth-heading { margin-bottom: 1.75rem; }
.auth-hello { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    background: var(--rn-accent-soft); color: var(--rn-accent-text); margin-bottom: .75rem; }
.auth-heading h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 .35rem; letter-spacing: -.01em; }
.auth-heading p { color: var(--rn-text-muted); margin: 0; }
.auth-fields .form-label { font-weight: 600; font-size: .9rem; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > .bi { position: absolute; inset-inline-start: .95rem; color: var(--rn-text-muted); font-size: 1.05rem; pointer-events: none; }
.auth-input .form-control { height: 3.1rem; padding-inline: 2.75rem; border-radius: .7rem; border: 1.5px solid var(--rn-border); background: var(--k-bg-ffffff, #fff); font-size: 1rem; }
.auth-input .form-control:focus { border-color: var(--rn-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rn-primary) 14%, transparent); }
.auth-input:focus-within > .bi { color: var(--rn-primary-text); }
/* A list in the same style (the type of business): the icon on one side, the arrow on the other. */
.auth-input .form-select { height: 3.1rem; padding-inline-start: 2.75rem; border-radius: .7rem; border: 1.5px solid var(--rn-border); font-size: 1rem; }
.auth-input .form-select:focus { border-color: var(--rn-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rn-primary) 14%, transparent); }
.auth-input .form-control[type="password"], .auth-input:has(.auth-eye) .form-control { padding-inline-end: 3rem; }
.auth-eye { position: absolute; inset-inline-end: .4rem; width: 2.4rem; height: 2.4rem; border: 0; border-radius: .5rem; background: transparent; color: var(--rn-text-muted); }
.auth-eye:hover { background: var(--bs-tertiary-bg); color: var(--rn-primary-text); }
.auth-caps { color: var(--k-fg-8a5300, #8a5300); }
.auth-submit { height: 3.2rem; border-radius: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--rn-primary) 28%, transparent); transition: transform .12s, box-shadow .12s; }
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--rn-primary) 34%, transparent); }
.auth-submit.is-busy { pointer-events: none; opacity: .85; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1rem; color: var(--rn-text-muted); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--rn-border); }
.auth-alt { height: 3rem; border-radius: .7rem; font-weight: 600; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; }
.auth-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .78rem; color: var(--rn-text-muted); }
.auth-foot-secure { display: inline-flex; align-items: center; gap: .3rem; }

.auth-hero { display: none; position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(150deg, #155ba6 0%, var(--rn-primary) 40%, var(--rn-sidebar) 100%); }
@media (min-width: 992px) { .auth-hero { display: flex; align-items: center; justify-content: center; } }
.auth-hero-glow { position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px 420px at 85% 10%, rgba(249, 170, 51, .35), transparent 70%),
                radial-gradient(520px 520px at 10% 95%, rgba(255, 255, 255, .12), transparent 70%); }
.auth-hero::after { content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12);
    inset-inline-end: -220px; bottom: -260px; box-shadow: 0 0 0 70px rgba(255, 255, 255, .03), 0 0 0 140px rgba(255, 255, 255, .025); }
.auth-hero-inner { position: relative; z-index: 1; max-width: 520px; padding: 3rem; }
.auth-hero-logo { height: 64px; width: auto; margin-bottom: 2.25rem; }
.auth-hero h2 { font-size: 2.1rem; font-weight: 800; line-height: 1.35; margin-bottom: .75rem; }
.auth-hero p { font-size: 1.05rem; opacity: .85; margin-bottom: 1.75rem; }
.auth-features { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .8rem; }
.auth-features li { display: flex; align-items: center; gap: .8rem; font-weight: 600; }
.auth-features li span { width: 2.2rem; height: 2.2rem; border-radius: .6rem; display: grid; place-items: center; flex-shrink: 0;
    background: rgba(255, 255, 255, .12); color: var(--rn-accent); }
.auth-glimpse { padding: 1rem 1.1rem; border-radius: 1rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); max-width: 360px; }
.auth-glimpse-head { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; font-weight: 600; margin-bottom: .75rem; }
.auth-glimpse-up { color: #9fe0b8; font-weight: 800; }
.auth-glimpse-bars { display: flex; align-items: flex-end; gap: .4rem; height: 70px; }
.auth-glimpse-bars span { flex: 1; border-radius: 4px 4px 0 0; background: rgba(255, 255, 255, .35); }
.auth-glimpse-bars span:last-child { background: var(--rn-accent); }

/* ---------- create a business (same split screen as sign-in) ---------- */
@media (min-width: 992px) {
    .auth-split:has(.auth-form-wide) { grid-template-columns: minmax(560px, 52%) 1fr; }
    .auth-hero { position: sticky; top: 0; height: 100vh; height: 100dvh; }
}
.auth-form.auth-form-wide { max-width: 560px; }
.setup-steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; gap: .5rem; counter-reset: none; }
.setup-steps li { flex: 1; display: flex; align-items: center; gap: .45rem; padding-bottom: .55rem; font-size: .82rem; font-weight: 700;
    color: var(--rn-text-muted); border-bottom: 3px solid var(--rn-border); transition: color .2s, border-color .2s; }
.setup-steps li span, .setup-title span { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    font-size: .8rem; font-weight: 800; background: var(--bs-tertiary-bg); color: var(--rn-text-muted); transition: background .2s, color .2s; }
.setup-steps li.is-done { color: var(--rn-primary-text); border-color: var(--rn-primary); }
.setup-steps li.is-done span, .setup-section.is-done .setup-title span { background: var(--rn-primary); color: #fff; }
.setup-section { padding: 1.1rem 0; border-top: 1px dashed var(--rn-border); }
.setup-section:first-of-type { border-top: 0; padding-top: 0; }
.setup-title { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; font-size: 1.02rem; font-weight: 800; margin-bottom: .85rem; }
.setup-title small { flex-basis: 100%; font-size: .78rem; font-weight: 500; color: var(--rn-text-muted); padding-inline-start: 2.15rem; margin-top: -.35rem; }
.setup-strength { display: flex; gap: .25rem; margin-top: .45rem; }
.setup-strength span { flex: 1; height: 4px; border-radius: 4px; background: var(--rn-border); transition: background .2s; }
.setup-strength[data-score="1"] span:nth-child(-n+1) { background: #d92d20; }
.setup-strength[data-score="2"] span:nth-child(-n+2) { background: #f79009; }
.setup-strength[data-score="3"] span:nth-child(-n+3) { background: #2e90fa; }
.setup-strength[data-score="4"] span { background: #12b76a; }
.setup-match.ok { color: var(--rn-success-text); }
.setup-match.bad { color: var(--rn-danger-text); }
.setup-currency label { display: flex !important; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: .8rem; height: 100%; }
.setup-currency label strong { display: block; }
.setup-currency label small { display: block; font-size: .78rem; }
.setup-currency-code { flex-shrink: 0; width: 3rem; height: 3rem; border-radius: .7rem; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
    background: var(--bs-tertiary-bg); color: var(--rn-primary-text); letter-spacing: .02em; }
.setup-currency input:checked + label .setup-currency-code { background: var(--rn-primary); color: #fff; }
.setup-tick { margin-inline-start: auto; font-size: 1.2rem; color: var(--rn-border); }
.setup-currency input:checked + label .setup-tick { color: var(--rn-primary-text); }
/* Settings → Business type: one tile per kind of business, its icon on a tinted square. */
.business-types .choice label { display: flex; align-items: center; gap: .6rem; height: 100%; padding: .6rem .75rem; border-radius: .75rem; font-weight: 600; font-size: .9rem; }
/* The parts side by side as there is room (2026-11-25, the page in one screen). */
.business-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); column-gap: 1.25rem; }
.business-type-icon { flex-shrink: 0; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .6rem; font-size: 1.1rem;
    background: color-mix(in srgb, var(--rn-primary) 10%, transparent); color: var(--rn-primary-text); }
.business-types .choice input:checked + label .business-type-icon { background: var(--rn-primary); color: #fff; }
.business-types .choice input:checked + label .setup-tick { color: var(--rn-primary-text); }
.business-types .choice label:hover { border-color: color-mix(in srgb, var(--rn-primary) 40%, var(--rn-border)); }
.setup-rate { display: flex; align-items: center; max-width: 320px; border: 1.5px solid var(--rn-border); border-radius: .7rem; overflow: hidden; background: var(--k-bg-ffffff, #fff); }
.setup-rate:focus-within { border-color: var(--rn-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rn-primary) 14%, transparent); }
.setup-rate span { padding: 0 .9rem; font-weight: 700; color: var(--rn-text-muted); background: var(--bs-tertiary-bg); align-self: stretch; display: grid; place-items: center; white-space: nowrap; }
.setup-rate .form-control { border: 0; height: 3rem; font-size: 1.1rem; font-weight: 700; text-align: center; box-shadow: none; }

/* ---------- sign-in brand panel: the whole logo large and centred ---------- */
.auth-hero { flex-direction: column; }
.auth-hero .auth-hero-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    max-width: 640px; padding: 3rem 2.5rem; }
.auth-hero .auth-hero-logo { width: min(440px, 80%); height: auto; margin: 0; opacity: .96; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .18));
    animation: auth-float 6s ease-in-out infinite; }
.auth-hero-chips { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0 2rem 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.auth-hero-chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.auth-hero-chips i { color: var(--rn-accent); }
@keyframes auth-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .auth-hero .auth-hero-logo { animation: none; } }
/* The big logo is on the brand panel; the small one at the top of the form is for phones, where the panel is hidden. */
@media (min-width: 992px) { .auth-top { justify-content: flex-end; } .auth-top-logo { display: none; } }

/* ---------- discounts (an amount or a percent) and the column chooser of the sale / purchase lines ---------- */
.disc-box { flex-wrap: nowrap; }
.disc-box .disc-mode {
    min-width: 2.75rem; padding: 0 .45rem; font-size: .7rem; font-weight: 800; letter-spacing: .02em;
    border: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); color: var(--rn-text-muted);
}
.disc-box .disc-mode:hover:not(:disabled) { color: var(--rn-primary-text); border-color: var(--rn-primary); }
.disc-box.is-percent .disc-mode {
    font-size: .9rem; background: var(--rn-accent-soft); color: var(--rn-accent-text);
    border-color: color-mix(in srgb, var(--rn-accent) 60%, transparent);
}
.disc-box.is-percent .form-control { border-color: color-mix(in srgb, var(--rn-accent) 60%, transparent); }
.doc-footer .df-disc { width: 9.5rem; }
.doc-lines .net-discounted { color: var(--rn-primary-text); font-weight: 700; }
.disc-hint { font-size: .72rem; line-height: 1.15; margin-top: .15rem; }
@media (max-width: 767.98px) { .doc-footer .df-disc { width: 8rem; } }

.doc-lines.no-discount .col-discount,
.doc-lines.no-discount .col-net,
.doc-lines[data-hide~="net"] .col-net,
.doc-lines[data-hide~="code"] .col-code,
.doc-lines[data-hide~="unit"] .col-unit,
.doc-lines[data-hide~="bonus"] .col-bonus,
.doc-lines[data-hide~="price"] .col-price,
.doc-lines[data-hide~="discount"] .col-discount,
.doc-lines[data-hide~="total"] .col-total,
.doc-lines[data-hide~="sale"] .col-sale,
.doc-lines[data-hide~="wholesale"] .col-wholesale { display: none; }

/* The purchase lines' sale price (2026-11-03): a price or a percent on the cost; the words under it say the new price, the one
   before (struck), the rounded price to take and, in red, a price at or below the cost. */
.sale-box .form-control.is-changed { border-color: var(--rn-primary); font-weight: 700; color: var(--rn-primary-text); }
.sale-hint { font-size: .72rem; line-height: 1.2; margin-top: .15rem; display: flex; flex-wrap: wrap; align-items: center; column-gap: .35rem; }
.sale-hint:empty { display: none; }
.sale-hint .sale-round { font-size: inherit; font-weight: 700; text-decoration: none; }
/* The item's usual markup (2026-11-04): the price it gives, offered under the box ("25% → 1,250"). */
.sale-hint .sale-usual { font-size: inherit; font-weight: 600; text-decoration: none; color: var(--k-fg-9a5b00, #9a5b00); }
.sale-hint .sale-why { flex-basis: 100%; color: var(--rn-text-muted); }
:is(.col-sale, .col-wholesale).sale-loss .form-control, :is(.col-sale, .col-wholesale).sale-loss .sale-now { border-color: var(--bs-danger); color: var(--bs-danger); }
.pc-sale { font-size: .8rem; font-weight: 600; }
/* What one costs the stock, under a purchase line's price (2026-11-19): after the discounts, with transport and customs, spread over the
   free goods; green when lower than the price, amber when higher. The parts on hover (title). */
.cost-one { font-size: .72rem; line-height: 1.2; margin-top: .15rem; color: var(--k-fg-1d7a45, #1d7a45); white-space: nowrap; cursor: help; }
.cost-one.cost-up { color: var(--k-fg-9a5b00, #9a5b00); }
.cost-one[hidden] { display: none !important; }
.pc-cost { display: block; font-size: .8rem; font-weight: 600; }
#pl-cost { color: var(--rn-text-muted); white-space: normal; cursor: default; }
#pl-cost .sale-why { font-size: .75rem; }
/* With the sale price beside them, the quantity and the price would shrink until 1,000 no longer shows: they keep their room, long
   headings take two lines instead, and the lines never push the side cards below them (the table scrolls in its card at worst). */
#purchase .doc-lines td .form-control:is([data-f=qty], [data-f=price], [data-f=sale], [data-f=whole]) { min-width: 4.25rem; }
/* The free and held bonus boxes: a short heading ("Free") let the column shrink until "10" showed as "1(" at 1440 px with the side cards. */
#purchase .doc-lines td .form-control:is([data-f=bonus], [data-f=held]) { min-width: 3.25rem; }
#purchase .doc-lines .sale-box .disc-mode { padding-inline: .3rem; }
#purchase .doc-lines thead th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
#purchase .doc-body > .col-xl { min-width: 0; }
/* The wholesale price beside the sale price (2026-11-04): narrower side padding in the cells and a tighter expiry box keep every column of a
   line beside the side cards at 1440 px (the total no longer scrolls out of sight). */
#purchase .doc-lines > :not(caption) > * > * { padding-inline: .3rem; }
/* The expiry date's column is narrow (2026-11-06, user's screenshot): its heading takes two lines like the held bonus's, the date a
   smaller type and the calendar button close to it, so the whole date still shows. */
#purchase .doc-lines .exp-input { padding-inline: .2rem; font-size: .8rem; width: 6.25rem; min-width: 0; }
#purchase .doc-lines .exp-input::-webkit-calendar-picker-indicator { margin-inline-start: .1rem; padding: 0; }

/* The purchase lines without a sideways scroll (2026-11-29, the user's screenshot: every column on, long English names, the table
   scrolled 270 px at 1536 px): on a computer the item's name takes two lines in smaller letters with its code and dates under it, the
   boxes are lower and narrower (the numbers keep their room), the cells' padding is thinner, the headings smaller, and the side cards
   (last purchases, transport) take a quarter of the width, not a third. Phones and tablets keep their cards. */
@media (min-width: 992px) {
    #purchase .doc-lines > :not(caption) > * > * { padding-inline: .17rem; }
    #purchase .doc-lines > :not(caption) > * > :first-child { padding-inline-start: .45rem; }
    #purchase .doc-lines tbody td { padding-block: .22rem; }
    #purchase .doc-lines thead th { padding-block: .3rem; font-size: .72rem; }
    /* every other column as narrow as its box or figure (their declared widths starved the item's), the item's name takes what is left */
    #purchase .doc-lines thead th:not(.col-item) { width: 1% !important; }
    /* the item: two lines of its name, then its code and its dates */
    #purchase .doc-lines .line-one { flex-wrap: wrap; align-items: center; gap: .05rem .35rem; }
    #purchase .doc-lines .line-one > .line-name { flex: 1 1 100%; min-width: 9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        white-space: normal; overflow-wrap: anywhere; font-size: .8rem; font-weight: 600; line-height: 1.28; }
    #purchase .doc-lines .line-one > .line-name.name-xlong { font-size: .76rem; }
    #purchase .doc-lines .line-one > .col-code { font-size: .66rem; letter-spacing: .01em; }
    /* the boxes: smaller letters and padding, each wide enough for its figure */
    #purchase .doc-lines td .form-control, #purchase .doc-lines td .form-select { min-height: 0; height: 1.85rem; padding-block: 0; font-size: .8rem; }
    #purchase .doc-lines td .form-control { padding-inline: .3rem; }
    #purchase .doc-lines td .form-select { padding-inline-start: .35rem; padding-inline-end: 1.15rem; background-size: 9px 7px; }
    html[dir=rtl] #purchase .doc-lines td .form-select { background-position: left .3rem center; }
    html[dir=ltr] #purchase .doc-lines td .form-select { background-position: right .3rem center; }
    #purchase .doc-lines td.col-unit .form-select { min-width: 4.3rem; }
    #purchase .doc-lines td .form-control:is([data-f=qty], [data-f=price]) { min-width: 3.6rem; }
    #purchase .doc-lines td .form-control:is([data-f=sale], [data-f=whole]) { min-width: 3.7rem; }
    #purchase .doc-lines td .form-control:is([data-f=bonus], [data-f=held]) { min-width: 2.6rem; }
    #purchase .doc-lines td .batch-input { min-width: 3.6rem; }
    #purchase .doc-lines td .disc-input { min-width: 2.8rem; }
    #purchase .doc-lines .exp-input { width: 6.05rem; font-size: .76rem; letter-spacing: -.01em; }
    #purchase .doc-lines .exp-input.dg-date { padding: 0 1rem 0 .25rem; background-position: right .22rem center; background-size: .6rem; }
    html[dir=rtl] #purchase .doc-lines .exp-input.dg-date { padding: 0 .25rem 0 1rem; background-position: left .22rem center; }
    /* the % / currency switch beside a discount or a price: a small tag */
    #purchase .doc-lines .disc-box .disc-mode { min-width: 1.6rem; padding: 0 .22rem; font-size: .64rem; font-weight: 700; }
    #purchase .doc-lines .sale-hint, #purchase .doc-lines .cost-one { font-size: .66rem; margin-top: .1rem; }
    /* the words under a price on one line, cut with … (the whole of them on hover): a row stays two lines high */
    #purchase .doc-lines .sale-hint { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
    /* …and they never widen their column (no width of their own, the cell's when drawn) */
    #purchase .doc-lines :is(.sale-hint, .cost-one) { width: 0; min-width: 100%; }
    #purchase .doc-lines .cost-one { overflow: hidden; text-overflow: ellipsis; }
    #purchase .doc-lines .sale-hint > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    #purchase .doc-lines .sale-hint > .sale-why { flex-basis: auto; }
    /* below the cost: the warning's sign before the percent, both red (its words in the tooltip) */
    #purchase .doc-lines .sale-hint > .text-danger-strong { order: -1; flex: none; font-size: 0; }
    #purchase .doc-lines .sale-hint > .text-danger-strong > .bi { font-size: .68rem; }
    #purchase .doc-lines .sale-loss .sale-hint > .num { color: var(--bs-danger); font-weight: 700; }
    /* "no price yet" in two short lines rather than cut */
    #purchase .doc-lines .sale-hint > .text-secondary:not(.num) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal;
        font-size: .62rem; line-height: 1.15; }
    /* a box's buttons (the % / currency tag) are raised by Bootstrap: the heading row stays over them when the rows scroll */
    #purchase .doc-lines thead th { z-index: 6; }
    #purchase .doc-lines td.col-net, #purchase .doc-lines td.col-total { font-size: .8rem; white-space: nowrap; }
    #purchase .doc-lines td > [data-f=remove] { padding: .12rem .32rem; font-size: .8rem; }
}
@media (min-width: 1200px) {
    #purchase .doc-body > .doc-side { flex: 0 0 auto; width: clamp(19rem, 26%, 29rem); }
    /* the narrower side card's Print / PDF / Excel / Columns: icons on one row (their names in the tooltip) */
    #purchase .doc-side .tx-bar { flex-wrap: nowrap; gap: .15rem; padding: .2rem .4rem; }
    #purchase .doc-side .tx-btn span { display: none; }
    #purchase .doc-side .tx-btn { height: 1.75rem; --bs-btn-padding-x: .45rem; --bs-btn-font-size: .8rem; }
}
@media (min-width: 992px) and (max-width: 1365.98px) {
    #purchase .doc-lines .line-one > .line-name { min-width: 6.8rem; }
    #purchase .doc-lines .exp-input { width: 5.8rem; font-size: .73rem; }
    #purchase .doc-lines td .disc-input { min-width: 2.4rem; }
    #purchase .doc-lines td .form-control:is([data-f=bonus], [data-f=held]) { min-width: 2.4rem; }
    #purchase .doc-lines td .form-control:is([data-f=qty], [data-f=price]) { min-width: 3.3rem; }
    #purchase .doc-lines td .form-control:is([data-f=sale], [data-f=whole]) { min-width: 3.4rem; }
    #purchase .doc-lines td .batch-input { min-width: 3.2rem; }
}
.cols-btn { white-space: nowrap; display: inline-flex; align-items: center; }
.cols-btn.has-hidden { border-color: var(--rn-primary); color: var(--rn-primary-text); }
.cols-count {
    margin-inline-start: .4rem; padding: .05rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 800;
    background: var(--rn-primary); color: #fff;
}
.cols-menu { min-width: 16rem; padding: .35rem 0; border-radius: .8rem; border: 1px solid var(--rn-border); box-shadow: 0 14px 36px rgba(15, 23, 42, .16); }
/* a long menu (the fields chooser with the owner's role part) scrolls inside the screen */
.cols-menu { max-height: min(75vh, 40rem); overflow-y: auto; overscroll-behavior: contain; }
.cols-head {
    padding: .5rem 1rem .6rem; margin-bottom: .25rem; border-bottom: 1px solid var(--rn-border);
    font-size: .78rem; font-weight: 800; color: var(--rn-text-muted);
}
.cols-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; padding: .45rem 1rem; cursor: pointer; font-size: .9rem; }
.cols-item:hover { background: var(--bs-tertiary-bg); }
.cols-item i { color: var(--rn-text-muted); }
.cols-item .form-check-input { cursor: pointer; }
.cols-foot {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    margin-top: .25rem; padding: .5rem 1rem .2rem; border-top: 1px solid var(--rn-border); font-size: .72rem; color: var(--rn-text-muted);
}
.cols-foot .btn-link { font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
/* the "Fields" chooser: a hidden part of a page, and the group titles in its menu */
.field-off { display: none !important; }
.cols-group { padding: .5rem 1rem .15rem; margin-top: .25rem; border-top: 1px solid var(--rn-border); font-size: .72rem; font-weight: 800; color: var(--rn-text-muted); }
/* a part the owner hides for the user's roles: shown greyed with a lock; the owner's own part of the menu below */
.cols-locked { opacity: .55; cursor: not-allowed; }
.cols-lock { font-size: .7rem; color: var(--rn-text-muted); }
.cols-role { border-top: 1px solid var(--rn-border); margin-top: .35rem; padding: .35rem .6rem .5rem; }
.cols-role .cols-group { padding-inline: 0; border-top: 0; margin-top: 0; }
.cols-role-now { margin-top: .3rem; line-height: 1.35; }
.cols-head + .cols-group { margin-top: 0; border-top: 0; }
/* rows of small fields below xl (entry page headers, the voucher form): they share the row by weight, so a hidden one
   leaves no gap (Bootstrap loads first, so these win over .col) */
@media (max-width: 1199.98px) {
    .dh-w3 { flex: 3 1 0; min-width: 6.5rem; }
    .dh-w4 { flex: 4 1 0; min-width: 8rem; }
    .dh-w5 { flex: 5 1 0; min-width: 9.5rem; }
}
/* a block whose every chooser field is hidden goes too (a card with only its title left) */
.field-group:not(:has([data-field]:not(.field-off), [data-field-keep])) { display: none !important; }
#pos.pos-mode-grid .cols-dd { display: none; }

/* ---------- expiry dates ---------- */
.exp-chip {
    display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: .4rem; padding: .05rem .45rem; vertical-align: middle;
    border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.exp-ok { background: var(--bs-tertiary-bg); color: var(--rn-text-muted); }
.exp-soon { background: var(--rn-accent-soft); color: var(--rn-accent-text); }
.exp-expired { background: var(--rn-danger-soft); color: var(--rn-danger-text); }
.exp-input.is-past { border-color: var(--rn-danger); color: var(--rn-danger-text); }
.doc-lines[data-hide~="expiry"] .col-expiry { display: none; }
.doc-lines[data-hide~="batch"] .col-batch { display: none; }
.pos-tile-pic .exp-chip { position: absolute; top: .3rem; inset-inline-start: .3rem; margin: 0; font-size: .6rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.pos-cline-sub .exp-chip { font-size: .62rem; }
@media (min-width: 1200px) { .inv-kpis.inv-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* a wide card with two figures side by side (stock value at cost | at sale price) and a small line under them: it takes
   two places, so the row holds six on a wide screen; "dense" lets a small card fill the gap left before it on phones */
.inv-kpis.inv-kpis-pair { grid-auto-flow: row dense; }
@media (min-width: 1400px) { .inv-kpis.inv-kpis-pair { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* summary cards with a "Fields" chooser: they close up when some are hidden (wide screens; phones keep two a row) */
.inv-kpis.inv-kpis-fit { grid-auto-flow: row dense; }
@media (min-width: 992px) { .inv-kpis.inv-kpis-fit { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); } }
.inv-kpi-wide { grid-column: span 2; }
.inv-kpi-pair { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 1rem; min-width: 0; }
.inv-kpi-pair > div:nth-child(2) { padding-inline-start: 1rem; border-inline-start: 1px solid var(--rn-border); }
.inv-kpi-pair > .inv-kpi-note { grid-column: 1 / -1; margin-top: .1rem; }
@media (max-width: 575.98px) { .inv-kpi-wide .inv-kpi-icon { display: none; } } /* phones: the room goes to the two figures */
/* a small second line under a card's figure (expected profit, a warning) */
.inv-kpi-note { font-size: .75rem; color: var(--rn-text-muted); line-height: 1.35; }
@media (max-width: 575.98px) { .inv-kpi-note { font-size: .7rem; } }
.exp-lots { display: flex; flex-wrap: wrap; gap: .5rem; }
.exp-lot { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .6rem .8rem; min-width: 10rem;
    border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); }
.exp-lot .exp-chip { margin: 0; }
.exp-row-expired td { background: color-mix(in srgb, var(--rn-danger) 5%, transparent); }

/* ---------- held bonus ---------- */
.doc-lines.no-bonus .col-held, .doc-lines[data-hide~="held"] .col-held { display: none; }
.input-held { background: color-mix(in srgb, var(--rn-primary) 6%, var(--bs-body-bg)); border-color: color-mix(in srgb, var(--rn-primary) 30%, transparent); }
/* Too much held bonus: the red border says it; Bootstrap's icon would cover the number in a narrow box. */
.form-control.input-held.is-invalid { background-image: none; padding-left: .5rem; padding-right: .5rem; border-color: var(--bs-form-invalid-border-color); }
.rule-chip {
    display: inline-flex; align-items: center; gap: .2rem; margin-inline-start: .4rem; padding: .05rem .45rem; vertical-align: middle;
    border-radius: 999px; font-size: .7rem; font-weight: 800; background: color-mix(in srgb, var(--rn-primary) 10%, transparent); color: var(--rn-primary-text);
}
.held-left { display: block; color: var(--rn-primary-text); font-weight: 600; }
.bonus-rule .input-group-text { font-size: .8rem; }
.held-pill { display: inline-block; min-width: 2.5rem; padding: .1rem .55rem; border-radius: 999px; font-weight: 800; text-align: center;
    background: color-mix(in srgb, var(--rn-primary) 10%, transparent); color: var(--rn-primary-text); }

/* ---------- A4 invoice (sales, purchases, returns): letterhead, bill-to and details, lines, summary ---------- */
/* Compact (2026-11-28, the user's rule: 15–20 items on an A5, 30–35 on an A4; every A4 / A5 document shares it): a small letterhead,
   the details as a grid of small cells beside the party, one row an item in small letters, the totals as one strip, little space at the end. */
.invoice-a4 {
    --ia4: var(--rn-primary);
    position: relative; overflow: hidden; width: 186mm; margin: 0 auto; background: #fff; color: #1f2937;
    font-size: 11.5px; line-height: 1.35;
}
@media screen {
    body.rx-a4 { background: var(--k-bg-e7ebf0, #e7ebf0); }
    /* on screen: a sheet of paper, its padding the printed page's margins */
    .invoice-a4 { width: 210mm; min-height: 297mm; padding: 7mm 8mm 8mm; margin-bottom: 2rem; border-radius: 4px; box-shadow: 0 12px 40px rgba(15, 23, 42, .16); }
    /* the sheet lying across, or upright when its own is across (2026-11-30, paper-dir.js) */
    .invoice-a4.paper-landscape { width: 297mm !important; min-height: 210mm; max-width: none; }
    .invoice-a4.doc-a5.paper-landscape { width: 210mm !important; min-height: 148mm; }
    .invoice-a4.paper-portrait:not(.doc-a5) { width: 210mm !important; }
}
.invoice-a4 * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ia4-muted { color: #6b7280; font-size: calc(10px * var(--fs-lines, 1)); }
.receipt-serials { color: #4b5563; font-size: calc(10px * var(--fs-lines, 1)); word-break: break-all; }
/* letterhead: business and branch | logo in the middle | the document's title and number */
.ia4-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4mm; }
.ia4-brand { min-width: 0; }
.ia4-logo-box { align-self: center; text-align: center; }
.ia4-logo { display: block; max-height: calc(17mm * var(--fs-logo, 1)); max-width: calc(50mm * var(--fs-logo, 1)); margin: 0 auto; object-fit: contain; }
.ia4-brand-name { font-size: calc(17px * var(--fs-name, 1)); font-weight: 800; color: var(--ia4); line-height: 1.2; }
.ia4-brand-meta { margin-top: .5mm; color: #4b5563; font-size: calc(10px * var(--fs-contacts, 1)); line-height: 1.3; }
.ia4-brand-meta div { display: flex; align-items: center; gap: 1.2mm; }
.ia4-brand-meta i, .ia4-party-meta i { color: var(--ia4); font-size: 9px; }
.ia4-doc { text-align: end; }
.ia4-doc-title { font-size: calc(18px * var(--fs-title, 1)); font-weight: 800; line-height: 1.1; color: #111827; text-transform: uppercase; letter-spacing: .02em; }
.ia4-doc-no { margin-top: .6mm; color: #6b7280; font-size: calc(10.5px * var(--fs-number, 1)); }
.ia4-doc-no strong { color: #111827; font-size: calc(12.5px * var(--fs-number, 1)); }
.ia4-chip { display: inline-block; margin-top: .8mm; padding: 0 2.4mm; border-radius: 999px; font-size: calc(9.5px * var(--fs-number, 1)); font-weight: 700; line-height: 1.6; border: 1px solid; }
.ia4-chip + .ia4-chip { margin-inline-start: 1.2mm; }
.ia4-chip-paid { color: #047857; border-color: #6ee7b7; background: #ecfdf5; }
.ia4-chip-part { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.ia4-chip-credit { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.ia4-chip-cancelled { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }
.ia4-accent { height: 2.5px; margin: 2.2mm 0 2.6mm; border-radius: 2px; background: linear-gradient(90deg, var(--ia4), color-mix(in srgb, var(--ia4) 25%, #fff)); }
[dir="rtl"] .ia4-accent { background: linear-gradient(270deg, var(--ia4), color-mix(in srgb, var(--ia4) 25%, #fff)); }
/* the party beside its details; the details are small cells, a label over its value, as many a row as fit */
.ia4-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.5mm; margin-bottom: 2.6mm; align-items: stretch; }
.ia4-box-label { font-size: calc(8.5px * var(--fs-info, 1)); font-weight: 800; color: var(--ia4); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2mm; }
.ia4-party { min-width: 0; padding: 1.3mm 2.6mm; border-inline-start: 3px solid var(--ia4); background: color-mix(in srgb, var(--ia4) 5%, #fff); border-radius: 0 6px 6px 0; }
[dir="rtl"] .ia4-party { border-radius: 6px 0 0 6px; }
.ia4-party-name { font-size: calc(12.5px * var(--fs-info, 1)); font-weight: 800; color: #111827; line-height: 1.25; }
.ia4-party-meta { display: flex; flex-wrap: wrap; gap: 0 3mm; margin-top: .2mm; color: #4b5563; font-size: calc(10px * var(--fs-info, 1)); line-height: 1.35; }
.ia4-party-meta div { display: inline-flex; align-items: center; gap: 1mm; }
.ia4-meta { display: flex; flex-direction: column; width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.ia4-meta > tbody { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-content: stretch; margin-inline-end: -1px; margin-bottom: -1px; }
.ia4-meta tr { display: flex; flex-direction: column; justify-content: center; flex: 1 1 24mm; min-width: 0; padding: .9mm 2.2mm;
    border-inline-end: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; }
.ia4-meta td { display: block; padding: 0; border: 0; }
/* A row of two names and two values (a hotel's registration card): each name over its own value. */
.ia4-meta td:nth-child(odd) { color: #6b7280; font-size: calc(8.5px * var(--fs-info, 1)); line-height: 1.25; white-space: nowrap; }
.ia4-meta td:nth-child(even) { font-weight: 700; color: #111827; font-size: calc(10.5px * var(--fs-info, 1)); line-height: 1.3; overflow-wrap: anywhere; }
.ia4-meta .num { white-space: nowrap; }
/* the lines: one row an item, small letters; a column's heading may take two lines. Every cell has a border of its own, a grid
   (the user's rule, 2026-11-29: as the invoices printed on paper books). One colour for every border: with collapsed borders two
   colours would meet at random edges. */
.ia4-lines { width: 100%; border-collapse: collapse; border-spacing: 0; line-height: 1.3; border: 1px solid #8d96a4; }
.ia4-lines th { background: var(--ia4); color: #fff; font-weight: 700; font-size: calc(9.5px * var(--fs-lines, 1)); line-height: 1.15; padding: 1.2mm 1.6mm; text-align: start;
    vertical-align: middle; border: 1px solid #8d96a4; }
.ia4-lines td { padding: .9mm 1.6mm; border: 1px solid #8d96a4; vertical-align: middle; font-size: calc(10.5px * var(--fs-lines, 1)); }
.ia4-lines td:not(.ia4-item) { white-space: nowrap; }
.ia4-lines tbody tr:nth-child(even) td { background: #f8fafc; }
.ia4-lines tr { break-inside: avoid; }
.ia4-lines .end, .ia4-totals .end { text-align: end; }
.ia4-no { width: 6mm; color: #6b7280; }
.ia4-item { font-weight: 600; color: #111827; }
.ia4-strong { font-weight: 700; color: #111827; }
.ia4-lines[data-hide~="code"] .col-code, .ia4-lines[data-hide~="unit"] .col-unit, .ia4-lines[data-hide~="bonus"] .col-bonus,
.ia4-lines[data-hide~="held"] .col-held, .ia4-lines[data-hide~="expiry"] .col-expiry, .ia4-lines[data-hide~="batch"] .col-batch,
.ia4-lines[data-hide~="public"] .col-public, .ia4-lines[data-hide~="price"] .col-price,
.ia4-lines[data-hide~="discount"] .col-discount, .ia4-lines[data-hide~="net"] .col-net { display: none; }
/* under the lines: the totals as one strip of small cells (the total in the brand's colour at its end), the notes under it */
.ia4-bottom { display: flex; flex-direction: column; margin-top: 2.2mm; break-inside: avoid; }
.ia4-bottom > .ia4-notes { order: 2; }
.ia4-notes > :first-child { margin-top: 1.8mm; }
.ia4-notes p { margin: 0; color: #374151; white-space: pre-line; }
.ia4-totals { display: block; width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.ia4-totals > tbody { display: flex; flex-wrap: wrap; margin-inline-end: -1px; margin-bottom: -1px; }
.ia4-totals tr { display: flex; flex-direction: column; justify-content: center; flex: 1 1 22mm; min-width: 0; padding: .9mm 2.4mm;
    border-inline-end: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; }
.ia4-totals td { display: block; padding: 0 !important; text-align: start !important; }
.ia4-totals td:first-child { color: #6b7280; font-size: calc(8.5px * var(--fs-totals, 1)); line-height: 1.25; white-space: nowrap; }
.ia4-totals td + td { font-weight: 700; color: #111827; font-size: calc(11.5px * var(--fs-totals, 1)); line-height: 1.3; white-space: nowrap; }
.ia4-totals .ia4-grand { order: 99; flex: 1.5 1 32mm; background: var(--ia4); border-color: var(--ia4); }
.ia4-totals .ia4-grand td { color: #fff; }
.ia4-totals .ia4-grand td:first-child { font-weight: 700; opacity: .9; }
.ia4-totals .ia4-grand td + td { font-size: calc(14.5px * var(--fs-grand, 1)); font-weight: 800; }
.ia4-totals small { font-size: calc(9px * var(--fs-totals, 1)); font-weight: 600; }
.ia4-totals .ia4-due td + td { color: #b91c1c; font-weight: 800; }
.ia4-totals .ia4-account td + td { color: #4b5563; }
.ia4-totals .ia4-way { background: #f8fafc; }
.ia4-totals .ia4-way td + td { font-size: calc(10px * var(--fs-totals, 1)); font-weight: 600; }
/* the total alone (an order, a quotation without a discount): a box at the end, not a band across the page */
.ia4-totals:has(> tbody > tr:only-child) { width: 70mm; align-self: flex-end; }
.doc-a5 .ia4-totals:has(> tbody > tr:only-child) { width: 52mm; }
.ia4-sign { display: flex; justify-content: space-between; gap: 30mm; margin-top: 10mm; break-inside: avoid; }
.ia4-sign div { flex: 1; padding-top: 1mm; border-top: 1px solid #9ca3af; text-align: center; color: #6b7280; font-size: calc(9.5px * var(--fs-foot, 1)); }
.ia4-foot { margin-top: 3mm; padding-top: 1.5mm; border-top: 1px solid #e5e7eb; text-align: center; color: #6b7280; font-size: calc(9.5px * var(--fs-foot, 1)); line-height: 1.3; }
/* a print design (Settings → Print design, 2026-11-07): second name and a line about the work under the name, the logo beside it,
   the contacts (phones with names, e-mail, website, address) on a tinted line under the letterhead, the footer's lines */
.ia4-top-start { grid-template-columns: 1fr auto; }
.ia4-top-start .ia4-brand { display: flex; align-items: center; gap: 4mm; }
.ia4-logo-start { max-height: calc(16mm * var(--fs-logo, 1)); max-width: calc(36mm * var(--fs-logo, 1)); margin: 0; flex-shrink: 0; }
.ia4-brand-text { min-width: 0; }
.ia4-brand-name2 { font-size: calc(12px * var(--fs-name2, 1)); font-weight: 700; color: color-mix(in srgb, var(--ia4) 70%, #111827); line-height: 1.25; }
.ia4-tagline { margin-top: .3mm; color: #4b5563; font-size: calc(10.5px * var(--fs-name2, 1)); font-weight: 600; }
.ia4-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: .5mm 4mm; margin-top: 2mm; padding: 1mm 3mm; border-radius: 6px;
    background: color-mix(in srgb, var(--ia4) 6%, #fff); color: #374151; font-size: calc(10px * var(--fs-contacts, 1)); line-height: 1.35; }
.ia4-contact { display: inline-flex; align-items: center; gap: 1.2mm; white-space: nowrap; }
.ia4-contact-wide { white-space: normal; }
.ia4-contact i { color: var(--ia4); font-size: calc(10.5px * var(--fs-contacts, 1)); }
.ia4-contact b { font-weight: 700; color: #111827; }
.ia4-contacts + .ia4-accent { margin-top: 2mm; }
.ia4-foot-design div + div { margin-top: .6mm; }
.doc-a5 .ia4-contacts { font-size: calc(8.5px * var(--fs-contacts, 1)); gap: .3mm 3mm; margin-top: 1.4mm; padding: .7mm 2mm; }
.doc-a5 .ia4-brand-name2 { font-size: calc(10px * var(--fs-name2, 1)); }
.doc-a5 .ia4-tagline { font-size: calc(9px * var(--fs-name2, 1)); }
.doc-a5 .ia4-logo-start { max-height: calc(11mm * var(--fs-logo, 1)); max-width: calc(24mm * var(--fs-logo, 1)); }
/* The print design's watermark (2026-11-25): the logo or a picture, faint, in the middle of the body under the letterhead (once, on the
   first page), over the page with multiply so the table rows do not hide it and the text stays black; nothing of the document moves. */
.ia4-watermark { position: relative; height: 0; z-index: 2; pointer-events: none; }
.ia4-watermark img { position: absolute; left: 50%; top: 95mm; transform: translate(-50%, -50%); width: var(--wm-size, 60%); max-height: 170mm;
    object-fit: contain; opacity: var(--wm-op, .08); mix-blend-mode: multiply; }
.doc-a5 .ia4-watermark img { top: 62mm; max-height: 110mm; }
/* a cancelled invoice says so across the page */
.ia4-stamp {
    position: absolute; top: 42%; inset-inline: 0; text-align: center; transform: rotate(-18deg); pointer-events: none;
    font-size: 72px; font-weight: 900; letter-spacing: .08em; color: rgba(220, 38, 38, .12); text-transform: uppercase;
}
.paper-landscape .ia4-watermark img { top: 62mm; max-height: 120mm; width: calc(var(--wm-size, 60%) * .72); }
.doc-a5.paper-landscape .ia4-watermark img { top: 42mm; max-height: 80mm; }
@media print {
    body.rx-a4 { background: #fff; }
    .invoice-a4 { width: auto; min-height: 0; padding: 0; margin: 0; box-shadow: none; border-radius: 0; }
    .invoice-a4.paper-landscape { width: auto !important; max-width: none !important; padding-inline: .4mm; } /* its last border whole */
}

/* ---------- Settings → Print design (2026-11-07): the form beside a preview of an A4 invoice and an 80 mm receipt ---------- */
.pd-preview-box { position: sticky; top: calc(var(--rn-topbar-height) + 1rem); max-height: calc(100vh - var(--rn-topbar-height) - 2rem); overflow: auto;
    padding: .75rem; border-radius: var(--rn-radius); background: var(--k-bg-e7ebf0, #e7ebf0); }
.pd-preview-box .invoice-a4 { min-height: 0; margin-bottom: 0; }
.pd-80 .receipt { box-shadow: 0 8px 24px rgba(15, 23, 42, .14); border-radius: 4px; }
.pd-pageno { margin-top: 4mm; text-align: center; color: var(--k-fg-6b7280, #6b7280); font-size: 10px; }
.pd-brand { display: flex; align-items: center; gap: .75rem; }
.pd-brand-logo { width: 4rem; height: 3rem; object-fit: contain; flex-shrink: 0; border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--k-bg-ffffff, #fff); }
.pd-brand-none { display: inline-flex; align-items: center; justify-content: center; color: var(--rn-text-muted); font-size: 1.3rem; }
.pd-phone + .pd-phone { margin-top: .5rem; }
.pd-wa { padding-top: .45rem; }
.pd-swatch { width: 2rem; height: 2rem; padding: 0; border-radius: 50%; border: 2px solid var(--k-bd-ffffff, #fff); box-shadow: 0 0 0 1px var(--rn-border); }
.pd-swatch.active { box-shadow: 0 0 0 2px var(--rn-text); }
.pd-wm-frame { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; margin: 0; border: 1px dashed var(--rn-border); border-radius: .5rem;
    background: var(--k-bg-ffffff, #fff); color: var(--rn-text-muted); cursor: pointer; overflow: hidden; }
.pd-wm-frame img { width: 100%; height: 100%; object-fit: contain; }
.pd-wm-frame [hidden] { display: none; }
/* Text sizes (2026-11-30): a panel opened from the Look card (the preview stays in view), a part's name and − 100% + beside it, the
   groups two by two. */
#pd-sizes-open { padding: .15rem .55rem; font-size: .8rem; line-height: 1.4; }
.pd-sizes-panel { width: min(38rem, calc(100vw - 2rem)); max-height: min(34rem, calc(100vh - 6rem)); overflow: auto; padding: .75rem .9rem; }
.pd-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .35rem 1.25rem; }
.pd-size-title { font-size: .72rem; font-weight: 800; color: var(--rn-primary-text); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.pd-size { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .1rem 0; }
.pd-size + .pd-size { border-top: 1px dashed var(--rn-border); }
.pd-size-label { min-width: 0; font-size: .8rem; line-height: 1.2; }
.pd-size-ctl { display: inline-flex; align-items: center; gap: .15rem; flex-shrink: 0; }
.pd-size-ctl .btn { padding: .05rem .4rem; line-height: 1.3; }
.pd-size-value { min-width: 3.1rem; text-align: center; font-weight: 700; font-size: .85rem; color: var(--rn-text-muted); }
.pd-size-value.pd-size-changed { color: var(--rn-primary-text); }
@media (max-width: 1199.98px) { .pd-preview-box { position: static; max-height: none; } }
@media (min-width: 1200px) { .pd-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .75rem; align-content: start; } }

/* ---------- printed money voucher (Cash/Print): the invoice's letterhead and look, an amount band; A5 or A4 ---------- */
.vp-move { display: flex; align-items: center; gap: 4mm; flex-wrap: wrap; }
.vp-move > i { color: var(--ia4); font-size: 18px; }
.vp-amount { margin: 0 0 3mm; border: 1px solid color-mix(in srgb, var(--ia4) 25%, var(--k-bd-ffffff, #fff)); border-radius: 8px; overflow: hidden; break-inside: avoid; }
.vp-amount-main { display: flex; justify-content: space-between; align-items: center; gap: 4mm; padding: 2.6mm 4mm; background: var(--ia4); color: #fff; }
.vp-amount-label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.vp-amount-value { font-size: 21px; font-weight: 800; line-height: 1.1; }
.vp-amount-value small { font-size: 13px; font-weight: 600; }
.vp-amount-row { display: flex; justify-content: space-between; gap: 4mm; padding: 1.3mm 4mm; border-top: 1px solid var(--k-bd-eef0f3, #eef0f3); color: var(--k-fg-374151, #374151); }
.vp-amount-row .num { font-weight: 700; color: var(--k-fg-111827, #111827); }
.vp-before { border-top: 0; }
.vp-balance { background: var(--k-bg-f8fafc, #f8fafc); }
.vp-owes-us, .vp-owes-us .num { color: var(--k-fg-047857, #047857) !important; font-weight: 700; }
.vp-we-owe, .vp-we-owe .num { color: var(--k-fg-b91c1c, #b91c1c) !important; font-weight: 700; }
.vp-notes { margin-bottom: 2.5mm; }
.vp-notes p { margin: 0; color: var(--k-fg-374151, #374151); white-space: pre-line; }
/* A5: the same page, smaller (compact 2026-11-28: 15–20 items on one sheet) */
.invoice-a4.doc-a5 { width: 136mm; font-size: 10px; }
@media screen { .invoice-a4.doc-a5 { width: 148mm; min-height: 210mm; padding: 6mm 6mm 7mm; } }
.doc-a5 .ia4-top { gap: 2.5mm; }
.doc-a5 .ia4-brand-name { font-size: calc(13px * var(--fs-name, 1)); }
.doc-a5 .ia4-brand-meta { font-size: calc(8.5px * var(--fs-contacts, 1)); }
.doc-a5 .ia4-logo { max-height: calc(12mm * var(--fs-logo, 1)); max-width: calc(32mm * var(--fs-logo, 1)); }
.doc-a5 .ia4-doc-title { font-size: calc(13.5px * var(--fs-title, 1)); }
.doc-a5 .ia4-doc-no { font-size: calc(9px * var(--fs-number, 1)); }
.doc-a5 .ia4-doc-no strong { font-size: calc(10.5px * var(--fs-number, 1)); }
.doc-a5 .ia4-chip { font-size: calc(8.5px * var(--fs-number, 1)); padding: 0 2mm; }
.doc-a5 .ia4-accent { height: 2px; margin: 1.6mm 0 2mm; }
.doc-a5 .ia4-info { gap: 2mm; margin-bottom: 2mm; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.doc-a5 .ia4-box-label { font-size: calc(7.5px * var(--fs-info, 1)); }
.doc-a5 .ia4-party { padding: 1mm 2.2mm; }
.doc-a5 .ia4-party-name { font-size: calc(11px * var(--fs-info, 1)); }
.doc-a5 .ia4-party-meta { font-size: calc(8.5px * var(--fs-info, 1)); gap: 0 2.2mm; }
.doc-a5 .ia4-meta tr { flex-basis: 14mm; min-width: min-content; padding: .7mm 1.6mm; }
.ia4-meta td:nth-child(3) { margin-top: .8mm; }
.doc-a5 .ia4-meta td:nth-child(odd) { font-size: calc(7.5px * var(--fs-info, 1)); }
.doc-a5 .ia4-meta td:nth-child(even) { font-size: calc(9px * var(--fs-info, 1)); }
/* An invoice on A5 (2026-11-14): the lines, totals and signatures of the A4 invoice, smaller. */
.doc-a5 .ia4-lines th { font-size: calc(8px * var(--fs-lines, 1)); padding: .9mm 1.1mm; }
.doc-a5 .ia4-lines td { padding: .6mm 1.1mm; font-size: calc(9px * var(--fs-lines, 1)); }
.doc-a5 .ia4-no { width: 4.5mm; }
.doc-a5 .ia4-muted, .doc-a5 .receipt-serials { font-size: calc(8.5px * var(--fs-lines, 1)); }
.doc-a5 .ia4-bottom { margin-top: 1.8mm; }
.doc-a5 .ia4-notes > :first-child { margin-top: 1.4mm; }
.doc-a5 .ia4-totals tr { flex-basis: 18mm; padding: .7mm 1.8mm; }
.doc-a5 .ia4-totals td:first-child { font-size: calc(7.5px * var(--fs-totals, 1)); }
.doc-a5 .ia4-totals td + td { font-size: calc(9.5px * var(--fs-totals, 1)); }
.doc-a5 .ia4-totals .ia4-grand { flex-basis: 27mm; }
.doc-a5 .ia4-totals .ia4-grand td + td { font-size: calc(12px * var(--fs-grand, 1)); }
.doc-a5 .ia4-totals small { font-size: calc(7.5px * var(--fs-totals, 1)); }
.doc-a5 .ia4-sign { gap: 14mm; margin-top: 8mm; }
.doc-a5 .ia4-sign div { font-size: calc(8.5px * var(--fs-foot, 1)); }
.doc-a5 .ia4-foot { margin-top: 2.2mm; padding-top: 1.2mm; font-size: calc(8.5px * var(--fs-foot, 1)); }
.doc-a5 .vp-amount { margin-bottom: 2.5mm; }
.doc-a5 .vp-amount-main { padding: 2mm 3mm; }
.doc-a5 .vp-amount-value { font-size: 16px; }
.doc-a5 .vp-amount-row { padding: 1mm 3mm; }
.doc-a5 .ia4-stamp { font-size: 44px; }
/* The notes follow the size of the end of the page (2026-11-30). */
.ia4-notes p { font-size: calc(11.5px * var(--fs-foot, 1)); }
.doc-a5 .ia4-notes p { font-size: calc(10px * var(--fs-foot, 1)); }
/* The compact layout of a print design (2026-11-30, the user's request): the phones (and e-mail, website) at the top where the document's
   name was, the address in the middle under the logo, and the document's name, number and how it was paid in a box at the end of the row
   of the customer and the details (.ia4-info, a grid, sits beside the float; whatever else comes after it starts under it). */
.ia4-top-compact { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.ia4-brand-with-logo { display: flex; align-items: center; gap: 4mm; }
.ia4-mid { display: flex; flex-direction: column; align-items: center; gap: 1mm; max-width: 72mm; text-align: center; }
.ia4-mid-address { display: inline-flex; align-items: flex-start; gap: 1.2mm; color: #374151; font-size: calc(10px * var(--fs-contacts, 1)); line-height: 1.3; }
.ia4-mid-address i, .ia4-phone i { color: var(--ia4); }
.ia4-phones { display: flex; flex-direction: column; align-items: flex-end; gap: .4mm; min-width: 0; color: #374151; font-size: calc(10px * var(--fs-contacts, 1)); line-height: 1.3; }
.ia4-phone { display: inline-flex; align-items: center; justify-content: flex-end; gap: 1.2mm; max-width: 100%; min-width: 0; }
.ia4-phone b { overflow-wrap: anywhere; }
.ia4-phone .num { white-space: nowrap; }
.ia4-phone-long .num { white-space: normal; overflow-wrap: anywhere; }
.ia4-phone b { font-weight: 700; color: #111827; }
/* The document's box (2026-11-30, the user's follow-up: the same height as the customer and the details): a cell at the end of their row
   (.ia4-docbox-cell, put there by _PrintDocCell), the name with the number under it and the chips beside them. On a page without such a row
   it floats beside what follows (.ia4-docbox-float), hidden when the row has its own. */
.ia4-docbox { display: flex; align-items: center; gap: 2.5mm; min-width: 0; padding: 1.3mm 2.6mm; text-align: start;
    border: 1px solid #e5e7eb; border-inline-start: 3px solid var(--ia4); border-radius: 6px; background: #fff; }
.ia4-docbox-text { min-width: 0; }
.ia4-docbox .ia4-doc-title { font-size: calc(13px * var(--fs-title, 1)); white-space: nowrap; }
.ia4-docbox .ia4-doc-no { margin-top: .3mm; }
.ia4-docbox .ia4-doc-no strong { white-space: normal; }
.ia4-one-no { white-space: nowrap; }
.ia4-docbox .ia4-chip { margin: 0; flex-shrink: 0; }
.ia4-docbox .ia4-chip + .ia4-chip { margin: 0; }
.ia4-docbox:not(:has(.ia4-doc-title:not(.field-off), .ia4-doc-no:not(.field-off), .ia4-chip:not(.field-off))) { display: none; }
.ia4-info:has(> .ia4-docbox-cell) { grid-template-columns: minmax(24mm, .85fr) minmax(min-content, 1.4fr) fit-content(76mm); }
.doc-a5 .ia4-info:has(> .ia4-docbox-cell) { grid-template-columns: minmax(20mm, .85fr) minmax(min-content, 1.4fr) fit-content(56mm); }
.ia4-info:has(> .ia4-docbox-cell) .ia4-meta tr { flex-basis: 14mm; min-width: min-content; }
.ia4-docbox-cell { order: 9; }
.ia4-docbox-float { float: inline-end; margin: 0 0 2.6mm; margin-inline-start: 2.5mm; }
.ia4-docbox-float:has(~ .ia4-info > .ia4-docbox-cell) { display: none; }
.ia4-docbox-float ~ :not(.ia4-info) { clear: both; }
.doc-a5 .ia4-docbox { gap: 1.8mm; padding: 1mm 2.2mm; }
.doc-a5 .ia4-docbox .ia4-doc-title { font-size: calc(11px * var(--fs-title, 1)); }
.doc-a5 .ia4-docbox-float { margin-bottom: 2mm; margin-inline-start: 2mm; }
.doc-a5 .ia4-mid-address, .doc-a5 .ia4-phones { font-size: calc(8.5px * var(--fs-contacts, 1)); }
/* a page printed from the background (the cash list's "Save and print") */
.print-frame { position: fixed; width: 0; height: 0; border: 0; inset-inline-start: -9999px; }


/* ---------- WhatsApp: the button, the "PDF ready" panel, a short message, a link that cannot open ---------- */
.btn-whatsapp { --bs-btn-bg: #1fa855; --bs-btn-border-color: #1fa855; --bs-btn-color: #fff;
    --bs-btn-hover-bg: #178f47; --bs-btn-hover-border-color: #178f47; --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #137a3c; --bs-btn-active-border-color: #137a3c; --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: #1fa855; --bs-btn-disabled-border-color: #1fa855; --bs-btn-disabled-color: #fff; font-weight: 600; }
.share-wa .dropdown-item small { font-size: .78rem; }
.share-toast { position: fixed; bottom: 1.25rem; inset-inline: 0; width: fit-content; max-width: calc(100% - 2rem); margin: 0 auto; z-index: 2000;
    padding: .55rem 1rem; border-radius: 999px; background: #1f2937; color: #fff; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.share-ready { position: fixed; bottom: 1rem; inset-inline: 0; width: min(380px, calc(100% - 2rem)); margin: 0 auto; z-index: 2000;
    padding: .9rem 1rem; border-radius: 14px; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); box-shadow: 0 16px 40px rgba(15, 23, 42, .25); }
.share-ready-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.share-ready-head > i { font-size: 1.6rem; color: var(--k-fg-b42318, #b42318); }
@media print { .share-toast, .share-ready { display: none !important; } .invoice-a4 { zoom: 1 !important; } }
/* A tile's small second line on My day (2026-11-11: the car's last load request). */
.sm-action-note { display: block; font-size: .72rem; font-weight: 500; color: var(--k-fg-667085, #667085); margin-top: .1rem; }

/* A salesman's workday (2026-11-11, workday.js): the card on My day. */
#sm-workday:empty { display: none; }
.sm-wd { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--k-bd-e5e7eb, #e5e7eb); border-radius: 14px; padding: .85rem 1rem; }
.sm-wd.is-open { border-color: #86d8a8; background: var(--k-bg-f3fbf6, #f3fbf6); }
.sm-wd-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.sm-wd-head > i { font-size: 1.25rem; color: var(--k-fg-d97706, #d97706); }
.sm-wd-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #16a34a; margin-inline-end: .4rem; animation: sm-wd-pulse 2s infinite; }
@keyframes sm-wd-pulse { 50% { opacity: .35; } }
.sm-wd-km { margin-bottom: .6rem; }
.sm-wd-km label { font-size: .8rem; color: var(--k-fg-667085, #667085); }
.sm-wd-km input { max-width: 14rem; direction: ltr; }
.sm-wd-note { display: block; color: var(--k-fg-667085, #667085); margin-top: .45rem; font-size: .75rem; }
.sm-wd-wait { font-size: .8rem; color: var(--k-fg-b54708, #b54708); }
.sm-wd-wait[hidden] { display: none; }

/* Maps inside the app (2026-11-11, ranma-map.js / Leaflet): kept below menus and sticky bars. */
.rn-map { position: relative; z-index: 0; isolation: isolate; border-radius: 10px; overflow: hidden; background: var(--k-bg-eef2f7, #eef2f7); }
.rn-map-off { display: grid; place-items: center; color: var(--k-fg-667085, #667085); font-size: .9rem; }
.rn-map-pin { background: none; border: 0; direction: ltr; width: 0; height: 0; }
.rn-map-pin span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; min-width: 24px;
  height: 24px; padding: 0 6px; border-radius: 12px; border: 2px solid var(--k-bd-ffffff, #fff); color: #fff; font: 700 12px/1 system-ui, Tahoma, sans-serif;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .4); white-space: nowrap; }
.rn-map-pin span.is-big { min-width: 30px; height: 30px; border-radius: 15px; font-size: 13px; }
.rn-map-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-inline-end: .35rem; vertical-align: middle; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content { margin: .55rem .75rem; line-height: 1.45; }

/* This device's printer (2026-11-11, printer.js): the print window or a Bluetooth receipt printer. */
.printer-dialog { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100% - 2rem)); box-shadow: 0 18px 50px rgba(16, 24, 40, .25); color: var(--k-fg-1f2937, #1f2937); }
.printer-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.printer-dialog form { margin: 0; }
.printer-head { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-bottom: 1px solid var(--k-bd-e5e7eb, #e5e7eb); }
.printer-head > i { font-size: 1.3rem; color: var(--rn-primary-text); }
.printer-body { padding: .9rem 1rem 1rem; }
.printer-way { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--k-bd-e5e7eb, #e5e7eb); border-radius: 10px; margin-bottom: .5rem; cursor: pointer; }
.printer-way:has(input:checked) { border-color: var(--rn-primary); background: var(--rn-primary-soft); }
.printer-way input { margin-top: .3rem; }
.printer-way small { display: block; color: var(--k-fg-667085, #667085); font-size: .8rem; }
.printer-way.is-off { opacity: .55; cursor: not-allowed; }
.printer-more { padding: .4rem .1rem 0; }
.printer-device { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; padding: .45rem .6rem; background: var(--k-bg-f8fafc, #f8fafc); border-radius: 8px; }
.printer-device[hidden], .printer-more[hidden] { display: none; }
@media print { .printer-dialog, #printer-panel, #printer-toast, #printer-busy { display: none !important; } }
.share-problem { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: var(--rn-bg); }
.share-problem-card { width: min(420px, 100%); padding: 2rem 1.5rem; text-align: center; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border);
    border-radius: 16px; box-shadow: var(--rn-shadow); }
.share-problem-logo { height: 44px; width: auto; margin-bottom: 1.5rem; }
.share-problem-icon { display: block; font-size: 2.4rem; color: var(--rn-primary-text); margin-bottom: .5rem; }
.share-problem-card h1 { font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.share-problem-card p { color: var(--rn-text-muted); margin: 0; }

/* ---------- Reports/Summary: a day, a month and a year side by side, each with its own arrows ---------- */
.sum-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.sum-card { overflow: hidden; }
.sum-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border-bottom: 1px solid var(--rn-border);
    background: color-mix(in srgb, var(--rn-primary) 6%, var(--rn-surface)); }
.sum-nav { width: 2.3rem; height: 2.3rem; padding: 0; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px;
    background: var(--rn-surface); border: 1px solid var(--rn-border); color: var(--rn-primary-text); font-size: 1rem; }
.sum-nav:hover { border-color: var(--rn-primary); color: var(--rn-primary-text); background: var(--rn-surface); }
.sum-nav.disabled { opacity: .35; }
.sum-when { flex: 1; min-width: 0; text-align: center; line-height: 1.3; }
.sum-kind { display: block; font-size: .72rem; font-weight: 700; color: var(--rn-text-muted); }
.sum-when b { display: block; font-size: 1rem; }
.sum-when small { display: block; font-size: .75rem; color: var(--rn-text-muted); }
.sum-main { padding: .85rem 1rem .55rem; }
.sum-label { font-size: .8rem; font-weight: 600; color: var(--rn-text-muted); }
.sum-big { font-size: 1.65rem; font-weight: 800; line-height: 1.25; color: var(--rn-primary-text); }
.sum-big small { font-size: .85rem; font-weight: 600; color: var(--rn-text-muted); }
.sum-note { font-size: .78rem; color: var(--rn-text-muted); }
.sum-rows { padding: 0 1rem .35rem; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .42rem 0;
    border-top: 1px dashed var(--rn-border); font-size: .9rem; }
.sum-row > b { font-weight: 700; white-space: nowrap; }
.sum-net { font-weight: 800; }
.sum-net > b { font-weight: 800; }
.sum-good > b { color: var(--k-fg-047857, #047857); }
.sum-bad > b { color: var(--k-fg-b42318, #b42318); }
.sum-more { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1rem; border-top: 1px solid var(--rn-border);
    font-size: .82rem; font-weight: 600; text-decoration: none; }
.sum-more:hover { background: color-mix(in srgb, var(--rn-primary) 5%, var(--rn-surface)); }
/* the cashboxes: money in and out by kind of dealing, then what is left */
.sum-cash { margin: 0 1rem .6rem; padding: .2rem .7rem .3rem; border-radius: var(--rn-radius-sm); background: color-mix(in srgb, var(--rn-primary) 4%, var(--rn-surface)); }
.sum-sec { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .5rem 0 .3rem; font-size: .88rem; font-weight: 700; }
.sum-sec > b { white-space: nowrap; }
.sum-sec-in, .sum-sec-in > b { color: var(--k-fg-047857, #047857); }
.sum-fold-out { border-top: 1px solid var(--rn-border); margin-top: .25rem; }
/* money in / out fold: the heading is the button (its chevron turns when open) */
.sum-fold > summary { cursor: pointer; list-style: none; }
.sum-fold > summary::-webkit-details-marker { display: none; }
.sum-fold-icon { display: inline-block; font-size: .7rem; margin-inline-end: .35rem; transition: transform .15s; color: var(--rn-text-muted); }
.sum-fold:not([open]) .sum-fold-icon { transform: rotate(var(--sum-fold-turn, 90deg)); }
[dir="rtl"] .sum-fold { --sum-fold-turn: 90deg; }
[dir="ltr"] .sum-fold { --sum-fold-turn: -90deg; }
.sum-fold[open] > summary .sum-sec { padding-bottom: .2rem; }
#dash-summary.sum-busy { opacity: .6; transition: opacity .15s; }
@media print { .sum-fold-icon { display: none; } }
.sum-sec-out, .sum-sec-out > b { color: var(--k-fg-b42318, #b42318); }
.sum-cash-net { border-top: 1px solid var(--rn-border); margin-top: .25rem; color: var(--rn-text); }
.sum-sub { display: flex; justify-content: space-between; gap: .75rem; padding: .16rem 0 .16rem; padding-inline-start: 1.35rem; font-size: .82rem; color: var(--rn-text); }
.sum-sub .num { font-weight: 600; white-space: nowrap; }
.sum-zero { color: var(--rn-text-muted); }
.sum-zero .num { font-weight: 400; }
@media print { .sum-nav { display: none !important; } .sum-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .sum-big { font-size: 1.45rem; } .sum-row { padding: .32rem 0; } .sum-main { padding: .7rem 1rem .45rem; } }

/* Companies and representatives (Customers & suppliers): the tabs' last two sit at the far end; a company's
   representatives as chips; a list filtered by one of them shows a chip with × above the rows. */
/* Customers and suppliers (the user's rule, 2026-11-23): the title, search and buttons on one slim row, every tab on the next. */
.party-tabs { flex-wrap: nowrap; gap: .1rem; margin-bottom: .45rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.party-tabs::-webkit-scrollbar { display: none; }
.party-tabs .nav-item { flex: none; }
.party-tabs .nav-link { padding: .22rem .55rem; font-size: .82rem; white-space: nowrap; }
.party-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .4rem; }
.party-head h1 { margin: 0; font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.party-legend { color: var(--rn-text-muted); font-size: .8rem; cursor: help; }
.party-search { display: flex; flex: 1 1 18rem; gap: .3rem; min-width: 0; }
.party-search .input-group { flex: 1 1 auto; width: auto; min-width: 0; }
.party-head-tools { display: flex; align-items: center; gap: .3rem; margin-inline-start: auto; }
.party-head .tx-bar { flex-wrap: nowrap; padding: 0; border: 0; background: none; }
.party-head .tx-btn span { display: none; }
.party-head .tx-btn { padding: .3rem .4rem; }
.party-head .party-search .btn, .party-head .cols-btn, .party-head #parties-import { padding-inline: .5rem; }
@media (min-width: 768px) {
    .party-head .form-control, .party-head .input-group-text, .party-head .btn:not(.tx-btn) { padding-block: .24rem; font-size: .84rem; }
}
@media (min-width: 1200px) { .party-head { flex-wrap: nowrap; } }
@media (max-width: 1199.98px) { .party-search { order: 3; flex-basis: 100%; } }
@media (max-width: 1599.98px) {
    #parties-import span { display: none !important; }
    .party-head .adv-open .d-xl-inline { display: none !important; }
    .party-tabs .nav-link { padding-inline: .42rem; font-size: .78rem; }
    .party-tabs .nav-link > .bi { display: none; }
}

/* Lists with two slim rows above them (the user's rule, 2026-11-23; items, stock documents): .lh = the title, figures or new documents, and the buttons;
   .lf = the search and its filters. What used to be big cards are figures in the row, or counts on the tabs. */
.lh { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; min-width: 0; margin-bottom: .4rem; }
.lh h1 { flex: none; margin: 0; font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.lh .btn:not(.tx-btn) { padding-block: .24rem; font-size: .82rem; white-space: nowrap; }
.lh .tx-bar { flex-wrap: nowrap; padding: 0; border: 0; background: none; }
.lh .tx-btn span { display: none; }
.lh .tx-btn { padding: .3rem .4rem; }
.lh .dropdown > .btn, .lh .cols-btn { padding-inline: .45rem; }
.lh-tools { display: flex; flex: none; align-items: center; gap: .3rem; margin-inline-start: auto; }
.lh-stats, .lh-actions { display: flex; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.lh-stats::-webkit-scrollbar, .lh-actions::-webkit-scrollbar, .lf-tabs::-webkit-scrollbar { display: none; }
.lh-stats { gap: .65rem; padding-inline-start: .6rem; border-inline-start: 1px solid var(--rn-border); font-size: .76rem; }
.lh-stat { display: inline-flex; flex: none; align-items: baseline; gap: .25rem; color: var(--rn-text-muted); font-weight: 600; white-space: nowrap; }
.lh-stat > .bi { align-self: center; color: var(--rn-primary-text); }
.lh-stat b { color: var(--bs-body-color); font-size: .86rem; font-weight: 800; }
.lh-stat b.text-success-strong { color: var(--k-fg-1e7b4a, #1e7b4a); }
.lh-stat b.text-danger-strong { color: var(--k-fg-b42318, #b42318); }
.lh-stat small { font-size: .64rem; }
.lh-stat-warn, .lh-stat-warn > .bi, .lh-stat-warn b { color: var(--k-fg-b25e09, #b25e09); }
.lh-actions { gap: .25rem; }
.lh .quick-action { display: inline-flex; flex: none; flex-direction: row; align-items: center; gap: .3rem; height: auto; min-height: 0; padding: .24rem .55rem;
    border-radius: .45rem; box-shadow: none; font-size: .8rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.lh .quick-action i { font-size: .92rem; }
.lh .quick-action:hover { background: color-mix(in srgb, var(--rn-primary) 7%, var(--k-bg-ffffff, #fff)); transform: none; }
.lh .quick-owed i { color: var(--k-fg-b25e09, #b25e09); }
.lh .quick-owed:has(.quick-badge) { border-color: var(--k-bd-f3c88f, #f3c88f); background: var(--k-bg-fff8ef, #fff8ef); }
.lh .quick-badge { position: static; min-width: 1.1rem; padding: 0 .3rem; font-size: .7rem; line-height: 1.35; }
.lf { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; min-width: 0; margin-bottom: .4rem; }
.lf-search { flex: 1 1 8rem; min-width: 8rem; max-width: 22rem; }
.lf-select { flex: 0 1 8.5rem; min-width: 6rem; }
.lf .form-control, .lf .form-select, .lf .btn { padding-block: .22rem; font-size: .82rem; }
.lf .btn { padding-inline: .5rem; }
.lf-tabs { flex: 1 1 auto; flex-wrap: nowrap; gap: .18rem; min-width: 0; padding-bottom: 0; scrollbar-width: none; }
.lf-tabs .pos-tab { flex: none; padding: .16rem .5rem; font-size: .78rem; white-space: nowrap; }
.lf-count { display: inline-block; min-width: 1.05rem; margin-inline-start: .25rem; padding: 0 .25rem; border-radius: 999px; background: var(--k-bg-eef1f5, #eef1f5); color: var(--rn-text-muted);
    font-size: .68rem; font-weight: 800; line-height: 1.4; text-align: center; }
.lf-count-warn { background: var(--k-bg-fdf0e3, #fdf0e3); color: var(--k-fg-b25e09, #b25e09); }
.lf-count-bad { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.pos-tab.active .lf-count { background: rgb(255 255 255 / .22); color: #fff; }
@media (min-width: 1200px) { .lh, .lf { flex-wrap: nowrap; } }
@media (max-width: 1199.98px) {
    .lh-stats, .lh-actions { order: 3; flex: 1 1 100%; }
    .lh-stats { padding-inline-start: 0; border-inline-start: 0; }
    .lf-search { max-width: none; }
    .lf-tabs { flex: 1 1 100%; }
}
@media (max-width: 575.98px) { .lh-stats { flex-wrap: wrap; gap: .15rem .7rem; overflow: visible; } }
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .lh .quick-action { gap: .2rem; padding-inline: .4rem; font-size: .77rem; }
    .lh .quick-action > i { display: none; }
}
@media (min-width: 1200px) and (max-width: 1365.98px) {
    .lh .quick-action { padding-inline: .32rem; font-size: .74rem; }
    .lh-stats { gap: .4rem; padding-inline-start: .4rem; }
    .lh-stat > .bi { display: none; }
    .lh-stat b { font-size: .8rem; }
    .lh a[data-field="newModel"] { padding-inline: .45rem; font-size: 0 !important; }
    .lh a[data-field="newModel"] > .bi { margin: 0 !important; font-size: .85rem; }
    .lf-search { flex: 1 1 7.5rem; min-width: 7rem; max-width: 12rem; }
    .lf-select { flex: 0 1 6.5rem; min-width: 5.5rem; }
    .lf-tabs { gap: .12rem; }
    .lf-tabs .pos-tab { padding-inline: .32rem !important; font-size: .74rem; }
}
@media (max-width: 1599.98px) {
    .lf-tabs .pos-tab > .bi, .lf-wide { display: none; }
    .lf .adv-open .d-xl-inline { display: none !important; }
    .lf-tabs .pos-tab { padding-inline: .42rem; }
}
/* The sales, purchases and both returns lists (2026-11-29, the user's screenshot: "smaller and tidier"): the tabs' row holds the tools
   (Print, PDF, Excel, Columns as icons, Fields, the buttons); one box under it holds a slim row of filters and, under a hairline, the
   figures of what is shown (they were four big cards and a row of export buttons). Zoho's, QuickBooks' and Stripe's lists keep the same
   order: tabs, one filter bar, one line of figures. */
.inv-tools { display: flex; flex: none; align-items: center; gap: .3rem; margin-bottom: .3rem; }
.inv-tools .inv-new { margin-bottom: 0; }
.inv-tools .tx-bar { flex-wrap: nowrap; gap: .15rem; padding: 0; border: 0; background: none; }
.inv-tools .tx-btn span { display: none; }
.inv-tools .tx-btn { --bs-btn-padding-y: 0; --bs-btn-padding-x: .48rem; --bs-btn-font-size: .86rem; height: 2rem; }
#inv-export { display: flex; align-items: center; }
#inv-export:has(.tx-bar) { padding-inline-end: .35rem; border-inline-end: 1px solid var(--rn-border); }
#inv-export:not(:has(.tx-bar)) { display: none !important; }
.il-bar { margin-bottom: .5rem; border: 1px solid var(--rn-border); border-radius: 12px; background: var(--rn-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.il-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .4rem .5rem; }
.il-period { display: contents; }
.il-bar .form-control, .il-bar .input-group-text, .il-bar .btn { font-size: .84rem; }
/* Today | this week | this month: a segmented switch on a soft track. */
.il-bar .inv-periods { flex: none; gap: 2px; padding: 2px; border-radius: 9px; background: var(--k-bg-eef1f5, #eef1f5); }
.il-bar .inv-periods > .btn { padding: .22rem .65rem; border: 0; border-radius: 7px !important; font-weight: 600; }
.il-bar .inv-periods > .btn-light { background: transparent; color: var(--rn-text-muted); }
.il-bar .inv-periods > .btn-light:hover { background: var(--rn-surface); color: var(--bs-body-color); }
.il-bar .inv-periods > .btn-primary { box-shadow: 0 1px 3px rgba(var(--rn-primary-rgb), .35); }
.il-bar .inv-periods .bi { font-size: .82rem; }
/* ‹ the day › as one box. */
.il-bar [data-field="day"] { flex: none; gap: 0 !important; }
.il-bar [data-field="day"] > .btn { display: inline-grid; place-items: center; width: 1.95rem; height: 1.95rem; padding: 0; border: 1px solid var(--rn-border);
    background: var(--rn-surface); color: var(--rn-text-muted); }
.il-bar [data-field="day"] > .btn:hover { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.il-bar #inv-prev { border-start-end-radius: 0; border-end-end-radius: 0; }
.il-bar #inv-next { border-start-start-radius: 0; border-end-start-radius: 0; }
.il-bar [data-field="day"] > .form-control { width: 8.9rem !important; height: 1.95rem; margin-inline: -1px; padding-block: 0; border-radius: 0;
    text-align: center; font-weight: 600; }
.il-bar [data-field="day"] > input[type="month"], .il-bar [data-field="day"] > input[data-dg="month"] { width: 10.4rem !important; }
.il-bar [data-field="day"] > .inv-period-range { display: inline-flex; align-items: center; width: auto !important; font-size: .78rem; }
.il-bar .inv-period-name { margin-inline-start: .35rem; }
/* The search: an icon in the box, Enter (or the small button) searches. */
.il-search { flex: 1 1 13rem; min-width: 10rem; max-width: 26rem; }
/* One rounded field (2026-11-29, the user's screenshot: the icon, the box and the button were three boxes): the magnifier inside it, a
   soft fill that turns white with a ring in the brand's colour when typed in, and the ↵ button only once something is typed. */
.il-search .input-group { flex-wrap: nowrap; align-items: center; height: 1.95rem; border: 1px solid var(--rn-border); border-radius: 9px;
    background: color-mix(in srgb, var(--rn-primary) 3%, var(--rn-surface)); transition: border-color .15s, box-shadow .15s, background .15s; }
.il-search .input-group:hover { border-color: color-mix(in srgb, var(--rn-primary) 35%, var(--rn-border)); }
.il-search .input-group:focus-within { border-color: var(--rn-primary); background: var(--rn-surface); box-shadow: 0 0 0 3px rgba(var(--rn-primary-rgb), .14); }
.il-search .input-group-text { height: 100%; padding: 0 .3rem 0 .6rem; border: 0; border-radius: 0; background: transparent; color: var(--rn-text-muted); }
html[dir=rtl] .il-search .input-group-text { padding: 0 .6rem 0 .3rem; }
.il-search .input-group:focus-within .input-group-text { color: var(--rn-primary-text); }
.il-search .form-control { height: 100%; min-width: 0; padding: 0 .2rem; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.il-search .form-control::placeholder { color: var(--rn-text-muted); opacity: .85; }
.il-go { display: inline-grid; place-items: center; width: 1.55rem; height: 1.55rem; margin-inline: .2rem; padding: 0; border: 0 !important; border-radius: 6px !important;
    background: var(--rn-primary); color: #fff; font-size: .78rem; opacity: 0; transform: scale(.85); pointer-events: none; transition: opacity .15s, transform .15s; }
.il-search .input-group:has(.form-control:not(:placeholder-shown)) .il-go { opacity: 1; transform: none; pointer-events: auto; }
.il-go:hover, .il-go:focus-visible { background: var(--rn-primary-hover, var(--rn-primary)); color: #fff; }
/* Advanced search, Unpaid, Cancelled: rounded chips that fill when on. */
.il-toggles { display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
.il-chip { display: inline-flex; align-items: center; gap: .3rem; height: 1.95rem; padding: 0 .7rem; border: 1px solid var(--rn-border); border-radius: 999px;
    background: var(--rn-surface); color: var(--bs-body-color); font-weight: 600; white-space: nowrap; }
.il-chip > .bi { color: var(--rn-text-muted); }
.il-chip:hover { border-color: color-mix(in srgb, var(--rn-primary) 45%, var(--rn-border)); background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.il-chip:hover > .bi { color: inherit; }
.il-chip-on, .il-chip-on:hover { border-color: var(--rn-primary); background: var(--rn-primary); color: #fff; }
.il-chip-on > .bi, .il-chip-on:hover > .bi { color: #fff; }
.il-chip-warn, .il-chip-warn:hover { border-color: var(--k-bd-f3c88f, #f3c88f); background: var(--k-bg-fff8ef, #fff8ef); color: var(--k-fg-b25e09, #b25e09); }
.il-chip-warn > .bi, .il-chip-warn:hover > .bi { color: inherit; }
.il-x { margin-inline-start: .1rem; font-size: .72rem; opacity: .8; }
.il-count { min-width: 1.15rem; padding: 0 .32rem; border-radius: 999px; background: var(--k-bg-eef1f5, #eef1f5); color: var(--rn-text-muted); font-size: .7rem;
    font-weight: 700; line-height: 1.5; text-align: center; }
.il-chip-on .il-count { background: rgb(255 255 255 / .25); color: #fff; }
/* The figures: one line under a hairline, each a label and its amounts; the paid share as a small bar. */
.il-sum { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.4rem; padding: .38rem .8rem; border-top: 1px solid var(--rn-border);
    border-end-start-radius: 11px; border-end-end-radius: 11px; background: color-mix(in srgb, var(--rn-primary) 3%, var(--rn-surface)); font-size: .8rem; }
.il-stat { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; color: var(--rn-text-muted); font-weight: 600; white-space: nowrap; }
.il-stat > .bi { font-size: .9rem; color: var(--rn-primary-text); }
.il-stat b { color: var(--bs-body-color); font-size: .95rem; font-weight: 800; }
.il-stat small { margin-inline-start: .18rem; font-size: .66rem; font-weight: 600; color: var(--rn-text-muted); }
.il-vals { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 .55rem; }
.il-val { white-space: nowrap; }
.il-val + .il-val { padding-inline-start: .55rem; border-inline-start: 1px solid var(--rn-border); }
.il-stat-good > .bi, .il-stat-good b { color: var(--rn-success-text); }
.il-stat-warn > .bi, .il-stat-warn b { color: var(--k-fg-b25e09, #b25e09); }
.il-meter { display: inline-block; width: 4.2rem; height: .38rem; overflow: hidden; border-radius: 999px; background: var(--k-bg-fbe3c4, #fbe3c4); }
.il-meter > span { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: #22a06b; }
.il-pct { color: var(--rn-text-muted); font-size: .72rem; font-weight: 700; }
@media (min-width: 992px) {
    .inv-tools .btn:not(.tx-btn) { padding-block: .28rem; font-size: .84rem; }
    .inv-tabs .nav-link { padding-block: .45rem; }
}
/* Laptops: the switch without its icons, the chips' long words as icons. */
@media (max-width: 1599.98px) {
    .il-bar .inv-periods .bi { display: none; }
    .il-chip-text { display: none; }
    .il-sum { gap: .3rem 1rem; }
}
@media (max-width: 1365.98px) {
    .il-bar .inv-periods > .btn { padding-inline: .5rem; }
    .il-bar [data-field="day"] > .form-control { width: 8.2rem !important; }
    .il-bar .inv-period-name { display: none; }
    .il-search { flex-basis: 9rem; min-width: 8rem; }
    .il-toggles [data-field="cancelled"] .d-md-inline { display: none !important; }
    .il-stat > .bi { display: none; }
}
/* Phones and tablets: the search a row of its own, the chips sharing one, the figures two by two. */
@media (max-width: 767.98px) {
    .inv-tabs { flex-wrap: wrap; row-gap: .4rem; }
    .inv-tools { flex: 1 1 100%; justify-content: flex-end; order: -1; margin-bottom: 0; }
    .inv-tabs .nav-tabs { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .inv-tabs .nav-tabs::-webkit-scrollbar { display: none; }
    .inv-tabs .nav-link { padding: .45rem .8rem; white-space: nowrap; }
    .il-filters { gap: .35rem; }
    .il-search { flex: 1 1 100%; order: -1; max-width: none; }
    .il-search .input-group { height: 2.4rem; }
    .il-search .form-control { font-size: 16px; }
    .il-go { width: 1.9rem; height: 1.9rem; }
    .il-toggles { flex: 1 1 100%; margin-inline-start: 0; }
    .il-toggles > div { flex: 1 1 0; }
    .il-toggles .il-chip { justify-content: center; width: 100%; }
    .il-chip { height: 2.2rem; }
    .il-bar [data-field="day"] > .btn, .il-bar [data-field="day"] > .form-control { height: 2.2rem; }
    .il-bar [data-field="day"] > .form-control { width: 9.5rem !important; font-size: 16px; }
    .il-sum { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; padding: .45rem .7rem; }
    .il-stat { flex-wrap: wrap; white-space: normal; }
    .il-meter { width: 3rem; }
}
.company-rep { display: inline-flex; align-items: center; padding: .3rem .7rem; border: 1px solid var(--rn-border);
    border-radius: 999px; background: var(--bs-tertiary-bg); color: inherit; text-decoration: none; font-size: .9rem; }
.company-rep:hover { border-color: var(--rn-primary); color: var(--rn-primary-text); }
.filter-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .4rem .25rem .7rem;
    border-radius: 999px; background: var(--rn-primary-soft); color: var(--rn-primary-text); font-size: .875rem; }
.filter-chip a { display: inline-flex; padding: .1rem .3rem; border-radius: 999px; color: inherit; }
.filter-chip a:hover { background: rgba(var(--rn-primary-rgb), .12); }

/* Money received or paid: the party's unpaid invoices and loans, ticked ones get the money oldest first (cash.js). */
.od-card .table { --bs-table-bg: transparent; }
.od-table th { font-size: .8rem; color: var(--bs-secondary-color); font-weight: 600; white-space: nowrap; background: var(--bs-tertiary-bg); }
.od-table td, .od-table th { padding: .45rem .6rem; }
.od-table .od-tick { width: 2.2rem; text-align: center; }
.od-table .od-pay { width: 9.5rem; min-width: 8rem; }
.od-table tr.od-on td { background: var(--rn-primary-soft); }
.od-pill { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.od-done { background: var(--k-bg-dcfce7, #dcfce7); color: var(--k-fg-166534, #166534); }
.od-part { background: var(--k-bg-fef3c7, #fef3c7); color: var(--k-fg-92400e, #92400e); }
.od-summary { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; padding: .6rem 1rem; border-top: 1px solid var(--rn-border); font-size: .9rem; }
.od-summary .od-note { flex-basis: 100%; }
@media (min-width: 768px) { .od-summary .od-note { flex-basis: auto; margin-inline-start: auto; } }

/* The voucher print: the invoices it paid. */
.vp-docs { margin-bottom: 5mm; break-inside: avoid; }
.paper-landscape .vp-docs { break-inside: auto; } /* a sheet lying across is short: the list begins on it */
.vp-docs .ia4-lines td { padding: 1.6mm 2mm; }
/* The money page's unpaid invoices on paper (Cash/OpenItems, 2026-11-14): up to 12 columns on A4, headings on two lines. */
#oi-lines th { white-space: normal; font-size: 10.5px; padding: 2mm 1.4mm; vertical-align: bottom; }
#oi-lines td { padding: 1.8mm 1.4mm; font-size: 11.5px; white-space: nowrap; }
.vp-doc-done { color: var(--k-fg-166534, #166534); font-weight: 700; white-space: nowrap; }
.vp-docs-rest { margin-top: 2mm; font-size: 12px; color: var(--k-fg-374151, #374151); }
.od-kind-inline { display: none; }
/* Phones: the buttons on their own line, each document a small card (number, date and kind, status; then after
   discount and remaining; then what is paid now). */
@media (max-width: 767.98px) {
    .od-card .pf-head { flex-wrap: wrap; }
    .od-card .od-actions { width: 100%; }
    .od-card .od-actions .btn { flex: 1; }
    .od-table thead { display: none; }
    .od-table tbody tr { display: grid; grid-template-columns: 2rem 1fr auto; grid-template-areas:
        "tick num status" "tick date date" ". total open" ". pay pay"; gap: .15rem .6rem; padding: .6rem .75rem; border-bottom: 1px solid var(--rn-border); }
    .od-table tbody td { display: block; padding: 0; border: 0; background: transparent !important; }
    .od-table tr.od-on { background: var(--rn-primary-soft); }
    .od-table .od-tick { grid-area: tick; width: auto; text-align: start; padding-top: .1rem; }
    .od-table .od-num { grid-area: num; }
    .od-table .od-status { grid-area: status; text-align: end; }
    .od-table .od-date { grid-area: date; font-size: .85rem; color: var(--bs-secondary-color); }
    .od-table .od-kind-inline { display: inline; }
    .od-table .od-total { grid-area: total; text-align: start !important; }
    .od-table .od-open { grid-area: open; }
    .od-table .od-pay { grid-area: pay; width: auto; display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
    .od-table .od-pay input { font-size: 16px; }
    .od-table [data-label]::before { content: attr(data-label) ": "; font-size: .78rem; font-weight: 400; color: var(--bs-secondary-color); white-space: nowrap; }
}

/* Held bonus given beyond what suppliers gave: owed by them until settled (Inventory → held bonus owed). */
.held-pill.held-owed { background: var(--k-bg-fee2e2, #fee2e2); color: var(--k-fg-b91c1c, #b91c1c); }
/* Item movements: stock, held bonus and owed side by side; on phones every movement is a card. */
.mv-table .mv-groups th { border-bottom: 0; padding-bottom: 0; }
.mv-table .mv-group { font-size: .72rem; letter-spacing: .02em; color: var(--rn-primary-text); border-bottom: 2px solid var(--rn-border) !important; }
.mv-table td.mv-held { background: var(--k-bg-fbfaf5, #fbfaf5); }
@media screen and (max-width: 767.98px) {
    .mv-table thead { display: none; }
    .mv-table, .mv-table tbody, .mv-table tr, .mv-table td { display: block; width: 100%; }
    .mv-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; padding: .6rem .75rem; border-bottom: 1px solid var(--rn-border); }
    .mv-table td { border: 0; padding: 0; text-align: start !important; background: none !important; }
    .mv-table td:nth-child(-n+2) { grid-column: 1 / -1; }
    .mv-table td:empty, .mv-table td.mv-zero { display: none; }
    .mv-table td[data-label]::before { content: attr(data-label) ": "; font-size: .75rem; font-weight: 400; color: var(--bs-secondary-color); }
}
/* Sale page: the part of a line's held bonus given from the stock, and what the stock has (red: not enough). */
.pos-held-note { display: block; margin-top: .15rem; font-size: .72rem; font-weight: 600; color: var(--k-fg-b45309, #b45309); white-space: normal; text-align: start; }
.pos-held-note.pos-held-short { color: var(--k-fg-b91c1c, #b91c1c); }

/* Held bonus settlement: "put the owed quantity back into the stock" — a quiet box under the ways. */
.restock-check { padding: .6rem .8rem .6rem 2.4rem; border: 1px dashed var(--rn-border); border-radius: .6rem; background: var(--k-bg-f8fafc, #f8fafc); }
[dir="rtl"] .restock-check { padding: .6rem 2.4rem .6rem .8rem; }
.restock-check .form-check-input { margin-inline-start: -1.6rem; }
/* "After saving" on the held bonus settlement: each figure now → after, as small tiles side by side. */
.after-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem; }
.after-tile { min-width: 0; padding: .55rem .8rem; border: 1px solid var(--rn-border); border-radius: .6rem; background: var(--k-bg-f8fafc, #f8fafc); }
.after-what { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .8rem; color: var(--bs-secondary-color); }
.after-what > i { color: var(--rn-primary-text); }
.after-what b { color: var(--bs-body-color); font-weight: 600; }
.after-values { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; margin-top: .15rem; }
.after-now { color: var(--bs-secondary-color); }
.after-arrow { font-size: .8rem; color: var(--bs-secondary-color); }
.after-new { font-size: 1.15rem; font-weight: 700; }
.after-new.after-good { color: var(--k-fg-15803d, #15803d); }
.after-new.after-bad { color: var(--k-fg-b91c1c, #b91c1c); }
.after-same { padding: .05rem .5rem; border-radius: 999px; background: var(--k-bg-e2e8f0, #e2e8f0); color: var(--k-fg-475569, #475569); font-size: .72rem; }
.after-note { margin-top: .2rem; font-size: .75rem; color: var(--bs-secondary-color); }
.after-tile.after-muted { display: flex; align-items: center; color: var(--bs-secondary-color); font-size: .875rem; }
.after-tile.after-warn { display: flex; align-items: center; grid-column: 1 / -1; border-color: var(--k-bd-fecaca, #fecaca); background: var(--k-bg-fef2f2, #fef2f2); color: var(--k-fg-b91c1c, #b91c1c);
    font-size: .875rem; font-weight: 600; }

/* An action card's count (Inventory: items whose held bonus suppliers owe). */
.quick-action { position: relative; }
/* Inventory with production: up to seven cards, all in one row on wide screens. */
.quick-badge { position: absolute; top: .5rem; inset-inline-end: .5rem; min-width: 1.5rem; padding: .1rem .45rem; border-radius: 999px;
    background: #dc2626; color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.3; }

/* Item page: the company's supplier and the representative's phone, small, inside their boxes. */
.link-tag { gap: .25rem; padding-inline: .45rem; max-width: 50%; min-width: 0; flex-shrink: 1; font-size: .75rem; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); }
.link-tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The name keeps room to be read and typed; the note gives way first (…). */
.input-group:has(.link-tag) { flex-wrap: nowrap; }
.input-group:has(.link-tag:not([hidden])) > .form-control { min-width: 5.5rem; }

/* A stock document seen read-only (Inventory/View): its facts as label over value, as many to a row as fit. */
.doc-view-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem 1.5rem; margin: 0; }
.doc-view-facts dt { font-size: .78rem; font-weight: 500; color: var(--bs-secondary-color); margin-bottom: .15rem; }
.doc-view-facts dd { margin: 0; }
.doc-view-facts .doc-view-wide { grid-column: 1 / -1; }

/* ---------- offline work: the state in the top bar (offline.js) ---------- */
.net-pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; font-weight: 700; }
.net-dot { width: .62rem; height: .62rem; border-radius: 50%; background: #12b76a; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(18, 183, 106, .18); }
.net-pill.on .net-label { display: none; } /* everything sent: the green dot alone */
.net-pill.off { background: var(--k-bg-fef3f2, #fef3f2); color: var(--k-fg-b42318, #b42318); border-color: var(--k-bd-fecdca, #fecdca); }
.net-pill.off .net-dot { background: #d92d20; box-shadow: 0 0 0 3px rgba(217, 45, 32, .18); }
.net-pill.busy, .net-pill.warn { background: var(--k-bg-fffaeb, #fffaeb); color: var(--k-fg-b54708, #b54708); border-color: var(--k-bd-fedf89, #fedf89); }
.net-pill.busy .net-dot, .net-pill.warn .net-dot { background: #f79009; box-shadow: 0 0 0 3px rgba(247, 144, 9, .2); }
.net-pill.busy .net-dot { animation: net-pulse 1s ease-in-out infinite; }
@keyframes net-pulse { 50% { opacity: .35; } }
.net-count { min-width: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: rgba(0, 0, 0, .08); }
.net-count[hidden] { display: none; }
@media (min-width: 576px) { .net-count { display: none; } } /* the label says it there */
.net-menu { min-width: 17rem; max-width: 22rem; }
/* A model's sizes and colours as chips, and its lines grouped by colour (a line not sold is greyed). */
.im-chips { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 1rem; }
.im-chip { display: inline-flex; align-items: center; gap: .15rem; padding: .2rem .25rem .2rem .65rem; border-radius: 999px;
    background: var(--rn-primary-soft); color: var(--rn-primary-text); font-weight: 700; font-size: .9rem; }
.im-chip button { border: 0; background: transparent; color: inherit; padding: 0 .2rem; line-height: 1; }
.im-variants .im-group td { background: var(--bs-tertiary-bg); padding-top: .4rem; padding-bottom: .4rem; }
.im-variants tr.im-off td:not(.dl-remove) { opacity: .45; }
@media screen and (max-width: 767.98px) {
    .im-variants.doc-stack tr.im-group { display: block; border: 0; padding: .25rem 0; margin: .5rem 0 .25rem; background: transparent; }
    .im-variants.doc-stack tr.im-group td { background: transparent; padding: 0; }
}

/* Starting balances: one results box for the party search of every line, fixed under the box typed in (never cut off by
   the scrolling table); the footer's totals per currency, side by side. */
.ob-results { position: fixed; z-index: 1060; max-height: 50vh; overflow-y: auto; }
/* The purchase page's size × colour window: narrow boxes, the colour column kept in view. */
.pm-grid th, .pm-grid td { min-width: 3.6rem; }
/* inside its window: at the window's top, not under the page's top bar (the rule for list tables) */
.app-content .table.pm-grid > thead > tr > th { position: sticky; top: 0; z-index: 2; }
/* Items → Model: a colour's picture beside its name (a tap changes it); the sale page's sizes window shows it too. */
.im-pic { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .5rem; border: 1px dashed var(--rn-border);
    overflow: hidden; cursor: pointer; vertical-align: middle; margin-inline-end: .5rem; color: var(--rn-text-muted); background: var(--k-bg-ffffff, #fff); }
.im-pic img { width: 100%; height: 100%; object-fit: cover; }
.pv-colour-pic { width: 2rem; height: 2rem; border-radius: .4rem; object-fit: cover; margin-inline-end: .5rem; vertical-align: middle; }
/* The item page's price level grid: a small table inside a card, its heading not sticky. */
.app-content .table.level-grid > thead > tr > th { position: static; }
.level-grid td input { min-width: 6rem; }
.pm-grid tbody th { background: var(--bs-tertiary-bg); position: sticky; inset-inline-start: 0; z-index: 1; }
.pm-grid .pm-qty { min-width: 3.2rem; padding-inline: .25rem; }
/* what each size has in stock, small under its box */
.pm-grid .pm-stock { font-size: .68rem; color: var(--rn-text-muted); text-align: center; line-height: 1.2; margin-top: .1rem; }
.ob-totals { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-self: center; }
.ob-lines .ob-roles:empty { display: none; }

/* What waits on this device: one row per record, its print page on a click. */
.net-list { margin-top: .5rem; max-height: 16rem; overflow-y: auto; border-top: 1px solid var(--bs-border-color); }
.net-row { display: flex; align-items: center; gap: .55rem; padding: .4rem .15rem; border-bottom: 1px solid var(--bs-border-color-translucent);
    color: inherit; text-decoration: none; font-size: .82rem; }
a.net-row:hover { background: var(--bs-tertiary-bg); }
.net-row > .bi:first-child { color: var(--rn-primary-text); font-size: 1rem; }
.net-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.net-row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-row-sub { color: var(--bs-secondary-color); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-row-amount { font-weight: 700; white-space: nowrap; }
.net-row-print { color: var(--bs-secondary-color); }
@media (max-width: 575.98px) {
    .net-pill { padding: .3rem .55rem; }
    .net-pill .net-label { display: none; } /* phones: the dot and the number waiting */
}

/* Import from Excel (phase 7): the rows as they were understood, in a box of their own with the heading kept in view. */
.imp-help summary { cursor: pointer; font-weight: 600; color: var(--rn-primary-text); }
.imp-step-head { flex-wrap: wrap; padding-bottom: .75rem; }
.imp-drop {
    display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; margin: 0; cursor: pointer;
    border: 2px dashed color-mix(in srgb, var(--rn-primary) 30%, var(--rn-border)); border-radius: .75rem;
    background: color-mix(in srgb, var(--rn-primary) 4%, var(--rn-surface)); color: var(--rn-text);
}
.imp-drop:hover, .imp-drop.imp-over { border-color: var(--rn-primary); background: var(--rn-primary-soft); }
.imp-drop > i { font-size: 1.6rem; color: var(--rn-primary-text); }
.imp-drop > span { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.imp-drop > small { color: var(--rn-text-muted); }
.imp-drop.imp-chosen { border-style: solid; }
.imp-progress { height: .9rem; border-radius: 999px; }
.imp-help th { font-weight: 600; width: 1%; }
.imp-table-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--rn-border); border-radius: .5rem; }
.app-content .imp-table-wrap .table.imp-table > thead > tr > th { top: 0; }
.imp-table td { vertical-align: top; font-size: .85rem; }
.imp-table .imp-notes { min-width: 16rem; font-size: .78rem; }
.imp-row-error > td { background: var(--k-bg-fff5f5, #fff5f5); }
.inv-pill.imp-new { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.inv-pill.imp-update { background: var(--k-bg-e8f0fb, #e8f0fb); color: var(--rn-primary-text); }
.inv-pill.imp-same { background: var(--k-bg-eef0f2, #eef0f2); color: var(--k-fg-5b6470, #5b6470); }
.inv-pill.imp-error { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }

/* Business type and parts shown only (user's rule, 2026-10-23: online, only the platform's owner changes them). */
.business-locked .choice label, .business-locked .form-check-label { cursor: default; }
.business-locked .choice input:disabled + label { opacity: 1; }
.business-locked .choice input:not(:checked) + label { opacity: .6; }
.business-locked .form-switch .form-check-input:disabled ~ .form-check-label { opacity: 1; }
/* The client's page: the form's cards sit inside the card, without a second frame. */
.client-type-form > .card { border: 0; box-shadow: none; background: transparent; }
.client-type-form > .card > .card-body { padding: 0 0 .75rem; }
@media (min-width: 1200px) { .client-type-form .business-types > .col-xl-3 { flex: 0 0 auto; width: 33.333%; } }

/* Invoice lists: today / this week / this month, then the arrows step by that period (2026-10-24). */
.inv-periods .btn { white-space: nowrap; }
.inv-period-range { width: auto; min-width: 11rem; background: var(--rn-surface); }
.inv-period-name { font-weight: 600; }

/* General journal (Accounting/Entries, phase 8): a rule between entries; credit accounts set in, as an accountant writes them. */
.gj-table .gj-entry { border-top: 2px solid var(--bs-border-color); }
.gj-table td.gj-credit { padding-inline-start: 2rem; }

/* The guests' QR menu (Guest/Menu, phase 10): a phone-first page of its own — the business on top, the table and its calls, sticky
   categories and search, dishes as cards with their pictures, and a bar at the bottom with the table and the order being made. */
.gm-body { background: var(--rn-bg); min-height: 100dvh; }
.gm { max-width: 760px; margin: 0 auto; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.gm-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1rem .75rem;
    background: linear-gradient(135deg, var(--rn-primary), var(--rn-sidebar)); color: #fff; }
.gm-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.gm-logo { height: 46px; width: 46px; object-fit: contain; border-radius: 12px; background: var(--k-bg-ffffff, #fff); padding: 4px; flex: 0 0 auto; }
.gm-brand-text { min-width: 0; }
.gm-brand-text h1 { font-size: 1.2rem; font-weight: 800; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-brand-text span { font-size: .8rem; opacity: .8; }
.gm-lang { display: inline-flex; align-items: center; gap: .35rem; color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; }
.gm-lang:hover, .gm-lang:focus { color: #fff; background: rgba(255, 255, 255, .12); }
.gm-table-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--k-bg-ffffff, #fff); border-bottom: 1px solid var(--rn-border); }
.gm-table-chip { display: inline-flex; align-items: center; gap: .35rem; margin-inline-end: auto; color: var(--rn-primary-text); font-size: .95rem; }
.gm-table-chip b { font-weight: 800; }
.gm-call { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; background: var(--rn-accent-soft); color: var(--rn-accent-text);
    font-weight: 600; border: 1px solid var(--k-bd-fde1b0, #fde1b0); }
.gm-call:hover { background: var(--k-bg-ffe9c4, #ffe9c4); color: var(--rn-accent-text); }
@media (max-width: 575.98px) {
    .gm-table-chip { flex: 1 1 100%; }
    .gm-call { flex: 1 1 0; justify-content: center; }
}
.gm-note { margin: .75rem 1rem 0; padding: .6rem .8rem; border-radius: var(--rn-radius-sm); background: var(--rn-accent-soft); color: var(--rn-accent-text); font-size: .9rem; }
.gm-tools { position: sticky; top: 0; z-index: 20; background: var(--k-bg-f5f7fbf5, rgba(245, 247, 251, .96)); backdrop-filter: blur(6px); padding: .6rem 1rem .4rem;
    border-bottom: 1px solid var(--rn-border); }
.gm-cats { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .45rem; }
.gm-cats::-webkit-scrollbar { display: none; }
.gm-cat { flex: 0 0 auto; border: 1px solid var(--rn-border); background: var(--k-bg-ffffff, #fff); color: var(--rn-text); border-radius: 999px; padding: .35rem .9rem;
    font-weight: 600; font-size: .9rem; }
.gm-cat.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.gm-search { position: relative; }
.gm-search i { position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%); color: var(--rn-text-muted); }
.gm-search .form-control { padding-inline-start: 2.3rem; border-radius: 999px; font-size: 16px; }
.gm-menu { padding: .25rem 1rem 1rem; }
.gm-section { scroll-margin-top: 7rem; }
.gm-section h2 { font-size: 1.05rem; font-weight: 800; margin: 1rem 0 .55rem; }
.gm-grid { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 576px) { .gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gm-dish { position: relative; display: flex; align-items: center; gap: .75rem; width: 100%; padding: .55rem; text-align: start; background: var(--k-bg-ffffff, #fff);
    border: 1px solid var(--rn-border); border-radius: 14px; box-shadow: var(--rn-shadow); color: inherit; transition: transform .12s ease, border-color .12s ease; }
.gm-dish:active { transform: scale(.98); }
.gm-dish-in { border-color: var(--rn-primary); }
.gm-dish-bump { animation: gm-bump .3s ease; }
@keyframes gm-bump { 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .gm-dish-bump { animation: none; } }
.gm-dish-img { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--rn-primary-soft);
    display: grid; place-items: center; color: var(--rn-primary-text); font-size: 1.8rem; }
.gm-dish-img img { width: 100%; height: 100%; object-fit: cover; }
.gm-dish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.gm-dish-name { font-weight: 700; line-height: 1.3; }
/* 2026-10-28: a dish's description (two lines on the card, all of it in its window) and the orders from home */
.gm-dish-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8rem; color: var(--bs-secondary-color); line-height: 1.3; }
.gm-dish-about { color: var(--bs-secondary-color); margin: .25rem 0 .5rem; white-space: pre-line; }
.gm-home-order { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .6rem .75rem; margin-bottom: .6rem; }
.gm-home-head { display: flex; align-items: center; gap: .4rem; }
.gm-home-head > i { font-size: 1.1rem; color: var(--rn-primary-text); }
.gm-home-declined .gm-home-head > i, .gm-home-cancelled .gm-home-head > i { color: var(--k-fg-b42318, #b42318); }
.gm-home-ready .gm-home-head > i, .gm-home-delivered .gm-home-head > i, .gm-home-done .gm-home-head > i { color: var(--k-fg-1e7b4a, #1e7b4a); }
.gm-dish-meta { color: var(--rn-primary-text); font-weight: 800; }
.gm-dish-add { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--rn-primary); color: #fff;
    font-size: 1.15rem; }
.gm-dish-count { position: absolute; top: -.45rem; inset-inline-end: -.35rem; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px;
    background: var(--rn-accent); color: #3b2300; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.gm-dish[hidden], .gm-section[hidden], .gm-dish-count[hidden], .gm-dish-pic[hidden] { display: none !important; }
.gm-empty { text-align: center; color: var(--rn-text-muted); margin: 2rem 0; }
.gm-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; gap: .6rem; padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
    background: var(--k-bg-ffffff, #fff); border-top: 1px solid var(--rn-border); box-shadow: 0 -6px 18px rgba(16, 24, 40, .08); max-width: 760px; margin: 0 auto; }
.gm-bar-table { position: relative; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--rn-border); border-radius: 12px; font-weight: 600; }
.gm-dot { position: absolute; top: .3rem; inset-inline-end: .3rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--rn-danger); }
.gm-dot[hidden] { display: none; }
.gm-bar-cart { flex: 1; display: flex; align-items: center; gap: .6rem; border-radius: 12px; font-weight: 700; padding: .65rem .9rem; }
.gm-bar-count { min-width: 1.7rem; height: 1.7rem; border-radius: 999px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: .85rem; }
.gm-bar-total { margin-inline-start: auto; }
.gm-toast { position: fixed; inset-inline: 1rem; bottom: calc(5.2rem + env(safe-area-inset-bottom)); z-index: 1100; max-width: 728px; margin: 0 auto;
    padding: .75rem 1rem; border-radius: 12px; background: #0f5132; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(16, 24, 40, .25); }
.gm-toast[hidden] { display: none; }
.gm-toast-bad { background: var(--rn-danger); }
.gm-dish-pic { height: 200px; overflow: hidden; border-radius: var(--bs-modal-inner-border-radius) var(--bs-modal-inner-border-radius) 0 0; }
.gm-dish-pic img { width: 100%; height: 100%; object-fit: cover; }
.gm-dish-price { font-size: 1.15rem; font-weight: 800; color: var(--rn-primary-text); margin-bottom: .5rem; }
.gm-group { border: 0; margin: .75rem 0 0; padding: 0; }
.gm-group legend { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; float: none; }
.gm-option { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; margin-bottom: .35rem; border: 1px solid var(--rn-border); border-radius: 10px; cursor: pointer; }
.gm-option .form-check-input { margin: 0; flex: 0 0 auto; }
.gm-option:has(input:checked) { border-color: var(--rn-primary); background: var(--rn-primary-soft); }
.gm-dish-foot, .gm-cart-foot, .gm-table-foot { gap: .6rem; flex-wrap: nowrap; }
.gm-dish-foot[hidden] { display: none !important; }
.gm-qty { display: inline-flex; align-items: center; gap: .5rem; }
.gm-qty .btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.gm-qty span { min-width: 1.5rem; text-align: center; font-weight: 800; font-size: 1.1rem; }
.gm-qty-sm .btn { width: 2.1rem; height: 2.1rem; }
.gm-line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--rn-border); }
.gm-line-text { display: flex; flex-direction: column; min-width: 0; }
.gm-line-text small { color: var(--rn-text-muted); }
.gm-line-text .num { color: var(--rn-primary-text); font-weight: 700; font-size: .9rem; }
.gm-line-sum { border-bottom: 0; padding: .4rem 0; }
.gm-cart-sum { display: flex; flex-direction: column; line-height: 1.2; }
.gm-cart-sum span { font-size: .8rem; color: var(--rn-text-muted); }
.gm-cart-sum b { font-size: 1.15rem; }
.gm-sub { font-size: .95rem; font-weight: 800; margin: 1rem 0 .25rem; }
.gm-sent { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; margin-bottom: .45rem; border-radius: 10px; background: var(--rn-bg); }
.gm-sent > i { font-size: 1.2rem; color: var(--rn-primary-text); }
.gm-sent-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gm-sent-text small { color: var(--rn-text-muted); }
.gm-sent-1 { background: var(--rn-accent-soft); }
.gm-sent-2 { background: var(--rn-success-soft); }
.gm-sent-3 { background: var(--rn-danger-soft); }
.gm-state { flex: 0 0 auto; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--rn-bg); color: var(--rn-text-muted); }
.gm-state-cooking { background: var(--rn-accent-soft); color: var(--rn-accent-text); }
.gm-state-ready { background: var(--rn-success-soft); color: var(--rn-success-text); }
.gm-state-served { background: var(--rn-primary-soft); color: var(--rn-primary-text); }

/* Guests' requests on the floor and an order page (phase 10): a panel of cards (orders to review, calls to answer), a mark on the
   tables that called. */
.gr-panel { margin-bottom: .9rem; padding: .7rem .8rem; border-radius: var(--rn-radius); background: var(--k-bg-ffffff, #fff); border: 2px solid var(--k-bd-fde1b0, #fde1b0);
    box-shadow: 0 6px 18px rgba(249, 170, 51, .18); }
.gr-panel[hidden] { display: none; }
.gr-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .5rem; color: var(--rn-accent-text); }
.gr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem; }
@media (max-width: 575.98px) { .gr-list { grid-template-columns: 1fr; } }
.gr-card { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: 10px; background: var(--rn-bg); }
.gr-kind-1 { background: var(--rn-primary-soft); }
.gr-kind-2, .gr-kind-3 { background: var(--rn-accent-soft); }
.gr-icon { font-size: 1.35rem; color: var(--rn-primary-text); }
.gr-kind-2 .gr-icon, .gr-kind-3 .gr-icon { color: var(--rn-accent-text); animation: rf-ready-pulse 1.6s ease-in-out infinite; border-radius: 50%; }
.gr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.gr-text small { color: var(--rn-text-muted); }
.gr-quote { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-note { padding: .5rem .7rem; margin-bottom: .6rem; border-radius: 10px; background: var(--rn-accent-soft); color: var(--rn-accent-text); }
.gr-note[hidden], .gr-error[hidden] { display: none; }
.gr-line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--rn-border); }
.gr-line-off { opacity: .45; text-decoration: line-through; }
.gr-line-text { display: flex; flex-direction: column; min-width: 0; }
.gr-line-text small { color: var(--rn-text-muted); }
.gr-qty { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; }
.gr-qty .btn { width: 2.1rem; height: 2.1rem; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.gr-qty span { min-width: 1.4rem; text-align: center; font-weight: 800; }
.gr-foot { gap: .5rem; flex-wrap: nowrap; }
.rf-table { position: relative; }
.rf-guest { position: absolute; top: -.55rem; inset-inline-end: -.4rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--rn-accent); color: #3b2300; box-shadow: 0 2px 8px rgba(16, 24, 40, .25); animation: rf-ready-pulse 1.4s ease-in-out infinite; }
.rf-guest[hidden] { display: none; }
.rf-calling { border-color: var(--rn-accent); }
@media (prefers-reduced-motion: reduce) { .rf-guest, .gr-kind-2 .gr-icon, .gr-kind-3 .gr-icon { animation: none; } }

/* Settings → Restaurant: the QR codes card; the printed table cards (Restaurant/QrCards). */
.qr-preview { width: 9rem; height: 9rem; flex: 0 0 auto; border: 1px solid var(--rn-border); border-radius: 10px; padding: .35rem; background: var(--k-bg-ffffff, #fff); }
.qr-preview svg { width: 100%; height: 100%; display: block; }
.qr-link { font-size: .8rem; word-break: break-all; direction: ltr; text-align: start; }
.qr-cats { max-height: 12rem; overflow-y: auto; }
.qr-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5mm; padding: 5mm; background: var(--k-bg-ffffff, #fff); }
.qr-card { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 1.5mm; height: 90mm; padding: 3mm 4mm;
    border: 1.5px dashed var(--k-bd-c3ccd9, #c3ccd9); border-radius: 4mm; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.qr-card-brand { display: flex; align-items: center; gap: 2.5mm; max-width: 100%; }
.qr-card-brand img { height: 10mm; width: auto; max-width: 30mm; object-fit: contain; }
.qr-card-brand b { font-size: 13pt; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-card-code { width: 42mm; height: 42mm; }
.qr-card-code svg { width: 100%; height: 100%; display: block; }
.qr-card-table { font-size: 17pt; font-weight: 800; line-height: 1.1; color: var(--rn-primary-text); }
.qr-card-table small { display: block; font-size: 9pt; font-weight: 600; color: var(--k-fg-475569, #475569); }
.qr-card-hint { font-size: 9.5pt; font-weight: 600; color: var(--k-fg-1b2636, #1b2636); }
.qr-card-wifi { font-size: 8pt; color: var(--k-fg-475569, #475569); direction: ltr; }
.qr-sheet-big { grid-template-columns: 1fr; }
.qr-sheet-big .qr-card { height: 255mm; gap: 8mm; padding: 14mm; border-width: 2px; }
.qr-sheet-big .qr-card-code { width: 120mm; height: 120mm; }
.qr-sheet-big .qr-card-brand img { height: 22mm; max-width: 70mm; }
.qr-sheet-big .qr-card-brand b { font-size: 26pt; }
.qr-sheet-big .qr-card-table { font-size: 30pt; }
.qr-sheet-big .qr-card-hint { font-size: 16pt; }

/* ---------- repairs (2026-10-28): what the customer wrote keeps its lines; the steps as a timeline ---------- */
.repair-text { white-space: pre-line; }
.repair-facts dt { font-weight: 600; color: var(--bs-secondary-color); }
.repair-facts dd { margin-bottom: .5rem; }
.repair-problem { max-width: 18rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.repair-steps li { display: flex; gap: .75rem; position: relative; padding-bottom: .9rem; }
.repair-steps li:last-child { padding-bottom: 0; }
.repair-steps li > i { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--rn-primary-soft); color: var(--rn-primary-text); z-index: 1; }
.repair-steps li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: calc(1rem - 1px); top: 2rem; bottom: 0; width: 2px; background: var(--bs-border-color); }

/* ---------- hotels (phase 11): setup, rate plans, prices by day ---------- */
/* Short tables inside a scroll box on phones: the heading stays in its place (a sticky one would cover the first row). */
.app-content .table.hs-static > thead > tr > th { position: static; }
.hr-floor { display: flex; gap: .75rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px solid var(--rn-border); }
.hr-floor:last-child { border-bottom: 0; }
.hr-floor-name { flex: 0 0 5.5rem; font-weight: 600; font-size: .82rem; color: var(--bs-secondary-color); padding-top: .35rem; }
.hr-rooms { display: flex; flex-wrap: wrap; gap: .35rem; }
.hr-room { border: 1px solid var(--rn-border); border-radius: .5rem; background: var(--rn-surface); padding: .2rem .5rem; min-width: 3.4rem;
    font-weight: 700; line-height: 1.15; text-align: center; color: var(--rn-text); }
.hr-room small { display: block; font-weight: 500; font-size: .66rem; color: var(--bs-secondary-color); }
.hr-room:hover, .hr-room:focus-visible { border-color: var(--rn-primary); color: var(--rn-primary-text); }
.hr-room.hr-off { opacity: .45; text-decoration: line-through; }
@media (max-width: 575.98px) { .hr-floor { flex-direction: column; gap: .3rem; } .hr-floor-name { flex-basis: auto; padding-top: 0; } }
.hs-tax { display: flex; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--rn-border); }
.hs-tax-icon { flex: 0 0 2.1rem; height: 2.1rem; border-radius: .6rem; display: grid; place-items: center;
    background: color-mix(in srgb, var(--rn-primary) 10%, var(--rn-surface)); color: var(--rn-primary-text); }
.hs-rooms-add { display: flex; flex-wrap: wrap; gap: .5rem; }
.hs-rooms-add .hs-numbers { flex: 2 1 14rem; }
.hs-rooms-add .hs-type { flex: 1 1 10rem; width: auto; }
.hs-rooms-add .hs-floor { flex: 0 1 7rem; }

.rp-derived-only, .rp-person-label { display: none; }
.rp-derived .rp-derived-only { display: block; }
.rp-derived .rp-own, .rp-derived .rp-price { display: none; }
.rp-person .rp-room-col, .rp-person .rp-room-label { display: none; }
.rp-person .rp-person-label { display: inline; }
.rp-prices .rp-price input { max-width: 9rem; }

.rg-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.rg-plans { display: flex; flex-wrap: wrap; gap: .35rem; }
.rg-plans .pos-tab { text-decoration: none; }
.rg-nav { flex-wrap: wrap; }
.rg-nav input[type=date], .rg-nav input[data-dg=date] { width: 9.5rem; }
.rg-legend { display: inline-flex; align-items: center; gap: .3rem; }
.rg-swatch { display: inline-block; width: 1rem; height: .8rem; border-radius: .2rem; border: 1px solid var(--rn-accent); background: var(--k-bg-fff4dc, #fff4dc); }
.rg-wrap { overflow-x: auto; border-top: 1px solid var(--rn-border); }
.app-content .table.rate-grid > thead > tr > th { position: static; }
.rate-grid { width: max-content; min-width: 100%; }
.rate-grid th, .rate-grid td { text-align: center; vertical-align: middle; padding: .2rem .25rem; border-inline-start: 1px solid var(--rn-border); }
.rate-grid .rg-type { text-align: start; position: sticky; inset-inline-start: 0; z-index: 2; background: var(--rn-surface); min-width: 12rem;
    border-inline-start: 0; box-shadow: inset -1px 0 0 var(--rn-border); }
.app-content .table.rate-grid > thead > tr > th.rg-type { position: sticky; top: auto; z-index: 3; }
.rate-grid thead .rg-day { min-width: 4.7rem; line-height: 1.1; }
@media (max-width: 575.98px) { .rate-grid .rg-type { min-width: 7.5rem; max-width: 9.5rem; } }
.rate-grid thead .rg-day small { display: block; font-weight: 500; font-size: .68rem; opacity: .8; }
.rate-grid .rg-weekend { background: var(--k-bg-fff8ea, #fff8ea); }
.rate-grid thead .rg-weekend { background: color-mix(in srgb, var(--rn-accent) 18%, var(--rn-surface)); }
.rate-grid thead .rg-today { box-shadow: inset 0 -3px 0 var(--rn-accent); }
.rate-grid .rg-price-row td { padding-bottom: 0; border-bottom: 0; }
.rg-input { width: 4.4rem; text-align: center; padding: .2rem .2rem; font-size: .85rem; border: 1px solid var(--rn-border); border-radius: .35rem; background: var(--rn-surface); }
.rg-input:focus { outline: 2px solid color-mix(in srgb, var(--rn-primary) 45%, transparent); border-color: var(--rn-primary); }
.rg-value { font-size: .85rem; }
.rg-own .rg-input, .rg-own .rg-value { border-color: var(--rn-accent); background: var(--k-bg-fff4dc, #fff4dc); font-weight: 700; }
.rate-grid .rg-stop { background: var(--k-bg-fdeeee, #fdeeee); }
.rg-stop .rg-input, .rg-stop .rg-value { text-decoration: line-through; color: var(--k-fg-b02a37, #b02a37); }
.rg-flags { font-size: .72rem; height: 1.45rem; white-space: nowrap; }
.rg-flags .badge { font-size: .66rem; padding: .1rem .3rem; }
.rg-change-types { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.rg-week { display: flex; flex-wrap: wrap; gap: .3rem; }
.rg-week .btn { min-width: 4.5rem; }
.rg-check { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--rn-border); border-radius: 999px; padding: .2rem .65rem; font-size: .85rem; }

/* ---------- hotels 11a.2: a booking and the room chart ---------- */
.bk-results { inset-inline: calc(var(--bs-gutter-x) * .5); top: 100%; z-index: 30; max-height: 18rem; overflow-y: auto; }
.bk-chip { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--rn-border); border-radius: .5rem; padding: .375rem .75rem; min-height: 2.4rem;
    background: color-mix(in srgb, var(--rn-primary) 5%, var(--rn-surface)); }
.bk-stay { padding: .9rem 1rem; border-top: 1px solid var(--rn-border); }
.bk-stay:first-child { border-top: 0; }
.bk-stay.bk-closed { background: var(--bs-tertiary-bg); }
.bk-stay-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.bk-grid { display: grid; gap: .5rem; align-items: end;
    grid-template-columns: minmax(9rem, 1.5fr) repeat(2, minmax(8.5rem, 1fr)) auto repeat(2, 4.2rem) minmax(9rem, 1.5fr) minmax(7rem, 1fr) 6.5rem; }
@media (max-width: 1399.98px) { .bk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bk-f { display: flex; flex-direction: column; gap: .2rem; min-width: 0; margin: 0; }
.bk-f > span { font-size: .78rem; color: var(--bs-secondary-color); white-space: nowrap; }
.bk-nights { padding-bottom: .45rem; }
.bk-quote { margin-top: .6rem; }
.bk-nightlist { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.bk-night { display: inline-flex; flex-direction: column; align-items: center; border: 1px solid var(--rn-border); border-radius: .4rem; padding: .2rem .35rem; font-size: .8rem; margin: 0; }
.bk-night small { color: var(--bs-secondary-color); font-size: .68rem; }
.bk-night input { width: 5rem; text-align: center; }
.bk-night.bk-typed { border-color: var(--rn-accent); background: var(--k-bg-fff4dc, #fff4dc); }
.bk-history { margin-top: .5rem; }
.bk-history li { padding: .25rem 0; border-bottom: 1px dashed var(--rn-border); }
.bk-totals { font-size: 1.05rem; }

.tc-card { overflow: hidden; }
.tc-scroll { overflow-x: auto; }
.tc { --label: 7.5rem; --day-min: 3.4rem; position: relative; min-width: calc(var(--label) + var(--days) * var(--day-min)); }
.tc-row, .tc-marks { display: grid; grid-template-columns: var(--label) repeat(var(--halves), minmax(0, 1fr)); }
.tc-marks { position: absolute; inset: 0; pointer-events: none; }
.tc-marks i { grid-row: 1; border-inline-start: 1px solid var(--rn-border); }
.tc-marks .tc-weekend { background: var(--k-bg-fff8ea, #fff8ea); }
.tc-marks .tc-today { background: color-mix(in srgb, var(--rn-accent) 14%, transparent); }
.tc-row { position: relative; min-height: 2.2rem; border-bottom: 1px solid var(--rn-border); align-items: center; }
.tc-label { grid-column: 1; grid-row: 1; position: sticky; inset-inline-start: 0; z-index: 3; align-self: stretch; display: flex; align-items: center; gap: .35rem;
    padding: 0 .6rem; background: var(--rn-surface); border-inline-end: 1px solid var(--rn-border); font-size: .88rem; overflow: hidden; white-space: nowrap; }
.tc-head { min-height: 2.8rem; }
.tc-day { grid-row: 1; text-align: center; line-height: 1.1; z-index: 1; }
.tc-day small { display: block; font-size: .68rem; color: var(--bs-secondary-color); }
.tc-day-today b { color: var(--k-fg-c77700, #c77700); }
.tc-type { min-height: 1.9rem; font-weight: 600; background: color-mix(in srgb, var(--rn-primary) 5%, transparent); }
.tc-type .tc-label { background: color-mix(in srgb, var(--rn-primary) 8%, var(--rn-surface)); }
.tc-left { grid-row: 1; text-align: center; font-size: .78rem; color: var(--rn-primary-text); z-index: 1; }
.tc-left.tc-full { color: var(--k-fg-b02a37, #b02a37); font-weight: 700; }
.tc-room { cursor: cell; }
.tc-waiting { min-height: 1.9rem; background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .03) 12px); }
.tc-bar { grid-row: 1; z-index: 2; margin: 3px 1px; height: 1.6rem; min-width: 0; border-radius: .45rem; display: flex; align-items: center; gap: .25rem; padding: 0 .45rem;
    font-size: .76rem; font-weight: 600; color: #fff; text-decoration: none; overflow: hidden; white-space: nowrap; cursor: pointer; }
.tc-bar:hover { color: #fff; filter: brightness(1.08); }
.tc-bar span { overflow: hidden; text-overflow: ellipsis; }
.tc-bar .bi-star-fill { color: #ffd65a; font-size: .7rem; }
.tc-st-1 { background: var(--rn-primary); }
.tc-st-2 { background: #198754; }
.tc-st-3 { background: #8a94a6; }
.tc-bar.tc-before { border-start-start-radius: 0; border-end-start-radius: 0; }
.tc-bar.tc-after { border-start-end-radius: 0; border-end-end-radius: 0; }
.tc-bar[draggable=true] { cursor: grab; }
.tc-drop { outline: 2px dashed var(--rn-accent); outline-offset: -2px; }
.tc-hk { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.hk-clean { background: #198754; }
.hk-dirty { background: #dc3545; }
.hk-inspected { background: #0d6efd; }
.tc-legend { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; }
.tc-swatch { width: 1rem; height: .7rem; border-radius: .2rem; display: inline-block; }
@media (max-width: 575.98px) { .tc { --label: 4.5rem; --day-min: 2.6rem; } }

/* ---------- hotels 11a.3: a stay, its bill, check-in ---------- */
.stay-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .6rem; }
.stay-facts > div { border: 1px solid var(--rn-border); border-radius: .6rem; padding: .45rem .7rem; display: flex; flex-direction: column; min-width: 0; }
.stay-facts small { color: var(--bs-secondary-color); font-size: .74rem; }
.stay-facts b { font-size: 1.02rem; }
.stay-facts span { font-size: .8rem; color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-guests input, .ci-guests select { min-width: 7rem; }
.ci-guests td:nth-child(2) input { min-width: 12rem; }
.bill-window { border-top: 1px solid var(--rn-border); padding: .75rem 1rem 1rem; }
.bill-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.bill-balance { font-size: .95rem; }
.bill-lines td { padding-top: .3rem; padding-bottom: .3rem; }
.bill-lines .bill-pay td { color: var(--k-fg-146c43, #146c43); }
.bill-lines .bill-voided td { text-decoration: line-through; color: var(--bs-secondary-color); }
.bill-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.inv-act-primary { color: var(--rn-primary-text); border-color: var(--rn-primary); }
.regcard-facts { width: 100%; margin-bottom: 1rem; }
.regcard-row td { height: 2.2rem; }

/* ---------- hotels 11a.5: housekeeping ---------- */
.hk-summary { display: flex; flex-wrap: wrap; gap: .4rem; }
.hk-chip { border: 1px solid var(--rn-border); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; background: var(--rn-surface); }
.hk-dirty-chip { border-color: var(--k-bd-f1aeb5, #f1aeb5); background: var(--k-bg-fdf0f1, #fdf0f1); }
.hk-clean-chip { border-color: #a3cfbb; background: var(--k-bg-eef8f2, #eef8f2); }
.hk-inspected-chip { border-color: var(--k-bd-9ec5fe, #9ec5fe); background: var(--k-bg-eef4ff, #eef4ff); }
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .5rem; }
@media (max-width: 575.98px) { .hk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hk-room { position: relative; }
.hk-face { width: 100%; border: 1px solid var(--rn-border); border-inline-start: 5px solid #198754; border-radius: .7rem; background: var(--rn-surface);
    padding: .5rem .65rem; display: grid; grid-template-columns: 1fr auto; gap: .1rem .4rem; text-align: start; color: var(--rn-text); }
.hk-dirty .hk-face { border-inline-start-color: #dc3545; background: var(--k-bg-fff7f7, #fff7f7); }
.hk-inspected .hk-face { border-inline-start-color: #0d6efd; }
.hk-blocked .hk-face { border-inline-start-color: #6c757d; background: repeating-linear-gradient(45deg, var(--k-bg-f6f6f6, #f6f6f6), var(--k-bg-f6f6f6, #f6f6f6) 6px, var(--k-bg-ececec, #ececec) 6px, var(--k-bg-ececec, #ececec) 12px); }
.hk-number { font-size: 1.25rem; font-weight: 800; }
.hk-type { font-size: .72rem; color: var(--bs-secondary-color); align-self: center; }
.hk-state, .hk-status, .hk-who { grid-column: 1 / -1; font-size: .78rem; }
.hk-status { font-weight: 700; }
.hk-dirty .hk-status { color: var(--k-fg-b02a37, #b02a37); }
.hk-who { color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-menu { min-width: 15rem; }
.hk-btn-clean { border: 1px solid #198754; color: var(--k-fg-198754, #198754); }
.hk-btn-dirty { border: 1px solid #dc3545; color: var(--k-fg-dc3545, #dc3545); }
.hk-btn-inspected { border: 1px solid #0d6efd; color: var(--k-fg-0d6efd, #0d6efd); }
.hk-btn-clean.active { background: #198754; color: #fff; }
.hk-btn-dirty.active { background: #dc3545; color: #fff; }
.hk-btn-inspected.active { background: #0d6efd; color: #fff; }
.tc-block { grid-row: 1; z-index: 1; margin: 3px 0; height: 1.6rem; border-radius: .3rem; display: flex; align-items: center; justify-content: center; color: var(--k-fg-6c757d, #6c757d);
    background: repeating-linear-gradient(45deg, var(--k-bg-e9ecef, #e9ecef), var(--k-bg-e9ecef, #e9ecef) 5px, var(--k-bg-dee2e6, #dee2e6) 5px, var(--k-bg-dee2e6, #dee2e6) 10px); font-size: .75rem; }

/* The police guest list (phase 11a.7): A4 across when printed, a companion's row a little in. */
.gl-table th { white-space: nowrap; }
.gl-table td { font-size: .85rem; }
.gl-table td .num { white-space: nowrap; }
/* The guest list has up to 17 columns: on wide screens too it scrolls in its own box (its heading is not sticky), never the page. */
.app-content .table-responsive:has(> .gl-table) { overflow-x: auto; }
/* The salesmen's performance has as many columns: the same. */
.app-content .table-responsive:has(> #perf-table) { overflow-x: auto; }
.gl-companion td:nth-child(2) { padding-inline-start: 1.2rem; font-weight: 500; }
.gl-print-head { justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #114987; padding-bottom: .4rem; margin-bottom: .6rem; }
.gl-print-hotel { font-size: 1.25rem; font-weight: 800; color: #114987; }
.gl-print-title { font-size: 1rem; font-weight: 700; }
.gl-sign { justify-content: space-around; margin-top: 2.5rem; }
.gl-sign > div { min-width: 14rem; text-align: center; border-top: 1px solid var(--k-bd-333333, #333); padding-top: .3rem; font-size: .85rem; }
@media print {
    .gl-table { font-size: 8pt; width: 100% !important; }
    .gl-table thead th { position: static !important; white-space: normal !important; vertical-align: bottom; }
    .table-responsive:has(> .gl-table) { overflow: visible !important; }
    .gl-table th, .gl-table td { padding: 2px 4px !important; border: 1px solid #999 !important; }
    .gl-table a { color: inherit; }
    .gl-table .badge { border: 1px solid #999; color: #000; background: none !important; }
}

/* The room type window's notes (2026-10-29): what each field is for. */
.tm-help { padding-inline-start: 1.1rem; margin-top: .4rem; }
.tm-help li { margin-bottom: .15rem; }
/* The police's electronic guest list (/p/{token}, 2026-10-29): an official, plain page; the PIN first. */
.pz-body { background: var(--k-bg-f3f5f8, #f3f5f8); min-height: 100vh; }
.pz-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.2rem; background: var(--k-bg-ffffff, #fff);
    border-bottom: 3px solid var(--rn-primary); }
.pz-brand { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.pz-brand h1 { font-size: 1.2rem; font-weight: 800; margin: 0; color: var(--rn-primary-text); }
.pz-brand span { font-size: .85rem; color: var(--bs-secondary-color); }
.pz-logo { height: 42px; width: auto; }
.pz-pin { display: flex; justify-content: center; padding: 3rem 1rem; }
.pz-pin form { max-width: 24rem; width: 100%; text-align: center; }
.pz-pin-icon { font-size: 2.6rem; color: var(--rn-primary-text); }
.pz-pin input { letter-spacing: .4em; font-weight: 700; }
.pz-main { padding: 1rem 1.2rem 2rem; }
.pz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .8rem; }
.pz-title { font-size: 1.05rem; font-weight: 700; margin: .2rem 0 .6rem; }
.pz-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.pz-cards > div { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); border-radius: .6rem; padding: .5rem .8rem; display: flex; flex-direction: column;
    font-size: .8rem; color: var(--bs-secondary-color); }
.pz-cards .num { font-size: 1.35rem; font-weight: 800; color: var(--rn-text); }
.pz-came { border-inline-start: 4px solid #198754 !important; }
.pz-left { border-inline-start: 4px solid #6c757d !important; }
.pz-row-left td { color: var(--k-fg-6c757d, #6c757d); }
.police-pin { font-size: 1.3rem; font-weight: 800; letter-spacing: .25em; background: var(--k-bg-f1f4f8, #f1f4f8); border-radius: .4rem; padding: 0 .5rem; }
.police-views li { padding: .15rem 0; border-bottom: 1px dashed var(--rn-border); }
@media print {
    .pz-body { background: #fff; }
    .pz-head { padding: 0 0 .4rem; }
    .pz-main { padding: 0; }
    .pz-cards > div { padding: .2rem .5rem; }
}
/* ---------------------------------------------------------------- online payments (2026-11-01): FIB, ZainCash, FastPay */
.pay-logo { display: inline-flex; align-items: center; justify-content: center; min-width: 4.6rem; padding: .15rem .55rem; border-radius: .45rem;
    font-weight: 800; font-size: .85rem; letter-spacing: 0; color: #fff; background: #5b6470; direction: ltr; }
.pay-logo.pay-fib { background: #0a8f83; }
.pay-logo.pay-zaincash { background: #1d1d1b; }
.pay-logo.pay-fastpay { background: #d7262f; }
.pay-body .pay-card { width: min(440px, 100%); padding: 1.5rem 1.25rem 1rem; }
.pay-brand { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-bottom: 1rem; }
.pay-brand-logo { max-height: 56px; max-width: 70%; object-fit: contain; }
.pay-brand-name { font-weight: 800; font-size: 1.05rem; }
.pay-what { font-weight: 700; }
.pay-party { color: var(--rn-text-muted); font-size: .9rem; margin-bottom: .5rem; }
.pay-amount-label { color: var(--rn-text-muted); font-size: .85rem; margin-top: .75rem; text-align: center; }
.pay-amount { font-size: 2rem; font-weight: 800; color: var(--rn-primary-text); text-align: center; line-height: 1.2; }
.pay-amount small { font-size: 1rem; font-weight: 600; color: var(--rn-text-muted); }
.pay-original { text-align: center; color: var(--rn-text-muted); font-size: .9rem; }
.pay-choose { margin: 1rem 0 .4rem; font-weight: 700; font-size: .9rem; }
.pay-providers { display: grid; gap: .5rem; }
.pay-provider { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; padding: .7rem .8rem;
    border: 1px solid var(--rn-border); border-radius: .6rem; background: var(--k-bg-ffffff, #fff); color: inherit; font-weight: 600; }
.pay-provider:hover:not(:disabled) { border-color: var(--rn-primary); background: var(--k-bg-f5f8fc, #f5f8fc); }
.pay-provider:disabled { opacity: .55; }
.pay-provider.pay-busy::after { content: ""; width: 1rem; height: 1rem; border: 2px solid var(--rn-primary); border-right-color: transparent;
    border-radius: 50%; animation: spinner-border .75s linear infinite; }
.pay-providers .pay-provider .pay-logo { min-width: 6rem; font-size: .95rem; padding: .3rem .7rem; }
.pay-note { margin-top: .9rem; font-size: .78rem; color: var(--rn-text-muted); text-align: center; }
.pay-qr { display: block; width: min(240px, 80%); height: auto; margin: .4rem auto .6rem; image-rendering: pixelated; }
.pay-code { font-size: 1.5rem; font-weight: 800; letter-spacing: .12em; direction: ltr; }
.pay-foot { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px dashed var(--rn-border); }
.pay-foot img { height: 24px; width: auto; opacity: .75; }
.gm-pay { margin-top: .75rem; padding: .6rem .7rem; border: 1px solid var(--k-bd-cfe3d8, #cfe3d8); border-radius: .6rem; background: var(--k-bg-f3faf6, #f3faf6); }
.gm-pay-title { display: flex; align-items: center; gap: .25rem; font-weight: 700; margin-bottom: .45rem; }
.gm-pay-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.gm-pay-buttons .pay-provider { width: auto; flex: 1 1 6.5rem; justify-content: center; padding: .45rem .5rem; }
.gm-min-note { padding: .45rem .6rem; border-radius: .5rem; background: var(--k-bg-fff4d6, #fff4d6); color: var(--k-fg-8a5a00, #8a5a00); font-weight: 600; }
.zone-line { display: flex; align-items: center; gap: .4rem; padding: .3rem 0; }
.zone-line .flex-grow-1 { min-width: 0; }
.zone-amount { flex: none; width: 5.8rem; }
.zone-btns { flex: none; width: 5.4rem; display: flex; gap: .25rem; justify-content: flex-end; }
.zone-head { padding-bottom: 0; }
.gr-wa-bar { position: fixed; inset-inline-start: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1090; display: flex; align-items: center; gap: .6rem;
    padding: .5rem .7rem; background: var(--k-bg-ffffff, #fff); border: 1px solid var(--k-bd-b7e3c6, #b7e3c6); border-radius: .7rem; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); }
[dir=rtl] .gr-wa-bar { transform: translateX(50%); }

/* The partners' equity (2026-11-06): its eleven columns fit beside the side menu — the headings wrap, the cells are narrower. */
#partners-table thead th { white-space: normal; vertical-align: bottom; padding-inline: .5rem; line-height: 1.25; }
#partners-table tbody td, #partners-table tfoot td { padding-inline: .5rem; }
/* The cashiers' report (2026-11-14): its columns fit beside the side menu at 1440px the same way (before, the page scrolled sideways). */
#cs-table thead th { white-space: normal; vertical-align: bottom; padding-inline: .5rem; line-height: 1.25; }
#cs-table tbody td, #cs-table tfoot td { padding-inline: .5rem; }

/* The salesman's app (2026-11-06): big figures and big buttons, made for a phone in one hand. */
.sm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .5rem; }
.sm-kpis-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm-kpi { background: var(--rn-surface); border: 1px solid var(--rn-border); border-radius: var(--rn-radius); padding: .6rem .75rem; display: flex; flex-direction: column; min-width: 0; }
.sm-kpis-board .sm-kpi { background: color-mix(in srgb, var(--rn-primary) 4%, var(--rn-surface)); }
.sm-kpi-wide { grid-column: span 2; }
.sm-kpi-label { font-size: .78rem; color: var(--rn-text-muted); }
.sm-kpi-value { font-weight: 800; font-size: 1.2rem; line-height: 1.3; }
.sm-kpi-value small { font-size: .7rem; font-weight: 600; color: var(--rn-text-muted); }
.sm-kpi-note { font-size: .75rem; color: var(--rn-text-muted); }
.sm-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.sm-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 5.25rem; padding: .6rem;
    border: 1px solid var(--rn-border); border-radius: var(--rn-radius); background: var(--rn-surface); color: var(--rn-primary-text);
    font-weight: 700; text-align: center; text-decoration: none; }
.sm-action i { font-size: 1.6rem; }
.sm-action:hover { background: color-mix(in srgb, var(--rn-primary) 6%, var(--rn-surface)); color: var(--rn-primary-text); }
.sm-action-primary { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.sm-action-primary:hover { background: color-mix(in srgb, var(--rn-primary) 85%, #000); color: #fff; }
.sm-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem;
    background: color-mix(in srgb, var(--rn-primary) 9%, var(--rn-surface)); color: var(--rn-primary-text); }
.sm-chip-sale { background: color-mix(in srgb, #198754 12%, var(--rn-surface)); color: #146c43; }
.sm-chip-money { background: color-mix(in srgb, var(--rn-accent) 22%, var(--rn-surface)); color: var(--k-fg-8a5a00, #8a5a00); }
.sm-chip-none { background: color-mix(in srgb, #6c757d 12%, var(--rn-surface)); color: #495057; }
.sm-list { display: grid; gap: .5rem; }
.sm-shop-pic { width: 6rem; height: 6rem; object-fit: cover; border-radius: var(--rn-radius); border: 1px solid var(--rn-border); flex-shrink: 0; }
@media (max-width: 575.98px) {
    .sm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm-head p { margin-bottom: 0; }
}

/* Scientific names and substitutes (2026-11-07) */
.generic-tag { display: inline-flex; align-items: center; gap: .2rem; margin-inline-start: .5rem; color: var(--k-fg-0f766e, #0f766e); font-size: .78rem; }
.pos-subs { display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: .5rem; padding: .05rem .45rem; border: 1px solid #0f766e;
    border-radius: 999px; color: var(--k-fg-0f766e, #0f766e); background: var(--k-bg-f0fdfa, #f0fdfa); font-size: .75rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pos-subs:hover { background: var(--k-bg-ccfbf1, #ccfbf1); }
.pos-subs-out { opacity: .65; }
.held-orders { color: var(--k-fg-b45309, #b45309); font-size: .75rem; font-weight: 600; }
.pos-short { border-color: #b45309; color: var(--k-fg-b45309, #b45309); background: var(--k-bg-fffbeb, #fffbeb); }
.pos-short:hover { background: var(--k-bg-fef3c7, #fef3c7); }
/* The list's form holds the table card: the card stays a child of .list-page's column. */
#sh-form { display: contents; }
.item-subs-list a { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); text-decoration: none; }
.item-subs-list a:last-child { border-bottom: 0; }
/* Free goods offers (2026-11-07, "10+2" for a while): a tag on an item, and today's offers for salesmen. */
.offer-chip { display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: .35rem; padding: 0 .45rem; border-radius: 1rem;
    background: var(--k-bg-e6f4ea, #e6f4ea); color: var(--k-fg-1e7b3a, #1e7b3a); font-size: .72rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.offer-chip-lg { font-size: .8rem; padding: .1rem .55rem; margin-inline-start: 0; }
.pos-overdue.pos-licence-soon { background: var(--rn-accent-soft); color: var(--rn-accent-text); border-color: transparent; }
/* Proof of delivery (2026-11-07): the signature pad and the signature kept. */
.dl-pad { display: block; width: 100%; height: 220px; border: 1px dashed var(--bs-border-color); border-radius: .5rem; background: var(--k-bg-ffffff, #fff); touch-action: none; cursor: crosshair; }
.dl-signature { display: block; max-width: 100%; max-height: 160px; border: 1px solid var(--bs-border-color); border-radius: .4rem; background: var(--k-bg-ffffff, #fff); }
/* A customer's ordering page (2026-11-07, /o/{token}). */
.b2b-body { background: var(--bs-tertiary-bg); padding-bottom: 9rem; }
.b2b-head { background: var(--k-bg-ffffff, #fff); border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 10; }
.b2b-bar { position: fixed; inset-inline: 0; bottom: 0; background: var(--k-bg-ffffff, #fff); border-top: 1px solid var(--bs-border-color); box-shadow: 0 -4px 14px rgba(0,0,0,.06); z-index: 10; }
.b2b-pic { width: 52px; height: 52px; border-radius: .5rem; object-fit: cover; flex-shrink: 0; }
.b2b-pic-none { display: inline-flex; align-items: center; justify-content: center; background: var(--bs-tertiary-bg); color: var(--rn-text-muted); font-size: 1.3rem; }
.b2b-qty { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.b2b-qty .b2b-q { width: 3.6rem; }
.sm-visit-photo { width: 96px; height: 96px; object-fit: cover; border-radius: .5rem; border: 1px solid var(--bs-border-color); }

/* Returnable crates (crates part, 2026-11-08): the button lights up while crates are typed; the window's boxes. */
.crates-button.crates-on { border-color: var(--rn-accent); background: color-mix(in srgb, var(--rn-accent) 14%, transparent); color: var(--k-fg-6b4300, #6b4300); }
.crate-table input { max-width: 7rem; }
/* Inside the window the lists' sticky heading would sit under the app's top bar, over the first row. */
.app-content .table.crate-table > thead > tr > th { top: 0; }
@media (max-width: 767.98px) {
    .crate-table input { max-width: none; font-size: 16px; }
    .crate-table td[data-after] { font-weight: 700; }
}
/* Returnable crates on a printed invoice (crates part): a small table under the notes; on the 80 mm receipt, a line per kind. */
.receipt-crates { margin-top: 3mm; }
.ia4-crates { width: 100%; border-collapse: collapse; font-size: 9pt; }
.ia4-crates th { font-weight: 600; color: #6b7280; border-bottom: 1px solid #e5e7eb; padding: 1mm 1.5mm; text-align: start; }
.ia4-crates td { padding: 1mm 1.5mm; border-bottom: 1px solid #f1f5f9; }
.ia4-crates .end { text-align: end; }

/* Equipment lent to customers (2026-11-09): a piece at a customer's (blue), the search lists under their boxes. */
.eq-pill-out { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.eq-party-list { z-index: 20; max-height: 16rem; overflow-y: auto; }

/* The note on a sale (2026-11-11): a thin amber line above the footer, the whole text on one line (… when longer). */
.pos-note-line { display: flex; align-items: center; gap: .5rem; background: var(--k-bg-fff4e0, #fff4e0); border: 1px solid var(--k-bd-f9d58f, #f9d58f); border-radius: .5rem;
    padding: .2rem .5rem; margin-bottom: .4rem; font-size: .875rem; }
.pos-note-line[hidden] { display: none; }
.pos-note-open { flex: 1; min-width: 0; text-align: start; border: 0; background: none; padding: 0; color: var(--k-fg-8a4b00, #8a4b00);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The sale's date (2026-11-11): amber while an old invoice is being entered. */
#pos-date.pos-date-old { background-color: var(--k-bg-fff4e0, #fff4e0); border-color: var(--rn-accent); color: var(--k-fg-8a4b00, #8a4b00); font-weight: 600; }

/* Looking things up without the internet (2026-11-10): an item's units, prices and stock open under its name. */
.ol-units > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.ol-units > summary::-webkit-details-marker { display: none; }
.ol-units > summary::after { content: "\F282"; font-family: "bootstrap-icons"; font-size: .7em; font-weight: normal; color: var(--bs-secondary-color); }
.ol-units[open] > summary::after { content: "\F286"; }

/* The salesmen's performance (2026-11-11): the best of the period on cards, and gold / silver / bronze ranks. */
.perf-leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; }
.perf-leader { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: .75rem; background: linear-gradient(135deg, var(--k-bg-fff8e8, #fff8e8), var(--k-bg-ffffff, #fff));
    border: 1px solid var(--k-bd-f6dfa8, #f6dfa8); }
.perf-leader-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--rn-accent); color: #fff; font-size: 1.15rem; }
.perf-leader-label { font-size: .75rem; color: var(--k-fg-8a6200, #8a6200); font-weight: 600; }
.perf-leader-name { font-weight: 700; font-size: 1rem; color: var(--rn-primary-text); }
.perf-leader-value { font-size: .85rem; color: var(--k-fg-475467, #475467); }
.perf-rank { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 .35rem; border-radius: 999px; font-weight: 700;
    background: var(--k-bg-f2f4f7, #f2f4f7); color: var(--k-fg-475467, #475467); }
.perf-rank-1 { background: #f9c33f; color: #5c3d00; }
.perf-rank-2 { background: var(--k-bg-d0d5dd, #d0d5dd); color: var(--k-fg-344054, #344054); }
.perf-rank-3 { background: #e7a978; color: #5a2d0c; }
#perf-table thead th { white-space: normal; vertical-align: bottom; }
.perf-rank-lg { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; flex: none; }

/* Teams and areas (2026-11-11): the salesman's area chips scroll on one line on a phone; a team's salesmen as ticks in two columns. */
.sm-areas { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .15rem; }
.sm-areas > .btn { flex: none; white-space: nowrap; }
.team-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .15rem .75rem; max-height: 16rem; overflow-y: auto; }
/* New customers waiting (2026-11-11): the shop's picture beside the name. */
.nc-picture { width: 3rem; height: 3rem; object-fit: cover; border-radius: .5rem; flex: none; }
.pending-pill { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px;
    background: var(--k-bg-fff4e0, #fff4e0); color: var(--k-fg-8a4b00, #8a4b00); border: 1px solid var(--k-bd-f6d29b, #f6d29b); white-space: nowrap; }
/* A suggested order (2026-11-11): what the customer missed last time, and what is due by their usual days. */
.suggest-chip { display: inline-block; font-size: .7rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; white-space: nowrap; }
.suggest-missed { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); border: 1px solid var(--k-bd-f5c2c0, #f5c2c0); }
.suggest-due { background: var(--rn-primary-soft); color: var(--rn-primary-text); border: 1px solid var(--k-bd-c9dafc, #c9dafc); }

/* Doctors (2026-11-11): the class as a coloured letter, the doctor's answer, the visit page's search lists. */
.doctor-class { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-weight: 700; font-size: .8rem; }
.doctor-class-A { background: var(--rn-primary); color: #fff; }
.doctor-class-B { background: color-mix(in srgb, var(--rn-primary) 16%, var(--k-bg-ffffff, #fff)); color: var(--rn-primary-text); }
.doctor-class-C { background: var(--k-bg-f2f4f7, #f2f4f7); color: var(--k-fg-475467, #475467); }
.doctor-answer { display: inline-block; font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; white-space: nowrap; }
.doctor-answer-Prescribes { background: var(--k-bg-e8f5ee, #e8f5ee); color: var(--k-fg-027a48, #027a48); }
.doctor-answer-WillPrescribe { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.doctor-answer-Interested { background: var(--k-bg-fff4e0, #fff4e0); color: var(--k-fg-8a4b00, #8a4b00); }
.doctor-answer-NotInterested { background: var(--k-bg-f2f4f7, #f2f4f7); color: var(--k-fg-475467, #475467); }
.dv-results { z-index: 20; max-height: 18rem; overflow-y: auto; }
.dv-chip { font-size: .85rem; padding: .35rem .55rem; }
.btn-close-sm { width: .55em; height: .55em; font-size: .7rem; vertical-align: middle; }

/* ---------------------------------------------------------------- smart entry: invoices read from pictures (2026-11-12) */
.smart-read { max-width: 46rem; }
.sr-icon { width: 3rem; height: 3rem; border-radius: .75rem; display: grid; place-items: center; font-size: 1.4rem;
    background: color-mix(in srgb, var(--rn-primary) 12%, var(--k-bg-ffffff, white)); color: var(--rn-primary-text); flex: none; }
.sr-facts { display: flex; flex-wrap: wrap; gap: .5rem; }
.sr-fact { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; padding: .2rem .6rem; border-radius: 999px;
    background: var(--bs-tertiary-bg); border: 1px solid var(--rn-border); }
.sr-drop { border: 2px dashed var(--rn-border); border-radius: .75rem; padding: 1.25rem; text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: .25rem; background: var(--bs-tertiary-bg); }
.sr-drop > .bi { font-size: 2rem; color: var(--rn-primary-text); }
.sr-drop.sr-over { border-color: var(--rn-primary); background: color-mix(in srgb, var(--rn-primary) 6%, var(--k-bg-ffffff, white)); }
.sr-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; margin-top: .75rem; }
.sr-thumbs:empty { display: none; }
.sr-thumb { margin: 0; border: 1px solid var(--rn-border); border-radius: .5rem; overflow: hidden; background: var(--k-bg-ffffff, #fff); }
.sr-thumb img { width: 100%; height: 9rem; object-fit: cover; object-position: top; display: block; }
.sr-thumb figcaption { display: flex; align-items: center; justify-content: space-between; gap: .25rem; padding: .25rem .35rem; font-size: .8rem; }
.sr-thumb-tools { display: inline-flex; gap: .15rem; }
.sr-thumb-tools .btn { padding: .05rem .3rem; }
.smart-fact { border: 1px solid var(--rn-border); border-radius: .5rem; padding: .4rem .6rem; height: 100%; }
.smart-fact-label { font-size: .75rem; color: var(--rn-text-muted); }
.smart-fact-value { font-size: 1.15rem; font-weight: 700; }
.smart-fact-note { font-size: .75rem; color: var(--rn-text-muted); }
.read-thumb img { width: 2.6rem; height: 3.2rem; object-fit: cover; object-position: top; border-radius: .25rem; border: 1px solid var(--rn-border); }

/* The purchase page with a reading: its banner, its lines' colours, the lines not found, the pictures beside the lines. */
.read-banner .read-counts { display: inline-flex; gap: .5rem; font-weight: 600; }
.read-count-green { color: var(--bs-success-text-emphasis); }
.read-count-amber { color: var(--k-fg-b45309, #b45309); }
.read-count-red { color: var(--bs-danger-text-emphasis); }
.read-warnings { padding-inline-start: 1.6rem; font-size: .85rem; }
.read-warnings li::marker { color: var(--k-fg-b45309, #b45309); }
#purchase .doc-lines tr.read-row > td:first-child { border-inline-start: 3px solid transparent; }
#purchase .doc-lines tr.read-green > td:first-child, #purchase .doc-lines tr.read-checked > td:first-child { border-inline-start-color: var(--bs-success); }
#purchase .doc-lines tr.read-amber > td { background: var(--k-bg-fffbeb, #fffbeb); }
#purchase .doc-lines tr.read-amber > td:first-child { border-inline-start-color: #f59e0b; }
/* The note takes the item column's width as it is (width 0, min-width 100%): it never widens the table; the name is cut with "…". */
.read-note { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .25rem; font-size: .78rem; color: var(--rn-text-muted); margin-top: .1rem;
    width: 0; min-width: 100%; line-height: 1.3; }
.read-note > .bi, .read-note > .btn { flex: none; }
.read-name { flex: 1 1 4rem; min-width: 0; overflow-wrap: anywhere; }
.read-why-icon { color: var(--k-fg-d97706, #d97706); cursor: help; }
.read-others { width: 0; min-width: 100%; }
.read-note-amber { color: var(--k-fg-92400e, #92400e); }
.read-why { color: var(--k-fg-b45309, #b45309); font-size: .75rem; }
.read-others { font-size: .75rem; }
.read-others .btn-link { font-size: .75rem; vertical-align: baseline; }
.pc-card.read-amber { border-inline-start: 3px solid #f59e0b; background: var(--k-bg-fffbeb, #fffbeb); }
.pc-card.read-green, .pc-card.read-checked { border-inline-start: 3px solid var(--bs-success); }
.pc-read { display: block; font-size: .75rem; color: var(--rn-text-muted); }
.read-unmatched { border: 1px solid var(--k-bd-fecaca, #fecaca); background: var(--k-bg-fef2f2, #fef2f2); border-radius: .5rem; padding: .4rem .5rem; margin-bottom: .5rem; max-height: 14rem; overflow: auto; }
.read-um-head { font-size: .85rem; font-weight: 600; color: var(--bs-danger-text-emphasis); margin-bottom: .25rem; }
.read-um { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem; padding: .3rem 0; border-top: 1px dashed var(--k-bd-fecaca, #fecaca); }
.read-um-pending { background: var(--k-bg-ffffff, #fff); border-radius: .35rem; outline: 2px solid var(--rn-primary); outline-offset: 1px; }
.read-um-text { font-size: .85rem; min-width: 0; }
.read-um-actions { display: flex; flex-wrap: wrap; gap: .25rem; }
.read-um-actions .btn { font-size: .78rem; padding: .1rem .45rem; }
.doc-page .doc-side > .pur-read-card { flex: 3 1 0; min-height: 0; display: flex; flex-direction: column; }
#purchase.pur-reading .doc-side > [data-field="lastPurchases"] { flex: 1 1 0; }
.pur-read-card > .card-body { flex: 1; min-height: 12rem; overflow: auto; }
.read-pages { background: var(--k-bg-f1f5f9, #f1f5f9); }
.read-page { display: block; width: 100%; height: auto; margin: 0 auto .25rem; cursor: zoom-in; background: var(--k-bg-ffffff, #fff); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.read-pages.read-zoom .read-page { width: 220%; max-width: none; cursor: zoom-out; }
.read-pages-big .read-page { max-width: 1100px; }
.read-pages-big.read-zoom .read-page { width: 200%; max-width: none; }
@media (max-width: 1199.98px) { .doc-page .doc-side > .pur-read-card { display: none !important; } }

/* A medicine's details (the pharma part, 2026-11-12): "500 mg · Tablet", kept cold, prescription only, controlled. */
.med-tag { display: inline-flex; align-items: center; gap: .3rem; margin-inline-start: .35rem; color: var(--k-fg-475569, #475569); font-size: .78rem; }
.med-cold { color: var(--k-fg-0369a1, #0369a1); }
.med-rx { font: 700 .68rem/1 "Inter", sans-serif; color: #fff; background: #7c3aed; border-radius: .25rem; padding: .12rem .28rem; direction: ltr; }
.med-controlled { color: var(--k-fg-b91c1c, #b91c1c); }

/* The controlled drugs register's signatures (printed under the drugs). */
.cd-sign { display: flex; justify-content: space-around; gap: 2rem; margin: 2.5rem 0 1rem; }
.cd-sign > div { min-width: 14rem; text-align: center; font-weight: 600; }
.cd-sign span { display: block; border-bottom: 1px solid #94a3b8; height: 2.5rem; margin-top: .5rem; }

.price-check-qr svg { width: 4.5rem; height: 4.5rem; display: block; }
.rs-receipt { display: inline-flex; align-items: center; gap: .25rem; background: var(--rn-primary-soft); color: var(--rn-primary-text); border-radius: 2rem; padding: .1rem .7rem; font-size: .9rem; }
/* The sale page's search row on a phone (2026-11-13: the till's buttons): the search on a line of its own, the buttons under it. */
@media (max-width: 575.98px) {
    .pos-search-row { flex-wrap: wrap; }
    .pos-search-row > .pos-search { flex: 1 1 100%; }
}

/* Several sales open at once (2026-11-14): a tab per customer being served above the lines; phones scroll the tabs sideways. */
.pos-sale-tabs { display: flex; align-items: center; gap: .4rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.pos-stab { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--k-bd-d5e0ee, #d5e0ee); border-radius: .6rem; background: var(--k-bg-ffffff, #fff); }
.pos-stab.active { border-color: var(--rn-primary); background: var(--k-bg-eaf1fb, #eaf1fb); box-shadow: inset 0 -2px 0 var(--rn-primary); }
.pos-stab-go { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: none; padding: .28rem .6rem; font-weight: 600;
    color: var(--bs-body-color); white-space: nowrap; }
.pos-stab.active .pos-stab-go { color: var(--rn-primary-text); }
.pos-stab-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
.pos-stab-count { background: var(--k-bg-e5ebf3, #e5ebf3); color: var(--k-fg-334155, #334155); font-weight: 700; }
.pos-stab-sum { color: var(--k-fg-4b5563, #4b5563); font-size: .85em; font-weight: 600; }
.pos-stab-x { border: 0; background: none; padding: .2rem .45rem .2rem .2rem; color: var(--k-fg-6b7280, #6b7280); line-height: 1; }
[dir=rtl] .pos-stab-x { padding: .2rem .2rem .2rem .45rem; }
.pos-stab-x:hover { color: var(--bs-danger); }
.pos-stab-new { flex: none; white-space: nowrap; }
/* A line's last sales / last purchases, beside its remove button. */
.pos-row-acts { white-space: nowrap; text-align: end; }
.pos-row-acts .btn { padding-inline: .4rem; }
.pos-hist-table td, .pos-hist-table th { white-space: nowrap; }

/* Companies and representatives (Reports/ByCompany views, 2026-11-15). */
/* The headings wrap (the sticky heading rule keeps them on one line); the cells are a little tighter, so every view fits 1366px. */
.app-content .table.bc-table > thead > tr > th, .app-content .table.co-table > thead > tr > th { white-space: normal; vertical-align: bottom; }
.bc-table > :not(caption) > * > * { padding-inline: .45rem; }
.bc-table td { font-size: .88rem; }
.bc-table td.bc-month, .bc-table th.bc-month { font-size: .8rem; white-space: nowrap; }
/* Month by month (up to 24 columns) scrolls in its own box on every screen, its heading in place. */
.app-content .table-responsive:has(> .bc-table[data-view="months"]) { overflow-x: auto; }
.app-content .table.bc-table[data-view="months"] > thead > tr > th { position: static; }
.bc-table th.bc-band-0 { color: var(--bs-danger-text-emphasis); }
.bc-table th.bc-band-1 { color: var(--bs-warning-text-emphasis); }
.bc-table td.bc-hot.bc-band-0 { background: rgba(var(--bs-danger-rgb), .07); color: var(--bs-danger-text-emphasis); font-weight: 600; }
.bc-table td.bc-hot.bc-band-1 { background: rgba(var(--bs-warning-rgb), .1); font-weight: 600; }
.bc-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.6rem; min-width: 4rem; vertical-align: middle; }
.bc-spark i { display: block; width: 5px; min-height: 1px; background: var(--rn-primary); border-radius: 1px; opacity: .75; }
.bc-spark i:last-child { opacity: 1; background: var(--rn-accent); }
.bc-lot { display: inline-block; margin: 1px 3px 1px 0; padding: 0 .4rem; border-radius: 1rem; background: var(--bs-light); border: 1px solid var(--bs-border-color); white-space: nowrap; }
.bc-lot-soon { background: rgba(var(--bs-warning-rgb), .15); border-color: rgba(var(--bs-warning-rgb), .5); }
.bc-lot-out { background: rgba(var(--bs-danger-rgb), .1); border-color: rgba(var(--bs-danger-rgb), .45); color: var(--bs-danger-text-emphasis); }

/* The order sheet (Reports/CompanyOrder). */
.co-table th { font-size: .8rem; }
.co-table > :not(caption) > * > * { padding-inline: .4rem; }
.co-table tr.co-off td:not(:first-child) { opacity: .55; }
.co-table .co-qty { width: 6.5rem; display: inline-block; }
@media print { .co-table tr.co-off { display: none; } .co-table .co-qty { border: 0; padding: 0; background: none; font-weight: 700; } }

/* A save bar hidden on purpose (the owner's account seen by someone else, 2026-11-15). */
.save-bar[hidden] { display: none !important; }

/* Security and password (Preferences/Security, 2026-11-15). */
.sec-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .4rem .75rem; }
.sec-codes code { font-size: 1rem; padding: .3rem .5rem; background: var(--bs-light); border: 1px solid var(--bs-border-color); border-radius: .375rem; color: var(--bs-body-color); text-align: center; }
.sec-qr svg { width: 11rem; height: 11rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--k-bg-ffffff, #fff); }
.sec-steps { padding-inline-start: 1.2rem; }
.sec-steps > li { margin-bottom: .75rem; }
@media print { .sec-codes code { border-color: #000; } }

/* The user guide (2026-11-15): Help/Index (front page with a search), Help/{id} (a topic) and Help/Book (the whole guide to print).
   The topics' own Markdown (HelpMarkdown) gives .help-steps (numbered steps), .help-shot (a screenshot with its caption),
   .help-callout (.help-tip / .help-warn / .help-note), .help-table, kbd for keys. */
.help-page { max-width: 1180px; margin: 0 auto; }
.help-hero { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; padding: 1.5rem 1.75rem; border-radius: 1rem; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--rn-primary) 82%, var(--k-bg-ffffff, #fff)) 0%, var(--rn-primary) 40%, var(--rn-sidebar) 100%); margin-bottom: 1.25rem; }
.help-hero p { color: #cfe0f5; }
.help-hero-icon { width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.8rem; color: var(--rn-accent); flex: none; }
.help-hero-actions { display: flex; flex-direction: column; gap: .5rem; flex: none; }
.help-search { position: relative; max-width: 40rem; }
.help-search .bi { position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); color: var(--k-fg-6b7c90, #6b7c90); }
.help-search input { padding-inline-start: 2.6rem; border-radius: .8rem; border: 0; }
.help-results { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.help-results[hidden] { display: none !important; }
.help-results-head { color: var(--k-fg-6b7c90, #6b7c90); font-size: .9rem; margin-bottom: .5rem; }
.help-results-list { list-style: none; margin: 0; padding: 0; }
.help-results-list li + li { border-top: 1px solid var(--k-bd-eef2f7, #eef2f7); }
.help-results-list a { display: block; padding: .6rem .25rem; text-decoration: none; color: inherit; }
.help-results-list a:hover { background: var(--k-bg-f5f8fc, #f5f8fc); }
.help-results-list b { color: var(--rn-primary-text); display: block; }
.help-results-list small { color: var(--k-fg-6b7c90, #6b7c90); }
.help-results-list mark { padding: 0 .1em; background: var(--k-bg-fff1c9, #fff1c9); }
.help-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; }
.help-chapter-card { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: 1rem 1.1rem; }
.help-chapter-card header { display: flex; gap: .75rem; align-items: center; margin-bottom: .6rem; }
.help-chapter-icon { width: 2.6rem; height: 2.6rem; border-radius: .8rem; display: grid; place-items: center; background: var(--k-bg-e8f0fb, #e8f0fb); color: var(--rn-primary-text); font-size: 1.3rem; flex: none; }
.help-chapter-no { font-size: .78rem; color: var(--k-fg-6b7c90, #6b7c90); display: block; }
.help-topic-list { list-style: none; margin: 0; padding: 0; }
.help-topic-list a { display: flex; gap: .6rem; padding: .45rem .35rem; border-radius: .6rem; text-decoration: none; color: inherit; }
.help-topic-list a:hover { background: var(--k-bg-f3f7fc, #f3f7fc); }
.help-topic-no { color: var(--rn-primary-text); font-weight: 700; min-width: 2.2rem; }
.help-topic-title { display: block; font-weight: 600; }
.help-topic-summary { display: block; font-size: .85rem; color: var(--k-fg-6b7c90, #6b7c90); }

.help-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.5rem; max-width: 1280px; margin: 0 auto; align-items: start; }
.help-side { position: sticky; top: calc(var(--rn-topbar-height) + 1rem); background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: .9rem;
  max-height: calc(100vh - var(--rn-topbar-height) - 2rem); overflow: auto; }
.help-side-home { display: flex; gap: .5rem; align-items: center; font-weight: 700; text-decoration: none; margin-bottom: .6rem; }
.help-side-chapter { display: flex; gap: .5rem; align-items: center; font-weight: 700; color: var(--k-fg-44566b, #44566b); padding: .4rem 0; border-top: 1px solid var(--k-bd-eef2f7, #eef2f7); }
.help-side-list { list-style: none; margin: 0; padding: 0; }
.help-side-list a { display: flex; gap: .5rem; padding: .35rem .5rem; border-radius: .5rem; text-decoration: none; color: inherit; font-size: .92rem; }
.help-side-list a .num { color: var(--k-fg-6b7c90, #6b7c90); min-width: 2rem; }
.help-side-list li.active a { background: var(--k-bg-e8f0fb, #e8f0fb); color: var(--rn-primary-text); font-weight: 700; }
.help-article { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: 1.5rem 2rem 2rem; min-width: 0; }
.help-crumbs { font-size: .88rem; color: var(--k-fg-6b7c90, #6b7c90); margin-bottom: .4rem; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.help-crumbs a { text-decoration: none; }
.help-crumb-sep { font-size: .7rem; }
.help-title { font-size: 1.8rem; font-weight: 800; margin-bottom: .35rem; }
.help-summary { font-size: 1.08rem; color: var(--k-fg-44566b, #44566b); margin-bottom: 1.25rem; }
/* A topic's video, played in the page (2026-11-17): its picture with a play button, then YouTube's player in the same 16:9 box. */
.help-video { max-width: 40rem; margin: 0 0 1.5rem; border: 1px solid var(--bs-border-color); border-radius: .9rem; overflow: hidden; background: var(--rn-sidebar); }
.help-video-box { position: relative; aspect-ratio: 16 / 9; }
.help-video-box iframe, .help-video-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.help-video-poster { padding: 0; background: var(--rn-sidebar); cursor: pointer; }
.help-video-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .15s; }
.help-video-poster:hover img, .help-video-poster:focus-visible img { filter: brightness(.85); }
.help-video-icon { position: absolute; inset: 0; margin: auto; width: 4.5rem; height: 3.2rem; border-radius: .9rem; display: grid; place-items: center;
  background: #e62117; color: #fff; font-size: 2.2rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .15s; }
.help-video-poster:hover .help-video-icon { transform: scale(1.08); }
.help-video-offline { position: absolute; inset: auto 0 0 0; padding: .6rem 1rem; background: rgba(11, 47, 87, .92); color: #fff; text-align: center; }
.help-video-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem .9rem; margin: 0;
  background: var(--k-bg-ffffff, #fff); font-size: .9rem; color: var(--k-fg-44566b, #44566b); }
.help-video-foot .bi { margin-inline-end: .35rem; }
.help-video-foot a { color: var(--k-fg-b0170f, #b0170f); text-decoration: none; white-space: nowrap; }
.help-video-foot a:hover { text-decoration: underline; }
@media print { .help-video { display: none; } }
.help-body { font-size: 1.04rem; line-height: 1.95; }
.help-body h2 { font-size: 1.3rem; font-weight: 800; margin: 1.6rem 0 .7rem; padding-bottom: .35rem; border-bottom: 2px solid var(--k-bd-eef2f7, #eef2f7); color: var(--rn-primary-text); }
.help-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
.help-body p { margin-bottom: .8rem; }
.help-list { padding-inline-start: 1.3rem; margin-bottom: .9rem; }
.help-list li { margin-bottom: .25rem; }
.help-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1rem; }
.help-steps > li { counter-increment: step; position: relative; padding-inline-start: 3rem; margin-bottom: 1.1rem; }
.help-steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: .1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--rn-primary); color: #fff; font: 700 1rem "Inter", sans-serif; display: grid; place-items: center; }
.help-step-text { padding-top: .15rem; }
.help-shot { margin: .75rem 0 1rem; }
.help-shot img { max-width: 100%; height: auto; border-radius: .75rem; border: 1px solid var(--k-bd-d5e0ee, #d5e0ee); box-shadow: 0 10px 28px rgba(16, 36, 58, .1); background: var(--k-bg-f5f7fa, #f5f7fa); }
.help-shot figcaption { font-size: .88rem; color: var(--k-fg-6b7c90, #6b7c90); margin-top: .4rem; }
.help-callout { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; border-radius: .8rem; margin: .8rem 0 1rem; line-height: 1.8; }
.help-callout > .bi { font-size: 1.25rem; flex: none; margin-top: .1rem; }
.help-tip { background: var(--k-bg-eaf7f0, #eaf7f0); border: 1px solid var(--k-bd-b9e3cc, #b9e3cc); }
.help-tip > .bi { color: var(--k-fg-1f9d6b, #1f9d6b); }
.help-warn { background: var(--k-bg-fff6e5, #fff6e5); border: 1px solid var(--k-bd-f5d79b, #f5d79b); }
.help-warn > .bi { color: var(--k-fg-b26a00, #b26a00); }
.help-note { background: var(--k-bg-eef4fc, #eef4fc); border: 1px solid var(--k-bd-c9daf1, #c9daf1); }
.help-note > .bi { color: var(--rn-primary-text); }
.help-table { overflow-x: auto; margin: .5rem 0 1rem; }
.help-table table { margin: 0; }
.help-table th { background: var(--k-bg-eef4fc, #eef4fc); white-space: nowrap; }
.app-content .help-table .table > thead > tr > th { position: static; }
.help-body kbd { font: 600 .85em "Inter", sans-serif; background: var(--k-bg-f3f5f8, #f3f5f8); color: var(--k-fg-10243a, #10243a); border: 1px solid var(--k-bd-c8d2df, #c8d2df); border-bottom-width: 2px; border-radius: .35rem; padding: .05rem .4rem; direction: ltr; unicode-bidi: isolate; }
.help-app-link .bi { font-size: .8em; margin-inline-end: .2rem; }
.help-topic-link[data-missing] { color: inherit; text-decoration: none; cursor: default; pointer-events: none; }
.help-related { margin-top: 1.75rem; padding: 1rem 1.2rem; background: var(--k-bg-f6f9fd, #f6f9fd); border-radius: .8rem; }
.help-related ul { list-style: none; padding: 0; margin: 0; }
.help-related a { text-decoration: none; }
.help-next { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--k-bd-eef2f7, #eef2f7); }
.help-next-link { display: flex; flex-direction: column; padding: .6rem .9rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; text-decoration: none; max-width: 48%; }
.help-next-link small { color: var(--k-fg-6b7c90, #6b7c90); }
.help-next-end { text-align: end; margin-inline-start: auto; }
@media (max-width: 991.98px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-side { position: static; max-height: none; order: 2; }
  .help-article { padding: 1.1rem 1rem 1.5rem; }
  .help-hero { padding: 1.1rem; }
  .help-hero-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
}

/* The book (Help/Book): a cover, the contents, every chapter from a new page. */
.help-book-body { background: #e9eef5; }
.help-book-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 1rem; background: #0b2f57; color: #fff; }
.help-book { max-width: 210mm; margin: 1rem auto; background: #fff; padding: 16mm 15mm; box-shadow: 0 10px 30px rgba(16, 36, 58, .15); }
.help-book h1 { font-weight: 900; }
.help-book-cover { min-height: 250mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; break-after: page; }
.help-book-logo { height: 26mm; margin-bottom: 8mm; }
.help-book-cover h1 { font-size: 30pt; color: var(--rn-primary-text); margin: 0; }
.help-book-sub { font-size: 14pt; color: #44566b; margin: 0; }
.help-book-type { display: inline-flex; gap: .6rem; align-items: center; font-size: 16pt; font-weight: 800; color: #3b2500; background: var(--rn-accent); border-radius: 999px; padding: .3rem 1.4rem; margin-top: 6mm;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.help-book-note { max-width: 120mm; font-size: 12pt; color: #44566b; margin-top: 10mm; }
.help-book-foot { display: flex; gap: 2rem; margin-top: 20mm; color: #6b7c90; font-size: 11pt; }
.help-book-toc { break-after: page; }
.help-book-toc h1 { font-size: 22pt; color: var(--rn-primary-text); margin-bottom: 6mm; }
.help-book-toc-chapter { font-size: 13pt; font-weight: 800; margin-top: 4mm; padding: 1mm 0; border-bottom: 1.5px solid #c9daf1; }
.help-book-toc-chapter a, .help-book-toc-topics a { text-decoration: none; color: inherit; }
.help-book-toc-topics { list-style: none; padding: 0; margin: 1mm 0 0; }
.help-book-toc-topics a { display: flex; align-items: baseline; gap: 2mm; padding: .6mm 0; font-size: 11pt; }
.help-book-toc-no { color: var(--rn-primary-text); font-weight: 700; min-width: 9mm; }
.help-book-toc-dots { flex: 1; border-bottom: 1px dotted #b7c3d2; transform: translateY(-1mm); }
.help-book-toc-page { min-width: 8mm; text-align: end; color: #44566b; }
.help-book-chapter { break-before: page; }
.help-book-chapter-head { display: flex; gap: 5mm; align-items: center; padding: 6mm 7mm; border-radius: 5mm; color: #fff; margin-bottom: 6mm;
  background: radial-gradient(120% 120% at 0% 0%, #1a5ea8 0%, var(--rn-primary) 45%, #0b2f57 100%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.help-book-chapter-head h1 { font-size: 22pt; margin: 0; }
.help-book-chapter-icon { width: 16mm; height: 16mm; border-radius: 4mm; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 22pt; color: var(--rn-accent); flex: none; }
.help-book-chapter-no { font-size: 11pt; color: #cfe0f5; }
.help-book-topic { margin-bottom: 8mm; }
.help-book-topic + .help-book-topic { break-before: page; }
.help-book-topic > h2 { font-size: 17pt; font-weight: 800; color: #10243a; margin: 0 0 2mm; }
.help-book-topic > h2 .num { color: var(--rn-primary-text); }
.help-book .help-body { font-size: 11pt; line-height: 1.85; }
.help-book .help-body h2 { font-size: 13pt; margin: 6mm 0 2mm; }
.help-book .help-shot { break-inside: avoid; }
.help-book .help-shot img { box-shadow: none; max-height: 120mm; width: auto; }
.help-book .help-steps > li { break-inside: avoid-page; }
.help-book .help-callout, .help-book .help-table { break-inside: avoid; }
.help-book .help-topic-link, .help-book .help-app-link { color: inherit; text-decoration: none; font-weight: 600; }
.help-book .help-app-link .bi { display: none; }
@media print {
  .help-book-body { background: #fff; }
  .help-book { margin: 0; padding: 0; box-shadow: none; max-width: none; }
  .help-callout, .help-steps > li::before, .help-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.help-book-marker { font-size: 2px; color: #fff; letter-spacing: 0; }

/* ---------------------------------------------------------------- Item reports (2026-11-17)
   Tabs between the item reports, and the charts drawn on the server (horizontal bars, columns by month, tall segmented bars) with the
   hover layer of charts.js. Chart colours: the dataviz reference palette (blue #2a78d6, orange #eb6834, an ordinal blue ramp), validated
   on white; marks thin, 4px rounded at the data end, square at the baseline; grid hairline; text never in the series colour. */
.rc-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.rc-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--bs-border-color);
  background: var(--k-bg-ffffff, #fff); color: var(--k-fg-33465c, #33465c); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.rc-tab:hover { background: var(--k-bg-f1f5fa, #f1f5fa); color: var(--rn-primary-text); }
.rc-tab.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }
.rc-card { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color); border-radius: .9rem; padding: 1rem 1.1rem; min-width: 0; }
.rc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.rc-card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.rc-card-sub { font-size: .82rem; color: var(--k-fg-6b7a8c, #6b7a8c); }
.rc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 991.98px) { .rc-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.rc-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.rc-bar-row { display: grid; grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .3rem .25rem;
  border-radius: .4rem; outline: none; }
.rc-bar-row:hover, .rc-bar-row:focus-visible, .rc-bar-row.rc-hover { background: var(--k-bg-f4f7fb, #f4f7fb); }
.rc-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; color: var(--k-fg-1d2b3a, #1d2b3a); }
.rc-bar-note { color: var(--k-fg-6b7a8c, #6b7a8c); margin-inline-start: .35rem; }
.rc-bar-track { height: 14px; display: flex; }
.rc-bar { display: block; height: 100%; min-width: 2px; background: var(--rc-color, #2a78d6); border-start-end-radius: 4px; border-end-end-radius: 4px; }
.rc-bar-neg { background: #d03b3b; }
.rc-bar-value { font-size: .88rem; font-weight: 600; color: var(--k-fg-1d2b3a, #1d2b3a); white-space: nowrap; }
.rc-columns { margin: 0; }
.rc-columns svg { width: 100%; height: auto; display: block; overflow: visible; }
.rc-grid { stroke: #e1e0d9; stroke-width: 1; }
.rc-baseline { stroke: #c3c2b7; stroke-width: 1; }
.rc-tick { font-size: 11px; fill: #898781; font-variant-numeric: tabular-nums; }
.rc-hit { fill: transparent; outline: none; }
.rc-hit:hover, .rc-hit:focus, .rc-hit.rc-hover { fill: rgba(var(--rn-primary-rgb), .06); }
.rc-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--k-fg-52514e, #52514e); margin-top: .25rem; }
.rc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: .35rem; vertical-align: -1px; }
.rc-table-view { margin-top: .4rem; font-size: .85rem; }
.rc-table-view summary { color: var(--k-fg-6b7a8c, #6b7a8c); cursor: pointer; }
.rc-seg-row { display: grid; grid-template-columns: minmax(6rem, auto) minmax(0, 1fr); gap: .75rem; align-items: center; margin-bottom: .5rem; }
.rc-seg-label { font-size: .85rem; color: var(--k-fg-52514e, #52514e); }
.rc-seg { display: flex; gap: 2px; height: 28px; }
.rc-seg-part { display: flex; align-items: center; padding-inline: .5rem; border-radius: 4px; color: #fff; font-size: .8rem; font-weight: 600; min-width: 4px;
  outline: none; overflow: hidden; white-space: nowrap; }
.rc-seg-part.rc-seg-dark { color: #0b0b0b; }
.rc-seg-part:hover, .rc-seg-part:focus-visible, .rc-seg-part.rc-hover { filter: brightness(1.12); }
.rc-tip { position: fixed; z-index: 2000; display: none; pointer-events: none; background: var(--k-bg-ffffff, #fff); border: 1px solid rgba(11, 11, 11, .1); border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(13, 43, 79, .16); padding: .45rem .65rem; max-width: 18rem; }
.rc-tip-name { font-size: .78rem; color: var(--k-fg-52514e, #52514e); }
.rc-tip-value { font-size: .92rem; font-weight: 700; color: var(--k-fg-0b0b0b, #0b0b0b); font-variant-numeric: tabular-nums; }
.rc-delta { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.rc-delta-up { color: var(--k-fg-006300, #006300); }
.rc-delta-down { color: var(--k-fg-b42318, #b42318); }
.rc-pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .12rem .55rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.rc-pill-a { background: #104281; color: #fff; }
.rc-pill-b { background: #2a78d6; color: #fff; }
.rc-pill-c { background: var(--k-bg-cde2fb, #cde2fb); color: var(--k-fg-0d366b, #0d366b); }
.rc-pill-good { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.rc-pill-warn { background: var(--k-bg-fff4dc, #fff4dc); color: var(--k-fg-8a5a00, #8a5a00); }
.rc-pill-bad { background: var(--k-bg-fde8e8, #fde8e8); color: var(--k-fg-b42318, #b42318); }
.rc-pill-muted { background: var(--k-bg-eef1f5, #eef1f5); color: var(--k-fg-52606f, #52606f); }
.app-content .table > thead > tr > th.rc-in { background: var(--k-bg-e9f5ee, #e9f5ee); color: var(--k-fg-1e6b43, #1e6b43); }
.app-content .table > thead > tr > th.rc-out { background: var(--k-bg-fbeceb, #fbeceb); color: var(--k-fg-9a2f22, #9a2f22); }
/* The item reports' tables can have many columns: they scroll in their own box (their heading is not sticky then), never the page. */
.app-content .table-responsive:has(> .rc-table) { overflow-x: auto; }
.app-content .table.rc-table > thead > tr > th { top: auto; }
.rc-table th { white-space: nowrap; }
.rc-table td.rc-item { min-width: 12rem; }
.rc-sticky-item { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--k-bg-ffffff, #fff); }
.rc-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .6rem; }
.rc-report { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--bs-border-color); border-radius: .8rem;
  background: var(--k-bg-ffffff, #fff); color: inherit; text-decoration: none; }
.rc-report:hover { border-color: var(--k-bd-9ec5f4, #9ec5f4); box-shadow: 0 4px 14px rgba(var(--rn-primary-rgb), .08); }
.rc-report .bi { font-size: 1.3rem; color: var(--rn-primary-text); }
.rc-report-title { font-weight: 700; font-size: .95rem; }
.rc-report-hint { font-size: .8rem; color: var(--k-fg-6b7a8c, #6b7a8c); }
@media print {
  .rc-tabs, .rc-table-view { display: none !important; }
  .rc-card { break-inside: avoid; border-color: #ccc; }
}
/* The count sheet: empty boxes to write in, a category's heading row, lines to sign. */
.rc-count .rc-count-box { min-width: 6.5rem; border-inline-start: 1px solid var(--bs-border-color); }
.rc-count .rc-count-note { min-width: 9rem; border-inline-start: 1px solid var(--bs-border-color); }
.rc-count tbody td { height: 2.4rem; }
.rc-count-group td { background: var(--k-bg-f1f5fa, #f1f5fa); font-weight: 700; color: var(--rn-primary-text); }
.rc-sign { display: flex; gap: 3rem; margin: 2rem 0 1rem; }
.rc-sign > div { flex: 1; display: flex; gap: .5rem; align-items: flex-end; }
.rc-sign span { flex: 1; border-bottom: 1px solid #999; height: 1.6rem; }
@media print { .rc-count td, .rc-count th { border: 1px solid #999 !important; } }

/* ---------- Print, PDF and Excel on every list table (table-export.js, 2026-11-19, the user's rule) ---------- */
.tx-bar { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .25rem; padding: .3rem .5rem;
    border-bottom: 1px solid var(--rn-border); background: var(--rn-surface); }
.card > .tx-bar:first-child { border-start-start-radius: inherit; border-start-end-radius: inherit; }
.tx-btn { --bs-btn-padding-y: .12rem; --bs-btn-padding-x: .45rem; --bs-btn-font-size: .74rem; display: inline-flex; align-items: center; gap: .3rem;
    color: var(--rn-text-muted); background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); border-radius: .4rem; }
.tx-btn:hover, .tx-btn:focus-visible { color: var(--rn-primary-text); border-color: var(--rn-primary); background: var(--k-bg-ffffff, #fff); }
.tx-caret { --bs-btn-font-size: .74rem; padding: 0 .28rem !important; color: var(--rn-text-muted); background: var(--k-bg-ffffff, #fff); border: 1px solid var(--rn-border); border-radius: .4rem; }
.tx-caret:hover, .tx-caret:focus-visible, .tx-caret.show { color: var(--rn-primary-text); border-color: var(--rn-primary); background: var(--k-bg-ffffff, #fff); }
/* Portrait or landscape (2026-11-30, paper-dir.js and table-export.js): a small sheet of paper, upright or across. */
.paper-ico { display: inline-block; width: .68em; height: .92em; border: 1.5px solid currentColor; border-radius: 2px; vertical-align: -.1em; flex-shrink: 0; }
.paper-ico-l { width: .92em; height: .68em; vertical-align: 0; }
.paper-dir .btn { display: inline-flex; align-items: center; gap: .4rem; }
.paper-menu { min-width: 0; }
.paper-menu .dropdown-item { display: flex; align-items: center; gap: .55rem; font-size: .86rem; white-space: nowrap; }
.paper-menu .dropdown-item > .bi:first-child { width: 1rem; text-align: center; }
.paper-menu .dropdown-item > .paper-ico { width: .7rem; height: .94rem; margin-inline: .15rem; }
.paper-menu .dropdown-item > .paper-ico-l { width: .94rem; height: .7rem; margin-inline: .03rem; }
.paper-menu .paper-on { margin-inline-start: auto; padding-inline-start: .75rem; visibility: hidden; }
.paper-menu .dropdown-item.active .paper-on { visibility: visible; }
@media (max-width: 767.98px) { .paper-dir .btn > span { display: none; } }
@media print { .paper-split > .paper-menu, .paper-split > .dropdown-toggle { display: none !important; } }
.tx-btn .bi-file-earmark-pdf { color: var(--k-fg-c0392b, #c0392b); }
.tx-btn .bi-file-earmark-excel { color: var(--k-fg-1e7b45, #1e7b45); }
@media (max-width: 575.98px) { .tx-btn span { display: none; } .tx-btn { --bs-btn-padding-x: .55rem; } }
.tx-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem .75rem; }
.tx-col { margin: 0; font-size: .85rem; }
.tx-toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 2000; padding: .5rem 1rem; border-radius: .6rem;
    background: #1f2937; color: #fff; font-size: .85rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); max-width: 90vw; }
.tx-toast[hidden] { display: none; }
/* The document itself, in its own frame: A4 sheets with the letterhead, the title and the table, numbered. */
body.tx-print { margin: 0; background: #fff; }
.tx-print .print-letterhead, .tx-print .print-letterfoot { display: block !important; }
.tx-sheet { box-sizing: border-box; width: 210mm; height: 296mm; padding: 10mm; overflow: hidden; display: flex; flex-direction: column;
    background: #fff; color: #111; break-after: page; page-break-after: always; }
.tx-sheet.tx-landscape { width: 297mm; height: 209mm; }
.tx-sheet:last-child { break-after: auto; page-break-after: auto; }
.tx-head { margin-bottom: 3mm; }
.tx-letter-plain { display: flex; align-items: center; gap: 4mm; border-bottom: 2px solid var(--rn-primary); padding-bottom: 2mm; }
.tx-letter-plain .tx-logo { max-height: 16mm; max-width: 45mm; object-fit: contain; }
.tx-letter-plain .tx-business { font-size: 17px; font-weight: 800; color: var(--rn-primary-text); }
.tx-titles { margin-bottom: 2.5mm; }
.tx-title { font-size: 14px; font-weight: 800; }
.tx-sub { font-size: 10.5px; color: var(--k-fg-555555, #555); }
.tx-sub .num { display: inline-block; direction: ltr; } /* a day and its time keep their order in Kurdish and Arabic, in the PDF too */
/* The figures above a table on its paper (2026-11-30, data-tx-cards). */
.tx-cards { display: flex; flex-wrap: wrap; gap: 2mm; margin-bottom: 3mm; }
.tx-card { flex: 1 1 36mm; min-width: 0; padding: 1.4mm 2.6mm; border: 1px solid var(--k-bd-cfd8e3, #cfd8e3); border-radius: 6px; background: var(--k-bg-f7f9fc, #f7f9fc); }
.tx-card-label { font-size: 10px; color: var(--k-fg-5b6775, #5b6775); }
.tx-card-value { font-size: 14px; font-weight: 800; line-height: 1.25; }
.tx-card-note { font-size: 9px; color: var(--k-fg-5b6775, #5b6775); }
.tx-table { font-size: var(--tx-fs, 11px); margin: 0; width: 100%; border-collapse: collapse; }
.tx-dense .tx-table { font-size: var(--tx-fs, 9.5px); }
/* A wide table on the paper chosen: smaller letters (--tx-fs), thinner cells, and at the smallest its words may break. */
.tx-small .tx-table > :is(thead, tbody, tfoot) > tr > :is(th, td) { padding: 2px !important; }
.tx-small .tx-table :is(small, .small, .text-secondary) { font-size: .92em; }
.tx-tight .tx-table :is(th, td), .tx-tight .tx-table :is(th, td) * { white-space: normal !important; overflow-wrap: anywhere; }
.tx-table > :is(thead, tbody, tfoot) > tr > :is(th, td) { text-align: center !important; vertical-align: middle !important; padding: 3px 4px !important;
    border: 1px solid var(--k-bd-d3dae6, #d3dae6) !important; position: static !important; }
.tx-table > thead > tr > th { background: var(--k-bg-eef3fa, #eef3fa) !important; color: var(--k-fg-114987, #114987) !important; font-weight: 700; white-space: normal; }
.tx-table .num { white-space: nowrap; }
.tx-table > tfoot > tr > td { font-weight: 700; background: var(--k-bg-f5f7fb, #f5f7fb) !important; }
.tx-table .inv-pill, .tx-table .badge { font-size: .9em; }
.tx-pagefoot { margin-top: auto; padding-top: 2mm; font-size: 9.5px; color: var(--k-fg-555555, #555); display: flex; gap: 4mm; align-items: flex-end; }
.tx-pagefoot .print-letterfoot { margin: 0; }
.tx-pageno { margin-inline-start: auto; white-space: nowrap; }

/* ---------- closing a sale or purchase being entered, and the draft kept on the device (2026-11-19, the user's request) ---------- */
.doc-close-modal .modal-content { border: 0; border-radius: 1rem; box-shadow: 0 18px 48px rgba(16, 24, 40, .22); }
.doc-close-icon { width: 3.4rem; height: 3.4rem; margin: 0 auto; display: grid; place-items: center; border-radius: 50%;
    background: var(--k-bg-fff4e5, #fff4e5); color: var(--k-fg-b45309, #b45309); font-size: 1.6rem; }
.doc-close-title { font-weight: 800; }
.doc-restored { position: fixed; bottom: 8.75rem; left: 50%; transform: translateX(-50%); z-index: 1080; display: flex; align-items: center; gap: .6rem;
    max-width: min(92vw, 40rem); padding: .55rem .6rem .55rem .9rem; border-radius: .75rem; background: var(--rn-primary); color: #fff;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .28); font-size: .9rem; }
.doc-restored .bi-cloud-check { font-size: 1.2rem; }
.doc-restored .btn-light { white-space: nowrap; font-weight: 600; }

/* The advanced search (2026-11-20; the sales, purchases and returns lists first): a box that looks names up, quick date ranges, and the
   conditions on as chips above the list, each with its ×. */
.adv-lookup { position: relative; }
.adv-lookup-list { position: absolute; inset-inline: 0; top: 100%; z-index: 1060; max-height: 14rem; overflow-y: auto; }
/* The window itself (the user's rule, 2026-11-20, for every advanced search): every control in view at once, no scrolling — small boxes
   and labels in a grid of four columns on a computer, two on a phone; .adv-wide takes two, .adv-all the whole row. */
/* Not clipped (overflow visible): the list of names of a lookup box lies over the window instead of making it scroll. */
.adv-modal .modal-content { border: 0; border-radius: 14px; box-shadow: 0 24px 60px rgba(11, 47, 87, .28); }
.adv-modal .modal-body { overflow: visible; }
.adv-modal .adv-head { border-radius: 14px 14px 0 0; }
.adv-modal .adv-foot { border-radius: 0 0 14px 14px; }
@media (max-width: 575.98px) {
    .adv-modal .modal-content { border-radius: 0; }
    .adv-modal .adv-head, .adv-modal .adv-foot { border-radius: 0; }
    .adv-modal .adv-head { padding-block: .55rem; }
    .adv-modal .modal-body { padding: .6rem .75rem; }
    .adv-modal .adv-foot { flex-wrap: nowrap; }
}
/* The heading on the brand's colour, its title in the middle; the close button at the end, white. */
.adv-modal .adv-head { position: relative; justify-content: center; padding: .7rem 3rem; border: 0;
    background: linear-gradient(135deg, var(--rn-primary), var(--rn-sidebar)); color: #fff; }
.adv-modal .adv-head .modal-title { font-size: 1.05rem; font-weight: 800; margin: 0; letter-spacing: .01em; }
.adv-modal .adv-head .btn-close { position: absolute; top: 50%; inset-inline-end: 1rem; margin: 0; transform: translateY(-50%); opacity: .85; }
.adv-modal .adv-head .btn-close:hover { opacity: 1; }
.adv-modal .modal-body { padding: .85rem 1rem; }
/* The foot on a tint of its own, set off by a line. */
.adv-modal .adv-foot { padding: .5rem 1rem; gap: .35rem; background: var(--k-bg-eef3f9, #eef3f9); border-top: 1px solid var(--k-bd-d5e0ee, #d5e0ee); }
.adv-box { container-type: inline-size; }
.adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; align-items: end; }
.adv-grid > * { min-width: 0; }
.adv-grid .form-label { display: block; margin-bottom: .15rem; font-size: .75rem; font-weight: 600; color: var(--rn-text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-grid > .adv-wide { grid-column: span 2; }
.adv-grid > .adv-all { grid-column: 1 / -1; }
@container (min-width: 44rem) { .adv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* A window with more conditions than one view holds: a tab each, every box of a tab in view (a charity's files, 2026-11-22). */
.adv-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; margin-bottom: .6rem; scrollbar-width: none; }
.adv-tabs .nav-link { white-space: nowrap; padding: .3rem .7rem; font-size: .82rem; font-weight: 600; }
.adv-tab-content { min-height: 15.5rem; }
.adv-ranges { display: flex; flex-wrap: wrap; gap: .3rem; }
.adv-ranges .btn { padding: .12rem .6rem; font-size: .78rem; border-radius: 999px; }
.adv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.adv-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .45rem; padding-inline-start: .75rem; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--rn-primary) 25%, transparent); background: var(--rn-primary-soft); color: var(--rn-primary-text);
    font-size: .85rem; text-decoration: none; }
.adv-chip > span { color: var(--rn-text-muted); }
.adv-chip > b { font-weight: 700; }
.adv-chip > .bi-x { font-size: 1.05rem; opacity: .7; }
a.adv-chip:hover { border-color: var(--rn-primary); }
a.adv-chip:hover > .bi-x { opacity: 1; color: var(--bs-danger); }
.adv-chip-plain { padding-inline-end: .75rem; }
.adv-hit { color: var(--rn-primary-text); font-weight: 600; }
.adv-hit-qty { white-space: nowrap; }
/* Several of a list at once (2026-11-28: "one company or more"): a box like a list that opens ticks with a search over the window
   (the window never scrolls: the ticks scroll in their own menu); ticked, the box is marked in the brand's colour. */
.adv-multi .dropdown { position: relative; }
.adv-multi-btn { display: block; width: 100%; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-multi-btn.adv-multi-on { border-color: var(--rn-primary); color: var(--rn-primary-text); font-weight: 600; background-color: var(--rn-primary-soft); }
.adv-multi-menu { min-width: 100%; width: 17rem; max-width: min(22rem, 92vw); padding: 0; overflow: hidden; }
.adv-multi-find { padding: .45rem; border-bottom: 1px solid var(--rn-border); }
.adv-multi-list { max-height: 15rem; overflow-y: auto; padding: .2rem 0; }
.adv-multi-item { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .28rem .75rem; font-size: .85rem; cursor: pointer; }
.adv-multi-item:hover { background: rgba(var(--rn-primary-rgb), .07); }
.adv-multi-item[hidden], .adv-multi-item.adv-multi-off { display: none; }
.adv-multi-item .form-check-input { flex: none; margin: 0; }
.adv-multi-item:has(input:checked) { color: var(--rn-primary-text); font-weight: 600; }
.adv-multi-special { font-style: italic; border-bottom: 1px dashed var(--rn-border); }
.adv-multi-empty { padding: .4rem .75rem; }
.adv-multi-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem .75rem;
    border-top: 1px solid var(--rn-border); font-size: .78rem; }
/* An expiry date: its two boxes and its quick ranges on one line, a row of their own. A dense grid fills the gaps a whole row leaves. */
.adv-grid.adv-dense { grid-auto-flow: row dense; }
.adv-days-line { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.adv-days-line > .adv-days-boxes { flex: 0 1 22rem; width: auto; min-width: 14rem; }
/* The items list: the lots on the shelf that expire on the days searched, under the stock. */
.adv-lots { display: flex; flex-direction: column; align-items: center; gap: .15rem; margin-top: .25rem; }
.adv-lot { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .78rem; }
.adv-lot .adv-lot-batch { color: var(--rn-text-muted); }
/* The items list with several companies chosen (2026-11-29): a heading before each company's items. */
.inv-table > tbody > tr.items-group-head > td { background: var(--rn-primary-soft); border-top: 2px solid rgba(var(--rn-primary-rgb), .35);
    color: var(--rn-primary-text); font-weight: 700; padding-block: .45rem; }
.items-group-head .items-group-name, .items-group-card .items-group-name { font-size: 1rem; font-weight: 800; }
.items-group-count { font-size: .78rem; font-weight: 600; color: var(--rn-text-muted); margin-inline-start: .5rem; }
.items-group-card { margin: .75rem 0 .4rem; padding: .45rem .7rem; border-radius: var(--rn-radius-sm); background: var(--rn-primary-soft);
    color: var(--rn-primary-text); font-weight: 700; }
.items-group-card:first-child { margin-top: 0; }

/* Every list can be searched (2026-11-29, select-search.js): the <select> stays, its list is Ranma's — a search box on top, the choices under
   it, the one chosen ticked, the part searched marked; it lies over the page (and over a window) and never makes it scroll. */
.ss-pop { position: fixed; z-index: 2000; display: flex; flex-direction: column; overflow: hidden; background: var(--rn-surface); color: var(--rn-text);
    border: 1px solid var(--rn-border); border-radius: 10px; box-shadow: 0 14px 36px rgba(11, 47, 87, .2); }
.ss-find-box { flex: none; padding: .4rem; border-bottom: 1px solid var(--rn-border); }
.ss-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: .25rem 0; }
.ss-opt { display: flex; align-items: center; gap: .4rem; padding: .32rem .75rem; font-size: .88rem; cursor: pointer; }
.ss-opt .ss-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: isolate; text-align: start; }
.ss-opt .ss-tick { flex: none; color: var(--rn-primary-text); }
.ss-opt.ss-active { background: rgba(var(--rn-primary-rgb), .1); }
.ss-opt.ss-sel { color: var(--rn-primary-text); font-weight: 600; }
.ss-opt.ss-off { opacity: .45; cursor: default; }
.ss-opt[hidden], .ss-group[hidden], .ss-empty[hidden] { display: none; }
.ss-opt mark { padding: 0; border-radius: 2px; color: inherit; background: color-mix(in srgb, var(--rn-accent) 45%, transparent); }
.ss-group { padding: .4rem .75rem .15rem; font-size: .72rem; font-weight: 700; color: var(--rn-text-muted); }
.ss-empty { padding: .55rem .75rem; font-size: .85rem; color: var(--rn-text-muted); }
select.ss-open { border-color: var(--rn-primary); box-shadow: 0 0 0 .2rem rgba(var(--rn-primary-rgb), .15); }
@media (hover: none) and (pointer: coarse) {
    .ss-opt { padding: .6rem .9rem; font-size: 1rem; }
    .ss-find { font-size: 16px; }
}
@media print { .ss-pop { display: none !important; } }

/* A form's save bar on a phone (2026-11-20): Delete, Cancel and a wide Save did not fit a 390px screen (Save on two lines, Delete pushed
   off the screen): smaller side padding, Save takes the room left. */
@media (max-width: 575.98px) {
    .party-form .save-bar { gap: .5rem; }
    .party-form .save-bar .btn { padding-inline: .85rem !important; font-size: 1rem; white-space: nowrap; }
    .party-form .save-bar .btn-primary { flex: 1; }
}

/* A table's heading kept in view by sticky-head.js where CSS cannot keep it (a table in a box that scrolls sideways, a heading left in its
   place): a copy fixed under the top bar while the rows are on the screen (the user's rule, 2026-11-21). */
.sh-float { position: fixed; z-index: 10; display: none; overflow: hidden; box-shadow: 0 8px 12px -10px rgba(16, 36, 58, .45); }
.sh-float.sh-on { display: block; }
.sh-float > table { margin: 0 !important; }
.app-content .sh-float .table > thead > tr > th { position: static !important; }
@media print { .sh-float { display: none !important; } }

/* A charity's beneficiaries (2026-11-22): where a file stands, the committee's grade, the file's facts and its steps. */
.inv-pill.ch-st-reception { background: var(--k-bg-e8f0fb, #e8f0fb); color: var(--rn-primary-text); }
.inv-pill.ch-st-waiting { background: var(--k-bg-fff4d6, #fff4d6); color: var(--k-fg-8a5a00, #8a5a00); }
.inv-pill.ch-st-supported { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.inv-pill.ch-st-stopped { background: var(--k-bg-eef0f2, #eef0f2); color: var(--k-fg-5b6470, #5b6470); }
.inv-pill.ch-st-refused { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.ch-grade { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; font-weight: 800; font-size: .8rem; }
.ch-grade-A { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.ch-grade-B { background: var(--k-bg-fff4d6, #fff4d6); color: var(--k-fg-8a5a00, #8a5a00); }
.ch-grade-C { background: var(--k-bg-e8f0fb, #e8f0fb); color: var(--rn-primary-text); }
.ch-grade-D { background: var(--k-bg-eef0f2, #eef0f2); color: var(--k-fg-5b6470, #5b6470); }
.ch-grade-chip label { min-width: 2.6rem; justify-content: center; font-weight: 800; }
.ch-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .25rem 1rem; margin: 0; }
.ch-fact { padding: .35rem 0; border-bottom: 1px dashed var(--rn-border); min-width: 0; }
.ch-fact dt { font-size: .75rem; font-weight: 600; color: var(--rn-text-muted); }
.ch-fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ch-problem { padding: .6rem .75rem; border-radius: .6rem; background: var(--bs-tertiary-bg); white-space: pre-line; }
.ch-steps { list-style: none; padding: 0; margin: 0; }
.ch-steps li { position: relative; padding: 0 1.1rem .8rem; border-inline-start: 2px solid var(--rn-border); }
.ch-steps li::before { content: ""; position: absolute; inset-inline-start: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--rn-primary); }
.ch-steps li:last-child { border-color: transparent; padding-bottom: 0; }
.ch-member .form-label { font-size: .8rem; margin-bottom: .2rem; }
/* The charity's pages in one row: on a narrow screen it slides sideways, with no scrollbar of its own. */
.ch-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex-shrink: 0; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-form .ch-orphan[hidden], .ch-form .ch-poor[hidden], .ch-member .ch-ed[hidden] { display: none !important; }

/* A charity's month sheet (2026-11-22): the boxes keep a width, paid rows are tinted. Its paper is the page SheetPrint. */
.sh-table .sh-extra { min-width: 5.5rem; }
.sh-table tr.sh-done > td { background: var(--k-bg-f6fbf8, #f6fbf8); }

/* A business's id on the platform's list (2026-11-23): small, whole, one click copies it. */
.biz-id { display: flex; align-items: center; justify-content: center; gap: .15rem; min-width: 10.5rem; max-width: 100%; margin-top: .1rem; }
.biz-id-text { padding: 0; background: none; color: var(--rn-text-muted); font-size: .66rem; overflow-wrap: anywhere; user-select: all; }
.biz-id-copy { flex: none; padding: .1rem .25rem; border: 0; border-radius: 4px; background: none; color: var(--rn-text-muted); font-size: .75rem; line-height: 1; }
.biz-id-copy:hover, .biz-id-copy:focus-visible { background: var(--k-bg-e8eef6, #e8eef6); color: var(--rn-primary-text); }
.biz-id-copy.biz-id-done { color: var(--k-fg-15803d, #15803d); }

/* Clearing a business's transactions (Platform/Business). */
.client-clear .pf-head-icon { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-b42318, #b42318); }
.clear-head { background: var(--k-bg-fff5f5, #fff5f5); color: var(--k-fg-b42318, #b42318); }
.clear-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.clear-counts > div { display: flex; flex-direction: column; min-width: 0; padding: .3rem .55rem; border: 1px solid var(--rn-border); border-radius: .45rem; background: var(--k-bg-ffffff, #fff); }
.clear-counts span { color: var(--rn-text-muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clear-counts b { font-size: 1rem; font-weight: 800; }
.clear-counts .clear-last { font-size: .76rem; line-height: 1.6; white-space: nowrap; }
.clear-note { height: 100%; padding: .4rem .6rem; border-radius: .45rem; }
.clear-note-out { background: var(--k-bg-fdecec, #fdecec); color: var(--k-fg-8f1d14, #8f1d14); }
.clear-note-stay { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-14613a, #14613a); }
@media (max-width: 575.98px) { .clear-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A stock take (2026-11-23) */
.st-facts { display: flex; flex-wrap: wrap; gap: .15rem .75rem; min-width: 0; }
.st-fact-on { color: var(--rn-primary-text); font-weight: 600; }
.st-views { display: flex; gap: .25rem; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .4rem; margin-bottom: .5rem; }
.st-card { background: var(--k-bg-ffffff, #fff); border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .3rem .6rem; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.st-card > span { font-size: .72rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card > b { font-size: 1.1rem; }
.st-card > small { font-size: .7rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card.st-up > b { color: var(--k-fg-1e7b4a, #1e7b4a); }
.st-card.st-down > b { color: var(--k-fg-b42318, #b42318); }
.st-card.st-warn.st-on { background: var(--k-bg-fdecec, #fdecec); border-color: var(--k-bd-f5c2c0, #f5c2c0); }
.st-card.st-warn.st-on > b { color: var(--k-fg-b42318, #b42318); }
/* One row on a computer: the item, then the boxes, then Save. */
.st-entry { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .35rem .5rem; margin-top: .45rem; padding: .4rem .6rem; border: 1px solid color-mix(in srgb, var(--rn-primary) 22%, var(--k-bd-ffffff, #fff));
    border-inline-start: 3px solid var(--rn-primary); border-radius: .55rem; background: color-mix(in srgb, var(--rn-primary) 5%, var(--k-bg-ffffff, #fff)); }
.st-entry[hidden] { display: none; }
.st-entry > div { flex: 1 1 7.25rem; max-width: 11rem; min-width: 0; }
.st-entry .form-label { font-size: .7rem; margin-bottom: .05rem; color: var(--bs-secondary-color); white-space: nowrap; }
.st-entry > .st-entry-name { flex: 2 1 13rem; max-width: none; align-self: center; line-height: 1.25; }
.st-entry > .st-entry-unit { flex-basis: 6.5rem; }
.st-entry > .st-entry-save { flex: none; max-width: none; display: flex; gap: .25rem; }
.st-entry > .st-lots { flex: 1 1 100%; max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.st-entry > .st-lots[hidden] { display: none; }
.st-lot { border: 1px solid var(--bs-border-color); background: var(--k-bg-f6f8fb, #f6f8fb); border-radius: 1rem; padding: .05rem .6rem; font-size: .75rem; }
.st-lot:hover { background: var(--rn-primary-soft); }
.st-filters { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.st-filters .pos-tab { white-space: nowrap; }
.st-tab-warn .num { color: var(--k-fg-b42318, #b42318); font-weight: 700; }
.st-find { width: 13rem; max-width: 100%; }
.st-row-warn > td { background: var(--k-bg-fff8f7, #fff8f7); }
.st-sum { display: grid; gap: .15rem; }
.st-sum > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--k-bd-eef0f3, #eef0f3); padding: .2rem 0; }
.st-sum dt { font-weight: 500; }
.st-sum dd { margin: 0; font-weight: 700; }
/* The report's lists one under the other, each at the whole width, so every column is in view. */
.st-report-grid { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.st-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .6rem; padding: .25rem .6rem !important; font-size: .9rem; font-weight: 600; }
.st-card-head .tx-bar, #sx-export .tx-bar { flex-wrap: nowrap; margin: 0; padding: 0; border: 0; background: none; }
#sx-table thead th { white-space: normal; line-height: 1.15; min-width: 3.5rem; }
.st-report-grid .table > :not(caption) > * > * { padding-block: .22rem; font-size: .84rem; }
.st-sign { justify-content: space-between; gap: 2rem; margin-top: 2.5rem; }
.st-sign > div { flex: 1; border-top: 1px solid var(--k-bd-333333, #333); padding-top: .3rem; text-align: center; font-size: .8rem; }
@media (max-width: 767.98px) {
    .st-entry > div { flex: 1 1 calc(50% - .25rem); max-width: none; }
    .st-entry > .st-entry-name, .st-entry > .st-entry-save { flex: 1 1 100%; }
    .st-entry > .st-entry-save .btn-primary { flex: 1; }
    .st-entry input, .st-entry select { font-size: 16px; }
    .st-find { width: 100%; }
    .st-facts { order: 5; flex-basis: 100%; }
    .st-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; }
    .st-card { padding: .2rem .4rem; }
    .st-card > b { font-size: .95rem; }
}
@media print { .st-report-grid { display: block; } .st-report-grid .card { margin-bottom: .5rem; break-inside: avoid; } }

/* A charity's file (2026-11-23, the user's request): small on a computer, as many boxes in a row as there is room for; on a phone or a tablet one part at a time. */
.ch-form { --ch-gap: .4rem; }
.ch-form .row { --bs-gutter-x: var(--ch-gap); --bs-gutter-y: var(--ch-gap); }
.ch-form .row.mb-3, .ch-form section.mb-3 { margin-bottom: var(--ch-gap) !important; }
.ch-form .card { border-radius: .55rem; }
.ch-form .form-label { display: block; margin-bottom: .05rem !important; font-size: .72rem; color: var(--rn-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.ch-form .form-control, .ch-form .form-select { min-height: 1.95rem; padding-block: .14rem; font-size: .86rem; line-height: 1.4; }
.ch-form .form-control { padding-inline: .5rem; }
.ch-form .form-select { padding-inline-start: .5rem; }
.ch-form textarea.form-control { resize: vertical; overflow: hidden; }
.ch-form .input-group .btn { padding-block: 0; font-size: .8rem; }
.ch-form .form-grid { gap: .3rem .45rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); }
.ch-form .form-grid > .fg-wide { grid-column: span 2; }
.ch-form .form-grid > .ch-rest { grid-column: 4 / -1; }
.ch-form .pf-chip label { padding: .12rem .6rem; font-size: .78rem; border-width: 1px; gap: .25rem; }
.ch-form .ch-grade-chip label { min-width: 2rem; }
.ch-hero { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: .3rem .6rem; padding: .35rem .6rem; margin-bottom: var(--ch-gap); }
.ch-hero-kind { display: flex; flex: none; gap: .25rem; padding-bottom: .15rem; }
.ch-hero-name { flex: 1 1 16rem; min-width: 0; }
.ch-hero-status { flex: 0 1 11rem; min-width: 0; }
.ch-hero-tools { flex: none; }
.ch-hero-tools .btn { min-height: 1.95rem; padding-block: .1rem; font-size: .82rem; }
.ch-form section[data-field] { scroll-margin-top: calc(var(--rn-topbar-height) + 3rem); }
.ch-form section[data-field] > .pf-head { min-height: 1.95rem; padding: .2rem .6rem; gap: .4rem; cursor: pointer; user-select: none; }
.ch-form .pf-head > div { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.ch-form .pf-head h2 { font-size: .85rem; white-space: nowrap; }
.ch-form .pf-head p { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-form .pf-head-icon { flex: none; width: 1.45rem; height: 1.45rem; border-radius: .35rem; font-size: .78rem; }
.ch-form .pf-head .btn { padding: .05rem .5rem; font-size: .76rem; white-space: nowrap; }
.ch-sec-badge { margin-inline-start: auto; flex: none; padding: 0 .4rem; border-radius: 1rem; background: var(--k-bg-eef0f3, #eef0f3); color: var(--rn-text-muted); font-size: .68rem; font-weight: 700; line-height: 1.3rem; }
.ch-sec-badge.ch-sec-on { background: var(--k-bg-e7f6ee, #e7f6ee); color: var(--k-fg-1e7b4a, #1e7b4a); }
.ch-sec-chev { flex: none; color: var(--rn-text-muted); font-size: .75rem; transition: transform .15s; }
.ch-sec-closed > .pf-head .ch-sec-chev, .ch-member-closed .ch-member-toggle .bi { transform: rotate(90deg); }
html[dir="ltr"] .ch-sec-closed > .pf-head .ch-sec-chev, html[dir="ltr"] .ch-member-closed .ch-member-toggle .bi { transform: rotate(-90deg); }
.ch-sec-closed > :not(.pf-head) { display: none !important; }
.ch-form section[data-field] > .card-body { padding: .1rem .6rem .45rem; }
.ch-form .col-lg-6 > .ch-sec-closed { height: auto !important; }
.ch-sec-foot { display: none; padding: 0 .6rem .55rem; }
.ch-nav { display: none; }
.ch-member { padding: .3rem .5rem !important; margin-bottom: .3rem; background: var(--k-bg-fafbfd, #fafbfd); }
.ch-member-head { display: flex; align-items: center; gap: .35rem; margin-bottom: .25rem; }
.ch-member-head .form-control { flex: 1 1 12rem; width: auto; min-width: 0; }
.ch-member-head .btn { flex: none; padding: .1rem .4rem; }
.ch-member-sum { display: none; flex: none; max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .74rem; }
.ch-member-toggle .bi { display: inline-block; transition: transform .15s; }
.ch-member-closed .ch-member-head { margin-bottom: 0; }
.ch-member-closed .fg-box { display: none; }
.ch-member-closed .ch-member-sum { display: block; }
.ch-help { display: flex; align-items: flex-end; gap: .35rem; margin-bottom: .3rem; }
.ch-help-org { flex: 2 1 10rem; min-width: 0; }
.ch-help-amount { flex: 1 1 7rem; min-width: 0; }
.ch-help-note { flex: 2 1 10rem; min-width: 0; }
.ch-help > .btn { flex: none; padding: .1rem .45rem; min-height: 1.95rem; }
@media (min-width: 1200px) { .ch-form .form-grid > .ch-wide3 { grid-column: span 3; } }
@media (max-width: 991.98px) {
    .ch-form .form-control, .ch-form .form-select { min-height: 2.45rem; font-size: 16px; } /* a phone does not zoom into a 16px box */
    .ch-form .form-label { font-size: .78rem; }
    .ch-form .form-grid { gap: .4rem .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
    .ch-form .form-grid > .ch-rest { grid-column: 1 / -1; }
    .ch-form .pf-chip label { padding: .3rem .7rem; font-size: .85rem; }
    .ch-form section[data-field] > .pf-head { min-height: 2.6rem; }
    .ch-form .pf-head h2 { font-size: .92rem; }
    .ch-form .pf-head p { display: none; }
    .ch-form .pf-head .btn { padding: .22rem .6rem; font-size: .82rem; }
    .ch-sec-foot { display: flex; justify-content: flex-end; }
    .ch-sec-next { display: inline-flex; align-items: center; gap: .15rem; min-height: 2.3rem; padding-inline: .8rem; }
    .ch-sec-next[hidden] { display: none; }
    html[dir="ltr"] .ch-sec-next .bi { transform: scaleX(-1); }
    .ch-nav { position: sticky; top: var(--rn-topbar-height); z-index: 20; display: flex; gap: .25rem; margin-bottom: var(--ch-gap); padding: .2rem 0; overflow-x: auto; background: var(--rn-bg); scrollbar-width: none; }
    .ch-nav::-webkit-scrollbar { display: none; }
    .ch-nav-item { flex: none; display: inline-flex; align-items: center; gap: .25rem; min-height: 2.2rem; padding: .15rem .65rem; border: 1px solid var(--rn-border); border-radius: 1.2rem; background: var(--k-bg-ffffff, #fff); color: var(--rn-text-muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
    .ch-nav-item.ch-nav-done { border-color: var(--k-bd-a9dcbf, #a9dcbf); color: var(--k-fg-1e7b4a, #1e7b4a); }
    .ch-nav-item.active { border-color: var(--rn-primary); background: var(--rn-primary); color: #fff; }
    .ch-hero-name { flex: 1 1 12rem; }
    .ch-hero-status { flex: 0 1 11.5rem; }
    .ch-hero-tools .btn { min-height: 2.45rem; }
    .ch-member-head .btn { min-height: 2.3rem; padding-inline: .55rem; }
    .ch-member-sum { max-width: 35%; }
    .ch-help { flex-wrap: wrap; padding-bottom: .35rem; border-bottom: 1px dashed var(--rn-border); }
    .ch-help-org, .ch-help-note { flex: 1 1 100%; }
    .ch-help-amount { flex: 1 1 8rem; }
    .ch-help > .btn { min-height: 2.45rem; }
}
@media (max-width: 575.98px) {
    .ch-hero-kind { flex: 1 1 100%; }
    .ch-hero-kind .choice { flex: 1; min-width: 0; }
    .ch-hero-kind .pf-chip label { justify-content: center; width: 100%; white-space: nowrap; }
    .ch-hero-name { flex: 1 1 100%; }
    .ch-hero-status { flex: 1 1 auto; }
    .ch-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ch-form .form-grid > .fg-wide, .ch-form .form-grid > .ch-rest { grid-column: 1 / -1; }
}

/* Date, month and time boxes in a browser set to Arabic: plain boxes with 0-9 and a small calendar (en-boxes.js). */
.dg-box { direction: ltr; }
html[dir=rtl] .dg-box { text-align: right; }
.dg-date {
    padding-inline-end: 1.7rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") no-repeat right .45rem center / .8rem;
}
html[dir=rtl] .dg-date { padding-right: .5rem; padding-left: 1.6rem; background-position: left .45rem center; }
.dg-date.form-control-sm { background-size: .7rem; }
html[dir=rtl] .dg-date.form-control-sm { padding-left: 1.25rem; background-position: left .3rem center; }
.dg-cal {
    position: fixed; z-index: 2100; width: 15.5rem; padding: .5rem; background: var(--k-bg-ffffff, #fff);
    border: 1px solid var(--k-bd-d8dee8, #d8dee8); border-radius: .6rem; box-shadow: 0 10px 28px rgba(11, 47, 87, .18); font-size: .82rem;
}
.dg-head, .dg-foot { display: flex; align-items: center; justify-content: space-between; }
.dg-head { margin-bottom: .3rem; }
.dg-foot { margin-top: .3rem; }
.dg-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.dg-cal-months .dg-grid { grid-template-columns: repeat(4, 1fr); gap: .2rem; }
.dg-week { padding: .15rem 0; color: var(--k-fg-6b7280, #6b7280); font-size: .72rem; font-weight: 700; }
.dg-cell, .dg-nav { border: 0; background: none; border-radius: .35rem; padding: .28rem 0; color: inherit; }
.dg-nav { padding: .2rem .5rem; color: var(--rn-primary-text); }
.dg-cell:hover, .dg-nav:hover { background: var(--k-bg-eaf1f9, #eaf1f9); }
.dg-cell.is-today { box-shadow: inset 0 0 0 1px var(--rn-accent); }
.dg-cell.is-on { background: var(--rn-primary); color: #fff; font-weight: 700; }
/* A date box typed in freely (date-box.js, 2026-11-29): the day written any usual way; the note when it is not a day. */
.db-note { position: fixed; z-index: 2100; max-width: 22rem; padding: .4rem .6rem; border-radius: .45rem; font-size: .8rem; line-height: 1.35;
    background: var(--k-bg-fdecec, #fdecec); color: var(--rn-danger-text); border: 1px solid rgba(220, 38, 38, .55); box-shadow: 0 6px 18px rgba(11, 47, 87, .15); }
#purchase .doc-lines .exp-input.dg-date { padding: 0 1.15rem 0 .3rem; background-position: right .3rem center; background-size: .65rem; }
html[dir=rtl] #purchase .doc-lines .exp-input.dg-date { padding: 0 .3rem 0 1.15rem; background-position: left .3rem center; }

/* Sale prices changed at once (Platform/Prices, ranma@mail.com only, 2026-11-24). */
#bp .bp-label { font-size: .78rem; font-weight: 700; text-transform: none; color: var(--bs-secondary-color); margin-bottom: .35rem; }
#bp [data-mode][hidden] { display: none !important; }
#bp .bp-table-box { max-height: 26rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
#bp .bp-table-box thead th { position: sticky; top: 0; z-index: 1; }
#bp .bp-confirm { border: 1px solid rgba(var(--bs-danger-rgb), .35); background: rgba(var(--bs-danger-rgb), .04); border-radius: .6rem; padding: .75rem .9rem; }
#bp .bp-confirm[hidden] { display: none; }

/* Customers given a markup at once (Platform/Markups, ranma@mail.com only, 2026-11-27). */
#mk .mk-label { font-size: .78rem; font-weight: 700; text-transform: none; color: var(--bs-secondary-color); margin-bottom: .35rem; }
#mk .mk-table-box { max-height: 26rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
#mk .mk-table-box thead th { position: sticky; top: 0; z-index: 1; }
#mk .mk-tick-col { width: 2.25rem; }
#mk #mk-table tbody tr[data-row] { cursor: pointer; }
#mk #mk-table tbody tr.mk-row-on > td { background: var(--rn-primary-soft); }
#mk .mk-quick { padding-top: 1.55rem; }
#mk .mk-confirm { border: 1px solid rgba(var(--bs-danger-rgb), .35); background: rgba(var(--bs-danger-rgb), .04); border-radius: .6rem; padding: .75rem .9rem; }
#mk .mk-confirm[hidden] { display: none; }
@media (max-width: 575.98px) { #mk .mk-quick { padding-top: 0; } }
/* Items → Change sale prices at once (2026-11-28): the items found with ticks, the new price, every change shown, the confirmation. */
#sp .sp-label { font-size: .78rem; font-weight: 700; color: var(--bs-secondary-color); margin-bottom: .35rem; }
#sp .sp-table-box { max-height: 26rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
#sp .sp-table-box thead th { position: sticky; top: 0; z-index: 1; }
#sp .sp-tick-col { width: 2.25rem; }
#sp #sp-table tbody tr[data-row] { cursor: pointer; }
#sp #sp-table tbody tr.sp-row-on > td { background: var(--rn-primary-soft); }
#sp .sp-confirm { border: 1px solid rgba(var(--bs-danger-rgb), .35); background: rgba(var(--bs-danger-rgb), .04); border-radius: .6rem; padding: .75rem .9rem; }
#sp .sp-confirm[hidden], #sp [hidden] { display: none !important; }
#sp #sp-currency { max-width: 6rem; }
/* Platform → Expiry dates from a file (2026-11-28, ranma@mail.com): each row of the file with what it does, the confirmation. */
#ex .ex-label { font-size: .78rem; font-weight: 700; color: var(--bs-secondary-color); margin-bottom: .35rem; }
#ex .ex-table-box { max-height: 32rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
#ex .ex-table-box thead th { position: sticky; top: 0; z-index: 1; }
#ex #ex-rows tr.ex-do .ex-what { color: var(--rn-success-text); font-weight: 600; }
#ex #ex-rows tr.ex-next .ex-what { color: var(--rn-primary-text); font-weight: 600; }
#ex #ex-rows tr.ex-bad .ex-what { color: var(--rn-danger-text); font-weight: 600; }
#ex #ex-rows tr.ex-same .ex-what { color: var(--bs-secondary-color); }
#ex .ex-confirm { border: 1px solid rgba(var(--bs-danger-rgb), .35); background: rgba(var(--bs-danger-rgb), .04); border-radius: .6rem; padding: .75rem .9rem; }
#ex [hidden] { display: none !important; }

/* The keyboard's F keys (Settings → General, 2026-11-25): the key written on its button, small, in the button's own colour. */
[data-fkey-label]:not(input):not(textarea):not(select)::after {
    content: attr(data-fkey-label);
    display: inline-block;
    margin-inline-start: .4em;
    padding: .05em .32em;
    border: 1px solid currentColor;
    border-radius: .28rem;
    font: 600 .66em/1.25 ui-monospace, SFMono-Regular, Consolas, monospace;
    opacity: .7;
    vertical-align: .12em;
    direction: ltr;
    unicode-bidi: isolate;
}
.dropdown-item[data-fkey-label]::after { float: inline-end; margin-top: .2em; }
.fk-pressed { box-shadow: 0 0 0 .2rem rgba(var(--rn-primary-rgb), .35) !important; }
.fk-kbd { font-size: .8rem; background: var(--rn-primary); color: #fff; padding: .15rem .45rem; border-radius: .3rem; }
@media (hover: none) and (pointer: coarse) { [data-fkey-label]::after { content: none !important; } }
@media print { [data-fkey-label]::after { content: none !important; } }
#function-keys .fk-table td { padding-top: .4rem; padding-bottom: .4rem; }
#function-keys .fk-icon { width: 2rem; color: var(--rn-primary-text); font-size: 1.05rem; }
#function-keys .fk-pick { width: 8.5rem; }

/* Compact forms on a computer (2026-11-25, the user's choice "C" after pictures of four ways at their screen, 1920 × 1080 at 125%):
   smaller boxes and slim section heads, a long help line as an ⓘ beside its field's name (compact-form.js), the small parts beside
   the big ones, so a form fits the screen without scrolling and without tabs — SAP's compact density on desktops, Odoo's and Fiori's
   forms in columns. Every page with a save bar, and any .rn-compact; a mouse only: phones and tablets keep their roomy boxes. */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    :is(.app-content:has(.save-bar), .rn-compact) .page-header { margin-bottom: .4rem; gap: .5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .page-header h1 { font-size: 1.15rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .page-header p { font-size: .8rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .page-header .btn:not(.btn-sm) { padding: .22rem .65rem; font-size: .85rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .alert { padding: .35rem .75rem; margin-bottom: .45rem; font-size: .85rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .alert .btn { padding: .18rem .6rem; font-size: .8rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-control,
    :is(.app-content:has(.save-bar), .rn-compact) .form-select { min-height: 1.95rem; padding-block: .14rem; font-size: .86rem; line-height: 1.4; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-control { padding-inline: .5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-select { padding-inline-start: .5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.form-control-sm, .form-select-sm) { min-height: 1.75rem; font-size: .82rem; }
    :is(.app-content:has(.save-bar), .rn-compact) textarea.form-control { min-height: 3.1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .input-group-text { padding: .1rem .45rem; font-size: .84rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .input-group > .btn:not(.btn-sm) { padding-block: .1rem; font-size: .84rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-label { font-size: .76rem; margin-bottom: .1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-text { font-size: .72rem; margin-top: .1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .card-body { padding: .35rem .7rem .5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.g-3, .g-md-3, .g-lg-3, .g-xl-3, .g-4, .g-md-4) { --bs-gutter-y: .4rem; --bs-gutter-x: .65rem; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.g-2, .g-md-2, .g-lg-2) { --bs-gutter-y: .35rem; --bs-gutter-x: .5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .mb-3 { margin-bottom: .45rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.mb-4, .my-4) { margin-bottom: .6rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.py-4, .py-5) { padding-block: .6rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) .tx-bar { padding-block: .15rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-grid { gap: .45rem .75rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .form-grid .form-label { margin-bottom: .1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-head { padding: .35rem .7rem 0; gap: .5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-head h2 { font-size: .88rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-head p { display: none; } /* its words are the heading's tooltip */
    :is(.app-content:has(.save-bar), .rn-compact) .pf-head-icon { width: 1.55rem; height: 1.55rem; font-size: .82rem; border-radius: .4rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-chip label { padding: .2rem .75rem; font-size: .83rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-active { padding: .35rem .65rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-hero .item-picture,
    :is(.app-content:has(.save-bar), .rn-compact) .item-picture { width: 6rem; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.item-layout, .item-main, .item-top, .item-side) { gap: .55rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .item-side { grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); } /* the stock cards up to four a row under the units */
    :is(.app-content:has(.save-bar), .rn-compact) .item-side .pf-head > div { min-width: 0; }
    :is(.app-content:has(.save-bar), .rn-compact) .item-side .pf-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    :is(.app-content:has(.save-bar), .rn-compact) .item-side .btn { white-space: nowrap; }
    :is(.app-content:has(.save-bar), .rn-compact) .item-side .item-stats { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); column-gap: .4rem; } /* side by side in a wide card */
    :is(.app-content:has(.save-bar), .rn-compact) .item-flag { padding: .28rem 0; }
    :is(.app-content:has(.save-bar), .rn-compact) .item-stats { gap: .25rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .item-stats > div { padding: .22rem .55rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-head .btn:not(.btn-sm) { padding: .15rem .55rem; font-size: .8rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .card-body > p.small { margin-bottom: .35rem !important; font-size: .78rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .card-body > .d-flex > .btn:not(.btn-sm) { padding: .22rem .65rem; font-size: .84rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .save-bar { padding-block: .4rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .save-bar .btn { padding: .32rem 1.1rem; font-size: .95rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pf-terms > .fg-wide { grid-column: auto; }
    :is(.app-content:has(.save-bar), .rn-compact) .card-body .btn:not(.btn-sm, .btn-link, .btn-close, .tx-btn) { padding: .22rem .7rem; font-size: .85rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .card-body .btn-group > .btn { padding-block: .22rem; }
    /* The user page: a slimmer band, the effective access one short line a module. */
    :is(.app-content:has(.save-bar), .rn-compact) .user-hero { padding: .4rem 1rem; gap: .75rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .user-avatar { width: 2.6rem; height: 2.6rem; font-size: 1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .user-hero-name { font-size: 1.1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .user-hero-stats > div { padding: .12rem .5rem; min-width: 3.8rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .user-hero-stats span { font-size: 1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .access-list li { padding: .1rem 0; font-size: .82rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .access-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); column-gap: 1.25rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .access-level { min-width: 5.5rem; padding-block: .05rem; font-size: .74rem; }
    /* The role page: the sections' table one short line a section, the special permissions one under another beside it. */
    :is(.app-content:has(.save-bar), .rn-compact) .role-matrix td, :is(.app-content:has(.save-bar), .rn-compact) .role-matrix th { padding: .12rem .35rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .role-level { min-width: 7.5rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .role-legend { gap: .25rem; margin-bottom: .3rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) .role-chip { padding: .08rem .45rem; font-size: .72rem; }
    :is(.app-content:has(.save-bar), .rn-compact) :is(.role-special, .role-pick) { padding: .1rem .5rem; gap: .45rem; font-size: .82rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .role-matrix .form-select { min-height: 1.6rem; padding-block: 0; font-size: .8rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .role-layout { gap: .55rem; }
    /* Business type and parts: small tiles, one short line a part. */
    :is(.app-content:has(.save-bar), .rn-compact) .business-types .choice label { padding: .22rem .5rem; gap: .4rem; font-size: .8rem; line-height: 1.25; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-parts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); column-gap: 1rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pd-phone + .pd-phone { margin-top: .3rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pd-intro { margin: -.35rem 0 .35rem !important; font-size: .76rem; }
    :is(.app-content:has(.save-bar), .rn-compact) #pd-ready { gap: .25rem !important; margin-top: .3rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) #pd-ready .btn { padding: .08rem .45rem; font-size: .76rem; }
    :is(.app-content:has(.save-bar), .rn-compact) #pd-form .form-switch.mt-3 { margin-top: .35rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) .pd-swatch { width: 1.6rem; height: 1.6rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .pd-brand { margin-bottom: .35rem !important; }
    :is(.app-content:has(.save-bar), .rn-compact) .pd-brand-logo { width: 3rem; height: 2.3rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-types .setup-tick { display: none; } /* the chosen tile is tinted */
    :is(.app-content:has(.save-bar), .rn-compact) .business-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .3rem; margin: 0; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-types > .choice { width: auto; max-width: none; padding: 0; margin: 0; }
    :is(.app-content:has(.save-bar), .rn-compact) #markup-base { gap: .05rem .75rem !important; margin-top: .1rem !important; font-size: .76rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-part:has(#markup-base) { grid-column: span 2; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-types .choice label > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-type-icon { width: 1.6rem; height: 1.6rem; font-size: .9rem; border-radius: .45rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-part { margin-bottom: 0 !important; gap: .5rem !important; align-items: center !important; padding-block: .05rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-part .kpi-icon { width: 1.45rem !important; height: 1.45rem !important; font-size: .78rem !important; border-radius: .4rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-part .form-check { margin-bottom: 0 !important; }
    :is(.app-content:has(.save-bar), .rn-compact) .business-part .form-check-label { font-size: .86rem; }
    :is(.app-content:has(.save-bar), .rn-compact) .cf-hint-moved { display: none !important; }
    .cf-info { display: inline-block; margin-inline-start: .25rem; color: var(--rn-text-muted); font-size: .9em; font-weight: 400; cursor: help; vertical-align: baseline; }
    .cf-info:hover, .cf-info:focus { color: var(--rn-primary-text); outline: none; }
}
.cf-info { display: none; }
@media (min-width: 992px) and (hover: hover) and (pointer: fine) { .cf-info { display: inline-block; } }

/* =====================================================================
   How Ranma looks (2026-11-25; Application/Platform/Looks): the business's colour (Settings → General, <html data-accent>) and
   each user's text size (the account menu, <html data-font>). Each colour was checked for white text on it, its own text on its
   soft tint and the menu's text on the menu (4.5:1 or more). Only the app's own pages take them: prints, PDFs and Excel have
   pages of their own and keep their colour (the print design). A swatch on the settings page takes its colour from
   data-accent-tile, whatever colour the page has now.
   ===================================================================== */
[data-accent-tile="blue"] {
    --rn-primary: #114987; --rn-primary-hover: #0c3768; --rn-primary-soft: #e8eef7; --rn-primary-rgb: 17, 73, 135;
    --rn-sidebar: #0b2f57; --rn-sidebar-text: #c5d3e6;
}
:root[data-accent="teal"], [data-accent-tile="teal"] {
    --rn-primary: #0f766e; --rn-primary-hover: #0c5e58; --rn-primary-soft: #e7f1f0; --rn-primary-rgb: 15, 118, 110;
    --rn-sidebar: #0a4c46; --rn-sidebar-text: #cae1df;
}
:root[data-accent="green"], [data-accent-tile="green"] {
    --rn-primary: #166534; --rn-primary-hover: #12512a; --rn-primary-soft: #e8f0eb; --rn-primary-rgb: 22, 101, 52;
    --rn-sidebar: #0e4121; --rn-sidebar-text: #ccddd2;
}
:root[data-accent="indigo"], [data-accent-tile="indigo"] {
    --rn-primary: #4338ca; --rn-primary-hover: #362da2; --rn-primary-soft: #ecebfa; --rn-primary-rgb: 67, 56, 202;
    --rn-sidebar: #2b2481; --rn-sidebar-text: #d6d3f3;
}
:root[data-accent="purple"], [data-accent-tile="purple"] {
    --rn-primary: #6b21a8; --rn-primary-hover: #561a86; --rn-primary-soft: #f0e9f6; --rn-primary-rgb: 107, 33, 168;
    --rn-sidebar: #44156c; --rn-sidebar-text: #deceec;
}
:root[data-accent="maroon"], [data-accent-tile="maroon"] {
    --rn-primary: #9f1239; --rn-primary-hover: #7f0e2e; --rn-primary-soft: #f5e7eb; --rn-primary-rgb: 159, 18, 57;
    --rn-sidebar: #660c24; --rn-sidebar-text: #eacbd3;
}
:root[data-accent="brown"], [data-accent-tile="brown"] {
    --rn-primary: #7a4b24; --rn-primary-hover: #623c1d; --rn-primary-soft: #f2ede9; --rn-primary-rgb: 122, 75, 36;
    --rn-sidebar: #4e3017; --rn-sidebar-text: #e2d7cf;
}
:root[data-accent="graphite"], [data-accent-tile="graphite"] {
    --rn-primary: #374151; --rn-primary-hover: #2c3441; --rn-primary-soft: #ebecee; --rn-primary-rgb: 55, 65, 81;
    --rn-sidebar: #232a34; --rn-sidebar-text: #d3d5d9;
}

/* Bootstrap's own blue follows the brand too (ticks, switches, pills, the active item of a menu, progress bars). */
.form-check-input:checked, .form-check-input[type=checkbox]:indeterminate { background-color: var(--rn-primary); border-color: var(--rn-primary); }
.btn-primary, .btn-outline-primary { --bs-btn-focus-shadow-rgb: var(--rn-primary-rgb); --bs-btn-disabled-border-color: var(--rn-primary);
    --bs-btn-active-border-color: var(--rn-primary-hover); }
.btn-outline-primary { --bs-btn-disabled-color: var(--rn-primary); }
:root { --bs-primary-text-emphasis: var(--rn-primary-hover); --bs-primary-bg-subtle: var(--rn-primary-soft);
    --bs-primary-border-subtle: color-mix(in srgb, var(--rn-primary) 30%, #fff); }
.form-check-input:focus { border-color: color-mix(in srgb, var(--rn-primary) 45%, var(--k-bd-ffffff, #fff)); box-shadow: 0 0 0 .2rem rgba(var(--rn-primary-rgb), .2); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--rn-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--rn-primary); }
.pagination { --bs-pagination-active-bg: var(--rn-primary); --bs-pagination-active-border-color: var(--rn-primary); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--rn-primary); }
.list-group { --bs-list-group-active-bg: var(--rn-primary); --bs-list-group-active-border-color: var(--rn-primary); }
.form-range::-webkit-slider-thumb { background-color: var(--rn-primary); }
.form-range::-moz-range-thumb { background-color: var(--rn-primary); }

/* Each user's text size: every rem of the app grows or shrinks with it (15px is the normal size). */
html[data-font="small"] { font-size: 14px; }
html[data-font="large"] { font-size: 16.5px; }
html[data-font="larger"] { font-size: 18px; }

/* The account menu's text size: four letters, the chosen one filled. */
.look-font { padding: .35rem 1rem .55rem; min-width: 15rem; }
.look-font-title { font-size: .85rem; font-weight: 600; color: var(--rn-text-muted); margin-bottom: .35rem; }
.look-font-sizes { display: flex; gap: .3rem; }
.look-font-size { flex: 1 1 0; min-width: 2.4rem; height: 2.2rem; display: grid; place-items: center; padding: 0; line-height: 1;
    border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--rn-surface); color: var(--rn-text); font-weight: 700; }
.look-font-size:hover { border-color: var(--rn-primary); color: var(--rn-primary-text); }
/* The letters grow from the smallest to the largest, so the four read as sizes at a glance (in px: the menu's own text keeps its size). */
.look-font-0 { font-size: 11px; } .look-font-1 { font-size: 14px; } .look-font-2 { font-size: 18px; } .look-font-3 { font-size: 23px; }
.look-font-size.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }

/* Settings → General: a tile per colour, a small picture of Ranma in it (the menu, a table's heading, a button). */
.look-accents { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .5rem; }
.look-accent { display: flex; flex-direction: column; gap: .35rem; margin: 0; padding: .4rem; cursor: pointer;
    border: 2px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--rn-surface); }
.look-accent:hover { border-color: rgba(var(--rn-primary-rgb), .5); }
.btn-check:checked + .look-accent { border-color: var(--rn-primary); box-shadow: 0 0 0 .15rem rgba(var(--rn-primary-rgb), .22); }
.btn-check:focus-visible + .look-accent { outline: 2px solid var(--rn-primary); outline-offset: 2px; }
.look-accent-swatch { display: flex; height: 3rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--rn-border); }
.look-accent-side { flex: 0 0 30%; background: var(--rn-sidebar); }
.look-accent-main { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: .35rem; background: var(--k-bg-f5f7fb, #f5f7fb); }
.look-accent-bar { height: .5rem; border-radius: 3px; background: var(--rn-primary-soft); border-bottom: 2px solid rgba(var(--rn-primary-rgb), .3); }
.look-accent-button { align-self: flex-end; width: 45%; height: .8rem; border-radius: 4px; background: var(--rn-primary); }
.look-accent-name { font-size: .8rem; font-weight: 600; text-align: center; color: var(--rn-text); }
.btn-check:checked + .look-accent .look-accent-name { color: var(--rn-primary-text); font-weight: 700; }

/* =====================================================================
   The dark mode (2026-11-25, the looks' phase 2): each user's choice in the account menu (light, dark, as the device) —
   <html data-mode="dark" data-bs-theme="dark"> (theme-mode.js; Bootstrap's own dark mode does the form boxes, menus and windows).
   Ranma's own colours turn by the tokens of the block at the end, written by tools/dev/dark-mode.py: run it after editing this file.
   Here, by hand: what Bootstrap keeps light in its dark mode, and Ranma's surfaces.
   ===================================================================== */
html[data-mode="dark"] body { background: var(--rn-bg); }
html[data-mode="dark"] .card { --bs-card-bg: var(--rn-surface); --bs-card-cap-bg: transparent; }
html[data-mode="dark"] .modal { --bs-modal-bg: var(--rn-surface); --bs-modal-border-color: var(--rn-border); }
html[data-mode="dark"] .dropdown-menu { --bs-dropdown-bg: var(--rn-surface); --bs-dropdown-border-color: var(--rn-border);
    --bs-dropdown-link-hover-bg: #243044; --bs-dropdown-link-color: var(--rn-text); }
html[data-mode="dark"] .offcanvas:not(.app-menu) { --bs-offcanvas-bg: var(--rn-surface); }
html[data-mode="dark"] .list-group { --bs-list-group-bg: var(--rn-surface); --bs-list-group-border-color: var(--rn-border); }
html[data-mode="dark"] .popover { --bs-popover-bg: var(--rn-surface); }
html[data-mode="dark"] .btn-light { --bs-btn-color: var(--rn-text); --bs-btn-bg: #1f2a3b; --bs-btn-border-color: #1f2a3b;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #2a374b; --bs-btn-hover-border-color: #2a374b; --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #334259; --bs-btn-active-border-color: #334259; --bs-btn-disabled-color: var(--rn-text-muted);
    --bs-btn-disabled-bg: #1f2a3b; --bs-btn-disabled-border-color: #1f2a3b; }
html[data-mode="dark"] .btn-outline-secondary { --bs-btn-color: #b8c3d1; --bs-btn-border-color: #4a586d; --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2a374b; --bs-btn-hover-border-color: #5b6b82; --bs-btn-active-color: #fff; --bs-btn-active-bg: #334259;
    --bs-btn-active-border-color: #5b6b82; --bs-btn-disabled-color: #7d8899; --bs-btn-disabled-border-color: #3a475a; }
html[data-mode="dark"] .btn-outline-dark { --bs-btn-color: var(--rn-text); --bs-btn-border-color: #5b6b82; --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2a374b; --bs-btn-hover-border-color: #5b6b82; }
html[data-mode="dark"] .btn-outline-success { --bs-btn-color: #63d297; --bs-btn-border-color: #3f9e6a; --bs-btn-hover-bg: #1f7a48; --bs-btn-hover-border-color: #1f7a48; --bs-btn-active-bg: #1f7a48; }
html[data-mode="dark"] .btn-outline-danger { --bs-btn-color: #f4878b; --bs-btn-border-color: #c4545c; --bs-btn-hover-bg: #b42f39; --bs-btn-hover-border-color: #b42f39; --bs-btn-active-bg: #b42f39; }
html[data-mode="dark"] .btn-outline-warning { --bs-btn-color: #f3c55b; --bs-btn-border-color: #b88a2a; --bs-btn-hover-color: #1b1300; }
html[data-mode="dark"] .btn-outline-info { --bs-btn-color: #6ccbe3; --bs-btn-border-color: #3c95ac; --bs-btn-hover-color: #062029; }
html[data-mode="dark"] .btn-outline-primary { --bs-btn-color: var(--rn-primary-text); --bs-btn-border-color: var(--rn-primary-text);
    --bs-btn-disabled-color: var(--rn-primary-text); --bs-btn-disabled-border-color: var(--rn-primary-text); }
html[data-mode="dark"] .table-light { --bs-table-color: var(--rn-text); --bs-table-bg: #1c2638; --bs-table-border-color: var(--rn-border);
    --bs-table-striped-bg: #222d40; --bs-table-striped-color: var(--rn-text); --bs-table-hover-bg: #253247; --bs-table-hover-color: var(--rn-text);
    --bs-table-active-bg: #2a374b; --bs-table-active-color: var(--rn-text); color: var(--rn-text); }
html[data-mode="dark"] .text-bg-light { color: var(--rn-text) !important; background-color: #243044 !important; }
html[data-mode="dark"] :is(.bg-white, .bg-light, .bg-body) { background-color: var(--rn-surface) !important; }
html[data-mode="dark"] :is(.text-secondary, .text-muted, .text-body-secondary) { color: var(--rn-text-muted) !important; }
html[data-mode="dark"] :is(.text-dark, .text-black, .text-body) { color: var(--rn-text) !important; }
html[data-mode="dark"] .text-primary { color: var(--rn-primary-text) !important; }
html[data-mode="dark"] .text-danger { color: #f4878b !important; }
html[data-mode="dark"] .text-success { color: #5ccf8e !important; }
html[data-mode="dark"] .text-warning { color: #f3c55b !important; }
html[data-mode="dark"] .text-info { color: #6ccbe3 !important; }
html[data-mode="dark"] .link-secondary { color: var(--rn-text-muted) !important; }
html[data-mode="dark"] .border-light { border-color: var(--rn-border) !important; }
html[data-mode="dark"] .form-check-input:not(:checked) { background-color: #0f1724; border-color: #4a586d; }
html[data-mode="dark"] .form-control::placeholder { color: rgba(226, 232, 240, .45); }

/* The account menu's light / dark / as the device. */
.look-theme { display: flex; gap: .3rem; }
.look-theme-choice { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .25rem; line-height: 1.1;
    border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); background: var(--rn-surface); color: var(--rn-text); font-size: .72rem; font-weight: 600; }
.look-theme-choice i { font-size: 1.05rem; }
.look-theme-choice:hover { border-color: var(--rn-primary); color: var(--rn-primary-text); }
.look-theme-choice.active { background: var(--rn-primary); border-color: var(--rn-primary); color: #fff; }

/* =====================================================================
   The activity log (2026-11-26; Pages/Activity, the dashboard's "Today's activity"): what was done (a pill: made, changed, cancelled,
   deleted), the marks that make a row worth a look, and each change old (struck) → new.
   ===================================================================== */
.act-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.act-pill-made { background: var(--k-bg-e7f6ec, #e7f6ec); color: var(--rn-success-text); }
.act-pill-changed { background: var(--rn-primary-soft); color: var(--rn-primary-text); }
.act-pill-cancelled { background: var(--k-bg-fdecec, #fdecec); color: var(--rn-danger-text); }
.act-pill-deleted { background: var(--k-bg-eef0f3, #eef0f3); color: var(--k-fg-3f4754, #3f4754); }
.act-pill-done { background: var(--k-bg-fdf0e3, #fdf0e3); color: var(--k-fg-8a4a06, #8a4a06); }
.act-flag { display: inline-block; margin-inline-start: .25rem; padding: .05rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 600;
    white-space: nowrap; background: var(--k-bg-fdf0e3, #fdf0e3); color: var(--k-fg-8a4a06, #8a4a06); }
.act-source { display: inline-block; font-size: .75rem; color: var(--rn-text-muted); white-space: nowrap; }
.act-look > td { background: rgba(253, 240, 227, .45); }
.act-kind { display: block; font-size: .75rem; color: var(--rn-text-muted); white-space: nowrap; }
.act-number { font-weight: 600; }
.act-changes-col { min-width: 16rem; }
.app-content .table td.act-changes { font-size: .82rem; line-height: 1.35; }
.act-change { display: inline; }
div.act-change { display: block; }
.act-field { color: var(--rn-text-muted); margin-inline-end: .2rem; }
.act-from { color: var(--rn-danger-text); text-decoration-thickness: 1px; }
.act-to { color: var(--rn-success-text); text-decoration: none; font-weight: 600; }
.act-arrow { font-size: .75em; margin: 0 .25rem; color: var(--rn-text-muted); }
html[dir="ltr"] .act-arrow { display: inline-block; transform: scaleX(-1); }
.act-more { display: flex; flex-wrap: wrap; gap: .1rem .6rem; font-size: .75rem; color: var(--rn-text-muted); }
.act-lines-added { color: var(--rn-success-text); }
.act-lines-removed { color: var(--rn-danger-text); }
.act-note { font-size: .82rem; }
/* The detail window. */
.act-detail-what { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: 1.05rem; margin-bottom: .5rem; }
.act-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .35rem .9rem; margin-bottom: .75rem; }
.act-facts dt { font-size: .72rem; font-weight: 600; color: var(--rn-text-muted); }
.act-facts dd { margin: 0; font-size: .88rem; }
.act-table td, .act-table th { vertical-align: middle; }
.act-from-cell { color: var(--rn-danger-text); }
.act-to-cell { color: var(--rn-success-text); font-weight: 600; }
.act-lines { display: grid; gap: .4rem; }
.act-line { padding: .4rem .6rem; border: 1px solid var(--rn-border); border-inline-start-width: 4px; border-radius: var(--rn-radius-sm); }
.act-line-added { border-inline-start-color: #15803d; }
.act-line-removed { border-inline-start-color: #b91c1c; }
.act-line-changed { border-inline-start-color: var(--rn-primary); }
.act-line-state { font-size: .72rem; font-weight: 700; color: var(--rn-text-muted); }
.act-line-values { display: flex; flex-wrap: wrap; gap: .15rem .9rem; font-size: .82rem; margin-top: .15rem; }
/* The dashboard's card. */
.act-today-counts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .5rem; }
.act-count { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
    background: var(--rn-primary-soft); color: var(--rn-primary-text); text-decoration: none; }
.act-count .num { font-size: .95rem; font-weight: 800; }
.act-count-bad { background: var(--k-bg-fdecec, #fdecec); color: var(--rn-danger-text); }
.act-person { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem;
    border: 1px solid var(--rn-border); color: var(--rn-text); }
.act-today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: .5rem 1.25rem; }
.act-today-title { font-size: .8rem; font-weight: 700; color: var(--rn-text-muted); margin: .25rem 0 .3rem; }
.act-today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .82rem; }
.act-today-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem; padding-bottom: .25rem; border-bottom: 1px dashed var(--rn-border); }
.act-today-list li:last-child { border-bottom: 0; }

/* The History button of a record's own page and its window (the activity log, 2026-11-27). */
.act-story-btn { position: fixed; inset-inline-start: 1rem; bottom: 1rem; z-index: 1040; display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem .85rem; border: 1px solid var(--rn-border); border-radius: 999px; background: var(--rn-surface); color: var(--rn-primary-text);
    font-size: .85rem; font-weight: 600; box-shadow: var(--rn-shadow); }
.act-story-btn:hover { border-color: var(--rn-primary); }
.act-story-dialog { width: min(46rem, calc(100vw - 2rem)); max-height: min(80vh, 46rem); padding: 0; border: 1px solid var(--rn-border);
    border-radius: var(--rn-radius); background: var(--rn-surface); color: var(--rn-text); }
.act-story-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.act-story-top { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .9rem;
    border-bottom: 1px solid var(--rn-border); background: var(--rn-surface); }
.act-story-body { padding: .75rem .9rem; overflow: auto; }
.act-story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.act-story-item { padding: .5rem .65rem; border: 1px solid var(--rn-border); border-radius: var(--rn-radius-sm); font-size: .85rem; }
.act-story-head { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-bottom: .2rem; }
@media print { .act-story-btn, .act-story-dialog { display: none !important; } }

/* dark-mode:start — written by tools/dev/dark-mode.py: never edit by hand */
html[data-mode="dark"] {
    color-scheme: dark;
    --rn-bg: #0d1420;
    --rn-surface: #161f2d;
    --rn-border: #283548;
    --rn-text: #e2e8f0;
    --rn-text-muted: #9aa7ba;
    --rn-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .35);
    --rn-primary: #326298;
    --rn-primary-hover: #2b5481;
    --rn-primary-soft: #1d2f47;
    --rn-primary-rgb: 50, 98, 152;
    --rn-primary-text: #83a0c1;
    --rn-primary-text-rgb: 131, 160, 193;
    --rn-success: #15803d;
    --rn-success-soft: #163431;
    --rn-success-text: #65ab7f;
    --rn-danger: #b91c1c;
    --rn-danger-soft: #3a1e29;
    --rn-danger-text: #d98484;
    --rn-accent-soft: #3f382e;
    --rn-accent-text: #fbc46a;
    --bs-primary-text-emphasis: var(--rn-primary-text);
    --bs-primary-bg-subtle: var(--rn-primary-soft);
    --bs-primary-border-subtle: color-mix(in srgb, var(--rn-primary) 45%, var(--rn-surface));
    --bs-secondary-bg: #222d3f;
    --bs-tertiary-bg: #1b2535;
    --bs-secondary-color: rgba(226, 232, 240, .72);
    --k-bd-000000: #9e9e9e;
    --k-bd-333333: #9e9e9e;
    --k-bd-93c5fd: #264971;
    --k-bd-9ec5f4: #2a486c;
    --k-bd-9ec5fe: #25426e;
    --k-bd-a9dcbf: #3c604b;
    --k-bd-b7e3c6: #385b44;
    --k-bd-b7e4c7: #375c44;
    --k-bd-b8c7e8: #34415d;
    --k-bd-b9e3cc: #385a48;
    --k-bd-c3ccd9: #404852;
    --k-bd-c3e4cf: #385643;
    --k-bd-c8d2df: #3d4651;
    --k-bd-c9d6e8: #364254;
    --k-bd-c9daf1: #2d4059;
    --k-bd-c9dafc: #213661;
    --k-bd-cfd8e3: #3b444f;
    --k-bd-cfe3d8: #3b4f44;
    --k-bd-cfe9da: #365141;
    --k-bd-d3dae6: #39414e;
    --k-bd-d5e0ee: #324051;
    --k-bd-d8dee8: #39404b;
    --k-bd-e5e7eb: #3a3d43;
    --k-bd-eef0f3: #363a41;
    --k-bd-eef2f7: #2f3946;
    --k-bd-f1aeb5: #652c32;
    --k-bd-f3c88f: #71532c;
    --k-bd-f5c2c0: #5f2b29;
    --k-bd-f5d79b: #6e572a;
    --k-bd-f6c9c5: #5e2c28;
    --k-bd-f6d29b: #6e5329;
    --k-bd-f6dfa8: #695628;
    --k-bd-f9d58f: #735927;
    --k-bd-fde1b0: #694f23;
    --k-bd-fecaca: #612020;
    --k-bd-fecdca: #612420;
    --k-bd-fedf89: #746027;
    --k-bd-ffffff: #273245;
    --k-bg-ccfbf1: #19453b;
    --k-bg-cde2fb: #192d44;
    --k-bg-d0d5dd: #303439;
    --k-bg-d1fadf: #1a4227;
    --k-bg-dbeafe: #152840;
    --k-bg-dcfce7: #173f25;
    --k-bg-dee2e6: #2c2f33;
    --k-bg-e0f2fe: #152e3e;
    --k-bg-e2e8f0: #252b34;
    --k-bg-e5e7eb: #2a2c30;
    --k-bg-e5ebf3: #222a34;
    --k-bg-e6f4ea: #213427;
    --k-bg-e7ebf0: #262b31;
    --k-bg-e7f6ec: #1f3426;
    --k-bg-e7f6ee: #1f3429;
    --k-bg-e8eef6: #202834;
    --k-bg-e8f0fa: #1a2737;
    --k-bg-e8f0fb: #192638;
    --k-bg-e8f5ee: #213329;
    --k-bg-e9ecef: #272b2f;
    --k-bg-e9f5ee: #213228;
    --k-bg-e9f6ee: #203327;
    --k-bg-eaf1f9: #1c2835;
    --k-bg-eaf1fb: #192537;
    --k-bg-eaf7f0: #1f3328;
    --k-bg-ececec: #1f2837;
    --k-bg-eef0f2: #26292c;
    --k-bg-eef0f3: #25282d;
    --k-bg-eef1f5: #23282e;
    --k-bg-eef2f7: #202730;
    --k-bg-eef3f9: #1d2732;
    --k-bg-eef3fa: #1c2533;
    --k-bg-eef3fc: #182336;
    --k-bg-eef4fc: #182536;
    --k-bg-eef4ff: #132139;
    --k-bg-eef6f0: #212f25;
    --k-bg-eef8f2: #1f3126;
    --k-bg-f0ecfb: #211936;
    --k-bg-f0faf4: #1c3225;
    --k-bg-f0fdfa: #16362f;
    --k-bg-f1f3f5: #24282b;
    --k-bg-f1f4f8: #20262e;
    --k-bg-f1f5f9: #1e272f;
    --k-bg-f1f5fa: #1d2631;
    --k-bg-f2f4f7: #22262c;
    --k-bg-f3f4f6: #24262a;
    --k-bg-f3f5f8: #21262c;
    --k-bg-f3f7fc: #192432;
    --k-bg-f3faf6: #1e2f25;
    --k-bg-f3fbf6: #1c3023;
    --k-bg-f4f7fb: #1c2430;
    --k-bg-f5f7fa: #1f242d;
    --k-bg-f5f7fb: #1d232e;
    --k-bg-f5f7fbf5: #1d232ef5;
    --k-bg-f5f8fc: #1a2430;
    --k-bg-f6f6f6: #1c2431;
    --k-bg-f6f8fb: #1d242d;
    --k-bg-f6f9fd: #182332;
    --k-bg-f6fbf8: #1d2d24;
    --k-bg-f7f9fc: #1c232e;
    --k-bg-f8f9fa: #222529;
    --k-bg-f8fafc: #1d252d;
    --k-bg-fafbfc: #1f2429;
    --k-bg-fafbfd: #1c212c;
    --k-bg-fbe3c4: #483419;
    --k-bg-fbeceb: #361b19;
    --k-bg-fbfaf5: #2e2b1d;
    --k-bg-fde8e8: #3b1616;
    --k-bg-fdecec: #391616;
    --k-bg-fdeeee: #381616;
    --k-bg-fdf0e3: #3d2916;
    --k-bg-fdf0f0: #361616;
    --k-bg-fdf0f1: #361619;
    --k-bg-fee2e2: #3e1515;
    --k-bg-fef2f2: #371414;
    --k-bg-fef3c7: #473d18;
    --k-bg-fef3f2: #371714;
    --k-bg-ffe9a8: #51431b;
    --k-bg-ffe9c4: #483618;
    --k-bg-fff1c9: #463a17;
    --k-bg-fff3d6: #413516;
    --k-bg-fff4d6: #413616;
    --k-bg-fff4dc: #3f3215;
    --k-bg-fff4e0: #3e2f15;
    --k-bg-fff4e5: #3c2b14;
    --k-bg-fff5f5: #371212;
    --k-bg-fff6e5: #3c2e14;
    --k-bg-fff7ed: #3a2913;
    --k-bg-fff7f6: #371612;
    --k-bg-fff7f7: #361212;
    --k-bg-fff8e8: #3b2f14;
    --k-bg-fff8ea: #3b2e14;
    --k-bg-fff8ec: #3a2c13;
    --k-bg-fff8ef: #392813;
    --k-bg-fff8f7: #361712;
    --k-bg-fffaeb: #3a3113;
    --k-bg-fffbeb: #3a3313;
    --k-bg-ffffff: #161f2d;
    --k-bg-ffffffe6: #161f2de6;
    --k-bg-ffffffeb: #161f2deb;
    --k-fg-006300: #a0f4a0;
    --k-fg-027a48: #94f3cb;
    --k-fg-0369a1: #80c9f1;
    --k-fg-047857: #94f3d8;
    --k-fg-075985: #8ccef2;
    --k-fg-0b0b0b: #dfdfdf;
    --k-fg-0d366b: #97bff2;
    --k-fg-0d6efd: #5793ec;
    --k-fg-0f766e: #91f1ea;
    --k-fg-10243a: #b7d0eb;
    --k-fg-111827: #c6d0e6;
    --k-fg-114987: #87b9f0;
    --k-fg-14532d: #a8eac2;
    --k-fg-14613a: #9febc5;
    --k-fg-146c43: #99ecc5;
    --k-fg-15803d: #8decb0;
    --k-fg-166534: #9eeabb;
    --k-fg-198754: #8ae9bd;
    --k-fg-1b2636: #bfccdf;
    --k-fg-1d2b3a: #bdcdde;
    --k-fg-1d5b33: #a6e3bc;
    --k-fg-1d7a45: #93e5b6;
    --k-fg-1e40af: #738ee7;
    --k-fg-1e6b43: #9ce3be;
    --k-fg-1e7b3a: #92e4ab;
    --k-fg-1e7b45: #92e4b5;
    --k-fg-1e7b4a: #92e4b9;
    --k-fg-1f2937: #c0ccdc;
    --k-fg-1f6b3a: #9de2b5;
    --k-fg-1f9d6b: #7ee6bc;
    --k-fg-334155: #b0bdd0;
    --k-fg-33465c: #acbdd1;
    --k-fg-344054: #b1bccf;
    --k-fg-374151: #b4bdcc;
    --k-fg-3f4754: #b4bbc6;
    --k-fg-44566b: #a5b4c6;
    --k-fg-475467: #a8b3c3;
    --k-fg-475569: #a7b3c3;
    --k-fg-4b5563: #acb4c0;
    --k-fg-52514e: #bbbab8;
    --k-fg-52606f: #a5b0bc;
    --k-fg-555555: #b7b7b7;
    --k-fg-5b3fb5: #9885d4;
    --k-fg-5b6470: #a5acb6;
    --k-fg-5b6775: #a2acb7;
    --k-fg-667085: #99a1b1;
    --k-fg-6b4300: #f4d39c;
    --k-fg-6b4600: #f4d69c;
    --k-fg-6b7280: #9da2ad;
    --k-fg-6b7a8c: #95a0ae;
    --k-fg-6b7c90: #939fae;
    --k-fg-6c757d: #9fa6ac;
    --k-fg-7a4b00: #f3cf95;
    --k-fg-7f1d1d: #e69090;
    --k-fg-8a4a06: #f2bf8a;
    --k-fg-8a4b00: #f2c48d;
    --k-fg-8a5300: #f2ca8d;
    --k-fg-8a5a00: #f2cf8d;
    --k-fg-8a6200: #f2d58d;
    --k-fg-8f1d14: #ee8b84;
    --k-fg-92400e: #f1ac82;
    --k-fg-9a2f22: #e38b81;
    --k-fg-9a3412: #f0997d;
    --k-fg-9a5b00: #f1c585;
    --k-fg-b0170f: #ef7973;
    --k-fg-b02a37: #de757f;
    --k-fg-b25e09: #f0b275;
    --k-fg-b26a00: #f0c079;
    --k-fg-b42318: #ec786f;
    --k-fg-b45309: #f0a974;
    --k-fg-b54708: #f0a174;
    --k-fg-b7791f: #e7b66f;
    --k-fg-b91c1c: #e96d6d;
    --k-fg-c0392b: #de766c;
    --k-fg-c77700: #efbb6f;
    --k-fg-d92d20: #e86d64;
    --k-fg-d97706: #eead63;
    --k-fg-dc3545: #e66e79;
    --k-fg-e8590c: #ec8c58;
    --k-fg-ea580c: #ec8a57;
    --k-fg-f5b301: #ecc457;
}
html[data-mode="dark"][data-accent="teal"] { --rn-primary: #0f766e; --rn-primary-hover: #0d645e; --rn-primary-soft: #14343d; --rn-primary-rgb: 15, 118, 110; --rn-primary-text: #65a7a2; --rn-primary-text-rgb: 101, 167, 162; }
html[data-mode="dark"][data-accent="green"] { --rn-primary: #246e40; --rn-primary-hover: #1f5e37; --rn-primary-soft: #193232; --rn-primary-rgb: 36, 110, 64; --rn-primary-text: #7da98d; --rn-primary-text-rgb: 125, 169, 141; }
html[data-mode="dark"][data-accent="indigo"] { --rn-primary: #564ccf; --rn-primary-hover: #4941b0; --rn-primary-soft: #252a54; --rn-primary-rgb: 86, 76, 207; --rn-primary-text: #9994e2; --rn-primary-text-rgb: 153, 148, 226; }
html[data-mode="dark"][data-accent="purple"] { --rn-primary: #8040b4; --rn-primary-hover: #6d3699; --rn-primary-soft: #2f274d; --rn-primary-rgb: 128, 64, 180; --rn-primary-text: #b590d4; --rn-primary-text-rgb: 181, 144, 212; }
html[data-mode="dark"][data-accent="maroon"] { --rn-primary: #ac3355; --rn-primary-hover: #932c48; --rn-primary-soft: #3a2437; --rn-primary-rgb: 172, 51, 85; --rn-primary-text: #cf889c; --rn-primary-text-rgb: 207, 136, 156; }
html[data-mode="dark"][data-accent="brown"] { --rn-primary: #825631; --rn-primary-hover: #6e492a; --rn-primary-soft: #302c2e; --rn-primary-rgb: 130, 86, 49; --rn-primary-text: #b59a84; --rn-primary-text-rgb: 181, 154, 132; }
html[data-mode="dark"][data-accent="graphite"] { --rn-primary: #5b6370; --rn-primary-hover: #4d545f; --rn-primary-soft: #272f3d; --rn-primary-rgb: 91, 99, 112; --rn-primary-text: #979ca5; --rn-primary-text-rgb: 151, 156, 165; }
html[data-mode="dark"] :is(.invoice-a4, .receipt, .print-letterhead, .print-letterfoot) {
    color-scheme: light; color: #1b2636;
    --rn-bg: #f5f7fb;
    --rn-surface: #ffffff;
    --rn-border: #e2e8f0;
    --rn-text: #1b2636;
    --rn-text-muted: #64748b;
    --rn-primary: #114987;
    --rn-primary-text: #114987;
    --rn-primary-soft: #e8eef7;
    --rn-primary-rgb: 17, 73, 135;
    --bs-body-color: #1b2636;
    --bs-body-bg: #ffffff;
    --bs-border-color: #e2e8f0;
    --k-bd-000000: initial;
    --k-bd-333333: initial;
    --k-bd-93c5fd: initial;
    --k-bd-9ec5f4: initial;
    --k-bd-9ec5fe: initial;
    --k-bd-a9dcbf: initial;
    --k-bd-b7e3c6: initial;
    --k-bd-b7e4c7: initial;
    --k-bd-b8c7e8: initial;
    --k-bd-b9e3cc: initial;
    --k-bd-c3ccd9: initial;
    --k-bd-c3e4cf: initial;
    --k-bd-c8d2df: initial;
    --k-bd-c9d6e8: initial;
    --k-bd-c9daf1: initial;
    --k-bd-c9dafc: initial;
    --k-bd-cfd8e3: initial;
    --k-bd-cfe3d8: initial;
    --k-bd-cfe9da: initial;
    --k-bd-d3dae6: initial;
    --k-bd-d5e0ee: initial;
    --k-bd-d8dee8: initial;
    --k-bd-e5e7eb: initial;
    --k-bd-eef0f3: initial;
    --k-bd-eef2f7: initial;
    --k-bd-f1aeb5: initial;
    --k-bd-f3c88f: initial;
    --k-bd-f5c2c0: initial;
    --k-bd-f5d79b: initial;
    --k-bd-f6c9c5: initial;
    --k-bd-f6d29b: initial;
    --k-bd-f6dfa8: initial;
    --k-bd-f9d58f: initial;
    --k-bd-fde1b0: initial;
    --k-bd-fecaca: initial;
    --k-bd-fecdca: initial;
    --k-bd-fedf89: initial;
    --k-bd-ffffff: initial;
    --k-bg-ccfbf1: initial;
    --k-bg-cde2fb: initial;
    --k-bg-d0d5dd: initial;
    --k-bg-d1fadf: initial;
    --k-bg-dbeafe: initial;
    --k-bg-dcfce7: initial;
    --k-bg-dee2e6: initial;
    --k-bg-e0f2fe: initial;
    --k-bg-e2e8f0: initial;
    --k-bg-e5e7eb: initial;
    --k-bg-e5ebf3: initial;
    --k-bg-e6f4ea: initial;
    --k-bg-e7ebf0: initial;
    --k-bg-e7f6ec: initial;
    --k-bg-e7f6ee: initial;
    --k-bg-e8eef6: initial;
    --k-bg-e8f0fa: initial;
    --k-bg-e8f0fb: initial;
    --k-bg-e8f5ee: initial;
    --k-bg-e9ecef: initial;
    --k-bg-e9f5ee: initial;
    --k-bg-e9f6ee: initial;
    --k-bg-eaf1f9: initial;
    --k-bg-eaf1fb: initial;
    --k-bg-eaf7f0: initial;
    --k-bg-ececec: initial;
    --k-bg-eef0f2: initial;
    --k-bg-eef0f3: initial;
    --k-bg-eef1f5: initial;
    --k-bg-eef2f7: initial;
    --k-bg-eef3f9: initial;
    --k-bg-eef3fa: initial;
    --k-bg-eef3fc: initial;
    --k-bg-eef4fc: initial;
    --k-bg-eef4ff: initial;
    --k-bg-eef6f0: initial;
    --k-bg-eef8f2: initial;
    --k-bg-f0ecfb: initial;
    --k-bg-f0faf4: initial;
    --k-bg-f0fdfa: initial;
    --k-bg-f1f3f5: initial;
    --k-bg-f1f4f8: initial;
    --k-bg-f1f5f9: initial;
    --k-bg-f1f5fa: initial;
    --k-bg-f2f4f7: initial;
    --k-bg-f3f4f6: initial;
    --k-bg-f3f5f8: initial;
    --k-bg-f3f7fc: initial;
    --k-bg-f3faf6: initial;
    --k-bg-f3fbf6: initial;
    --k-bg-f4f7fb: initial;
    --k-bg-f5f7fa: initial;
    --k-bg-f5f7fb: initial;
    --k-bg-f5f7fbf5: initial;
    --k-bg-f5f8fc: initial;
    --k-bg-f6f6f6: initial;
    --k-bg-f6f8fb: initial;
    --k-bg-f6f9fd: initial;
    --k-bg-f6fbf8: initial;
    --k-bg-f7f9fc: initial;
    --k-bg-f8f9fa: initial;
    --k-bg-f8fafc: initial;
    --k-bg-fafbfc: initial;
    --k-bg-fafbfd: initial;
    --k-bg-fbe3c4: initial;
    --k-bg-fbeceb: initial;
    --k-bg-fbfaf5: initial;
    --k-bg-fde8e8: initial;
    --k-bg-fdecec: initial;
    --k-bg-fdeeee: initial;
    --k-bg-fdf0e3: initial;
    --k-bg-fdf0f0: initial;
    --k-bg-fdf0f1: initial;
    --k-bg-fee2e2: initial;
    --k-bg-fef2f2: initial;
    --k-bg-fef3c7: initial;
    --k-bg-fef3f2: initial;
    --k-bg-ffe9a8: initial;
    --k-bg-ffe9c4: initial;
    --k-bg-fff1c9: initial;
    --k-bg-fff3d6: initial;
    --k-bg-fff4d6: initial;
    --k-bg-fff4dc: initial;
    --k-bg-fff4e0: initial;
    --k-bg-fff4e5: initial;
    --k-bg-fff5f5: initial;
    --k-bg-fff6e5: initial;
    --k-bg-fff7ed: initial;
    --k-bg-fff7f6: initial;
    --k-bg-fff7f7: initial;
    --k-bg-fff8e8: initial;
    --k-bg-fff8ea: initial;
    --k-bg-fff8ec: initial;
    --k-bg-fff8ef: initial;
    --k-bg-fff8f7: initial;
    --k-bg-fffaeb: initial;
    --k-bg-fffbeb: initial;
    --k-bg-ffffff: initial;
    --k-bg-ffffffe6: initial;
    --k-bg-ffffffeb: initial;
    --k-fg-006300: initial;
    --k-fg-027a48: initial;
    --k-fg-0369a1: initial;
    --k-fg-047857: initial;
    --k-fg-075985: initial;
    --k-fg-0b0b0b: initial;
    --k-fg-0d366b: initial;
    --k-fg-0d6efd: initial;
    --k-fg-0f766e: initial;
    --k-fg-10243a: initial;
    --k-fg-111827: initial;
    --k-fg-114987: initial;
    --k-fg-14532d: initial;
    --k-fg-14613a: initial;
    --k-fg-146c43: initial;
    --k-fg-15803d: initial;
    --k-fg-166534: initial;
    --k-fg-198754: initial;
    --k-fg-1b2636: initial;
    --k-fg-1d2b3a: initial;
    --k-fg-1d5b33: initial;
    --k-fg-1d7a45: initial;
    --k-fg-1e40af: initial;
    --k-fg-1e6b43: initial;
    --k-fg-1e7b3a: initial;
    --k-fg-1e7b45: initial;
    --k-fg-1e7b4a: initial;
    --k-fg-1f2937: initial;
    --k-fg-1f6b3a: initial;
    --k-fg-1f9d6b: initial;
    --k-fg-334155: initial;
    --k-fg-33465c: initial;
    --k-fg-344054: initial;
    --k-fg-374151: initial;
    --k-fg-3f4754: initial;
    --k-fg-44566b: initial;
    --k-fg-475467: initial;
    --k-fg-475569: initial;
    --k-fg-4b5563: initial;
    --k-fg-52514e: initial;
    --k-fg-52606f: initial;
    --k-fg-555555: initial;
    --k-fg-5b3fb5: initial;
    --k-fg-5b6470: initial;
    --k-fg-5b6775: initial;
    --k-fg-667085: initial;
    --k-fg-6b4300: initial;
    --k-fg-6b4600: initial;
    --k-fg-6b7280: initial;
    --k-fg-6b7a8c: initial;
    --k-fg-6b7c90: initial;
    --k-fg-6c757d: initial;
    --k-fg-7a4b00: initial;
    --k-fg-7f1d1d: initial;
    --k-fg-8a4a06: initial;
    --k-fg-8a4b00: initial;
    --k-fg-8a5300: initial;
    --k-fg-8a5a00: initial;
    --k-fg-8a6200: initial;
    --k-fg-8f1d14: initial;
    --k-fg-92400e: initial;
    --k-fg-9a2f22: initial;
    --k-fg-9a3412: initial;
    --k-fg-9a5b00: initial;
    --k-fg-b0170f: initial;
    --k-fg-b02a37: initial;
    --k-fg-b25e09: initial;
    --k-fg-b26a00: initial;
    --k-fg-b42318: initial;
    --k-fg-b45309: initial;
    --k-fg-b54708: initial;
    --k-fg-b7791f: initial;
    --k-fg-b91c1c: initial;
    --k-fg-c0392b: initial;
    --k-fg-c77700: initial;
    --k-fg-d92d20: initial;
    --k-fg-d97706: initial;
    --k-fg-dc3545: initial;
    --k-fg-e8590c: initial;
    --k-fg-ea580c: initial;
    --k-fg-f5b301: initial;
}
/* dark-mode:end sha=fa238013e1eff36a */
