/* Avin workspace. Brand yellow calls out actions; semantic colors describe status. */
:root {
    --ink: #17243a;
    --bg: #f1f4f8;
    --sf: #fff;
    --sf2: #f6f8fb;
    --tx: #17243a;
    --mu: #4f6074;
    --fa: #596a80;
    --ln: #dce3ed;
    --ln2: #c4cfdd;
    --ac: #22354f;
    --acH: #15263e;
    --acS: #eaf0f9;
    --nav: #13243a;
    --nav-text: #d5dfec;
    --nav-muted: #a4b3c7;
    --nav-line: #304159;
    --nav-active: #34425a;
    --focus-ring: #315da1;
    --sh1: 0 2px 6px #1629430a, 0 6px 16px -10px #16294338;
    --sh2: 0 8px 26px -12px #16294347;
    --surface-radius: 16px;
}

/* Internal messages use the same controls and semantic colors as the workspace. */
.warehouse-case-group .sh {justify-content:flex-start;gap:8px}
.warehouse-case-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:12px}
.dispatch-day {display:inline-flex;padding:4px 10px;border-radius:8px;background:var(--acS);color:var(--ac)}
.dispatch-day[data-day="sat"],.dispatch-day[data-day="wed"] {background:#dce9fd;color:#194476}
.dispatch-day[data-day="sun"],.dispatch-day[data-day="thu"] {background:#dcf1e8;color:#235640}
.dispatch-day[data-day="mon"],.dispatch-day[data-day="fri"] {background:#f6e8fa;color:#663579}
.dispatch-day[data-day="tue"] {background:#fff0cf;color:#785213}
.handover-grid {border:1px solid var(--ln);border-radius:12px;margin-block:8px;overflow:hidden}
.handover-row {display:grid;grid-template-columns:minmax(0,1fr) minmax(50px,.2fr) minmax(86px,.26fr);gap:12px;align-items:start;padding:12px}
.handover-row + .handover-row {border-block-start:1px solid var(--ln)}
.handover-head {background:var(--sf2);color:var(--mu);font-weight:650}
.handover-product {min-width:0;overflow-wrap:anywhere}
.handover-product > small {display:block;color:var(--mu)}
.handover-product .ser {margin-block-start:4px}
.handover-row [data-hq] {width:100%;min-width:0;text-align:center}
.bi-coverage {margin:0 0 8px}
.catalog-attributes {margin:0}
.catalog-attributes > div {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:12px;padding:8px 0;border-block-end:1px solid var(--ln)}
.catalog-attributes dd {margin:0;overflow-wrap:anywhere}
.catalog-attributes small {display:block;color:var(--mu)}
@media(max-width:600px) {
    .handover-row {padding:8px;gap:8px;grid-template-columns:minmax(0,1fr) 44px 73px}
    .handover-head {font-size:12px}
}

.staff-alert-page { display:grid; gap:16px; align-content:start; }
.staff-alert-tabs { display:flex; align-items:center; width:fit-content; max-width:100%; }
.staff-alert-tabs a { display:grid; place-items:center; min-height:38px; padding:6px 14px; border-radius:var(--r1); font-weight:600; color:var(--mu); text-decoration:none; }
.staff-alert-tabs a:hover { background:var(--sf2); }
.staff-alert-tabs a.on { background:var(--sf); color:var(--tx); box-shadow:inset 0 -2px var(--brand); }
.staff-alert-list { border-block:1px solid var(--ln); background:var(--sf); }
.staff-alert-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto 16px; align-items:center; gap:16px; width:100%; min-height:64px; padding:12px 16px; border:0; background:none; color:var(--tx); font:inherit; text-align:start; cursor:pointer; }
.staff-alert-row + .staff-alert-row { border-block-start:1px solid var(--ln); }
.staff-alert-row:hover { background:var(--sf2); }
.staff-alert-row strong,.staff-alert-row small,.staff-result small { display:block; overflow-wrap:anywhere; }
.staff-alert-row small,.staff-alert-count,.staff-result small { color:var(--mu); font-size:12px; }
.staff-alert-row .i { width:16px; color:var(--mu); }
.staff-alert-empty { margin:0; padding:16px 0; }
.staff-compose-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.staff-choices { min-inline-size:0; border:0; padding:0; margin:0; }
.staff-choices legend { margin-bottom:8px; font-weight:600; }
.staff-choices label { display:flex; align-items:center; gap:10px; min-height:42px; padding:5px 10px; overflow-wrap:anywhere; border-radius:var(--r1); cursor:pointer; }
.staff-choices label:hover { background:var(--sf2); }
.staff-choices label:has(:checked) { background:var(--acS); }
.staff-choices label input { flex:none; accent-color:var(--ac); }
.staff-choices label small { color:var(--mu); }
.staff-people-list { max-height:180px; overflow:auto; }
.staff-choices [hidden], #sa-people[hidden], #sa-all[hidden], #sa-options-field[hidden], .avino-message-error[hidden] { display:none; }
.staff-result { margin:8px 0 16px; padding:0; list-style:none; }
.staff-result li { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:8px 0; border-block-end:1px solid var(--ln); }
.staff-result li > :last-child { white-space:nowrap; }
.staff-message-text { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
.top .avino-inbox { display:inline-flex; align-items:center; gap:4px; padding-inline:8px; }
.avino-inbox .avino { width:20px; height:20px; }
#avino-message { width:min(540px,calc(100% - 32px)); max-height:calc(100dvh - 32px); padding:0; color:var(--tx); background:var(--sf); border:1px solid var(--ln2); border-radius:var(--r2); box-shadow:var(--sh2); }
#avino-message::backdrop { background:rgb(15 25 42 / .38); }
#avino-message[open] { animation:avino-message-in .17s ease-out; }
@keyframes avino-message-in { from { opacity:0; } to { opacity:1; } }
.avino-message-form { display:grid; grid-template-rows:auto minmax(0,1fr) auto; max-height:calc(100dvh - 34px); }
.avino-message-head,.avino-message-actions { display:flex; align-items:center; gap:12px; padding:16px 20px; }
.avino-message-head { border-block-end:1px solid var(--ln); }
.avino-message-head h2 { font-size:20px; line-height:1.45; margin:0; overflow-wrap:anywhere; }
.avino-message-head .avino { flex:none; width:44px; height:44px; }
.avino-message-main { display:grid; gap:16px; padding:16px 20px; overflow:auto; }
.avino-message-actions { border-block-start:1px solid var(--ln); }
.avino-message-error { margin:0; }
.avino-insight { display:grid; padding:0 16px; background:var(--sf); border:1px solid var(--ln); border-radius:var(--r2); }
.avino-insight header { display:flex; align-items:center; gap:8px; padding:12px 0; }
.avino-insight header .avino { width:24px; height:24px; }
.avino-insight h2 { font-size:16px; margin:0; }
.bi-review { border-block-start:1px solid var(--ln); padding:9px 0; }
.bi-review summary,.report-method summary { cursor:pointer; font-weight:600; }
.bi-review ul { list-style:none; padding:0; margin:8px 0; }
.bi-review li { display:flex; justify-content:space-between; gap:12px; padding:6px 0; color:var(--mu); }
.bi-review a { overflow-wrap:anywhere; }
.bi .bi-drill { position:relative; color:var(--tx); text-align:start; cursor:pointer; padding-inline-end:32px; box-shadow:none; }
.bi .bi-drill:hover { background:var(--sf2); }
.bi .bi-drill .i { position:absolute; inset-inline-end:10px; inset-block-start:14px; width:14px; color:var(--mu); }
.bi .bi-drill.is-link::after { content: none; }
.report-method { color:var(--mu); margin-block:16px; padding-block:8px; border-block-start:1px solid var(--ln); }
.report-method p { margin:8px 0 0; max-inline-size:68ch; }
.sales-trace { padding:12px 0; border-block:1px solid var(--ln); }
.sales-trace dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr)); gap:8px 16px; margin:0 0 8px; }
.sales-trace dt { color:var(--mu); font-size:12px; }
.sales-trace dd { margin:0; font-weight:650; overflow-wrap:anywhere; }
.sales-trace summary { cursor:pointer; font-weight:600; }
.sales-trace ol { list-style:none; padding:0; margin:8px 0; }
.sales-trace li { display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding-block:6px; border-block-end:1px solid var(--ln); }
.sales-trace li span,.sales-trace li time { display:block; color:var(--mu); font-size:12px; }
.sales-report-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px 12px; align-items:end; }
.sales-report-filters .field { margin:0; }
.i5-sales { display:flex; justify-content:space-between; gap:8px; padding:4px 2px; border-block-end:1px solid #ddd; }
@media (max-width:640px) { .sales-trace li { display:grid; } .sales-report-filters .btn { min-height:44px; } }

@media (min-width:641px) and (max-width:1024px) {
    .staff-alert-row { grid-template-columns:minmax(0,1fr) auto auto 16px; gap:12px; }
    .bi .bi-title { align-items:baseline; }
}
@media (max-width:640px) {
    .staff-alert-tabs { width:100%; }
    .staff-alert-tabs a { flex:1; min-height:44px; padding-inline:6px; }
    .staff-alert-row { grid-template-columns:minmax(0,1fr) auto 14px; gap:4px 8px; padding:12px 10px; }
    .staff-alert-count { grid-row:2; grid-column:1; }
    .staff-alert-row .i { grid-column:3; grid-row:1; }
    .staff-compose-grid { grid-template-columns:1fr; gap:0; }
    .staff-choices label,.avino-message-actions .btn { min-height:44px; }
    .avino-message-head,.avino-message-main,.avino-message-actions { padding-inline:14px; }
    .avino-message-head h2 { font-size:18px; }
    .bi-review li { display:grid; gap:2px; }
}
@media (prefers-reduced-motion:reduce) { #avino-message[open] { animation:none; } }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #17243a; --bg: #111b2a; --sf: #1a283b; --sf2: #213149; --tx: #f0f4fc;
        --mu: #bccee2; --fa: #acc0d7; --ln: #34465e; --ln2: #4a607a;
        --ac: #bcd1f6; --acH: #dbe8ff; --acS: #2d4160; --focus-ring: #ffdf59;
        --sh1: 0 2px 6px #0307103d; --sh2: 0 8px 26px -12px #0307109c;
    }
}
:root[data-theme="dark"] {
    --ink: #17243a; --bg: #111b2a; --sf: #1a283b; --sf2: #213149; --tx: #f0f4fc;
    --mu: #bccee2; --fa: #acc0d7; --ln: #34465e; --ln2: #4a607a;
    --ac: #bcd1f6; --acH: #dbe8ff; --acS: #2d4160; --focus-ring: #ffdf59;
    --sh1: 0 2px 6px #0307103d; --sh2: 0 8px 26px -12px #0307109c;
}

body { background: var(--bg); }
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
.side {
    background: var(--nav);
    color: var(--nav-text);
    border-color: var(--nav-line);
    backdrop-filter: none;
    scrollbar-color: var(--nav-line) transparent;
}
.side .brand { color: #fff; min-height: 56px; margin-bottom: 9px; border-bottom: 1px solid var(--nav-line); }
.side .ngl { color: var(--nav-muted); }
.side .ng { border-color: var(--nav-line); }
.side .ni { color: var(--nav-text); }
.side .ni:hover:not(.on), .side .ni:focus-visible { background: var(--nav-active); color: #fff; }
.side .ni.on {
    color: #fff0ac;
    background: var(--nav-active);
    box-shadow: inset -3px 0 0 var(--brand);
}
.side .ni.on .i { color: #fff0ac; filter: none; }
.side .ni:focus-visible, .side .brand:focus-visible { outline-color: var(--brand); }
.side .badge { background: #f4d55a; color: var(--ink); box-shadow: none; }

.top {
    gap: 10px;
    background: var(--sf);
    backdrop-filter: none;
    box-shadow: 0 2px 9px #16294309;
}
.top-location { white-space: nowrap; font-weight: 750; }
.top .search { flex: 0 1 360px; margin-inline-start: 8px; background: var(--sf2); border: 1px solid var(--ln); }
.top .search span { overflow: hidden; text-overflow: ellipsis; text-align: start; white-space: nowrap; }
.top :is(.fbtop, .okdot, .me, .top-tour, .qsale) { flex: 0 0 auto; }
.top .okdot, .top .me {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--ln);
    border-radius: 10px;
    background: var(--sf2);
    color: var(--tx);
    min-height: 36px;
    min-width: 36px;
}
.top .okdot i { position: absolute; inset: 6px auto auto 5px; width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--sf2); }
.top .fbtop { width: 36px; padding-inline: 0; }
.list-tabs { flex-wrap: wrap; align-self: flex-start; }
.order-customer { max-width: 48rem; }
.order-customer .actbar { margin-top: 8px; }
.workshop-intro { margin: min(8vh, 64px) auto; width: min(780px, calc(100% - 32px)); }
.workshop-syllabus { display: grid; gap: 10px; margin-block: 14px; }
.workshop-stage { padding: 12px 16px; }
.workshop-stage h3 { margin-block: 0 5px; }
.workshop-stage ul { margin-block: 0; padding-inline-start: 17px; }
.workshop-report { margin-inline: auto; width: min(900px, calc(100% - 32px)); padding-block: 20px; }
.workshop-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 12px; }
.learn-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.learn-card h2 { margin: 0; }
.guide-exercise { border: 0; margin: 8px 0 0; padding: 0; }
.guide-exercise legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.guide-exercise .btn { margin: 2px 0 2px 5px; white-space: normal; text-align: start; }
.guide-exercise .btn[aria-pressed=true] { background: var(--acS); color: var(--ac); border-color: var(--ac); }
.guide-exercise p { margin: 5px 0 0; }
.top .top-tour { background: var(--acS); color: var(--ac); border-color: var(--ln); }
.top .btn { transition: background .15s ease, border-color .15s ease; }
.bnav { background: var(--sf); box-shadow: 0 -4px 20px #16294310; }
.bnav button.on { background: var(--acS); }
.bnav button.on::before { background: var(--brandD); }

.page { gap: 22px; }
.page :is(.phr, .entity-header) { align-items: center; }
.page > :is(.phr, .ph, .entity-header) {
    padding-block: 6px 16px;
    border-bottom: 1px solid var(--ln);
}
.page h1 { font-size: clamp(1.42rem, 2.5vw, 1.95rem); font-weight: 800; line-height: 1.38; }
.page > .back { align-self: flex-start; margin-bottom: -8px; }
.page .sh { font-size: 1.05rem; color: var(--tx); }
.card, .panel, .rows.todo, .deal, .cbox { border-color: var(--ln); border-radius: var(--surface-radius); box-shadow: var(--sh1); }
.page .rows:not(.todo) > .row { border-color: var(--ln); }
.page .rows .row.is-link:hover, .page .rows .row:focus-within { background: var(--sf2); }
.page .row .act { opacity: 1; }
.btn.pri:not(:disabled) { font-weight: 750; }
.btn:not(.pri, .dan, .ghost):hover:not(:disabled) { border-color: var(--ac); }
.btn[aria-busy="true"] { cursor: progress; }
.seg { background: var(--sf2); border: 1px solid var(--ln); padding: 3px; }
.seg button.on { background: var(--sf); color: var(--tx); box-shadow: inset 0 -2px 0 var(--brandD), var(--sh1); }
.input { border-color: var(--ln2); }
.input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px color-mix(in srgb,var(--focus-ring) 15%, transparent); }
.demo-ribbon { align-items: center; padding-block: 4px; background: var(--acS); }
.demo-ribbon > span { color: var(--mu); }
.demo-ribbon > button:last-child { margin-inline-start: auto; }

.work-heading .hello { gap: 14px; }
.work-heading .avsay { color: var(--mu); }
.work-today > .work-shortcuts { margin-block: -7px 0; }
.work-today > .work-shortcuts .btn { background: var(--sf); color: var(--tx); border: 1px solid var(--ln2); }
.work-today > .work-shortcuts .btn.pri { background: var(--acS); color: var(--ac); }
.work-today .hero.work-priority {
    color: #fff;
    background: radial-gradient(ellipse at 94% 0%, #334d6f 0, transparent 67%), #172940;
    border: 1px solid #2b425e;
    padding: clamp(16px, 2.7vw, 29px);
    min-height: 138px;
    box-shadow: 0 12px 30px -15px #0d20386b;
}
.work-priority .sp { min-width: 0; }
.work-priority .lbl { background: none; color: #ffe47b; font-size: .82rem; font-weight: 750; }
.work-priority :is(p, h2) { color: #fff; }
.work-priority h2 { font-size: clamp(1.1rem, 2.1vw, 1.5rem); }
.work-priority p { color: #d5e1f1; margin-top: 3px; }
.work-today .hero.work-priority .av { background: #344b69; color: #ffdf59; box-shadow: none; }
.work-priority .av.red { color: #ffc4ba; }
.work-priority .av::after { display: none; }
.priority-action:empty { display: none; }
.priority-action .btn { white-space: normal; height: auto; min-height: 44px; text-align: center; }
.work-today .kmini > .kpi { background: var(--sf); border-color: var(--ln); box-shadow: var(--sh1); }

.entity-actions { align-items: stretch; }
.entity-tabs { max-width: 100%; overflow: auto; padding: 4px; }
.entity-tabs > button { flex: none; }
.case-stage { padding: 14px 12px; }
.cact { border-width: 1px; box-shadow: none; }
.order-page { gap: 16px; }
.order-jump { display: none; }
.order-summary-title { font-size: 1rem; margin: 0; }
#order-review { scroll-margin-block-start: 76px; }
.ocard .ototals > .big { background: var(--acS); padding: 8px 10px; border-radius: 9px; }
.case-list-header { display: grid; gap: 12px; }
.case-list-header h1, .case-stage-heading h2 { margin: 0; }
.case-filterbar { display: grid; gap: 8px; justify-items: start; }
.case-filterbar .seg { display: flex; max-width: 100%; flex-wrap: wrap; }
.case-filterbar button { min-height: 40px; }
.case-filterbar button:disabled { opacity: .55; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.case-grid .deal { min-width: 0; }
.case-grid .deal .dt .sm-t { white-space: normal; overflow-wrap: anywhere; }
.case-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.case-identity small, .case-fact > small { color: var(--mu); }
.case-item-preview, .case-request { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.case-detail-page { gap: 16px; }
.case-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.case-facts.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-fact { display: grid; align-content: start; justify-items: start; gap: 3px; min-width: 0; padding: 9px 11px;
    background: var(--sf2); border: 1px solid var(--ln); border-radius: var(--surface-radius); overflow-wrap: anywhere; }
.case-fact .tag { white-space: normal; }
.case-stage { display: grid; gap: 12px; }
.case-stage-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.case-stage-heading p, .case-reviewed { margin: 0; }
.case-reviewed { padding: 8px 10px; background: var(--sf2); border: 1px solid var(--ln); border-radius: var(--r1); font-size: 13px; }
.case-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.case-phases li { min-width: 0; }
.case-phase { color: var(--tx); display: grid; align-content: start; text-align: start; gap: 4px; width: 100%; min-height: 62px;
    padding: 8px; border: 1px solid var(--ln); border-radius: var(--surface-radius); background: var(--sf2); cursor: pointer; }
.case-phase:hover, .case-phase[aria-expanded="true"], .case-phase:focus-visible { border-color: var(--accent, var(--brand)); }
.case-phase.now { border-color: var(--brand); box-shadow: inset 0 -3px var(--brand); background: var(--sf); }
.case-phase b { display: flex; gap: 3px; align-items: center; font-size: 13px; }
.case-phase b svg { width: 13px; height: 13px; flex: none; }
.case-phase small { color: var(--mu); font-size: 11px; overflow-wrap: anywhere; }
.case-phase-detail { padding: 12px; background: var(--sf2); border-radius: var(--surface-radius); border: 1px solid var(--ln); }
.case-phase-detail h3, .case-phase-detail p { margin: 0 0 6px; }
.case-phase-detail h3 { display: flex; align-items: center; gap: 8px; }
.case-phase-times { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 10px; }
.case-phase-times div { display: grid; gap: 2px; }
.case-phase-times dt, .case-phase-events small { color: var(--mu); font-size: 12px; }
.case-phase-times dd { margin: 0; }
.case-phase-events { display: grid; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.case-phase-events li { display: grid; gap: 3px; padding-inline-start: 8px; border-inline-start: 2px solid var(--ln); overflow-wrap: anywhere; }
.case-phase-events li p { white-space: pre-wrap; }
@media (min-width: 850px) {
    .case-filterbar { grid-template-columns: auto 1fr; }
}
@media (min-width: 1180px) {
    .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .case-phases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .case-filterbar .seg { width: 100%; }
    .case-filterbar .seg button { flex: 1 0 auto; }
    .case-summary-card .dh { align-items:start; gap:8px; }
    .case-summary-card .dt { min-width:0; }
    .case-summary-card .case-card-number { display:inline-block; }
    .case-summary-card:has(.case-item-preview) .case-card-title { display:none; }
    .case-summary-card .case-phases { grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
    .case-summary-card .case-phase { min-height:44px; padding:4px 2px; place-content:center; text-align:center; gap:0; }
    .case-summary-card .case-phase b { font-size:12px; justify-content:center; }
    .case-summary-card .case-phase small { font-size:10px; }
    .case-summary-card .case-phase b svg { display:none; }
    .case-summary-card .dn { flex-wrap:wrap; gap:6px; }
    .case-summary-card .dn .btn { width:100%; min-height:44px; }
    .case-summary-card .case-card-timing { margin-block-start:0; }
}
.oacts .btn.pri { min-height: 44px; white-space: normal; height: auto; }
.oacts .btn[data-oact="cancel"], .oacts .btn[data-oact="reject"] { color: var(--red); }
#focus .fbar { border-color: var(--ln); box-shadow: var(--sh1); }
#focus .savebar { border-top: 1px solid var(--ln); }
#modal .mft { z-index: 2; box-shadow: 0 -6px 18px -14px #13243a8a; }
#tourPanel.practice-dock { border-color: var(--ln2); box-shadow: 0 14px 36px -10px #13243a50; }
#tourPanel.practice-dock .tour-hd { background: var(--nav); color: #fff; }
#tourPanel.practice-dock .tour-hd :is(span, .btn) { color: var(--nav-text); }
#tourPanel.practice-dock .tour-hd .btn:hover { background: var(--nav-active); }

@media (max-width: 1200px) {
    .top .search { flex-basis: 40px; margin-inline-start: 0; }
    .top .search span, .top .search kbd { display: none; }
}
@media (max-width: 1000px) {
    .order-jump { display: inline-flex; min-height: 40px; }
    .top .me span { display: none; }
    .top .me { padding-inline: 0; }
    .top .live { display: none; }
    .top .search { flex: 0 1 40px; }
}
@media (max-width: 760px) {
    .top { height: 56px; gap: 4px; padding-inline: 7px; }
    .top-location { display: none; }
    .top :is(.search, .okdot, .me, .fbtop, .top-tour, .qsale, .return-call) { width: 36px; min-width: 36px; padding-inline: 0; min-height: 44px; }
    .top .brand { min-width: 29px; }
    .top .live { display: none; }
    .top :is(.top-tour, .return-call) span { display: none; }
    .page { gap: 17px; }
    .page > :is(.phr, .ph, .entity-header) { padding-block: 3px 12px; }
    .demo-ribbon { gap: 5px 10px; font-size: .76rem; }
    .demo-ribbon > button { padding-inline: 6px; }
    .work-today .hero.work-priority { flex-wrap: wrap; align-content: start; gap: 10px; }
    .work-priority .sp { flex: 1 1 70%; }
    .work-priority .priority-action { width: 100%; }
    .priority-action .btn { width: 100%; }
    .work-today .kmini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entity-actions { width: 100%; }
    .entity-actions > .btn.pri { flex: 1 0 28%; }
    .entity-tabs button, .entity-actions .btn { min-height: 40px; }
}
@media (forced-colors: active) {
    .side .ni.on, .seg button.on, .bnav button.on { outline: 2px solid Highlight; outline-offset: -2px; }
}

.customer-header {display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.customer-header .entity-actions {justify-content:flex-start}
.call-phone-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px;width:100%}
.call-phone-tools select{width:auto;max-width:11rem;min-height:32px}
.call-phone-tools [data-act=dial],.call-phone-tools [data-act=redial]{min-width:104px}
.order-items>.sh{padding:12px 12px 0;margin:0}
#modal.case-inspector{width:min(540px,calc(100% - 24px))}
.case-inspector .case-phase-detail{border:0;padding:0;background:none}
.case-phase small{overflow-wrap:normal;font-size:12px}
.workshop-current-chapter{font-size:12px;color:var(--mu);margin-bottom:4px}
#tourCanvas.draw{z-index:96;touch-action:none}
#tourPanel.drawing{z-index:97}
@media (prefers-reduced-motion:reduce){
  #modal.case-inspector.open{animation:none}
}

header:has(.need-group-tabs){display:flex;flex-wrap:wrap}
header:has(.need-group-tabs)>.ph{flex-basis:100%}
header:has(.need-group-tabs) .need-group-tabs{order:1}

@media(max-width:760px){
  #modal.open~#tourPanel.open{top:8px;bottom:auto;z-index:97;max-height:34dvh}
  #modal.open~#tourPanel.practice-dock.open{max-height:24dvh}
  #modal.open~#tourPanel.drawing :is(.tour-lbl,.tour-tri,.tour-marks,.tour-ft,#tourSaved){display:none}
  #modal.open~#tourPanel.drawing .tour-bd{padding-block:5px}
}

.case-detail-page .chead{align-items:stretch}
.case-detail-page .chead .case-stage{margin-block:4px}
.case-detail-page .case-phase b{align-items:baseline;white-space:normal}

#focus .fbody { padding-block-start: 16px; overflow-anchor: none; }
.call-context { gap: 0; padding: 0; background: var(--sf); }
.call-context > :is(.ctxbar, .care, .wkly) { margin: 0 16px 8px; }
.call-customer-head { display: grid; gap: 4px; padding: 16px 16px 12px; }
.call-customer-head .cname { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: clamp(1.15rem, 2.3vw, 1.65rem); margin: 0; }
.call-customer-head .cmeta { margin: 0; font-size: 13px; }
.call-context .ctools { padding: 8px 12px; gap: 5px; border-block: 1px solid var(--ln); background: var(--sf2); }
.call-context .ctools .btn { white-space: nowrap; }
.call-context .ctools .btn.on { border-color: var(--brand); box-shadow: inset 0 -2px var(--brand); }
.call-info-panel { min-width: 0; }
.call-info-panel .shb { min-width: 0; padding: 14px 16px 18px; display: grid; gap: 14px; overflow-anchor: none; }
.call-info-panel.open .shb { overflow: auto; max-height: min(65dvh, 620px); scrollbar-gutter: stable; }
.call-info-panel h3, .call-result h2 { margin: 0 0 5px; font-size: 1rem; }
.call-at-glance { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 0; }
.call-at-glance > div { background: var(--sf2); border: 1px solid var(--ln); border-radius: 10px; padding: 9px; min-width: 0; }
.call-at-glance dt, .call-info-panel li small { font-size: 12px; color: var(--mu); }
.call-at-glance dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.call-info-panel section { min-width: 0; }
.call-info-panel p { margin: 0; }
.call-info-panel ul { margin: 0; padding-inline-start: 18px; }
.call-open-work ul, .call-purchases ul, .call-last-purchase ul { padding: 0; list-style: none; }
.call-open-work li, .call-purchases li, .call-last-purchase li { display: flex; gap: 8px; align-items: baseline; padding-block: 6px; border-block-end: 1px solid var(--ln); }
.call-purchases li, .call-last-purchase li { justify-content: space-between; }
.call-info-panel li small { display: block; }
.call-info-panel li div { min-width: 0; overflow-wrap: anywhere; }
.call-purchases li .btn { flex: none; align-self: center; }
.call-last-purchase header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px; }
.call-brief-note { background: var(--sf2); padding: 9px 11px; border-radius: 9px; overflow-wrap: anywhere; }
.call-result { padding: 16px; gap: 13px; }
.call-actions:empty { display: none; }
.call-table-scroll { max-width: 100%; min-width: 0; overflow: auto; }
@media (max-width: 760px) {
    .call-info-panel.open .shb { max-height: none; }
    .call-context .ctools { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .call-context .ctools .btn { font-size: 12px; gap: 3px; min-height: 36px; padding-inline: 4px; }
    .call-context .ctools svg { width: 13px; height: 13px; }
    .call-purchases li { align-items: start; flex-wrap: wrap; }
}
@media (max-width: 365px) {
    .call-at-glance { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .call-context .ctools { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 1200px) {
    #focus .call-phone-tools { width: auto; }
}

.order-warehouse-label { display: grid; gap: 3px; margin-block: 4px; font-size: 12px; color: var(--mu); }
.order-warehouse-label .wsel { width: 100%; min-width: 108px; }
.order-line-stock { font-weight: 600; }
.order-stock-warehouses { display: block; color: var(--mu); overflow-wrap: anywhere; }
.course-welcome, .course-entry { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.course-welcome { margin:12px clamp(12px,3vw,32px) 0; }
.course-welcome small { display:block; color:var(--mu); margin-top:3px; }
.course-entry p { margin:4px 0 0; }
.course-chapter[aria-current="step"] { border-color:var(--ac); }
.course-chapter ol { padding-inline-start:20px; margin:0; line-height:1.75; }
.course-chapter .selected { font-weight:700; }
.course-practice { display:grid; gap:6px; margin-top:7px; }
.course-practice .field,.course-practice p { margin:0; }

/* finance desk (S1-4) and the dark «next step» box: review notes of 21 Nov 2026 */
.work-priority .priority-action .btn:not(.pri) { background: #fff; color: #172940; border-color: #fff; }
.work-priority .priority-action .btn:not(.pri):hover { background: #e8eef7; }
.findesk-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.findesk-kpis .kpi b { white-space: nowrap; font-size: clamp(1rem, 1.6vw, 1.25rem); }
.findesk-kpis .kpi span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.findesk-alerts { display: grid; gap: 8px; margin-block: 10px; }
.findesk-alert summary { cursor: pointer; }
.findesk-alert.red { border-color: var(--red); }
.findesk-alert.amb { border-color: var(--amb); }

/* manager dashboard (S1-7) */
.dash { display: grid; gap: 22px; min-inline-size: 0; }
.dash-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.dash-heading .sh, .dash-panel .sh { margin: 0; }
.dash-heading span, .dash-legend, .dash-period-context { color: var(--mu); font-size: .825rem; }
.dash-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.dash-period, .dash-panel { padding: 14px; }
.dash-period { min-inline-size: 0; background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); }
.dash-period dt { font-weight: 650; }
.dash-period dd { margin: 0; }
.dash-period-value { padding-block: 3px 5px; font-size: clamp(1.125rem, 1.8vw, 1.5rem); font-weight: 800; }
.dash-amount { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dash-period-context { display: flex; align-items: baseline; justify-content: space-between; gap: 3px 10px; flex-wrap: wrap; }
.dash-period-context .dash-amount { color: var(--tx); }
.dash-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; align-items: start; }
.dash-panel, .dash-section, .dash .kpi { min-inline-size: 0; }
.dash .dash-work { grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); }
.dash .dash-money { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.dash .dash-work .kpi { min-block-size: 52px; }
.dash .dash-money .kpi span, .findesk .kpi span { white-space: normal; overflow: visible; }
.dash .dash-money .kpi b, .findesk .kpi b { white-space: normal; overflow-wrap: anywhere; }
.dash-list { list-style: none; padding: 0; margin: 8px 0 0; min-inline-size: 0; }
.dash-list li { padding-block: 9px; border-block-end: 1px solid var(--ln); }
.dash-list li:last-child { border-block-end: 0; }
.dash-channel, .dash-customer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 4px 10px; align-items: baseline; }
.dash-channel .dash-period-context, .dash-bar-t { grid-column: 1 / -1; }
.dash-label { min-inline-size: 0; text-align: start; white-space: normal; overflow-wrap: anywhere; }
.dash-customer button { min-height: 44px; }
.dash-legend { display: flex; gap: 8px 14px; flex-wrap: wrap; margin: 6px 0 0; }
.dash-legend > span::before { content: ""; display: inline-block; inline-size: 10px; block-size: 4px; background: var(--brandD); margin-inline-end: 5px; vertical-align: middle; }
.dash-legend > span + span::before { background: var(--ln2); }
.dash-bar-t { display: grid; gap: 2px; align-content: start; padding-block: 2px; }
.dash-bar-t meter { inline-size: 100%; block-size: 4px; appearance: none; --dash-bar: var(--brandD); }
.dash-bar-t meter.prev { --dash-bar: var(--ln2); }
.dash-bar-t meter::-webkit-meter-bar { background: transparent; border: 0; }
.dash-bar-t meter::-webkit-meter-optimum-value { background: var(--dash-bar); border-radius: 3px; }
.dash-bar-t meter::-moz-meter-bar { background: var(--dash-bar); border-radius: 3px; }
.pal-status { margin: 0; padding: 12px; text-align: center; }
.pal-status:empty, #palL:empty { padding: 0; }
.dash-stuck { margin-block-start: 10px; }
.dash-stuck-links { display: flex; gap: 2px 12px; flex-wrap: wrap; }
.dash-stuck-links a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.manager-device-tools [data-pwa-toolbar] { margin-block-start: 8px; min-inline-size: 0; }
.manager-device-tools .pwa-controls .btn { flex: 0 1 auto; min-block-size: 44px; height: auto; white-space: normal; }
.findesk-cheques { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.findesk .demand .findesk-cheque { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 1px 10px; align-items: baseline; }
.findesk-cheque .findesk-party { overflow-wrap: anywhere; }
.findesk-party small { display: block; }
.findesk-due { grid-column: 1 / -1; }
.findesk-bank { table-layout: fixed; width: 100%; }
.findesk-bank th, .findesk-bank td, .findesk .tbl.findesk-bank td.num { white-space: normal; overflow-wrap: anywhere; }
.findesk-bank th:first-child { width: 40%; }
@media (max-width: 760px) {
    .dash { gap: 18px; }
    .dash-breakdown { grid-template-columns: minmax(0, 1fr); }
    .dash-periods { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .dash-period { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 3px 8px; align-items: baseline; padding: 10px 12px; }
    .dash-period-value { padding: 0; }
    .dash-period-context { grid-column: 1 / -1; }
    .manager-today .today-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .manager-today .today-tabs button { justify-content: center; min-height: 44px; white-space: normal; padding: 4px 8px; }
    .rpage .rtabs, .rpage .rparts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); overflow: visible; }
    .rpage .rtabs button, .rpage .rparts button { justify-content: center; min-height: 44px; height: auto; white-space: normal; padding: 6px 8px; }
}
.sales-report-filters > *, .sales-report-filters .input { min-inline-size: 0; }
.sales-report-summary { table-layout: fixed; width: 100%; }
.sales-report-summary th, .sales-report-summary td { overflow-wrap: anywhere; white-space: normal; }
.sales-report-summary th:first-child { width: 45%; }
.sales-report-summary th:nth-child(2) { width: 15%; }
.mobile-cell-label { display: none; }
@media (max-width: 550px) {
    .rpage .rtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rpage .rtabs button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .team-members, .team-members tbody { display: block; }
    .team-members thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
    .team-members tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 8px; border-block-end: 1px solid var(--ln); }
    .team-members tr:last-child { border-block-end: 0; }
    .team-members td, .team-members td.num { display: block; padding: 0; border: 0; text-align: start; white-space: normal; overflow-wrap: anywhere; }
    .team-members td:first-child { grid-column: 1 / -1; }
    .team-members td:first-child button { min-height: 44px; font-weight: 700; white-space: normal; }
    .team-members .mobile-cell-label { display: block; color: var(--mu); font-size: .8rem; }
}
@media (max-width: 600px) {
    .sales-report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sales-report-filters > :nth-child(n+3) { grid-column: 1 / -1; }
    .sales-report-records, .sales-report-records tbody { display: block; }
    .sales-report-records thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
    .sales-report-records tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 9px 0; border-block-end: 1px solid var(--ln); }
    .sales-report-records td { display: block; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .sales-report-records td:first-child { font-weight: 700; grid-column: 1 / -1; }
    .sales-report-records td:first-child :is(button, a) { display: inline-flex; align-items: center; min-height: 44px; }
    .sales-report-records .mobile-cell-label { display: block; color: var(--mu); font-size: .8rem; }
}

/* ---------- dispatch desk (S2-D): route board, location, 80 mm slip, A5 invoice ---------- */
.route-sum{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;padding:10px 14px;border-radius:12px;background:var(--sf2)}
.route-sum b{font-size:18px}
.route-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.route-card{padding:12px 16px;display:flex;flex-direction:column;gap:6px;transition:transform .15s,box-shadow .15s}
.route-card.new{border-color:var(--amb)}
.route-card:has(.route-stop){padding:0;position:relative;min-width:0}
.route-stop-summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;list-style:none;min-height:58px}
.route-stop-summary::-webkit-details-marker{display:none}
.route-card:has(.route-stop-call) .route-stop-summary{padding-inline-end:68px}
.route-stop-meta{min-width:0}
.route-stop-meta b,.route-stop-address{display:block;overflow-wrap:anywhere}
.route-stop-address{color:var(--mu);font-size:12px}
.route-stop-caret{font-size:20px;color:var(--mu)}
.route-stop[open] .route-stop-caret{transform:rotate(180deg)}
.route-stop-call{position:absolute;inset-block-start:8px;inset-inline-end:10px}
.route-stop-call .btn{width:44px;min-height:44px;justify-content:center}
.route-stop-body{border-block-start:1px solid var(--ln);padding:10px 14px;display:grid;gap:8px}
.route-stop-body>.btn{justify-self:start}
.route-stop-body .rc-move{display:flex;gap:6px;flex-wrap:wrap}
.route-load{border:1px solid var(--ln);border-radius:10px;padding:10px;min-width:0}
.route-load h3{font-size:14px;margin:0 0 6px}
.route-load-items{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:4px}
.route-load-items li{display:flex;justify-content:space-between;gap:8px}
.route-load-items li span{overflow-wrap:anywhere}
.route-load-items li b{flex-shrink:0}
.order-steps{margin-block:6px 2px}
.order-header-actions{align-self:flex-start;justify-content:flex-end;flex-wrap:wrap}
.order-empty-lines{margin:0;padding:12px}
.sale-document-numbers,.sale-document-numbers>div{display:flex;gap:6px 10px;flex-wrap:wrap}
.sale-document-numbers{margin:7px 0 0;font-size:.8rem}
.sale-document-numbers dt{color:var(--mu)}
.sale-document-numbers dd{margin:0;font-weight:700}
.inv5 .sale-document-numbers{font-size:9pt;margin-block:3px}
@media(max-width:600px){
    .route-stop-summary{min-height:55px;padding:8px 10px;gap:8px}
    .route-stop-call{inset-inline-end:7px;inset-block-start:5px}
    .route-card:has(.route-stop-call) .route-stop-summary{padding-inline-end:60px}
    .order-header-actions{width:100%}
    .order-page .cname{overflow-wrap:anywhere}
}
.route-card.dragging{opacity:.55}.route-card.over{box-shadow:0 0 0 2px var(--pri,#2563eb)}
.route-card[draggable="true"]{cursor:grab}
.rc-head{display:flex;gap:10px;align-items:flex-start}
.rc-no{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--pri,#2563eb);color:#fff;font-weight:700}
.rc-name{font-size:16px;font-weight:700}
.rc-move{display:flex;flex-direction:column;gap:4px}.rc-move .btn{min-width:38px}
.route-card .actbar{flex-wrap:wrap}
.route-loads ul{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-wrap:wrap;gap:6px}
.route-loads summary{list-style:none}
.route-loads summary::-webkit-details-marker{display:none}
.route-card .route-phone-mobile{display:none}
.delivery-count{display:grid;gap:8px}
.delivery-count-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(66px,20%);gap:8px;align-items:center}
.delivery-count-row label{display:flex;align-items:center;gap:8px;min-height:44px}
.delivery-count-row input[type="checkbox"]{width:20px;height:20px;flex:none}
@media (max-width:760px){.route-card .route-phone-desktop{display:none}.route-card .route-phone-mobile{display:inline-flex}.route-card .actbar .btn{min-height:44px}}
.geo-box{display:flex;flex-direction:column;gap:8px}.geo-box .actbar{flex-wrap:wrap;gap:6px}
.case-print{margin-top:6px;gap:6px;flex-wrap:wrap}
@media (max-width:600px){.route-card .actbar .btn{flex:1 1 40%}}

.slip{width:74mm;margin:12px auto;padding:2mm;background:#fff;color:#000;font-size:12.5px;line-height:1.55;font-weight:500}
.slip .noprint{margin-bottom:10px}
.sl-co{text-align:center;font-size:17px;font-weight:800}
.sl-title{text-align:center;font-size:15px;font-weight:800;border:2px solid #000;border-radius:4px;padding:2px 0;margin:4px 0}
.sl-kv{display:grid;grid-template-columns:auto 1fr;gap:0 8px}.sl-kv span{color:#000}.sl-kv b{text-align:end}
.sl-hr{border-top:1.5px dashed #000;margin:5px 0}
.sl-cust b{font-size:14px}.sl-to{font-weight:800;margin-top:3px}
.sl-small{font-size:11px}
.sl-tbl{width:100%;border-collapse:collapse}.sl-tbl th{border-bottom:1.5px solid #000;font-size:11.5px;text-align:start;padding:2px}
.sl-tbl td{border-bottom:1px dotted #000;padding:4px 2px;vertical-align:top}
.sl-ck{width:14px;font-size:15px}.sl-nm{font-weight:700}
.sl-q{text-align:center;font-size:18px;font-weight:900;white-space:nowrap}.sl-q small{display:block;font-size:10px;font-weight:500}
.sl-total{text-align:end;font-weight:800;margin-top:4px}
.sl-note{border:1px solid #000;padding:3px 5px;margin-top:5px}
.sl-sign{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px;text-align:center;font-size:11.5px}.sl-sign div{border-top:1px solid #000;padding-top:22px}
.sl-foot{text-align:center;font-size:10px;margin-top:8px}
@media print{.slip{margin:0;padding:0;width:74mm}}

.print.a5{max-width:148mm;padding:6mm;font-size:11px;gap:7px;line-height:1.6}
.a5-head{display:grid;grid-template-columns:1.3fr auto 1fr;gap:8px;align-items:center;border-bottom:2px solid #111;padding-bottom:6px}
.a5-co{display:flex;flex-direction:column}.a5-co b{font-size:17px}.a5-co span{font-size:10px;color:#333}
.a5-title{font-size:16px;font-weight:800;border:2px solid #111;border-radius:6px;padding:3px 14px}
.a5-doc{display:grid;grid-template-columns:auto 1fr;gap:0 6px;font-size:10.5px}.a5-doc b{text-align:end}
.a5-buyer{display:grid;grid-template-columns:repeat(3,1fr);gap:2px 10px;border:1px solid #888;border-radius:6px;padding:5px 9px}
.a5-buyer span{color:#555;font-size:9.5px;margin-inline-end:4px}.a5-buyer .wide{grid-column:1/-1}
.a5-tbl{width:100%;border-collapse:collapse}.a5-tbl th,.a5-tbl td{border:1px solid #777;padding:3px 4px;text-align:center}
.a5-tbl th{background:#eee;font-size:10px}.a5-tbl td.nm{text-align:start}.a5-tbl td.mono{font-size:9.5px}
.a5-tbl tbody tr:nth-child(even) td{background:#fafafa}
.a5-bottom{display:grid;grid-template-columns:1fr 56mm;gap:8px;align-items:start}
.a5-words{margin:0 0 4px;font-size:10.5px}
.a5-bal,.a5-tot{width:100%;border-collapse:collapse}.a5-bal th,.a5-bal td,.a5-tot th,.a5-tot td{border:1px solid #888;padding:2px 6px;font-size:10.5px}
.a5-bal th,.a5-tot th{text-align:start;font-weight:500;background:#f6f6f6}.a5-bal td,.a5-tot td{text-align:end}
.a5-tot tr.sum th,.a5-tot tr.sum td,.a5-bal tr.sum th,.a5-bal tr.sum td{font-weight:800;font-size:12px;background:#eaeaea}
.a5-note{margin:4px 0 0;font-size:10.5px}
.a5-sign{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:14px;text-align:center;font-size:10.5px}.a5-sign div{border-top:1px dashed #666;padding-top:24px}
.a5-foot{display:flex;justify-content:space-between;font-size:9px;color:#555;border-top:1px solid #ccc;padding-top:3px}
@media print{.print.a5{max-width:none;padding:0}}

/* full amounts on one line (finance note #8): the tile grows, the number never wraps or shortens */
.findesk .kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}
.findesk .kpi b,.dash .kpi b{font-size:clamp(17px,1.7vw,22px)}
.findesk .demand b,.findesk .tbl td.num{font-size:14px}
.sg-img{flex:none;width:44px;height:44px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid var(--ln)}

/* warehouse keeper's desk */
.store-kpis{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.store-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}
.store-card{padding:12px 16px;display:flex;flex-direction:column;gap:8px}
.store-card.ready{box-shadow:0 0 0 2px var(--ac) inset}
.pick-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.pkb{width:100%;display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--ln);border-radius:12px;background:var(--sf2);text-align:start;cursor:pointer;font:inherit;color:inherit}
.pkb.on{background:var(--acS);border-color:var(--ac)}.pkb.on .pk-nm{text-decoration:line-through;opacity:.7}
.pk-box{flex:none;width:24px;height:24px;border-radius:7px;border:2px solid var(--ln2);display:grid;place-items:center;background:var(--sf)}
.pkb.on .pk-box{background:var(--ac);border-color:var(--ac);color:#fff}.pk-box .i{width:15px;height:15px}
.pk-nm{flex:1;min-width:0;font-weight:600}.pk-nm small{display:block;font-size:11px;color:var(--mu);font-weight:400}
.pk-q{font-size:22px;font-weight:900;white-space:nowrap}.pk-q small{font-size:11px;font-weight:500;margin-inline-start:3px}
.store-card .actbar{flex-wrap:wrap;gap:6px}
.store-group{padding:12px;display:grid;align-content:start;gap:8px}
.store-group .store-card{box-shadow:none;border:1px solid var(--ln)}
.store-invoices{display:grid;gap:4px;font-size:13px}
.store-invoices > div{display:flex;gap:5px;flex-wrap:wrap}
.store-invoices summary,.store-review summary{cursor:pointer}
.store-review[open] > summary{margin-block-end:10px}
@media (max-width:600px){.store-grid{grid-template-columns:1fr}.store-card .actbar .btn{flex:1 1 30%}}

/* discount ceilings bar on the product search (finance / admin) */
.ladbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:10px 14px}
.ladbar label{display:flex;align-items:center;gap:6px;font-size:13px}.ladbar .input{width:70px;height:36px;text-align:center}

/* consignment cards: one block per invoice */
.cons-card{display:flex;flex-direction:column;gap:8px}
.cons-inv{border:1px solid var(--ln);border-radius:10px;padding:6px 10px;background:var(--sf2)}
.cons-ih{font-weight:700;font-size:13px;margin-bottom:2px}
.fold{padding:10px 16px}.fold summary{cursor:pointer;font-weight:700}

/* top search (owner, 22 Nov 2026): one clean line per result; actions only on the highlighted / hovered one */
#pal .pi{height:auto;min-height:48px;padding:8px 12px;align-items:center;row-gap:6px;border-bottom:1px solid var(--ln)}
#pal .pi:last-child{border-bottom:0}
#pal .pi .pl{font-weight:700;font-size:15px;line-height:1.5}
#pal .pi .pl em{font-weight:400;font-size:12px}
#pal .pi .r{direction:ltr;font-variant-numeric:tabular-nums;font-size:13px;color:var(--mu)}
#pal .pacts{display:none;padding-inline-start:32px}
#pal .pi.on .pacts,#pal .pi:hover .pacts{display:flex}
#pal .pi.on{background:var(--acS)}

/* cases board: five columns by stage */
.cboard{display:grid;grid-template-columns:repeat(5,minmax(220px,1fr));gap:12px;align-items:start;overflow-x:auto;padding-bottom:6px}
.bcol{background:var(--sf2);border:1px solid var(--ln);border-radius:14px;padding:8px;min-height:120px}
.bcol-h{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:800;padding:4px 6px 8px}
.bcol-b{display:flex;flex-direction:column;gap:8px}
.bcol-empty{text-align:center;color:var(--fa);margin:16px 0}
.bcard{background:var(--sf);border:1px solid var(--ln);border-radius:12px;overflow:hidden}
.bcard.mine{border-color:var(--amb)}
.bcard.late{border-color:var(--red)}
.bc-main{display:flex;flex-direction:column;gap:2px;width:100%;padding:8px 10px;text-align:start;background:none;border:0;font:inherit;color:inherit;cursor:pointer}
.bc-name{font-size:14px;line-height:1.5}.bc-sub{font-size:12px;color:var(--mu)}.bc-turn{font-size:12px}
.bc-acts{display:flex;gap:4px;padding:0 8px 8px;flex-wrap:wrap}.bc-acts .btn{height:28px;padding:0 8px;font-size:12px}
@media (max-width:760px){.cboard{grid-template-columns:repeat(5,82vw);scroll-snap-type:x mandatory}.bcol{scroll-snap-align:start}}
@media (max-width:620px){
    .cboard{grid-template-columns:minmax(0,1fr);overflow:visible;scroll-snap-type:none}
    .bcol{min-height:0}
    .bcol:not(:has(.bcard)){display:none}
}

/* A5 landscape invoice: Hasib's layout the owner likes, set larger and cleaner (owner, 22 Nov 2026: «بهتر از آن، نه بدتر») */
.print.inv5{max-width:210mm;padding:5mm 6mm;gap:0;font-size:12px;line-height:1.55;color:#151515;border-top:5px solid #f5c400;background:#fff}
.inv5 .noprint{margin-bottom:8px}.inv5 .i{width:13px;height:13px;flex:none}
.i5-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:4px 2px 6px;border-bottom:1.5px solid #f5c400}
.i5-title{font-size:25px;font-weight:900;letter-spacing:-.3px}
.i5-phone{font-size:19px;font-weight:800;direction:ltr;display:flex;gap:7px;align-items:center}.i5-phone .i{width:17px;height:17px}
.i5-logo{justify-self:end}.i5-logo img{height:11mm;width:auto;display:block}
.i5-bar{display:flex;justify-content:space-between;gap:10px;background:#f1f1f1;padding:4px 10px;font-size:11.5px;margin-top:5px;border-radius:3px}
.i5-bar span{display:flex;align-items:center;gap:5px}.i5-bar b{font-size:12px}
.i5-cust{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:6px 10px 7px}
.i5-cust>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}.i5-cust span{display:flex;align-items:center;gap:5px}
.i5-buyer{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}.i5-name{font-size:21px;font-weight:900;line-height:1.3;overflow-wrap:anywhere}
.i5-code,.i5-ch{font-size:11px;font-weight:500;color:#555}
.i5-cust>div:first-child>span{font-size:11.5px;color:#333}
.i5-tel{display:flex;flex-direction:column;align-items:flex-start;direction:ltr;font-size:12px;font-weight:600}
.i5-tbl{width:100%;border-collapse:collapse}
.i5-tbl th{background:#f5c400;color:#151515;font-weight:800;padding:5px 4px;font-size:11.5px;border:1px solid #f5c400}
.i5-tbl td{border:1px solid #dcdcdc;padding:4px 5px;text-align:center;height:27px;font-size:12px}
.i5-tbl tbody tr:nth-child(even) td{background:#f7f7f7}
.i5-tbl td.nm{text-align:start;font-size:13px;font-weight:600}.i5-tbl td.tot{font-weight:900;font-size:13.5px}.i5-tbl td.xs{font-size:10.5px}
.i5-note{border-bottom:1.5px solid #777;padding:4px 8px 7px;font-size:11.5px}
.i5-foot{display:grid;grid-template-columns:1.15fr .75fr 1.6fr;gap:10px;margin-top:7px;align-items:stretch}
.i5-sum{display:grid;grid-template-columns:auto auto;justify-content:center;align-content:center;gap:1px 12px;text-align:center;font-size:11px}
.i5-sum b{font-size:13.5px}.i5-disc{grid-column:1/-1;display:flex;justify-content:center;gap:12px;align-items:center;border-bottom:1px solid #999;padding-bottom:3px}
.i5-disc span{display:flex;flex-direction:column}.i5-final{font-weight:900}.i5-sum b.i5-final{font-size:18px}
.i5-words{grid-column:1/-1;font-style:normal;font-size:10px;color:#444;margin-top:2px}
.i5-chq{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-inline:1px dashed #bbb}
.i5-chq b{font-size:13px}.i5-chq span{font-size:10px;color:#555}.i5-chq strong{font-size:17px}
.i5-bal{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#f5c400;border-radius:5px;padding:7px 12px}
.i5-bal>div:first-child{display:flex;flex-direction:column;align-items:center;gap:1px}.i5-bal b{font-size:14px}.i5-bal strong{font-size:25px;font-weight:900;line-height:1.3}.i5-bal span{font-size:10px}
.i5-qr{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10px;font-weight:600;direction:ltr}
.i5-qrbox{display:block;width:25mm;height:25mm;overflow:hidden;background:#fff;border-radius:4px;position:relative}
.i5-qrbox img{position:absolute;width:38.3mm;max-width:none;left:-6.66mm;top:-6.71mm}
@media print{
    .print.inv5{max-width:none;padding:0;display:block}
    .i5-tbl thead{display:table-header-group}
    .i5-tbl tr,.i5-foot{break-inside:avoid}
}

/* warehouse slip, 80 mm thermal: black on white, large where the keeper looks (owner, 22 Nov 2026) */
.slip2{width:74mm;margin:12px auto;padding:2mm;background:#fff;color:#000;font-size:12.5px;line-height:1.5;font-weight:500}
.slip2 .noprint{margin-bottom:10px}
.s2-logo{display:flex;flex-direction:column;align-items:center;gap:1px}.s2-logo img{height:13mm;filter:grayscale(1) contrast(1.4)}.s2-logo span{font-size:12px;font-weight:700;direction:ltr}
.s2-band{margin:5px 0;background:#000;color:#fff;text-align:center;font-size:15px;font-weight:900;padding:4px 0;border-radius:3px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.s2-doc{display:grid;grid-template-columns:1.6fr 1fr;border:2px solid #000;border-radius:4px}
.s2-doc>div{display:flex;flex-direction:column;align-items:center;padding:2px 0}.s2-doc>div+div{border-inline-start:2px solid #000}
.s2-doc small{font-size:10px}.s2-doc b{font-size:21px;font-weight:900;line-height:1.2}
.s2-time{text-align:center;font-size:10.5px;margin:3px 0 4px}
.s2-cust{display:flex;flex-direction:column;border-top:1.5px dashed #000;border-bottom:1.5px dashed #000;padding:4px 0}.s2-cust b{font-size:15px;font-weight:900}.s2-cust span{font-size:11.5px}
.s2-to{margin-top:5px;border:1.5px solid #000;border-radius:4px;padding:3px 6px;display:flex;flex-direction:column}.s2-to small{font-size:10px}.s2-to b{font-size:13.5px}.s2-to span{font-size:10.5px}
.s2-items{list-style:none;margin:6px 0 0;padding:0}
.s2-items li{display:flex;align-items:center;gap:6px;padding:5px 0;border-bottom:1px dotted #000}
.s2-ck{flex:none;width:15px;height:15px;border:2px solid #000;border-radius:3px}
.s2-nm{flex:1;min-width:0;display:flex;flex-direction:column}.s2-nm b{font-size:13px;font-weight:800;line-height:1.4}.s2-nm small{font-size:10px}
.s2-q{flex:none;min-width:15mm;display:flex;flex-direction:column;align-items:center;background:#000;color:#fff;border-radius:4px;padding:2px 4px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.s2-q b{font-size:21px;font-weight:900;line-height:1.15}.s2-q small{font-size:9.5px}
.s2-total{display:flex;justify-content:space-between;align-items:center;margin-top:5px;font-size:12px}.s2-total b{font-size:15px;font-weight:900}
.s2-note{margin-top:5px;border:1px solid #000;padding:3px 6px;font-size:11.5px}
.s2-sign{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px}
.s2-sign div{border:1.5px solid #000;border-radius:4px;height:19mm;padding:3px 5px;display:flex;flex-direction:column;justify-content:space-between}
.s2-sign span{font-size:11.5px;font-weight:800}.s2-sign small{font-size:10px}
.s2-foot{text-align:center;font-size:9.5px;margin-top:6px;letter-spacing:.05em}
@media print{.slip2{margin:0;padding:0;width:74mm}}
.cboard .bcard.deal{padding:0;gap:0;border-radius:12px;box-shadow:none;display:block}
.bcard.age1{background:color-mix(in srgb,var(--amb) 9%,var(--sf))}
.bcard.age2{background:color-mix(in srgb,var(--red) 10%,var(--sf));border-color:color-mix(in srgb,var(--red) 45%,var(--ln))}
.bc-carrier{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:700;color:var(--ac)}.bc-carrier .i{width:13px;height:13px}
.bcard.hasib{border-style:dashed}

/* ============ Stability rules (owner, 22 Nov 2026): nothing moves or changes size on hover, focus, press or selection =====   - feedback is colour, background and shadow only — never transform, padding, border width or font weight
   - a selected tab / menu item keeps the exact width it had: same font weight in every state
   - see DESIGN_SYSTEM_FA.md */
.btn:hover:not(:disabled), .btn:active:not(:disabled), .chip:active, .qchips button:active, .kpi:active,
.kpi:hover, .kpi.is-link:hover, .lc:hover, .gap:hover, .pcard:hover, button.kpi:hover,
.side .ni:hover .i { transform: none !important; }
.btn:active:not(:disabled), .kpi.is-link:active, .chip:active { filter: brightness(.94); }
.kpi.is-link:hover, .lc:hover, .pcard:hover, button.kpi:hover { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ac) 45%, transparent), var(--sh1, var(--sh)); }
.tab, .tab.on, .side .ni, .side .ni.on, .bnav button, .bnav button.on, .rparts button, .rparts button.on,
.seg button, .seg button.on, .seg a.btn, .seg a.btn.on { font-weight: 600; }
.wkly { padding: 8px 10px; border-radius: 10px; }
.bselbar, .bselbar.on { border: 1.5px solid transparent; }
.bselbar.on { border-color: var(--ac); }
/* numbers that update in place keep their width */
.kpi b, .cnt, .num, .tag, .badge { font-variant-numeric: tabular-nums; }
.elsewhere{display:flex;gap:6px;align-items:flex-start;padding:6px 10px;border-radius:10px;background:var(--ambS);color:var(--tx);font-size:13px}.elsewhere .i{width:16px;height:16px;color:var(--amb);flex:none;margin-top:2px}

/* ============ simple case page: warehouse keeper and logistics (owner, 22 Nov 2026) =====   who, where, what — names and quantities large and bold — one choice, one big button */
.case-simple{max-width:720px;gap:14px}
.cs-head{display:flex;flex-direction:column;gap:6px;padding:4px 2px}
.cs-head h1{font-size:24px;font-weight:900;line-height:1.4}
.cs-meta{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font-size:14px}
.cs-meta span{display:flex;align-items:center;gap:5px}.cs-meta .i{width:16px;height:16px}
.cs-tel{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border-radius:12px;background:var(--acS);color:var(--tx);font-weight:800;font-size:16px;direction:ltr}
.case-simple .case-recipient{display:none}
.case-simple .cact{padding:14px;gap:12px}
.case-simple .cact h3{font-size:17px;font-weight:900}
.case-simple .case-handover-items h4{font-size:15px}
.case-simple .hl{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--ln);border-radius:12px;background:var(--sf)}
.case-simple .hl .sp{flex:1;min-width:0;font-size:16px;font-weight:800;line-height:1.5}
.case-simple .hl .sp small{display:block;font-size:12px;font-weight:500;color:var(--mu)}
.case-simple .hl input[data-hq]{width:92px;height:50px;font-size:22px;font-weight:900;text-align:center}
.case-simple .ser summary{font-size:12px;color:var(--mu);cursor:pointer;padding:2px 12px}
.case-simple .seg{display:flex;width:100%}.case-simple .seg button{flex:1;height:50px;font-size:15px}
.case-simple .field{font-size:14px}.case-simple .field .input,.case-simple .field select{height:48px;font-size:16px}
.case-simple .btn.pri.big,.case-simple [data-act="casehand"],.case-simple [data-act="deldone"]{width:100%;height:56px;font-size:18px;font-weight:900;justify-content:center}
.case-simple .dlines li{font-size:16px;font-weight:700;padding:6px 0}.case-simple .dlines li b{font-size:20px;font-weight:900}
.case-simple .cs-load-lines li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:10px}
.cs-load-lines strong,.case-simple .tdn,.case-simple .rs{overflow-wrap:anywhere}
.cs-load-lines b{white-space:nowrap}.cs-load-lines small{font-size:.7em}
.case-simple .cs-more .row{flex-wrap:wrap;align-items:flex-start}
.case-simple .cs-more .rt{min-width:0;flex:1 1 200px}
.case-simple .actbar{flex-wrap:wrap}
@media(max-width:560px){.case-simple .cs-more .row>.act{flex:1 1 auto}.case-simple .cs-more .ccom{display:grid;grid-template-columns:minmax(0,1fr) auto}.case-simple .cs-more .ccom input{grid-column:1/-1}.case-simple .cs-more .ccom select{min-width:0}}
.case-simple .cs-more summary{font-weight:700;cursor:pointer}
.ser{margin-top:-4px}
.cs-head h1 .nm{font-size:inherit;font-weight:inherit;color:var(--tx)}
.cs-debt{font-size:14px}.cs-debt b{font-size:17px;font-weight:900}
/* order picker: one line per item, the user's discount cap as one coloured number (owner, 22 Nov 2026) */
.tbl td.pn1 b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42ch}
.dcap{display:inline-block;min-width:44px;padding:2px 8px;border-radius:8px;background:var(--sf2);color:var(--mu);font-weight:800;text-align:center}
.dcap.on{background:var(--acS);color:var(--ac)}

/* invoice description on the case (notes 23/25) */
.inv-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 8px 12px; border-radius: 8px;
  background: var(--ambS); color: var(--tx); font-size: 14px; font-weight: 600; line-height: 1.7; white-space: pre-wrap; }
.inv-note svg { flex: none; margin-top: 4px; width: 16px; height: 16px; color: var(--amb); }

/* board cards are all one size (owner, 22 Nov 2026, note 28: «ابعاد کارت‌ها متغیر هست و کاربر گیج می‌شه»):
   every line is one line, the action row is always there, so rows of cards line up */
.cboard .bcard.deal{display:flex;flex-direction:column;height:148px}
.cboard .bc-main{flex:1;min-height:0;overflow:hidden}
.cboard .bc-main > *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.cboard .bc-main .bc-carrier ~ .bc-carrier{display:none}
.cboard .bc-acts{flex:none;min-height:36px;flex-wrap:nowrap}

/* keeper desk: the number beside each line is what goes out (partial hand-over, note 15); other consignments (note 16) */
.pick-list .pk-row{display:flex;gap:8px;align-items:stretch}
.pick-list .pk-row .pkb{flex:1;min-width:0}
.pick-list .pk-out{flex:none;width:72px;height:auto;min-height:44px;text-align:center;font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.oth{padding:8px 12px}.oth summary{cursor:pointer;font-size:14px}
.oth-c{padding:8px 0;border-top:1px solid var(--ln)}.oth-c:first-of-type{border-top:0}
.oth-c ul{margin:4px 0 0;padding:0 16px 0 0;list-style:none}.oth-c li{font-size:14px;line-height:1.9}
.oth-c .pk-q{font-size:16px;font-weight:900;font-variant-numeric:tabular-nums}

/* sortable stock columns (note 17) */
.thsort{all:unset;cursor:pointer;font-weight:600;white-space:nowrap}.thsort.on{color:var(--ac)}
.keeper-tbl td.num b{font-size:16px;font-weight:900}

/* sale dispatch labels (note 26): the weekday amber, the carrier blue-green, so the keeper tells them apart at a glance */
.dtag{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;margin-inline-end:4px;border-radius:8px;font-size:12px;font-weight:800;vertical-align:middle}
.dtag.day{background:var(--ambS);color:var(--amb)}
.dtag.frt{background:color-mix(in srgb,#0d9488 14%,var(--sf));color:#0d9488}.dtag .i{width:13px;height:13px}
.odisp{display:flex;flex-wrap:wrap;align-items:center;gap:4px}

/* complements per group (note 20): five tiles in view, the rest a horizontal swipe; a promotion has a coloured frame */
.sgg{margin-top:8px}.sgg .sh{margin:4px 0}
.sgrow{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 32px) / 5);gap:8px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity}
@media (max-width:900px){.sgrow{grid-auto-columns:minmax(150px,42%)}}
.sgt{display:flex;flex-direction:column;gap:4px;min-width:0;padding:8px;border:1px solid var(--ln);border-radius:12px;background:var(--sf);scroll-snap-align:start}
.sgt.promo{border:2px solid var(--ac);background:color-mix(in srgb,var(--ac) 7%,var(--sf))}
.sgt .sg-img{width:100%;height:72px;object-fit:contain}
.sgt-n{font-size:13px;line-height:1.5;height:3em;overflow:hidden}
.sgt-m{display:flex;flex-wrap:wrap;gap:4px;font-size:12px;min-height:20px}
.sgt-p{font-size:14px;font-weight:800;font-variant-numeric:tabular-nums;min-height:21px}
.sgt .btn{margin-top:auto}

/* print in place (note 14): the document in a frame inside the dialog, no new tab */
#modal.wide-print{width:min(940px,96vw);max-width:none}
.pframe{display:block;width:100%;height:min(66vh,620px);border:1px solid var(--ln);border-radius:12px;background:#fff}
.pframe.slip{width:min(360px,100%);margin-inline:auto}
html.inframe .print .noprint{display:none}
html.inframe body{background:#fff}

/* technical card caution from AVIN-KG (note 18) */
.cat-caution{display:flex;gap:8px;align-items:flex-start;margin:0 0 8px;padding:8px 12px;border-radius:8px;background:var(--ambS);font-size:13px;line-height:1.7}
.cat-caution svg{flex:none;margin-top:3px;width:15px;height:15px;color:var(--amb)}

.order-line-policy .over{color:var(--amb);font-weight:700}
.order-line-warehouse .wsel.short{border-color:var(--red)}
.sgg.alt .sh{color:var(--amb);display:flex;align-items:center;gap:6px}.sgg.alt .sh .i{width:15px;height:15px}

/* Owner notes 34, 36, 37, 39. */
.customer-sort{flex-wrap:wrap}.customer-sort label{display:flex;align-items:center;gap:8px}
.elsewhere{display:block}.elsewhere summary{display:flex;align-items:center;gap:8px;cursor:pointer}.elsewhere summary::after{content:"⌄";margin-inline-start:auto}.elsewhere[open] summary::after{content:"⌃"}
.elsewhere-items{padding:8px 12px}.elsewhere-items ul{margin:4px 0}.elsewhere-items li{display:flex;gap:10px}.elsewhere-items li span{flex:1}
.sg-image-frame{position:relative;display:flex;align-items:center;justify-content:center;width:48px;height:48px;flex:0 0 48px;border:1px solid var(--ln);border-radius:8px;background:var(--sf);overflow:hidden}
.sg-image-frame .sg-placeholder{width:32px;height:32px;opacity:.55}.sgt .sg-image-frame{width:100%;height:88px;flex:0 0 88px}.sgt .sg-placeholder{width:56px;height:56px}.sg-image-frame .sg-img,.sgt .sg-image-frame .sg-img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--sf)}
.turn-own{background:var(--ac);color:var(--sf);font-weight:800;padding:4px 8px;border-radius:6px}.turn-delegate{background:var(--sf);color:var(--tx);border:1px solid var(--ln);padding:4px 8px;border-radius:6px}

/* business intelligence (owner, 22 Nov 2026): plain sections, each with one line saying what it shows */
.bi{gap:24px}
.bi-sec{display:flex;flex-direction:column;gap:12px}
.bi-head h2{margin:0;font-size:20px;font-weight:800}.bi-head p{margin:2px 0 0;font-size:13px;color:var(--mu)}
.bi .kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.bi .kpi{position:relative}.bi .kpi small{display:block;font-size:12px;font-weight:600;margin-top:4px;line-height:1.6}
.bi .bi-more{position:absolute;top:10px;left:12px;font-style:normal;font-size:12px;color:var(--ac);font-weight:700}
.bi-cust{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.bi-ch-t{margin:0 0 8px;font-size:14px;font-weight:700}
.bi-legend{display:flex;gap:16px;font-size:12px;color:var(--mu);margin-bottom:6px}.bi-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-inline-end:4px;vertical-align:-2px}
.bi-legend i.cur,.bi-pair .cur{background:var(--ac)}.bi-legend i.prev,.bi-pair .prev{background:color-mix(in srgb,var(--mu) 45%,var(--sf))}
.bi-months{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;align-items:end;height:170px}
.bi-m{display:flex;flex-direction:column;align-items:center;height:100%;min-width:0}
.bi-pair{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px}
.bi-pair span{width:42%;border-radius:3px 3px 0 0;min-height:1px}.bi-pair .cur.none{background:none}
.bi-m small{font-size:11px;color:var(--mu);margin-top:4px;white-space:nowrap}
.bi-stack{display:flex;height:16px;border-radius:8px;overflow:hidden;background:var(--sf2)}
.bi-stack span.ok,.bi-stack-legend i.ok{background:#16a34a}.bi-stack span.mid,.bi-stack-legend i.mid{background:#84cc16}
.bi-stack span.warn,.bi-stack-legend i.warn{background:var(--amb)}.bi-stack span.bad,.bi-stack-legend i.bad{background:var(--red)}
.bi-stack-legend{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px;margin-top:10px}
.bi-stack-legend div{display:grid;grid-template-columns:12px 1fr;column-gap:6px;align-items:center}
.bi-stack-legend i{width:12px;height:12px;border-radius:3px;grid-row:span 3}.bi-stack-legend span{font-size:12px;color:var(--mu)}
.bi-stack-legend b{font-variant-numeric:tabular-nums}.bi-stack-legend small{font-size:12px;color:var(--mu)}
.bi-chn{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
.bi-chn div{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid var(--ln)}
.bi-chn b{font-variant-numeric:tabular-nums}
@media (max-width:700px){.bi-months{gap:2px;height:140px}.bi-m small{font-size:9px}}
.count-today .cnt-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--ln)}
.count-today .cnt-row:first-of-type{border-top:0}.count-today .cnt-row .input{width:90px;text-align:center;font-weight:800}
.count-today .cnt-row.done{opacity:.7}

/* Fixed template spacing, on the shared 4/8/12/16/24 scale. */
.u-font-16px{font-size:16px !important}
.u-font-20px{font-size:20px !important}
.u-gap-12px{gap:12px !important}
.u-gap-16px{gap:16px !important}
.u-gap-4px{gap:4px !important}
.u-gap-8px{gap:8px !important}
.u-pad-0-16px-16px{padding:0 16px 16px !important}
.u-pad-12px-0{padding:12px 0 !important}
.u-pad-12px-16px{padding:12px 16px !important}
.u-pad-16px{padding:16px !important}
.u-pad-16px-16px{padding:16px 16px !important}
.u-pad-24px{padding:24px !important}
.u-pad-4px-0{padding:4px 0 !important}
.u-pad-4px-16px{padding:4px 16px !important}
.u-pad-4px-4px{padding:4px 4px !important}
.u-pad-4px-8px{padding:4px 8px !important}
.u-pad-4px-8px-0{padding:4px 8px 0 !important}
.u-pad-8px{padding:8px !important}
.u-pad-8px-0{padding:8px 0 !important}
.u-pad-8px-12px{padding:8px 12px !important}
.u-pad-8px-4px{padding:8px 4px !important}

/* UX cleanup: one reading scale and stable geometry across workspaces. */
.page { gap:24px; font-size:14px; }
.page h1 { font-size:26px; line-height:1.4; }
.page :is(h2, .sh) { font-size:20px; line-height:1.5; }
.page :is(h3, .card-title, .store-card h3) { font-size:16px; line-height:1.5; }
.page :is(.sm-t, .rs, .sub, small) { font-size:12px; }
.page > :is(.ph, .phr), .page .phr > .ph { min-width:0; }
.work-heading .hello { gap:12px; }
.work-heading .sub { display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.work-heading .sub > span { display:inline-flex; gap:4px; }
.meta-kind, .dispatch-meta { font-size:12px; color:var(--mu); background:none; padding:0; border:0; }
.meta-kind { margin-inline-end:8px; }
.dispatch-meta { display:inline-flex; align-items:center; gap:4px; }
.page :is(.deal, .store-card, .card) { min-width:0; }
.page :is(.deal, .store-card) :is(.nm, h3) { font-size:16px; font-weight:700; }
.page :is(.deal, .store-card) .actbar { margin-block-start:12px; }
.page .btn.ghost:not(.ib) > .i { display:none; }
.product-groups > summary { cursor:pointer; font-size:14px; }
.product-groups[open] > summary { margin-block-end:8px; }
.kpi { min-width:0; min-height:84px; gap:4px; box-shadow:none; }
.kpi[hidden] { display:none; }
.kpi > span { font-size:12px; color:var(--mu); }
.kpi b { display:block; max-width:100%; font-size:clamp(14px, 1.6vw, 22px); line-height:1.4;
    white-space:nowrap; font-variant-numeric:tabular-nums; }
.kpi:not(.is-link):not(button) { box-shadow:none; }
.kpi::before { display:none; }
.kpi.is-link { box-shadow:var(--sh1); }
.kpi.is-link::after { inset-inline-end:8px; }
.kpi.is-link:hover::after { inset-inline-end:8px; }
.row.is-link:hover::after, .clk.is-link:hover::after { inset-inline-end:10px; }
.kpi.is-link b { padding-inline-end:12px; }
.kpi:hover, .kpi.is-link:hover, button.kpi:hover { transform:none; }
.mft { flex-direction:row-reverse; gap:8px; padding:16px 24px; }
.mhd, .mbd { padding-inline:24px; }
.mhd h2 { font-size:20px; }
.btn, .seg button, .tab { font-variant-numeric:tabular-nums; }
.u-pad-start-16 { padding-inline-start:16px; }
.customer-table caption { padding:8px 16px; text-align:start; font-size:12px; color:var(--mu); }
.customer-table .act { display:flex; opacity:1; }
@media (max-width:620px) {
    .page h1 { font-size:26px; }
    .kpi b { font-size:clamp(12px, 3.6vw, 18px); }
    .kpi { padding:12px 8px; }
    .mhd, .mbd, .mft { padding-inline:16px; }
    .work-heading .hello { gap:8px; }
    .work-heading .sub { display:block; }
    .page .entity-actions { flex-wrap:wrap; }
}
/* BI values keep their unit on one line; detailed series stay inside their card on mobile. */
.bi .kpi b { white-space: nowrap; font-size: clamp(16px, 1.6vw, 20px); }
.bi .kpis { grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); }
.bi .kpi { min-width: 0; }
.bi-growth { display: grid; gap: 4px; margin-top: 10px; }
.bi-growth small { display: flex; justify-content: space-between; gap: 8px; }
.bi-source p { overflow-wrap: anywhere; line-height: 1.9; }
.bi-table { max-width: 100%; overflow-x: auto; }
.bi-source summary, .bi details summary { cursor: pointer; }
.bi .bi-m small { font-size:12px; }
@media (max-width:700px) {
    .bi .bi-months { grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,1fr);
        gap:12px 5px;height:270px; }
    .bi .bi-m small {font-size:10px;white-space:normal;text-align:center;line-height:1.2}
}

.bi-list-scroll{max-height:62vh;overflow:auto}
.bi-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.bi-title h1, .bi-title p { margin: 0; }
.bi-title p { color: var(--mu); margin-block-start: 4px; }
.bi-freshness { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--mu); font-size: .825rem; }
.bi-freshness > span { min-width: 0; overflow-wrap: anywhere; }
.bi-sec > h2 { margin: 0; }
.bi .bi-sec { min-inline-size: 0; gap: 10px; }
.bi .bi-detail > .bi-sec + .bi-sec { margin-block-start: 18px; }
.bi .kpi b { white-space: normal; overflow-wrap: anywhere; }
.bi a.kpi { min-height: 44px; color: var(--tx); }
.bi .kpi span { white-space: normal; padding-inline-end: 12px; }
.bi .report-method > summary { min-height: 44px; align-content: center; }
.bi-head-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.warehouse-stock-breakdown{display:none;gap:3px;margin-top:6px;font-size:.82rem;line-height:1.4}
.warehouse-stock-breakdown.all-widths{display:grid}
.warehouse-stock-breakdown>span{display:flex!important;justify-content:space-between;align-items:baseline;gap:8px}
.warehouse-stock-breakdown b{white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:760px){.warehouse-stock-breakdown{display:grid}.keeper-tbl .warehouse-stock-breakdown{max-width:24rem}}
.store-lane{margin-block:8px 16px}
.store-lane>summary{cursor:pointer;padding:12px;border:1px solid var(--ln);border-radius:10px;background:var(--sf)}
.store-lane>summary .cnt{margin-inline-start:6px}
.store-lane>.store-grid{margin-block-start:8px}
.bi-list-scroll{margin-block-start:8px}
@media print{
  body:has(#main .bi) :is(#sidebar,#bottomnav,#topbar,.noprint){display:none!important}
  #main:has(.bi){margin:0;width:auto;padding:0}
  .bi .kpi{break-inside:avoid}
  body:has(#modal.open [data-bi-export-table]) > :not(#modal){display:none!important}
  #modal.open:has([data-bi-export-table]){--bg:#fff;--sf:#fff;--tx:#111;--mu:#444;--ln:#bbb;color:#111;background:#fff;position:static;inset:auto;transform:none;width:auto;max-width:none;height:auto;max-height:none;overflow:visible;border:0;box-shadow:none}
  #modal.open:has([data-bi-export-table]) :is(form,.mbd,.bi-list-scroll){height:auto;max-height:none;overflow:visible}
  #modal.open:has([data-bi-export-table]) :is(.mhd button,.mft,.bi-list-tools){display:none!important}
  [data-bi-export-table] th{position:static}
  [data-bi-export-table] tr{break-inside:avoid}
}
.bi .report-method > :not(summary) { margin-block-start: 10px; }
.pos-settle-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pos-settle-toolbar .field, .pos-settlement-card h2, .pos-settle-toolbar p { margin: 0; }
.pos-settlement-card { min-width: 0; display: grid; gap: 12px; overflow-wrap: anywhere; }
.pos-settlement-card .row { flex-wrap: wrap; gap: 8px; }
.pos-settle-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(145px,100%),1fr)); gap: 10px; margin: 0; }
.pos-settle-facts dt { color: var(--mu); font-size: .8rem; }
.pos-settle-facts dd { margin: 2px 0 0; font-weight: 650; }
.pos-settle-devices { list-style: none; padding: 0; margin: 0; }
.pos-settle-devices li { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--ln); padding-block: 6px; }
.order-register-filters { display:flex; align-items:end; flex-wrap:wrap; gap:10px; }
.order-register-filters .field { margin:0; min-width:min(180px,100%); }
.order-register-filters .seg { align-self:end; max-width:100%; }
.order-page .order-items,.order-page .order-lines { direction:rtl; min-width:0; text-align:start; }
.order-page .order-line-field { text-align:start; }
.order-page .order-line-field .input[dir=ltr] { text-align:right; }
@media (max-width:550px) {
    .order-register-filters .field { flex:1 1 140px; }
    .order-register-filters .seg { flex-basis:100%; }
}
@media (max-width: 700px) {
    .bi-operations .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .bi-operations .kpi { min-block-size: 68px; justify-content: center; }
    .bi-operations .kpi span { padding-inline-end: 0; }
}

.order-supply h2{margin:0 0 6px}
.order-supply-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.65fr) auto;align-items:start;gap:10px;padding-block:10px;border-block-start:1px solid var(--ln)}
.order-supply-row p{margin:4px 0 0}
@media(max-width:760px){.order-supply-row{grid-template-columns:minmax(0,1fr) auto}.order-supply-row>.actbar{grid-column:1/-1}}

#mlfree[hidden] { display:none; }
.need-products:not([hidden]) { display:grid; gap:8px; }
.need-product { margin:0; min-width:0; padding:8px 10px 10px; border:1px solid var(--ln); border-radius:8px; }
.need-product legend { padding-inline:4px; font-weight:600; }
.need-product button { align-self:end; justify-self:start; }

.contact-matches { display:block; margin-block:12px; padding:10px 12px; border:1px solid var(--ln); border-radius:10px; background:var(--sf2); }
.contact-matches[hidden] { display:none; }
.contact-matches p { margin:0 0 6px; }
.contact-match { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding-block:8px; }
.contact-match + .contact-match { border-block-start:1px solid var(--ln); }
.contact-match-card { display:grid; min-inline-size:0; gap:3px; overflow-wrap:anywhere; font-size:13px; }
.contact-match-card strong { font-size:14px; }
.contact-distinct { display:flex; align-items:center; gap:8px; margin-block-start:6px; }
.contact-merge-preview { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%, 190px),1fr)); gap:12px; }
.contact-merge-preview section { min-inline-size:0; padding:12px; border:1px solid var(--ln); border-radius:10px; background:var(--sf2); }
.contact-merge-preview h3 { margin:0 0 8px; font-size:13px; }

#return-call-slot { display:contents; }
.call-queue-picker section + section { margin-block-start:14px; }
.call-queue-picker h3, .case-start-group h3 { margin:0 0 6px; font-size:13px; font-weight:700; color:var(--mu); }
.call-queue-picker .mi { min-height:44px; text-align:start; }
.call-queue-picker .queue-name { overflow-wrap:anywhere; }
.case-start-group + .case-start-group { margin-block-start:12px; }

.call-result-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.call-result-heading h2 { margin-block:0; }

.sales-customer-name { font-size:clamp(16px, 2vw, 21px); font-weight:800; }
.sales-doc-ref { font-size:.75em; font-weight:600; color:var(--mu); }

/* Structured product data and the financial work queue. */
.knowledge-editor-groups, .knowledge-editor-groups section, .knowledge-form {
  display:grid; gap:12px; min-inline-size:0;
}
.knowledge-editor-groups section {border-block-start:1px solid var(--ln);padding-block:8px}
.knowledge-editor-groups header, .knowledge-editor-row, .money-review-card header {
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px
}
.knowledge-editor-row b {overflow-wrap:anywhere}
.knowledge-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.knowledge-form .field {min-inline-size:0;margin:0}
.knowledge-form input, .knowledge-form select {max-inline-size:100%}
.knowledge-sources {border:1px solid var(--ln);border-radius:8px;display:flex;flex-wrap:wrap;gap:8px 12px;padding:8px 12px}
.knowledge-sources label {display:flex;align-items:center;gap:4px}
.knowledge-point {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;gap:8px;margin-block:8px}
.knowledge-point .input {min-inline-size:0}
.knowledge-target-result {display:flex;flex-wrap:wrap;gap:8px;min-inline-size:0}
.money-review-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}
.money-review-card h2 {margin:0}
.money-review-card header {margin-block-end:12px}
.money-review-value {font-size:18px;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:520px) {
  .knowledge-form-grid {grid-template-columns:minmax(0,1fr)}
  .money-review-card .btn, .knowledge-editor .btn {min-block-size:44px}
}

/* Document actions stay in the same corner at each viewport. */
.page > .document-header {
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:start;
    gap:10px 12px;
}
.document-identity { grid-column:1; min-inline-size:0; overflow-wrap:anywhere; }
.document-edit { grid-column:2; justify-self:end; display:flex; flex-wrap:wrap; justify-content:end; gap:6px; }
.document-actions { grid-column:1 / -1; justify-content:end; }
@media (max-width:560px) {
    .order-page > .document-header { grid-template-columns:minmax(0, 1fr); }
    .order-page .document-edit { grid-column:1; }
}
.bi-mode-select { min-block-size:44px; }

/* cheque / credit terms (owner, 26 Nov 2026): one clear box the approver cannot miss */
.orow.pay-note { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.pay-note textarea { width: 100%; min-height: 56px; resize: vertical; }
.pay-note-view { display: block; margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--ambS); color: var(--tx); border-inline-start: 3px solid var(--amb); font-size: .9em; }
.i5-pay { font-weight: 600; }

/* owner, 28 Nov 2026: complete, scrollable result lists and a visible keyboard choice */
#opres, #pfres, #prres, .pickl { max-height: min(60vh, 560px); overflow: auto; overscroll-behavior: contain; }
.kbon, tr:has(> td .kbon) { outline: 2px solid var(--ac, #2563eb); outline-offset: -2px; background: var(--hl, rgba(37, 99, 235, .08)); }
#pal .pi.on { outline: 2px solid var(--ac, #2563eb); outline-offset: -2px; }

/* owner, 28 Nov 2026: a colleague's work done or followed «on behalf» never looks like one's own */
.meta-kind.proxy { background: var(--proxy-bg, #f3e8ff); color: var(--proxy-fg, #6b21a8); border: 1px dashed currentColor; }
.proxy-note { margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--proxy-bg, #f3e8ff); color: var(--proxy-fg, #6b21a8); font-size: 13px; }
.late-box.proxy, details.more-acts.proxy { border-inline-start: 4px dashed var(--proxy-fg, #6b21a8); }
.late-box li.proxy small { color: var(--proxy-fg, #6b21a8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --proxy-bg: #3b1f52; --proxy-fg: #e9d5ff; } }
:root[data-theme="dark"] { --proxy-bg: #3b1f52; --proxy-fg: #e9d5ff; }

/* AVINO settings: lessons and the call log (owner, 28 Nov 2026) */
.av-lesson { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.av-lesson .input { flex: 1; }
.av-talk { max-height: 46vh; overflow: auto; padding: 8px; border: 1px solid var(--ln); border-radius: 10px; margin-bottom: 8px; }
.av-turn { margin: 4px 0; } .av-turn.caller b { color: var(--mu); } .av-turn.avino b { color: var(--ac, #2563eb); }
.av-tools { max-height: 30vh; overflow: auto; font-size: 13px; }

/* scan at delivery (owner, 28 Nov 2026) */
.dd-scan-row { display: flex; gap: 8px; } .dd-scan-row .input { flex: 1; }
.dd-scan video.pwa-camera { width: 100%; max-height: 40vh; border-radius: 10px; background: #000; }

/* owner, 28 Nov 2026: label scan and print stay optional but in plain sight at the warehouse exit */
.ser.ser-open { display: grid; gap: 4px; margin-top: 4px; }
.ser.ser-open .hn-btn { justify-self: start; }
