/* AVIN design system v2 (owner, 26 Nov 2026): «طراحی را دگرگون کن، از حالت AI دربیاور».
   Loaded last; it settles the look the older layers left half-decided.

   Rules
   1. Flat, quiet surfaces. No glows, gradient borders, gradient text, shimmer or decorative shadows.
   2. One yellow button per area = the thing to do now. Everything else is plain or ghost.
   3. The data a person works with is the loudest thing on screen: product, warehouse, stock, amount, customer, count.
      Labels are small and grey; values are large and bold.
   4. Actions sit in fixed places: on a row, at its end; on a document, in the bar at the bottom of its summary.
   5. No paragraphs of explanation in the working screens. Avino says it in one line when it matters. */

:root {
    --bg: #f3f2ef;
    --sf: #ffffff;
    --sf2: #f7f6f3;
    --tx: #1c1d1f;
    --mu: #5d6168;
    --fa: #6d7178;
    --ln: #e2e0db;
    --ln2: #cfccc5;
    --brand: #ffcc00;
    --brandD: #e0b000;
    --brandS: #fff6cc;
    --ac: #1c1d1f;
    --acH: #000;
    --acS: #fff6cc;
    --sh1: none;
    --sh2: 0 10px 30px -18px rgb(0 0 0 / .35);
    --r1: 8px;
    --r2: 10px;
    --surface-radius: 10px;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #141517; --sf: #1c1d20; --sf2: #232428; --tx: #f2f2f0; --mu: #a9adb4; --fa: #9a9ea5;
        --ln: #2e3035; --ln2: #3b3e44; --ac: #f2f2f0; --acH: #fff; --acS: #3a3415; --brandS: #3a3415;
    }
}
:root[data-theme="dark"] {
    --bg: #141517; --sf: #1c1d20; --sf2: #232428; --tx: #f2f2f0; --mu: #a9adb4; --fa: #9a9ea5;
    --ln: #2e3035; --ln2: #3b3e44; --ac: #f2f2f0; --acH: #fff; --acS: #3a3415; --brandS: #3a3415;
}

/* 1. quiet surfaces */
body { background: var(--bg) !important; font-size: 15px; line-height: 1.7; }
.ph h1, .phr h1, .kpi b, .hero .lbl {
    background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important; color: var(--tx);
}
.kpi::before, .btn.pri::before, .hero::before, .hero::after { content: none !important; display: none !important; }
.card, .kpi, .hero, .ocard, .cbx, .row.td, .dgcard { box-shadow: none !important; }
.card, .kpi, .hero { border: 1px solid var(--ln) !important; border-radius: var(--r2) !important; background: var(--sf) !important; }
.hero .av, .brand i { background: var(--sf2) !important; box-shadow: none !important; }
.side .ni.on { background: var(--nav-active, #2a2c31) !important; box-shadow: inset -3px 0 0 var(--brand) !important; }
.chip.on, .qchips button.on { background: var(--tx) !important; color: var(--sf) !important; box-shadow: none !important; }
.seg button.on { box-shadow: inset 0 -2px 0 var(--brand) !important; font-weight: 700; }
.empty { background: none !important; }

/* 2. buttons: one yellow per area, all the same height */
.btn { border-radius: var(--r1); font-weight: 600; }
.btn.pri, .btn.pri:hover:not(:disabled) {
    background: var(--brand) !important; border-color: var(--brandD) !important; color: #1c1d1f !important; box-shadow: none !important;
}
.btn.pri:hover:not(:disabled) { background: var(--brandD) !important; }
.btn.pri .i { color: #1c1d1f; }
.row .act .btn.pri ~ .btn.pri { background: var(--sf) !important; border-color: var(--ln2) !important; }

/* 3. data first: values loud, labels quiet */
.sh { font-size: 17px; font-weight: 800; }
.kpi span, dt, .case-order-row small, .case-overview-facts small, .money-facts dt, .sales-trace dt, .handover-head { color: var(--mu); font-size: 12px; font-weight: 500; }
.kpi b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.case-order-row strong, .handover-product, .ol-name, .plrow b, .prow b, .order-lines-area .name, .dlines b,
.money-review-value, .money-facts dd, .case-overview-facts b, .sales-trace dd { font-weight: 800; color: var(--tx); }
.case-order-row strong, .handover-product { font-size: 15.5px; }
.case-order-row small, .handover-product > small { font-weight: 700; color: var(--tx); opacity: .78; }   /* warehouse name: readable, not grey */
.case-order-row b, .num, td.num, .handover-row [data-hq] { font-variant-numeric: tabular-nums; font-weight: 800; }
.rt .nm, .tdn .nm, .cname, .sales-customer-name { font-weight: 800; color: var(--tx); }
.rs { color: var(--mu); }
.rs b { color: var(--tx); }
.stock-zero, .tred { color: #b42318; }

/* 4. fixed action places */
.row.td .act, .row .act { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; opacity: 1 !important; }
.ocard #oacts, .ocard .oacts, .order-page .actbar { position: sticky; bottom: 0; background: var(--sf); padding-block: 10px; border-block-start: 1px solid var(--ln); z-index: 2; }

/* 5. quieter helper text in working screens (kept for screen readers via the title where it matters) */
.work-today .xs-t.fa, .order-page .xs-t.fa, .case-page .xs-t.fa { font-size: 11.5px; }

/* the row list on Today */
.rows.todo .row.td { border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); margin-block-end: 8px; padding: 12px 14px; }
.rows.todo .row.td.red { border-inline-start: 4px solid #d92d20; }
.rows.todo .row.td.amb { border-inline-start: 4px solid var(--brand); }
.meta-kind { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--sf2); color: var(--mu); }
.meta-kind.red { background: #fde8e6; color: #b42318; }
.meta-kind.amb { background: var(--brandS); color: #6b5200; }

/* Avino, the coach (owner, 26 Nov 2026): one line, from the person's own data, with the button that does it */
.coach { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); }
.coach .avino { width: 52px; height: 46px; flex: none; }
.coach .say { flex: 1; min-width: 0; }
.coach .say b { display: block; font-size: 16px; font-weight: 800; color: var(--tx); }
.coach .say span { display: block; color: var(--mu); font-size: 13px; }
.coach .say .bubble-next { margin-top: 2px; }
.coach .btn { flex: none; }
.coach.done { background: var(--sf2); }
.coach-x { color: var(--mu); }

/* the main work of the day, one big card per role */
.mainwork { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.mw { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); text-align: start; color: var(--tx); cursor: pointer; font: inherit; }
.mw:hover { border-color: var(--ln2); background: var(--sf2); }
.mw small { color: var(--mu); font-size: 12.5px; font-weight: 600; }
.mw b { font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mw em { font-style: normal; color: var(--mu); font-size: 13px; }
.mw.now { border-color: var(--brandD); background: var(--brandS); }
.mw.now b { color: #1c1d1f; }
.mw .bar { height: 6px; border-radius: 3px; background: var(--ln); overflow: hidden; }
.mw .bar i { display: block; height: 100%; background: var(--brandD); }
@media (max-width: 640px) { .mw b { font-size: 24px; } .coach { align-items: flex-start; } }

/* order lines: product, warehouse and stock are what the writer and approver check */
#olines .pn b { font-size: 15.5px; font-weight: 800; color: var(--tx); }
#olines .pn span { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 6px; background: var(--sf2); color: var(--tx); font-weight: 700; font-size: 12.5px; }
#olines td.num, #olines .num { font-weight: 800; }
#olines th, .ptbl th { color: var(--mu); font-weight: 600; font-size: 12px; }

/* warehouse pick list: product bold, quantity big, warehouse and code readable */
.pick-list .pk-nm { font-weight: 800; font-size: 15.5px; color: var(--tx); }
.pick-list .pk-nm small { display: block; font-weight: 600; font-size: 12.5px; color: var(--mu); }
.pick-list .pk-q { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--tx); }
.pick-list .pk-q small { font-size: 12px; font-weight: 600; color: var(--mu); margin-inline-start: 3px; }
.pick-list .pkb.on .pk-nm { text-decoration: line-through; color: var(--mu); }
.store-card .rc-name, .route-card .rc-name { font-size: 17px; font-weight: 800; }
.store-card .actbar .btn, .route-load .actbar .btn { min-height: 44px; }
.store-desk .work-heading, .route-page .work-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* logistics stops: what to deliver and where, without opening anything */
.route-load-items li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-block-end: 1px solid var(--ln); }
.route-load-items li span { font-weight: 700; color: var(--tx); }
.route-load-items li b { font-weight: 900; font-variant-numeric: tabular-nums; }
.route-stop-address { color: var(--tx); font-weight: 600; }
.route-stop-next { display: block; color: var(--mu); font-size: 12.5px; font-weight: 600; }
.route-stop[open] { background: var(--brandS); border-radius: var(--r2); }
.route-card .rc-no { font-weight: 900; }
.route-load .btn.pri { min-height: 48px; font-size: 16px; flex: 1 1 100%; }
.store-card .actbar .btn[data-store]:first-of-type { background: var(--brand); border-color: var(--brandD); color: #1c1d1f; font-weight: 800; }
@media (max-width: 640px) {
    .mainwork { grid-template-columns: 1fr 1fr; gap: 8px; }
    .mw { padding: 10px 12px; gap: 2px; }
    .mw b { font-size: 22px; }
    .mw em { font-size: 12px; }
    .coach { padding: 10px 12px; gap: 10px; }
    .coach .avino { width: 40px; height: 36px; }
    .coach .say b { font-size: 15px; }
}

/* call window: results big enough to hit without aiming; the quick «no answer» row stands out */
.call-result .chips .chip { min-height: 40px; font-size: 14.5px; font-weight: 700; }
.call-result .chips-quick .chip { background: var(--sf2); }
.call-result .chips .chip.on { background: var(--brand) !important; color: #1c1d1f !important; border-color: var(--brandD) !important; }
.outcome-groups .lbl { display: block; margin: 8px 0 4px; font-weight: 800; color: var(--tx); font-size: 13px; }
.outcome-groups .lbl:first-child { margin-top: 0; }
.call-coach { margin-block-end: 10px; }
.phone-big { font-size: 24px; font-weight: 900; letter-spacing: .5px; }
.call-actionbar .call-phone-tools .btn.pri { min-height: 42px; font-size: 15px; padding-inline: 18px; }
/* the customer's «next step»: its button is the thing to press, so it looks like one */
.nextstep .btn, .nextstep a.btn, .nextstep button { background: var(--brand) !important; border: 1px solid var(--brandD) !important; color: #1c1d1f !important; font-weight: 800; border-radius: var(--r1); min-height: 38px; padding-inline: 14px; }
.nextstep b { font-size: 15.5px; font-weight: 800; }

/* case: warnings, bottleneck, how it leaves, last notes, paths (owner, 26 Nov 2026) */
.case-alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.calert { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r1); font-size: 13.5px; border: 1px solid; }
.calert .i { width: 16px; height: 16px; }
.calert small { font-weight: 500; opacity: .85; }
.calert.red { background: #fde8e6; border-color: #f4b4ad; color: #8f1d14; }
.calert.amb, .calert.undefined { background: var(--brandS); border-color: var(--brandD); color: #5a4500; }
.calert.blue { background: #e6effd; border-color: #b4cdf4; color: #173f7a; }
.case-focus { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--ln); border-inline-start: 5px solid var(--brandD); border-radius: var(--r2); background: var(--sf); }
.case-focus.red { border-inline-start-color: #d92d20; }
.case-focus.grn { border-inline-start-color: #12805c; }
.cf-where { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cf-where small, .cf-how small { color: var(--mu); font-weight: 600; font-size: 12px; }
.cf-where b { font-size: 20px; font-weight: 900; }
.cf-where span { color: var(--tx); }
.cf-what { margin: 0; font-weight: 700; }
.cf-how { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cf-how .dispatch-meta { font-weight: 800; font-size: 14px; padding: 3px 10px; border-radius: 6px; background: var(--brandS); color: #3b2f00; }
.cf-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cf-notes li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: start; padding: 8px 10px; border-radius: var(--r1); background: var(--sf2); }
.cf-notes li span { font-weight: 700; }
.cf-notes li small { color: var(--mu); white-space: nowrap; }
.cf-paths { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-paths .btn { min-height: 42px; }
.cs-focus { margin-block: 8px; }
@media (max-width: 640px) { .cf-notes li { grid-template-columns: 18px 1fr; } .cf-notes li small { grid-column: 2; } .cf-paths .btn { flex: 1 1 45%; } }
.seg button.seg-red { color: #b42318; }
.seg button.seg-red.on { box-shadow: inset 0 -2px 0 #d92d20 !important; }
/* follow-up (blue: a promised call, closes itself) vs task (violet: a job, closed by its owner) */
.meta-kind.fu { background: #e6effd !important; color: #173f7a !important; }
.meta-kind.task { background: #efe7fb !important; color: #4b2a85 !important; }
.meta-kind.fu.red, .meta-kind.task.red { box-shadow: inset 0 0 0 1.5px #d92d20; }
[data-fk].fk-fu.on { background: #e6effd !important; color: #173f7a !important; }
[data-fk].fk-task.on { background: #efe7fb !important; color: #4b2a85 !important; }
#mfkh { font-size: 13px !important; color: var(--tx) !important; font-weight: 600; }

/* follow-ups page: type first (blue / violet), counts big */
.fu-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--mu); }
.fu-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.fu-kind { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); color: var(--tx); font: inherit; cursor: pointer; }
.fu-kind b { font-size: 22px; font-weight: 900; }
.fu-kind.on { border-color: var(--tx); box-shadow: inset 0 -3px 0 var(--brand); }
.fu-kind.fu.on { border-color: #173f7a; box-shadow: inset 0 -3px 0 #3b6fd1; }
.fu-kind.task.on { border-color: #4b2a85; box-shadow: inset 0 -3px 0 #7c4ddb; }
.rows.todo .grp { font-weight: 800; margin: 10px 0 6px; }
.rows.todo .grp.red { color: #b42318; }
/* needs: in stock now = green and loud */
.deal.mine { border-color: #12805c !important; box-shadow: inset 4px 0 0 #12805c; }
.nlist .tag.grn { font-weight: 800; }

/* customer identity: the same block on order and case (owner, 26 Nov 2026) */
.cust-id { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); margin-block: 8px; }
.ci-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ci-name .nm { font-size: 21px; font-weight: 900; color: var(--tx); }
.ci-code { color: var(--mu); font-size: 12.5px; font-weight: 600; }
.ci-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px 16px; margin: 0; }
.ci-f.wide { grid-column: span 2; }
.ci-f dt { color: var(--mu); font-size: 12px; font-weight: 600; }
.ci-f dd { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--tx); overflow-wrap: anywhere; }
.ci-f dd a { color: var(--tx); text-decoration: none; border-bottom: 1px dashed var(--ln2); }
.ci-f dd small { font-weight: 600; color: var(--mu); font-size: 12px; }
.ci-f.debt dd { color: #b42318; }
.ci-links { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .ci-f.wide { grid-column: auto; } }
/* case: the title says which document; every section carries a button back to it */
.case-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-doc-title { font-size: 20px; font-weight: 900; margin: 0; }
.case-stage-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-stage-heading h2 { margin-inline-end: auto; }
.case-order-items h2, .sh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn.case-doc { margin-inline-start: auto; }
/* order header: no empty white strip around the side buttons */
.order-header-actions, .document-actions { background: none !important; border: 0 !important; padding: 0 !important; }
/* products: stock out = red, price and stock bold; an agent sees only their own discount, not the approval ladder */
.st0, td.num.st0 { color: #b42318 !important; font-weight: 800; }
.tbl td.pn b, .tbl td.pn .pnl b { font-weight: 800; font-size: 15px; color: var(--tx); }
html[data-role="agent"] .tbl td.num[title] .xs-t.fa { display: none; }
html[data-role="agent"] .tbl td.num[title] br { display: none; }

/* BI (owner, 26 Nov 2026): Avino's one thing, one headline number, warnings only when non-zero */
.bi .coach { margin-block: 4px 8px; }
.bi-chips { margin-block: 0 8px; }
.bi-chips .calert { text-decoration: none; }
.bi-chips .calert b { font-size: 15px; }
.bi-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-block: 4px 12px; }
.bi-hero > div { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); }
.bi-hero .bh-main { border-inline-start: 5px solid var(--brandD); }
.bi-hero small { color: var(--mu); font-size: 12.5px; font-weight: 600; }
.bi-hero b { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--tx); line-height: 1.2; }
.bi-hero .bh-side b { font-size: 22px; }
.bi-hero em { font-style: normal; font-size: 13px; color: var(--mu); }
.bi-hero em b { font-size: inherit; font-weight: 800; }
.bi-hero .bh-u { font-size: 13px; margin-inline-start: 4px; }
.bi-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r1); background: var(--sf2); font-size: 13.5px; }
.bi-line .i { width: 16px; height: 16px; }
.bi-line b { font-weight: 900; }
.bi-line a { color: inherit; }
.bi .kpi.big b { font-size: 30px; }
.bi .kpi small { color: var(--mu); font-size: 12px; font-weight: 500; }
.bi .bi-freshness { margin-top: 16px; }
.bi-mode { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mu); margin-bottom: 8px; }
@media (max-width: 640px) { .bi-hero { grid-template-columns: 1fr; } .bi-hero b { font-size: 26px; } }
.bi-who { display: flex; align-items: center; gap: 8px; }
.bi-who .nm { font-weight: 800; }
/* phone: the coach button goes under the words, full width, instead of squeezing them */
@media (max-width: 640px) { .coach { flex-wrap: wrap; } .coach .say { flex: 1 1 calc(100% - 70px); } .coach > .btn, .coach > a.btn { flex: 1 1 100%; } }
/* main-work progress bar in 10% steps (no inline styles: tests/ux_contract.py) */
.mw .bar i.w0 { width: 0%; }
.mw .bar i.w1 { width: 10%; }
.mw .bar i.w2 { width: 20%; }
.mw .bar i.w3 { width: 30%; }
.mw .bar i.w4 { width: 40%; }
.mw .bar i.w5 { width: 50%; }
.mw .bar i.w6 { width: 60%; }
.mw .bar i.w7 { width: 70%; }
.mw .bar i.w8 { width: 80%; }
.mw .bar i.w9 { width: 90%; }
.mw .bar i.w10 { width: 100%; }

/* late deliveries (owner, 26 Nov 2026): red everywhere, the same tag on card, lane, case and Today */
.late-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: #fde8e6; color: #8f1d14; font-weight: 800; font-size: 12.5px; margin-inline-end: 6px; }
.late-tag .i { width: 14px; height: 14px; }
.due-tag { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--brandS); color: #5a4500; font-weight: 800; font-size: 12.5px; margin-inline-end: 6px; }
.store-lane.has-late > summary { box-shadow: inset 4px 0 0 #d92d20; }
.late-box { border: 1px solid #f4b4ad; border-inline-start: 5px solid #d92d20; border-radius: var(--r2); background: #fff7f6; padding: 12px 14px; display: grid; gap: 8px; }
.late-box header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.late-box header b { display: inline-flex; align-items: center; gap: 6px; color: #8f1d14; font-size: 16px; font-weight: 900; }
.late-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.late-box li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 4px 10px; align-items: baseline; }
.late-box li .nm { font-weight: 800; text-align: start; }
.late-box li span { color: var(--mu); font-size: 13px; }
.late-box li small { grid-column: 1 / -1; color: var(--mu); font-size: 12px; }
@media (prefers-color-scheme: dark) { .late-box { background: transparent; } }
@media (max-width: 640px) { .late-box li { grid-template-columns: 1fr auto; } .late-box li span { grid-column: 1 / -1; grid-row: 2; } }
.lane-late { margin-inline-start: 8px; }

/* the week's distribution load on the warehouse desk */
.week-load .wl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.wl-day { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--ln); border-radius: var(--r2); background: var(--sf); text-align: center; }
.wl-day small { color: var(--mu); font-weight: 700; font-size: 12.5px; }
.wl-day b { font-size: 24px; font-weight: 900; }
.wl-day em { font-style: normal; color: var(--mu); font-size: 12px; }
.wl-day.today { border-color: var(--brandD); box-shadow: inset 0 -3px 0 var(--brand); }
.wl-day.late { border-color: #f4b4ad; background: #fff7f6; }
.wl-day.wl-none b { color: var(--mu); font-weight: 600; }
.wl-day .late-tag { justify-self: center; margin: 0; }
@media (max-width: 640px) { .week-load .wl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* custom product fields and the H-Q chart (owner, 26 Nov 2026) */
.pf-card .tdhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-sec h3 { font-size: 13px; color: var(--mu); font-weight: 700; margin: 10px 0 6px; }
.pf-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 16px; margin: 0; }
.pf-list dt { color: var(--mu); font-size: 12px; font-weight: 600; }
.pf-list dd { margin: 0; font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.pf-list .pf-wide { grid-column: 1 / -1; }
.pf-list .pf-long { white-space: pre-line; font-weight: 600; }
.pf-list .pf-empty dd { font-weight: 500; }
.pf-pub { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #e6effd; color: #173f7a; font-weight: 700; }
.pf-form { display: grid; gap: 12px; }
.pf-form-sec { border: 1px solid var(--ln); border-radius: var(--r2); padding: 8px 12px; display: grid; gap: 8px; }
.pf-form-sec legend { font-weight: 800; padding: 0 6px; }
.pf-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-multi { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pf-defs-wrap { overflow-x: auto; }
.pf-defs .input { min-width: 90px; }
.pf-pub-l { white-space: nowrap; font-size: 13px; }
.hq-chart { width: 100%; max-width: 420px; height: auto; display: block; margin: 6px 0 10px; }
.hq-chart text { font-size: 10px; fill: var(--mu); }
.hq-chart .hq-grid { stroke: var(--ln); stroke-width: 1; }
.hq-chart .hq-line { fill: none; stroke: var(--brandD); stroke-width: 2.5; }
.hq-chart .hq-pt { fill: var(--tx); }
.hq-chart .hq-ax { font-weight: 700; }

/* goods in and QR labels (owner, 26 Nov 2026) */
.rl-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.rl-head b { font-size: 16px; font-weight: 900; }
.rl-done { opacity: .75; }
.rl-lines .rl-n { width: 80px; }
.lbl-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.lbl-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.lbl-sheet { display: flex; flex-wrap: wrap; gap: 4mm; padding: 4mm; background: #fff; }
.lbl { box-sizing: border-box; display: flex; align-items: center; gap: 2mm; padding: 1.5mm; border: 1px dashed #bbb; overflow: hidden; background: #fff; color: #000; }
.lbl .lq { flex: none; line-height: 0; }
.lbl .lt { display: grid; gap: .6mm; min-width: 0; font-size: 8.5pt; line-height: 1.2; }
.lbl .lt b { font-weight: 800; overflow-wrap: anywhere; }
.lbl .lt small { font-size: 7pt; }
@media print { .noprint { display: none !important; } body, #app { background: #fff !important; } .lbl-sheet { display: block; padding: 0; gap: 0; }
  .lbl { border: 0; page-break-after: always; break-after: page; } }

/* printers settings (owner, 26 Nov 2026) */
.pr-win { display: grid; gap: 6px; }
.pr-w { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .8fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--ln); border-radius: var(--r1); }
.pr-w b { font-weight: 800; }
.pr-drv { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-drv li { display: grid; gap: 2px; }
.pr-drv small { color: var(--mu); }
@media (max-width: 640px) { .pr-w { grid-template-columns: 1fr auto; } }

/* purchase receiving */
.rl-lines .rc-n { width: 72px; }

/* relations graph on the product page */
.pg-svg { width: 100%; max-width: 860px; height: auto; display: block; margin: 0 auto; }
.pg-svg .ge { stroke-width: 2.5; }
.pg-svg .ge.alt { stroke: #12805c; } .pg-svg .ge.comp { stroke: #3b6fd1; }
.pg-svg .ge.check { stroke-dasharray: 6 5; opacity: .85; }
.pg-svg .gn circle { fill: var(--sf); stroke: var(--tx); stroke-width: 2; }
.pg-svg .gc circle { fill: var(--brand); stroke: var(--tx); stroke-width: 2; }
.pg-svg text { font-size: 11px; unicode-bidi: plaintext; fill: var(--tx); font-weight: 700; }
.pg-svg a:hover text { text-decoration: underline; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--mu); margin-bottom: 6px; }
.pg-legend i { display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-inline-end: 4px; }
.pg-legend i.alt { border-color: #12805c; } .pg-legend i.comp { border-color: #3b6fd1; } .pg-legend i.check { border-top-style: dashed; }
.rc-target { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-inline-end: auto; }
.rc-target .input { min-width: 140px; }
/* container labels and the labels hub (owner, 27 Nov 2026): big, plain, one job at a time */
.rc-pack { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.rc-lv { min-height: 44px; padding: 8px 18px; border: 2px solid var(--line, #ccc); border-radius: 12px; background: var(--card, #fff); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.rc-lv.on { border-color: var(--pri, #1a73e8); background: var(--pri, #1a73e8); color: #fff; }
.rc-plan { font-size: 14px; font-weight: 700; }
.lh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.lh-tile { display: grid; justify-items: center; gap: 10px; min-height: 170px; padding: 22px; border: 2px solid var(--line, #ddd); border-radius: 18px; background: var(--card, #fff); font: inherit; text-align: center; cursor: pointer; }
.lh-tile:hover, .lh-tile:focus-visible { border-color: var(--pri, #1a73e8); }
.lh-tile .i { width: 40px; height: 40px; }
.lh-tile b { font-size: 20px; }
.lh-tile span { font-size: 14px; color: var(--mu, #666); }
.lh-top { display: flex; align-items: center; gap: 12px; }
.lh-top h2 { margin: 0; font-size: 20px; }
.lh-back { min-height: 44px; font-size: 15px; }
.lh-say { font-size: 15px; margin: 4px 0; }
.lh-scan { display: flex; gap: 10px; flex-wrap: wrap; }
.lh-in { flex: 1 1 280px; min-height: 52px; font-size: 18px; }
.lh-big { min-height: 52px; padding: 10px 24px; font-size: 17px; font-weight: 800; }
.lh-card { display: grid; gap: 12px; padding: 18px; border: 2px solid var(--pri, #1a73e8); border-radius: 16px; background: var(--card, #fff); font-size: 16px; }
.lh-card.lh-warn { border-color: #d99500; }
.lh-list { display: grid; gap: 8px; }
.lh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line, #ddd); border-radius: 12px; background: var(--card, #fff); font: inherit; text-align: start; cursor: pointer; }
.lh-row.on { border: 2px solid var(--pri, #1a73e8); }
.lh-range { display: flex; gap: 16px; flex-wrap: wrap; }
.lh-range label, .lh-count { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.lh-range .input, .lh-count .input { width: 110px; min-height: 48px; font-size: 18px; text-align: center; }
.hn-btn { margin-top: 6px; }
.lbl .lt .lbl-box { font-size: 10pt; }
.lbl .lt > b:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lbl .lt .lseq { font-size: 7pt; white-space: nowrap; }
.lbl .lt .lseq b { font-size: 8pt; }
.rc-hist { display: block; font-size: 11px; white-space: nowrap; }
