/* FruitBusiness -- shell design system (variant C from the style comparison:
   shadcn-style tokens and component shapes), written as a plain, committed
   stylesheet rather than the Tailwind CDN script the comparison mockups
   used -- no runtime dependency, consistent with how the rest of this
   repo's services ship their own static/style.css. A handful of small
   utility classes cover the spacing/layout glue Tailwind utilities would
   otherwise provide; they are listed at the bottom and are not meant to be
   a general-purpose framework. */

:root{
  /* THE PAGE IS TINTED, THE BLOCKS ARE WHITE (2026-10-27, the legacy CRM's way): the page a very light blue, every
     card, the sidebar and the header white, a card lifted by a soft shadow instead of a border -- blocks read apart
     without hairlines between them */
  --background:#f6f9ff; --foreground:#0a0a0a;
  --surface:#ffffff;                                   /* the sidebar and the header */
  --card-border:transparent; --card-border-width:0px; --shadow-card:0 0 30px rgba(1,41,112,.08); --shadow-chrome:0 0 20px rgba(1,41,112,.06);
  --card:#ffffff; --card-foreground:#0a0a0a;
  --border:#e3e8f1; --input:#dfe4ee; --ring:#a1a1aa;
  --muted:#f1f4fa; --muted-foreground:#71717a;
  --label-foreground:#3f3f46;     /* a field's label: a step below the text (--foreground), above the muted grey */
  --primary:#18181b; --primary-foreground:#fafafa;
  --accent:#e7eefa; --accent-foreground:#18181b;    /* a lit row: plainly apart from the page's #f6f9ff */
  /* (2026-10-27, an experiment: the dark theme is GREY, not black -- lines and frames stay visible on it)
     the POSITIVE action button (.btn-primary, 2026-10-27, the owner's pick of ten, static/lab/buttons.html: no.4):
     a soft blue fill with blue text, in tune with the tinted page -- never black */
  --positive:#e7eefa; --positive-foreground:#1d4fd8; --positive-border:#c9d7f2;
  --positive-hover:#dbe6f8; --positive-hover-border:#b5c9ee;
  --destructive:#dc2626; --destructive-bg:#fef2f2;
  --success:#16a34a; --success-bg:#f0fdf4;
  --warning:#b45309; --warning-bg:#fffbeb;
  --info:#2563eb; --info-bg:#eff6ff;
  --radius:0.625rem;
  --shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg:0 20px 40px -10px rgb(0 0 0 / .18);
  --overlay:rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --background:#2b2d31; --foreground:#f2f3f5;
    --surface:#313338; --card-border:#4a4e57; --card-border-width:1px; --shadow-card:none; --shadow-chrome:none;
    --card:#36393f; --card-foreground:#f2f3f5;
    --border:#4a4e57; --input:#5c606b; --ring:#6b707b;
    --muted:#3f4249; --muted-foreground:#b5b9c2;
    --label-foreground:#d4d4d8;
    --primary:#fafafa; --primary-foreground:#18181b;
    --accent:#454952; --accent-foreground:#fafafa;
    --positive:#34466b; --positive-foreground:#c9dbff; --positive-border:#4a6194;
    --positive-hover:#3c5180; --positive-hover-border:#5a74ab;
    --destructive:#f87171; --destructive-bg:rgba(248,113,113,.12);
    --success:#4ade80; --success-bg:rgba(74,222,128,.12);
    --warning:#fbbf24; --warning-bg:rgba(251,191,36,.12);
    --info:#60a5fa; --info-bg:rgba(96,165,250,.12);
    --overlay:rgba(0,0,0,.55);
    color-scheme:dark;
  }
}
/* the browser's own parts follow the theme (2026-11-16): a native <select>'s list, the scrollbars, a date picker --
   Windows drew the list white under the dark theme's light words, only the chosen one readable */
:root{color-scheme:light;}
:root[data-theme="dark"]{color-scheme:dark;}
select option,select optgroup{background-color:var(--card);color:var(--foreground);}
:root[data-theme="dark"]{
  --background:#2b2d31; --foreground:#f2f3f5;
  --surface:#313338; --card-border:#4a4e57; --card-border-width:1px; --shadow-card:none; --shadow-chrome:none;
  --card:#36393f; --card-foreground:#f2f3f5;
  --border:#4a4e57; --input:#5c606b; --ring:#6b707b;
  --muted:#3f4249; --muted-foreground:#b5b9c2;
  --label-foreground:#d4d4d8;
  --primary:#fafafa; --primary-foreground:#18181b;
  --accent:#454952; --accent-foreground:#fafafa;
  --positive:#34466b; --positive-foreground:#c9dbff; --positive-border:#4a6194;
  --positive-hover:#3c5180; --positive-hover-border:#5a74ab;
  --destructive:#f87171; --destructive-bg:rgba(248,113,113,.12);
  --success:#4ade80; --success-bg:rgba(74,222,128,.12);
  --warning:#fbbf24; --warning-bg:rgba(251,191,36,.12);
  --info:#60a5fa; --info-bg:rgba(96,165,250,.12);
  --overlay:rgba(0,0,0,.55);
}

*{box-sizing:border-box;}
html,body{margin:0;min-height:100%;background:var(--background);color:var(--foreground);}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}   /* iOS never enlarges text on its own (a phone turned sideways) */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.45;}
a{color:inherit;}
/* FOCUS LOOKS LIKE HOVER (2026-10-13), the whole app, one rule: no ring of the browser's or of ours -- an element
   in focus looks exactly as it does under the pointer. Every hover in this file is written
   `:is(:hover,:focus-visible,:has(:focus-visible))` (the element, or the input inside a label / a row, in focus)
   and tests/test_security_and_i18n.py refuses a bare one. Tabbing still shows where one is, in our own styling;
   what had no hover of its own gets one below. */
:focus,:focus-visible{outline:none;}
.icon{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-0.15em;}

/* ---- primitives (the "library" layer of the shell) ---- */
.input:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--muted-foreground);}
a:not([class]):is(:hover,:focus-visible,:has(:focus-visible)){text-decoration-thickness:2px;}
.tip:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.toggle:is(:hover,:focus-visible,:has(:focus-visible)) .toggle-track{box-shadow:0 0 0 3px var(--accent);}
.slider input[type=range]:is(:hover,:focus-visible,:has(:focus-visible)){filter:brightness(.94);}
.card{border:var(--card-border-width) solid var(--card-border);background:var(--card);color:var(--card-foreground);border-radius:var(--radius);box-shadow:var(--shadow-card);}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;white-space:nowrap;border-radius:calc(var(--radius) - 2px);font-size:.8125rem;font-weight:500;height:2.25rem;padding:0 .9rem;transition:background-color .12s,opacity .12s;cursor:pointer;border:1px solid transparent;font-family:inherit;}
a.btn,span.btn{text-decoration:none;}
/* What is switched off is INERT: it answers to nothing -- no hover, no press, no focus ring. The
   pointer over it stays the ordinary arrow: that the button is off is seen, and said by its
   explanation. */
.btn:disabled,.btn[aria-disabled="true"]{opacity:.45;cursor:default;pointer-events:none;transition:none;outline:none;box-shadow:none;}
.btn-primary{background:var(--positive);color:var(--positive-foreground);border-color:var(--positive-border);font-weight:600;}
.btn-primary:is(:hover,:focus-visible,:has(:focus-visible)):not(:disabled){background:var(--positive-hover);border-color:var(--positive-hover-border);}
.btn-outline{border-color:var(--border);background:var(--card);color:var(--foreground);}
.btn-outline:is(:hover,:focus-visible,:has(:focus-visible)):not(:disabled){background:var(--accent);}
.btn-block{width:100%;}
.input, select.input, textarea.input{height:2.25rem;width:100%;border-radius:calc(var(--radius) - 2px);border:1px solid var(--input);background:var(--card);padding:0 .65rem;font-size:.8125rem;color:var(--foreground);font-family:inherit;}
label.field{display:block;font-size:.75rem;font-weight:500;margin-bottom:.35rem;color:var(--foreground);}
.field-wrap{margin-bottom:1rem;}
.field-hint{font-size:.6875rem;color:var(--muted-foreground);margin-top:.3rem;}
.badge{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.2rem .6rem;font-size:.6875rem;font-weight:600;}
.badge-outline{border:1px solid var(--border);color:var(--muted-foreground);}
.alert{border-radius:calc(var(--radius) - 2px);padding:.65rem .85rem;font-size:.8125rem;margin-bottom:1rem;}
.alert-destructive{background:var(--destructive-bg);color:var(--destructive);}
.alert-success{background:var(--success-bg);color:var(--success);}
.alert-info{background:var(--info-bg);color:var(--info);}
.sidebar-link{display:flex;align-items:center;gap:.65rem;padding:.5rem .7rem;border-radius:calc(var(--radius) - 2px);font-size:.8125rem;font-weight:500;color:var(--muted-foreground);text-decoration:none;}
.sidebar-link:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.sidebar-link.active{background:var(--accent);color:var(--foreground);}

/* ---- auth/landing shared bits ---- */
.auth-shell{min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem;}   /* dvh: the screen as it is seen, a phone's bars aside */
.auth-card{width:min(400px,100%);padding:2rem;}
.auth-card-wide{width:min(560px,100%);}
.auth-brand{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:1rem;margin-bottom:1.5rem;justify-content:center;}
.auth-brand .icon{width:1.3rem;height:1.3rem;}
.brand-logo{width:2rem;height:2rem;flex:none;}
.app-sidebar-brand .brand-logo{width:1.75rem;height:1.75rem;}
.auth-title{font-size:1.25rem;font-weight:700;text-align:center;margin:0 0 .3rem;}
.auth-subtitle{font-size:.8125rem;color:var(--muted-foreground);text-align:center;margin-bottom:1.5rem;}
.auth-footer{text-align:center;font-size:.8125rem;color:var(--muted-foreground);margin-top:1.25rem;}
.auth-topbar{position:fixed;top:1rem;right:1rem;z-index:5;}

/* ---- language switcher: a light, borderless button + dropdown ---- */
.lang-switcher{position:relative;}
/* .lang-switcher-button also carries .btn.btn-outline -- same height,
   padding, border radius and font as the header's Log in / Sign up, so all
   three sit on one visual line; the outline variant keeps it lighter than
   Sign up's primary button, on purpose. Only the icon-specific bits (flag
   size, caret gap) live here. */
.lang-switcher-button{gap:.35rem;padding-inline:.7rem;}
.lang-switcher-caret{width:.7rem;height:.7rem;color:var(--muted-foreground);}
.flag-icon{width:1.15rem;height:.77rem;border-radius:2px;flex:none;display:block;}
.lang-switcher-menu{position:absolute;top:calc(100% + .4rem);right:0;min-width:9.5rem;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:.3rem;z-index:20;}
.lang-switcher-item{display:flex;align-items:center;gap:.55rem;padding:.45rem .6rem;border-radius:calc(var(--radius) - 4px);font-size:.8125rem;color:var(--foreground);text-decoration:none;}
.lang-switcher-item:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.lang-switcher-item.active{font-weight:600;}

/* ---- /init: the @slug field, live validation and the city type-ahead ---- */
.slug-field{display:flex;align-items:center;border:1px solid var(--input);border-radius:calc(var(--radius) - 2px);overflow:hidden;}
.slug-field:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--muted-foreground);}
.slug-field-prefix{padding:0 0 0 .65rem;color:var(--muted-foreground);font-size:.8125rem;white-space:nowrap;user-select:none;}
.slug-field .input{border:none;padding-left:.1rem;outline:none;min-width:0;}
.field-hint-ok{color:var(--success);}
.field-optional{color:var(--muted-foreground);font-weight:400;}
.field-tip{position:relative;display:inline-grid;place-items:center;width:1rem;height:1rem;margin-left:.25rem;border-radius:999px;background:var(--muted);color:var(--muted-foreground);font-size:.625rem;font-weight:700;cursor:help;}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;}
@media (max-width:520px){.grid-3,.auth-card-wide .grid-2{grid-template-columns:1fr;gap:0;}}

/* ---- onboarding: steps, avatars, cancelling ---- */
.onboarding-step{text-align:center;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);margin-bottom:.4rem;}
.avatar-picker{display:flex;flex-direction:column;align-items:center;gap:.45rem;margin-bottom:1.25rem;}
.avatar-picker-button{position:relative;border:none;background:none;padding:0;border-radius:999px;cursor:pointer;}
/* the avatars are STICKERS (the pack, a not-chosen one too): no circle round them -- a soft shadow, a little stronger
   under the pointer */
.avatar-picker-button img{display:block;width:6rem;height:6rem;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.18));transition:filter .12s,transform .12s;}
.avatar-picker-button:is(:hover,:focus-visible,:has(:focus-visible)) img{filter:drop-shadow(0 4px 8px rgba(0,0,0,.25));transform:translateY(-1px);}
.avatar-picker-badge{position:absolute;right:0;bottom:0;display:grid;place-items:center;width:1.8rem;height:1.8rem;border-radius:999px;background:var(--primary);color:var(--primary-foreground);border:2px solid var(--card);}
.avatar-picker-badge .icon{width:.85rem;height:.85rem;}
.avatar-picker-caption{font-size:.75rem;color:var(--muted-foreground);}
.dialog-wide{width:min(560px,calc(100% - 2rem));}
.avatar-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:.6rem;margin:.75rem 0;}
.avatar-option{border:none;background:none;padding:0;border-radius:999px;cursor:pointer;}
.avatar-option img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(0,0,0,.16));transition:transform .1s,filter .1s;}
.avatar-option:is(:hover,:focus-visible,:has(:focus-visible)) img{transform:scale(1.08);filter:drop-shadow(0 4px 8px rgba(0,0,0,.25));}
.avatar-upload{display:flex;align-items:center;gap:.7rem;width:100%;padding:.55rem .7rem;border:1px dashed var(--border);border-radius:var(--radius);background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;margin-bottom:1rem;}
.avatar-upload:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.avatar-upload-preview{flex:none;display:grid;place-items:center;width:2.6rem;height:2.6rem;border-radius:999px;background:var(--muted);color:var(--muted-foreground);}
.avatar-upload-preview .icon{width:1.1rem;height:1.1rem;}
.avatar-upload-title{display:block;font-size:.8125rem;font-weight:500;}
.avatar-upload .field-hint{display:block;margin-top:.1rem;}
/* step 3: product and tier are radio cards */
.choice-row{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin-top:.4rem;}
@media (max-width:520px){.choice-row{grid-template-columns:1fr;}}
.choice{position:relative;display:block;cursor:pointer;}
.choice input{position:absolute;opacity:0;pointer-events:none;}
.choice-body{display:flex;flex-direction:column;gap:.15rem;height:100%;padding:.7rem .75rem;border:1px solid var(--border);border-radius:var(--radius);}
.choice:is(:hover,:focus-visible,:has(:focus-visible)) .choice-body{background:var(--accent);}
.choice input:checked + .choice-body{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary);}
.choice-title{font-size:.8125rem;font-weight:600;}
.choice-price{font-size:1rem;font-weight:700;margin:.15rem 0;}
.choice-period{font-size:.6875rem;font-weight:400;color:var(--muted-foreground);}
.choice-note{font-size:.6875rem;color:var(--muted-foreground);line-height:1.35;}
.trial-notice{font-size:1.0625rem;line-height:1.35;text-align:center;padding:.85rem 1rem;}
.plan-submit{margin-top:1.75rem;}
.alert-warning{background:var(--warning-bg);color:var(--warning);}
.stub-facts{margin:0 0 1rem;border:1px solid var(--border);border-radius:var(--radius);font-size:.8125rem;}
.stub-facts div{display:flex;justify-content:space-between;gap:1rem;padding:.5rem .75rem;}
.stub-facts div + div{border-top:1px solid var(--border);}
.stub-facts dt{color:var(--muted-foreground);}
.stub-facts dd{margin:0;font-weight:600;}
.cancel-registration{text-align:center;margin-top:1.25rem;}
.btn-link-destructive{border:none;background:none;padding:0;font:inherit;font-size:.75rem;color:var(--muted-foreground);text-decoration:underline;text-underline-offset:2px;cursor:pointer;}
.btn-link-destructive:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--destructive);}
.btn-destructive{background:var(--destructive);color:#fff;}
.btn-destructive:is(:hover,:focus-visible,:has(:focus-visible)){opacity:.9;}
.dialog{--dialog-head:.9rem;width:min(420px,calc(100% - 2rem));padding:var(--dialog-head) 1.5rem 1.5rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--card-foreground);box-shadow:var(--shadow-lg);}
.dialog::backdrop{background:var(--overlay);}
.dialog-title{font-size:1rem;font-weight:700;margin:0 0 .5rem;}
.dialog-body{font-size:.8125rem;color:var(--muted-foreground);margin:0 0 1.25rem;line-height:1.5;}
.dialog-actions{display:flex;justify-content:flex-end;gap:.6rem;flex-wrap:wrap;}
.field-hint-error{color:var(--destructive);}
.city-field{position:relative;}
.city-field-menu{position:absolute;top:calc(100% + .25rem);left:0;right:0;max-height:14rem;overflow-y:auto;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:.25rem;z-index:20;}
.city-field-item{display:block;width:100%;text-align:left;border:none;background:transparent;padding:.4rem .6rem;border-radius:calc(var(--radius) - 4px);font-size:.8125rem;font-family:inherit;color:var(--foreground);cursor:pointer;}
.city-field-item:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}

/* ---- branch switcher: absent entirely with a single branch (see layout_app.html) ---- */
.branch-switcher{position:relative;}
.branch-switcher-button{display:inline-flex;align-items:center;gap:.35rem;height:2.25rem;border:1px solid var(--border);background:transparent;color:var(--foreground);font:inherit;font-size:.8125rem;font-weight:500;padding:0 .7rem;border-radius:calc(var(--radius) - 2px);cursor:pointer;}
.branch-switcher-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.branch-switcher-button .icon{width:.9rem;height:.9rem;}
.branch-switcher-button .lang-switcher-caret{width:.7rem;height:.7rem;}
.branch-switcher-menu{position:absolute;top:calc(100% + .3rem);right:0;min-width:10rem;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:.3rem;z-index:20;}
.branch-switcher-menu{min-width:14rem;max-height:70vh;overflow-y:auto;}
.branch-switcher-city{color:var(--muted-foreground);font-weight:400;}
.branch-switcher-search{margin-bottom:.3rem;height:2rem;}
.branch-switcher-item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;padding:.4rem .6rem;border:none;border-radius:calc(var(--radius) - 4px);background:none;color:var(--foreground);font:inherit;font-size:.8125rem;text-align:left;cursor:pointer;}
.branch-switcher-item[hidden]{display:none;}
.branch-switcher-item:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.branch-switcher-item.active{font-weight:600;background:var(--accent);}
.branch-switcher-item small{display:block;font-size:.6875rem;font-weight:400;color:var(--muted-foreground);}
.branch-switcher-item kbd{font:inherit;font-size:.625rem;color:var(--muted-foreground);border:1px solid var(--border);border-radius:4px;padding:0 .3rem;white-space:nowrap;}
@media (max-width:800px){.branch-switcher-item kbd,.branch-switcher-city{display:none;}}
/* a phone shows the branch icon alone, like the avatar */
@media (max-width:640px){.branch-switcher-current,.branch-switcher .lang-switcher-caret{display:none;}.branch-switcher-button{padding:0 .55rem;}}
.auth-divider{display:flex;align-items:center;gap:.6rem;margin:1.25rem 0;color:var(--muted-foreground);font-size:.6875rem;text-transform:uppercase;letter-spacing:.04em;}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--border);}
.social-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;}
.social-btn{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:.6rem .3rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:transparent;font-size:.625rem;color:var(--muted-foreground);cursor:not-allowed;}
.social-btn .icon{width:1.1rem;height:1.1rem;}

/* ---- landing page ---- */
.landing-header{display:flex;align-items:center;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border);}
.landing-header .auth-brand{margin:0;justify-content:flex-start;}
.landing-header-actions{margin-left:auto;display:flex;gap:.6rem;align-items:center;}
.hero{max-width:760px;margin:0 auto;padding:4.5rem 1.5rem 3rem;text-align:center;}
.hero h1{font-size:2.25rem;font-weight:800;letter-spacing:-0.02em;margin:0 0 1rem;text-wrap:balance;}
.hero p{font-size:1rem;color:var(--muted-foreground);margin:0 0 2rem;}
.hero .btn{height:2.6rem;padding:0 1.4rem;font-size:.875rem;}
.sections{max-width:960px;margin:0 auto;padding:1rem 1.5rem 4rem;display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;}
.sections .card{padding:1.5rem;}
.sections h3{margin:0 0 .5rem;font-size:1rem;}
.sections p{margin:0;font-size:.8125rem;color:var(--muted-foreground);}
.landing-footer{text-align:center;padding:1.5rem;font-size:.75rem;color:var(--muted-foreground);border-top:1px solid var(--border);}
@media (max-width:720px){ .sections{grid-template-columns:1fr;} .hero h1{font-size:1.6rem;} }

/* ---- app shell (post-login) ---- */
.app-shell{display:flex;min-height:100vh;}
.app-sidebar{width:15rem;flex:0 0 auto;border-right:1px solid var(--card-border);background:var(--surface);box-shadow:var(--shadow-chrome);z-index:2;padding:1rem;display:flex;flex-direction:column;gap:.15rem;position:sticky;top:0;height:100vh;}
.app-sidebar-brand{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:.9rem;padding:.4rem .7rem 1rem;}
.app-main{flex:1;min-width:0;}
.app-header{display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--card-border);background:var(--surface);box-shadow:var(--shadow-chrome);position:relative;z-index:1;padding:0 1.5rem;height:3.5rem;}
/* The path: the page's title. Links muted, the last element -- the page -- in the foreground;
   one line, and when it does not fit it is the BEGINNING that gives way (the page stays). */
.app-crumbs{display:flex;align-items:center;gap:.45rem;min-width:0;font-size:.875rem;color:var(--muted-foreground);white-space:nowrap;}
.crumb{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--muted-foreground);text-decoration:none;}
a.crumb{flex:0 1 auto;}
a.crumb:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
.crumb-sep{flex:none;color:var(--border-strong,var(--muted-foreground));opacity:.7;}
.crumb-current{flex:0 0 auto;max-width:100%;margin:0;font:inherit;font-weight:600;color:var(--foreground);}
@media (max-width:640px){.app-crumbs{font-size:.8125rem;gap:.35rem;}}
.app-header-actions{margin-left:auto;display:flex;align-items:center;gap:.6rem;}
.app-avatar{width:1.6rem;height:1.6rem;border-radius:999px;background:var(--accent);display:grid;place-items:center;font-size:.7rem;font-weight:700;object-fit:cover;flex:none;}
.user-menu{position:relative;}
/* The header's buttons share one scale: 2.25rem high, .7rem of padding on both
   sides (.lang-switcher-button, .branch-switcher-button, this one). Inside:
   avatar, .5rem, name. */
.user-menu-button{gap:.5rem;padding:0 .7rem;}
.user-menu-button .app-avatar{display:block;}
.user-menu-button span.app-avatar{display:grid;}
.user-menu-name{line-height:1;}
.user-menu-popover{position:absolute;top:calc(100% + .4rem);right:0;min-width:13rem;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:.3rem;z-index:20;}
.user-menu-who{display:flex;flex-direction:column;gap:.1rem;padding:.45rem .6rem .55rem;margin-bottom:.3rem;border-bottom:1px solid var(--border);font-size:.8125rem;}
.user-menu-who span{font-size:.6875rem;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;}
.user-menu-item{display:flex;align-items:center;gap:.55rem;width:100%;padding:.45rem .6rem;border:none;border-radius:calc(var(--radius) - 4px);background:none;color:var(--foreground);font:inherit;font-size:.8125rem;text-align:left;cursor:pointer;}
a.user-menu-item{text-decoration:none;}
.user-menu-item:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.user-menu-item .icon{width:1rem;height:1rem;color:var(--muted-foreground);}
.user-menu-item.active{font-weight:600;}
.user-menu-role{padding:0 .6rem .5rem;margin:-.35rem 0 .3rem;border-bottom:1px solid var(--border);font-size:.6875rem;color:var(--muted-foreground);}
.user-menu-who{border-bottom:none;margin-bottom:0;}
.user-menu-group{padding-bottom:.3rem;margin-bottom:.3rem;border-bottom:1px solid var(--border);}
.user-menu-caption{padding:.2rem .6rem;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);}
/* a phone shows the avatar alone */
@media (max-width:640px){
  .user-menu-name{display:none;}
  .user-menu-button{padding:0;border-color:transparent;height:auto;border-radius:999px;}
  .user-menu-button .app-avatar{width:2rem;height:2rem;}
}
/* ONE content column per page: everything in it -- the row of buttons, the tabs, the lists,
   the notices -- is as wide as the column and starts and ends where it does. Every page states its
   width (layout_app.html, page_width): normal, document, wide -- or full, the whole screen, for pages
   of dense information (waybills, reports). A form is narrower on purpose. */
.app-content{--content-top:2rem;padding:var(--content-top) 2.5rem 2rem;--content-width:56rem;}
.app-content > *{max-width:var(--content-width);}
.app-content-wide{--content-width:70rem;}
.app-content-document{--content-width:64rem;}
.app-content-full{--content-width:none;}
.page-eyebrow{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--muted-foreground);margin-bottom:.35rem;}
.placeholder-panel{border:1px dashed var(--border);border-radius:var(--radius);padding:3rem 1.5rem;text-align:center;color:var(--muted-foreground);}
.placeholder-panel h2{color:var(--foreground);font-size:1rem;margin:0 0 .4rem;}
.placeholder-panel p{margin:0;font-size:.8125rem;}
@media (max-width:800px){
  .app-sidebar{display:none;}
  .app-content{--content-top:1.25rem;padding:1.25rem;}
}

/* An item's picture and its local number (_item_tag.html): a frame and a tab under it in the colour of the condition. */
.item-tag{flex:none;display:inline-flex;flex-direction:column;align-items:stretch;width:3rem;--tag:#4f7bbf;}
.item-tag-used{--tag:#d2645f;}
.item-tag-picture{display:grid;place-items:center;height:3rem;border:1px solid color-mix(in srgb,var(--tag) 55%,transparent);border-bottom:0;border-radius:4px 4px 0 0;background:var(--card);color:var(--muted-foreground);overflow:hidden;}
.item-tag-picture img{width:100%;height:100%;object-fit:contain;padding:3px;}
.item-tag-number{min-height:.95rem;padding:0 .2rem;border-radius:0 0 4px 4px;background:color-mix(in srgb,var(--tag) 75%,transparent);color:#fff;font-size:.625rem;font-weight:600;line-height:.95rem;text-align:center;font-variant-numeric:tabular-nums;letter-spacing:.01em;white-space:nowrap;overflow:hidden;}
.item-tag-none{background:color-mix(in srgb,var(--tag) 25%,transparent);}
.item-tag-large{width:5rem;}
/* An item as a thumbnail (_item_tag.html item_thumb): the frame in its condition's colour, the quantity of a lot on a
   small square of that colour sitting on the frame's bottom-right corner. */
.item-thumb{--tag:#4f7bbf;position:relative;flex:none;display:grid;place-items:center;width:var(--thumb,3.25rem);height:var(--thumb,3.25rem);
  border:1px solid color-mix(in srgb,var(--tag) 55%,transparent);border-radius:6px;background:var(--card);color:var(--muted-foreground);text-decoration:none;}
.item-thumb.item-tag-used{--tag:#d2645f;}
.item-thumb img{width:100%;height:100%;object-fit:contain;padding:2px;border-radius:inherit;}
a.item-thumb:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--tag);}
.item-thumb-qty{position:absolute;right:-.3rem;bottom:-.3rem;min-width:1.05rem;height:1.05rem;padding:0 .2rem;border-radius:4px;
  background:var(--tag);color:#fff;font-size:.625rem;font-weight:700;line-height:1.05rem;text-align:center;font-variant-numeric:tabular-nums;}
/* an item's stickers (_stickers.html): small pictures beside its properties, the name in the tooltip */
.item-sticker{display:inline-grid;place-items:center;width:1.375rem;height:1.375rem;vertical-align:middle;color:var(--muted-foreground);}
.item-sticker img{display:block;width:100%;height:100%;object-fit:contain;}
/* an item's page: its stickers as toggles -- pressed (on the item) full colour, the others faded */
.item-sticker-toggle{display:grid;place-items:center;width:2.25rem;height:2.25rem;padding:.2rem;border:1px solid var(--border);border-radius:6px;background:var(--card);cursor:pointer;}
.item-sticker-toggle img{width:100%;height:100%;object-fit:contain;filter:grayscale(1);opacity:.4;}
.item-sticker-toggle.is-on{border-color:var(--primary);background:var(--accent);}
.item-sticker-toggle.is-on img{filter:none;opacity:1;}
button.item-sticker-toggle:is(:hover,:focus-visible,:has(:focus-visible)) img{opacity:.8;}
span.item-sticker-toggle{cursor:default;}
/* a consignment unit given back to the supplier: greyed, as the old CRM did */
.item-returned{--tag:#9aa3ad;}
.item-returned img,.item-returned .bi{filter:grayscale(1);opacity:.45;}
.item-tag-large .item-tag-picture{height:5rem;}
.item-tag-large .item-tag-number{font-size:.75rem;line-height:1.2rem;min-height:1.2rem;}
/* An item's page (item.html), the old CRM's card: a row per fact -- the LABEL right-aligned on the left, the ICON in
   the middle, the VALUE on the right --, the rows in a column of a readable width; then the actions, the history */
/* the rows' card starts with its first row: no padding of its own above it (the card's 20 px and the rows' 12 px made
   43 px above the first label where every other row has 11 px) -- the row's own inset is the gap */
/* the rows run edge to edge of their card -- the hover covers the whole width --; the text keeps a 1rem inset inside
   the cells; what follows the rows (actions, history) has that inset of its own */
/* EXPERIMENT (2026-10-18): the item page's and the waybill page's blocks at most --item-width wide (760px since
   2026-10-20, so that the item's modal in the search opens at its final width), at the left. To undo, delete the
   .it-narrow rule. */
:root{--item-width:760px;}            /* the item page's blocks -- the full page and the search's modal alike */
.it-narrow{max-width:var(--item-width);}
.it-card{padding:0 0 1.25rem;overflow:hidden;}   /* a first / last row's hover keeps to the rounded corners */
/* the item page's head, a block of its own above the rows: its picture, then brand · device type and the model name */
.it-head-card{display:flex;align-items:center;gap:1.25rem;margin-bottom:1rem;padding:1.25rem 1.5rem;}
/* the block of where the item came from: its own card; the waybill as a badge, the balances as the old CRM's badges */
.it-origin{margin-bottom:1rem;padding-bottom:0;}   /* rows only: the last row's own inset is its bottom gap, as the first's is its top */
.it-badge{display:inline-flex;align-items:center;padding:.2rem .6rem;border-radius:4px;background:var(--wh-bg);color:var(--wh-ink) !important;font-size:.8125rem;font-weight:600;text-decoration:none;}
.it-badge:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--wh-bg-hover);}
.it-balance{display:inline-flex;align-items:center;gap:.3rem;padding:.15rem .55rem;border-radius:4px;font-size:.8125rem;font-weight:600;font-variant-numeric:tabular-nums;}
.it-balance .bi{font-size:.85rem;}
.it-balance-green{background:#dcfce7;color:#166534;}
.it-balance-blue{background:#dbeafe;color:#1e40af;}
.it-balance-red{background:#fee2e2;color:#991b1b;}
.it-title{display:flex;flex-direction:column;gap:.3rem;min-width:0;}
.it-title h1{margin:0;font-size:1.375rem;line-height:1.25;}
.it-kind{color:var(--muted-foreground);font-size:.8125rem;}
.it-title p{display:flex;align-items:center;gap:.5rem;margin:.15rem 0 0;font-size:.8125rem;}
/* the iOS Settings shape, with the icon of ours: the LABEL hugs the left edge, the VALUE the right edge, each as wide
   as its content, and the ICON stays on the row's midline -- the two halves around it are equal tracks, so neither
   text's length ever moves it: one vertical axis down the page */
.it-rows{display:grid;grid-template-columns:minmax(0,1fr) 3.8rem minmax(0,1fr);padding:0;}   /* no gaps: each row's hairline runs unbroken, edge to edge */
.it-row{display:contents;}
/* a row's text sits as far from its top and bottom as from the card's edges: 16 px all round (a 49 px row) */
.it-row > *{display:flex;align-items:center;min-height:3.05rem;padding:.3rem 0;border-bottom:1px solid var(--border);}
.it-row:last-child > *{border-bottom:0;}
/* the row under the pointer, across all three columns: the light hover of the app's other rows */
.it-row:is(:hover,:focus-visible,:has(:focus-visible)) > *{background:var(--accent);}
.it-row > .it-label{padding-left:1rem;}
.it-row > .it-value{padding-right:1rem;}
.it-row-section > *{border-top:1px solid var(--border);}   /* a group begins: the line doubles */
/* as iOS Settings: the LABEL is the definite text, the VALUE the lighter grey */
.it-label{justify-content:flex-start;color:var(--foreground);font-size:.9375rem;text-align:left;}
.it-label-short{display:none;}
@media (max-width:640px){.it-label-long{display:none;}.it-label-short{display:inline;}}
.it-icon{justify-content:center;color:var(--muted-foreground);}
.it-icon img{width:1.875rem;height:1.875rem;object-fit:contain;}
.it-icon .bi{font-size:1.4rem;}
/* a colour's swatch, the size of the row's icons (scoped: the badges' .wb-swatch, later in the file, is smaller) */
.it-icon .it-swatch{width:1.35rem;height:1.35rem;border-radius:50%;}
.it-value{flex-wrap:wrap;justify-content:flex-end;gap:.35rem;min-width:0;color:var(--muted-foreground);font-size:.9375rem;overflow-wrap:anywhere;text-align:right;}
.it-value :is(a,.it-text,.wd-comment-text,.wd-tracking-text,.it-link,.it-dest,.it-person){color:var(--muted-foreground);}
.it-person{display:inline-flex;align-items:center;gap:.45rem;}
.it-person img{width:1.5rem;height:1.5rem;border-radius:50%;object-fit:cover;}
.it-empty{color:var(--muted-foreground);}
.it-text{padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:right;cursor:pointer;}
.it-text.it-empty{color:var(--muted-foreground);}
.it-text-field{width:24rem;max-width:100%;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;text-align:right;outline:none;}
.it-text-field[hidden],.it-text[hidden]{display:none;}
/* an invisible select: the value as text, right-aligned, a pointer; its list opens on a click */
/* an invisible select -- no frame, no background --, only its caret at the right says it opens a list */
.it-select{max-width:100%;padding:0 .95rem 0 0;border:0;color:inherit;font:inherit;text-align:right;text-align-last:right;cursor:pointer;appearance:none;-webkit-appearance:none;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238b8f97' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center / .7rem .7rem;}
.it-select:is(:hover,:focus-visible){color:var(--foreground);outline:none;}
.it-chips{justify-content:flex-end;}
.it-condition{flex:none;}
.it-condition .segmented-item{height:1.75rem;}   /* Новое / Б/у: the chips' height, so the row keeps its height */
/* the blocks follow one another; the kit is one row of buttons */
.it-block{margin-bottom:1rem;}
.it-card.it-block:has(> .it-rows:only-child){padding-bottom:0;}   /* rows only: the last row's inset is the gap */
.it-kit{padding:1rem;}
.it-kit[hidden]{display:none;}
.it-gone{color:var(--muted-foreground);text-decoration:line-through;text-decoration-color:rgba(185,28,28,.6);}   /* a property the model no longer has */
.it-drop{display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;margin-left:.4rem;padding:0;border:1px solid var(--border);border-radius:6px;background:var(--card);color:#b91c1c;cursor:pointer;}
.it-drop:is(:hover,:focus-visible,:has(:focus-visible)){background:rgba(185,28,28,.08);border-color:rgba(185,28,28,.4);}
.it-row-missing .it-select:has(option[value=""]:checked){color:var(--muted-foreground);}
.it-kit-row{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem;}
/* (2026-10-18: the actions' and the history's cards had border-top:0 -- left over from when they were parts of the
   rows' card --, which took their top border away: they are blocks like the others now) */
/* Действия / Крафты: the caption above the card, the buttons centred -- the picture over its word */
.it-block-caption{margin:0 0 .4rem .25rem;color:var(--muted-foreground);font-size:.8125rem;font-weight:500;}
.it-actions{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:center;gap:.5rem;padding:1rem;}
.it-action-group{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;}
.it-action{display:inline-flex;align-items:center;gap:.4rem;}
.it-action img{width:1.15rem;height:1.15rem;object-fit:contain;}
.it-actions .it-action{flex-direction:column;justify-content:center;gap:.3rem;width:8rem;height:auto;min-height:4.25rem;padding:.55rem .4rem;font-size:.75rem;line-height:1.2;white-space:nowrap;text-align:center;}   /* one width for every action, wide enough for «В другой филиал» on one line */
.it-actions-crafts .it-action{white-space:normal;}
.it-actions .it-action img{width:1.6rem;height:1.6rem;}
.it-actions .tip{display:inline-flex;}
/* Крафты: all seven on ONE line, sharing it -- smaller words and pictures */
.it-actions-crafts{flex-wrap:nowrap;gap:.4rem;}
.it-actions-crafts > .tip{flex:1 1 0;min-width:0;}
.it-actions-crafts .it-action{width:100%;min-height:3.75rem;padding:.45rem .2rem;font-size:.6875rem;}
.it-actions-crafts .it-action img{width:1.35rem;height:1.35rem;}

/* A history row (_history.html), the old CRM's .actionrow: three badges of a fixed size -- what, who, when -- then the
   content as chips, on one line */
.hs-list{margin:0;padding:0;list-style:none;}
.hs-row{display:flex;align-items:center;gap:.25rem;min-height:2.6rem;padding:.25rem 0;border-bottom:1px solid var(--border);}
.hs-row:last-child{border-bottom:0;}
.hs-badge{flex:none;display:inline-flex;align-items:center;gap:.3rem;width:7rem;height:1.9rem;padding:0 .3rem;border-radius:4px;background:var(--wh-bg);color:var(--wh-ink);font-size:.6875rem;text-decoration:none;overflow:hidden;}
.hs-badge > span:last-child{flex:1;min-width:0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hs-badge img{flex:none;width:1.1rem;height:1.1rem;object-fit:contain;}
a.hs-badge:is(:hover,:focus-visible){background:var(--wh-bg-hover);}
.hs-avatar{flex:none;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;overflow:hidden;background:var(--muted);font-size:.625rem;font-weight:600;}
.hs-avatar img{width:100%;height:100%;object-fit:cover;}
.hs-content{flex:1;min-width:0;display:flex;align-items:center;gap:.25rem;overflow:hidden;white-space:nowrap;}
.hs-chip{flex:none;display:inline-flex;align-items:center;gap:.25rem;height:1.9rem;padding:0 .3rem;border-radius:4px;background:var(--wh-bg);color:var(--wh-ink);font-size:.75rem;text-decoration:none;white-space:nowrap;}
.hs-chip img{width:1.1rem;height:1.1rem;object-fit:contain;}
.hs-text{display:block;flex:0 1 auto;min-width:0;line-height:1.9rem;overflow:hidden;text-overflow:ellipsis;}
.hs-green{background:rgba(40,180,40,.13);}
.hs-red{background:rgba(200,40,40,.12);}
.hs-blue{background:rgba(40,110,200,.14);}
.hs-lightblue{background:rgba(40,150,220,.1);}
.hs-icon{padding:0 .25rem;}
.hs-was{opacity:.65;}
.hs-plus{color:var(--muted-foreground);font-size:.6875rem;margin:0 -.1rem;}
.hs-undone .hs-content > .hs-chip:not(.hs-tail){text-decoration:line-through;opacity:.65;}
.hs-link:is(:hover,:focus-visible){background:var(--wh-bg-hover);}
.hs-tail{margin-left:auto;}
.hs-content > .btn.hs-tail{flex:none;}
.hs-item{display:inline-flex;align-items:center;gap:.2rem;margin:0 .1rem;padding:0 .3rem 0 .15rem;height:1.45rem;border-radius:4px;background:var(--card);border:1px solid #4f7bbf;color:inherit;font-weight:600;text-decoration:none;vertical-align:middle;}
.hs-item-used{border-color:#d2645f;}
.hs-item img,.hs-item i{width:1.1rem;height:1.1rem;object-fit:contain;}
.hs-item:is(:hover,:focus-visible){background:var(--wh-bg-hover);}

@media (max-width:700px){.hs-row{flex-wrap:wrap;}.hs-who{margin-left:auto;}.hs-content{order:1;flex-basis:100%;flex-wrap:wrap;white-space:normal;}}
.it-history{padding:1rem;}
.it-history h2{margin:0 0 .35rem;font-size:1rem;}
@media (max-width:640px){
  .it-rows{grid-template-columns:minmax(0,1fr) 2.75rem minmax(0,1fr);}
}
/* The view switch of a list page: two joined buttons, rounded outside, a straight divider -- the waybill strip's shape. */
.view-switch{display:inline-grid;grid-auto-flow:column;grid-auto-columns:minmax(7.5rem,auto);border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);overflow:hidden;}
.view-switch-item{height:2.125rem;padding:0 1.1rem;border:0;background:transparent;color:var(--muted-foreground);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;}
/* a switch's picture before its word (Кратко / Подробно, the consignment tabs) */
.view-switch-item:has(> img){display:inline-flex;align-items:center;justify-content:center;gap:.45rem;}
.view-switch-item > img{width:1.1rem;height:1.1rem;object-fit:contain;}
.view-switch-item + .view-switch-item{border-left:1px solid var(--border);}
.view-switch-item:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--switch-hover);color:var(--foreground);}
.view-switch-item.active{background:var(--switch-on);color:var(--foreground);}

/* A posted waybill's header, the old CRM's (_waybill_head.html; 2026-10-17): one row of badges that never wraps, each
   of a set SIZE -- its widest at a wide screen: small 90px (number, documents, days), medium 140px (supplier,
   destination), large 170px (who posted it and when, the payment mode; who accepted it in the days' place), action
   100px, and an empty flex badge taking the slack between the days and who posted it -- so a badge is always in the
   same place. Every badge keeps .3rem inside it left and right. A track shrinks towards its
   minimum (a picture's room) only when the card is narrower than all of them. In a badge the picture sits flush left and
   the text is centred in the room beside it, cut with "…" when it does not fit. The old CRM's look -- 3px corners on a
   pale blue, a 28px picture -- made legible: 12px text, a darker ink (#173246 instead of #224758). As the card narrows
   the badges shed what they say: a person's surname, then the time (measured, static/waybill_head.js); the long words
   and the names (container queries). */
:root{--wh-bg:rgba(80,130,170,.11);--wh-bg-hover:rgba(80,130,170,.2);--wh-ink:#173246;--wh-ink-muted:#4b6478;}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--wh-bg:rgba(120,170,210,.13);--wh-bg-hover:rgba(120,170,210,.22);--wh-ink:#d6e6f3;--wh-ink-muted:#9fb6c8;}}
:root[data-theme="dark"]{--wh-bg:rgba(120,170,210,.13);--wh-bg-hover:rgba(120,170,210,.22);--wh-ink:#d6e6f3;--wh-ink-muted:#9fb6c8;}
.wh-card{container-type:inline-size;}
.wh{--wh-h:2.25rem;--wh-img:1.75rem;--wh-gap:.4rem;--wh-pad:.3rem;
  /* every slot its size at its widest -- the number never below five digits', the others never below a picture's room */
  --wh-number:90px;--wh-supplier:minmax(2.6rem,140px);--wh-dest:minmax(2.6rem,140px);
  --wh-mode:minmax(2.6rem,176px);--wh-docs:minmax(3.6rem,90px);--wh-state:minmax(3.6rem,90px);
  --wh-person:minmax(2.6rem,170px);--wh-action:minmax(2.6rem,100px);
  display:grid;align-items:center;column-gap:var(--wh-gap);padding:.6rem .75rem;border-bottom:1px solid var(--border);
  grid-template-columns:var(--wh-number) var(--wh-supplier) var(--wh-dest) var(--wh-mode) var(--wh-docs) var(--wh-state)
                        minmax(0,1fr) var(--wh-person) var(--wh-action);}
.wh-form{display:contents;}
.wh-b{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;min-width:0;height:var(--wh-h);padding:0 var(--wh-pad);overflow:hidden;white-space:nowrap;
  border:0;border-radius:3px;background:var(--wh-bg);color:var(--wh-ink);font:inherit;font-size:.75rem;line-height:1;text-decoration:none;}
.wh-b:not(:has(.wh-i)){grid-template-columns:minmax(0,1fr);}
.wh-b-flex{padding:0;}
:is(a,button).wh-b{cursor:pointer;}
:is(a,button).wh-b:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--wh-bg-hover);}
.wh-i{display:grid;place-items:center;width:var(--wh-img);height:var(--wh-img);padding:4px;overflow:hidden;color:var(--wh-ink-muted);font-size:.6875rem;font-weight:700;}
.wh-i img{display:block;width:100%;height:100%;object-fit:contain;}
.wh-i .bi{font-size:.95rem;line-height:1;}
.wh-i-letter{padding:0;border-radius:999px;background:var(--muted);}
.wh-txt{min-width:0;padding:0 .2rem;overflow:hidden;text-align:center;text-overflow:ellipsis;}
.wh-txt:empty{display:none;}
.wh-m{margin-left:.25rem;color:var(--wh-ink-muted);}
.wh-b-person .wh-txt{padding:0 .1rem;}
.wh-b-num{font-size:.8125rem;font-weight:600;font-variant-numeric:tabular-nums;}
.wh-b-num .wh-txt{padding:0 .25rem;}
.wh-b-docs,.wh-b-state{font-variant-numeric:tabular-nums;}
.wh-b-accept{font-weight:600;}
.wh-b-locked{cursor:default;}
.wh-b-locked .wh-i,.wh-b-locked .wh-txt{filter:grayscale(1);opacity:.55;}
.wh-no-text .wh-txt{display:none;}
/* a slot with nothing to say keeps its place, unseen (straight to the warehouse: no trip, no tracking) */
.wh-b-blank{background:transparent;}
/* two people in one person's room -- who wrote it, who accepted it: two short badges side by side, filling the room
   exactly as the one large badge does */
.wh-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:var(--wh-gap);min-width:0;}
.wh-b-short .wh-txt{padding:0 .1rem;}
.wh-days-ok .wh-txt{color:#15803d;}.wh-days-late .wh-txt{color:#b45309;}.wh-days-overdue .wh-txt{color:#b91c1c;}
/* "Принято на склад" (_waybill_head.html stock_head): number · supplier · destination · payment type (large) · documents
   · the slack · who (large) · the delivery time (medium) -- no action slot. The slack while it gets 40px or more (a card
   of ~1049px); narrower, every slot but the number shares the room in proportion to its size */
.wh-stock{--wh-mode:minmax(2.6rem,170px);--wh-state:minmax(2.6rem,140px);
  grid-template-columns:var(--wh-number) var(--wh-supplier) var(--wh-dest) var(--wh-mode) var(--wh-docs) minmax(0,1fr)
                        var(--wh-person) var(--wh-state);}
@container (max-width:1049px){
  .wh.wh-stock{--wh-supplier:minmax(2.6rem,140fr);--wh-dest:minmax(2.6rem,140fr);--wh-mode:minmax(2.6rem,170fr);
      --wh-docs:minmax(3.6rem,90fr);--wh-person:minmax(2.6rem,170fr);--wh-state:minmax(2.6rem,140fr);
      grid-template-columns:var(--wh-number) var(--wh-supplier) var(--wh-dest) var(--wh-mode) var(--wh-docs)
                            var(--wh-person) var(--wh-state);}
  .wh-stock .wh-b-flex{display:none;}
}
/* once the goods are in, the state is a large badge ("За 14 дней"), on every card of the list alike so that the badges
   stand one under another -- blank where the waybill never travelled */
.wh-state-wide{--wh-state:minmax(2.6rem,170px);}
/* the slack badge only while it gets 40px or more (the slots at their widest + 40px: a card of ~1111px, ~1191px with
   the large state); narrower it goes, and the slots share its room in proportion to their sizes -- all but the action,
   which keeps its 100px longest */
@container (max-width:1191px){
  .wh-state-wide{--wh-number:90px;--wh-supplier:minmax(2.6rem,140fr);--wh-dest:minmax(2.6rem,140fr);
      --wh-mode:minmax(2.6rem,176fr);--wh-docs:minmax(3.6rem,90fr);--wh-state:minmax(2.6rem,170fr);--wh-person:minmax(2.6rem,170fr);
      --wh-action:100px;
      grid-template-columns:var(--wh-number) var(--wh-supplier) var(--wh-dest) var(--wh-mode) var(--wh-docs) var(--wh-state)
                            var(--wh-person) var(--wh-action);}
  .wh-state-wide .wh-b-flex{display:none;}
}
@container (max-width:1111px){
  .wh:not(.wh-state-wide):not(.wh-stock){--wh-number:90px;--wh-supplier:minmax(2.6rem,140fr);--wh-dest:minmax(2.6rem,140fr);
      --wh-mode:minmax(2.6rem,176fr);--wh-docs:minmax(3.6rem,90fr);--wh-state:minmax(3.6rem,90fr);--wh-person:minmax(2.6rem,170fr);
      --wh-action:100px;
      grid-template-columns:var(--wh-number) var(--wh-supplier) var(--wh-dest) var(--wh-mode) var(--wh-docs) var(--wh-state)
                            var(--wh-person) var(--wh-action);}
  .wh:not(.wh-state-wide):not(.wh-stock) .wh-b-flex{display:none;}
}
/* What goes as room runs out is ONE ladder, climbed by static/waybill_head.js -- the fewest steps with which every
   badge fits, so what a badge shows depends on the card's width alone and never comes back as it narrows:
     1 a person's surname        2 "дней"                  3 the supplier's name (its slot shrinks to the logo)
     4 "№" (only where the number does not fit)  5 a person's time   6 the destination (likewise)
     7 the payment mode's label, once not a letter is left (until then it is cut letter by letter)
     8 Принять's label (its slot starts sharing)
     9 closer badges            10 a phone's sizes -- the spacing itself, only when nothing else is left to give
   Step rules outrank every slot rule (.wh.wh.wh-sN; the collapses and step 8 .wh.wh.wh.wh.wh-sN, above 9 and 10). */
.wh-s1 .wh-b-person .wh-word{display:none;}
.wh-s1 .wh-b-person .wh-m{margin-left:0;}
.wh-s2 .wh-b-state .wh-word{display:none;}
.wh.wh.wh.wh.wh-s3{--wh-supplier:calc(var(--wh-img) + 2 * var(--wh-pad));}
.wh-s3 .wh-b-supplier .wh-txt{display:none;}
.wh-b-num.wh-no-word .wh-word{display:none;}   /* step 4: only where the number itself does not fit (its slot is a fixed 90px) */
.wh-s5 .wh-b-person .wh-txt{display:none;}
.wh.wh.wh.wh.wh-s6{--wh-dest:calc(var(--wh-img) + 2 * var(--wh-pad));}
.wh-s6 .wh-b-dest .wh-txt{display:none;}
.wh.wh.wh.wh.wh-s8{--wh-action:minmax(2.6rem,100fr);}
.wh-s8 .wh-b-action .wh-txt{display:none;}
.wh.wh.wh-s9{--wh-gap:.3rem;padding:.5rem;}
.wh.wh.wh-s10{--wh-gap:1px;--wh-pad:1px;--wh-img:1.5rem;padding:.45rem .3rem;
  --wh-number:minmax(2.75rem,1fr);--wh-supplier:minmax(26px,1fr);--wh-dest:minmax(26px,1fr);--wh-mode:minmax(26px,1fr);
  --wh-docs:minmax(2.3rem,1fr);--wh-state:minmax(2.3rem,1fr);--wh-person:minmax(26px,1fr);--wh-action:minmax(26px,1fr);}
.wh-s10 .wh-txt{padding:0 1px;}
.wh-s10 .wh-b-num{font-size:.75rem;}

/* The COMPACT line of "В доставке" (waybills_delivery.html) -- a line of its own, not the header squeezed: the number,
   the supplier's and the destination's logos alone (no badge, no frame; who they are in the tooltip), the days on the
   way as a small square -- the number large, the word under it, tinted by how long --, the goods' thumbnails out of
   any badge and larger than the card's (merged by model, "×N", three shown, the rest fading), the total as plain text,
   and the accept button, the old CRM's badge, at the right edge: "Принять" in every mode, its icon money handed over
   instead of the tick while something is still to pay (modes 4-5; the tooltip says "Оплатить и принять"). */
.wd-row{--wh-h:2.25rem;--wh-img:1.75rem;--wh-pad:.3rem;--wh-gap:.4rem;   /* the header's own badge measures */
  /* ONE unit sizes the days square and every thumbnail, and the line's height follows from it: exactly the expanded
     card's header (a 2.25rem badge with .6rem above and below), so it can never grow past it */
  --wd-unit:2.9rem;--wd-thumb-gap:.5rem;
  display:grid;align-items:center;gap:.75rem;
  /* the thumbnails never show fewer than two and a half (the half fading at the edge); below that the button gives up
     its room -- it is the one track that shrinks */
  grid-template-columns:90px 2rem 2rem var(--wh-h) minmax(calc(2.5 * var(--wd-unit) + 2 * var(--wd-thumb-gap)),1fr) 7.5rem minmax(2.6rem,100px);
  height:calc(var(--wh-h) + 1.2rem);padding:calc((var(--wh-h) + 1.2rem - var(--wd-unit)) / 2) .75rem;}   /* the header's .75rem at the sides */
.wd-row-num{display:grid;}
.wd-row-logo{display:grid;place-items:center;width:2rem;height:2rem;padding:0;border:0;background:transparent;color:var(--muted-foreground);font:inherit;}
.wd-row-logo img{display:block;width:100%;height:100%;object-fit:contain;}
.wd-row-logo .bi{font-size:1.1rem;}
.wd-row-pic{display:grid;place-items:center;width:100%;height:100%;}
.wd-row-pic img{display:block;width:100%;height:100%;object-fit:contain;}
button.wd-row-logo{cursor:pointer;border-radius:4px;}
button.wd-row-logo:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
/* the days square: as high as the badges around it (--wh-h, the number badge's) and exactly as wide -- the number and
   the word one above the other, sized to fit it (2026-10-18; it used to be the thumbnails' larger unit) */
.wd-row-days{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--wh-h);height:var(--wh-h);border-radius:3px;line-height:1;font-variant-numeric:tabular-nums;}
.wd-row-days strong{font-size:.875rem;font-weight:700;letter-spacing:-.01em;}
.wd-row-days small{margin-top:.1rem;font-size:.5rem;font-weight:500;opacity:.85;}
.wd-row-days-ok{background:#dcfce7;color:#166534;}
.wd-row-days-late{background:#fef3c7;color:#92400e;}
.wd-row-days-overdue{background:#fee2e2;color:#991b1b;}
.wd-row-thumbs{--thumb:var(--wd-unit);display:flex;gap:var(--wd-thumb-gap);min-width:0;overflow:hidden;
  padding:.3rem .35rem .3rem 0;margin:-.3rem 0;}   /* room for a quantity sitting on a corner, not added to the height */
/* as many as the room allows; only when some do not fit, the last ones fade out at the edge (waybills_delivery.js) */
.wd-row-thumbs-cut{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 3rem),transparent 100%);
                           mask-image:linear-gradient(to right,#000 calc(100% - 3rem),transparent 100%);}
.wd-row-total{font-size:.9375rem;font-weight:700;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;}
.wd-row-accept{width:100%;}
/* "Принято на склад": the least -- number, supplier, the days square, the goods, the total */
.wd-row-stock{grid-template-columns:90px 2rem var(--wh-h) minmax(calc(2.5 * var(--wd-unit) + 2 * var(--wd-thumb-gap)),1fr) 10rem;}
.wd-row-stock .wd-row-total{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;}
.wd-row-stock .wd-paid-with{flex:none;width:4.75rem;justify-content:center;}   /* ONE width -- room for two logos side by side --, the logos centred in it: the amounts stand one under another whatever paid */
.wd-row-days-none{background:var(--muted);}
.wd-row-days-none img{width:55%;height:55%;object-fit:contain;filter:grayscale(1);opacity:.6;}
/* the columns are the same in every line -- the number, the total and the button stand one under another */

/* ---- administration: lists, members, forms that save on change ---- */
/* the page's buttons: flush with the right edge of the column; what says something about the
   page (a document's state) stays on the left */
.page-head{display:flex;align-items:center;justify-content:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;}
.page-head > .page-state{margin-right:auto;}
/* The band right under the header bar: the tabs at its left, standing on its line, and the page's
   action at its right, with the same space above it (to the header) and below it (to the line).
   When the two do not fit, the action takes a row of its own ABOVE the tabs (wrap-reverse), so
   the tabs stay on the line. */
.strip{--band-space:.75rem;display:flex;flex-wrap:wrap-reverse;justify-content:space-between;column-gap:1rem;min-height:calc(2.25rem + 2 * var(--band-space) + 1px);margin-top:calc(-1 * var(--content-top));margin-bottom:1rem;border-bottom:1px solid var(--border);}
.strip > .tabs{flex:0 0 auto;max-width:100%;align-self:center;margin:var(--band-space) auto;}   /* midway in the band, centred */
.strip:has(> .tabs){position:relative;justify-content:center;}
.strip:has(> .tabs) > :is(.btn,.tip){position:absolute;right:0;top:50%;transform:translateY(-50%);margin:0;}
@media (max-width:640px){                                   /* no room for both on one line: the action above, as before */
  .strip:has(> .tabs){position:static;}
  .strip:has(> .tabs) > :is(.btn,.tip){position:static;transform:none;margin:var(--band-space) 0 0 auto;}
}
.strip > .btn,.strip > .tip{align-self:center;margin:var(--band-space) 0 var(--band-space) auto;}
.member-name{display:block;font-size:1rem;font-weight:600;}
.page-state{display:flex;align-items:center;gap:.5rem;min-height:2.25rem;}
.page-subtitle{font-size:.8125rem;color:var(--muted-foreground);}
.btn-small{height:1.9rem;padding:0 .65rem;font-size:.75rem;}
.btn-primary:disabled:is(:hover,:focus-visible,:has(:focus-visible)),.btn-primary[aria-disabled="true"]:is(:hover,:focus-visible,:has(:focus-visible)),.btn-primary:disabled:active{opacity:.45;}
/* an explanation on something that is switched off */
.tip{position:relative;display:inline-flex;border-radius:calc(var(--radius) - 2px);cursor:default;}
/* a switched-off button inside its wrapper: the WRAPPER hears the pointer (static/tooltip.js) */
.tip > [disabled]{pointer-events:none;}
.social-tip{display:flex;}
.social-tip > .social-btn{flex:1 1 auto;}
.btn-outline-destructive{color:var(--destructive);}
.btn-outline-destructive:is(:hover,:focus-visible,:has(:focus-visible)):not(:disabled){background:var(--destructive-bg);}
.text-destructive{color:var(--destructive);}
/* ---- a branch, edited in a dialog over the list ---- */
.branch-dialog{width:min(640px,calc(100% - 1.5rem));max-height:calc(100vh - 2rem);padding:0;overflow:hidden;}
.branch-dialog[open]{display:flex;flex-direction:column;}
.branch-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1.4rem;border-bottom:1px solid var(--border);}
.branch-dialog-head .dialog-title{margin:0;}
.branch-dialog-body{padding:1.1rem 1.4rem;overflow-y:auto;}
.branch-dialog-foot{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1.4rem;border-top:1px solid var(--border);}
.branch-dialog-foot .btn{margin-left:auto;}
.branch-dialog-foot [hidden],.branch-dialog [hidden]{display:none;}      /* a button's display never beats "hidden" */
.branch-dialog-foot .icon-button{margin-left:-.45rem;}
.dialog-close{display:grid;place-items:center;width:2rem;height:2rem;border:none;border-radius:calc(var(--radius) - 3px);background:none;color:var(--muted-foreground);font-size:1.3rem;line-height:1;cursor:pointer;}
.dialog-close:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.section-caption{margin:0 0 .7rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);}
.section-caption .save-state{text-transform:none;letter-spacing:0;}
/* the branch's LOGO: the picture as it is, centred on the plain white of the paper it is
   printed on, in a frame of 1000 x 450 with slightly rounded corners */
.document-logo-frame{position:relative;width:max-content;max-width:100%;margin:0 auto 1rem;}
.document-logo-fixed{cursor:default;}                  /* a new branch: the logo every branch starts with */
.document-logo{display:grid;place-items:center;height:6.6rem;max-width:100%;aspect-ratio:1000 / 450;padding:0;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:#fff;overflow:hidden;cursor:pointer;}
.document-logo:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--ring);}
.document-logo img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;}
/* back to the logo every branch starts with: a small cross on the corner of one's own */
.document-logo-remove{position:absolute;top:-.45rem;right:-.45rem;display:grid;place-items:center;width:1.35rem;height:1.35rem;padding:0;border:1px solid var(--border);border-radius:999px;background:var(--card);color:var(--muted-foreground);font-size:.95rem;line-height:1;cursor:pointer;box-shadow:var(--shadow-sm);}
.document-logo-remove:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--destructive);border-color:var(--destructive);}
.document-logo-remove[hidden]{display:none;}
/* ... seen only while the pointer is over the logo, or the keyboard is on it or on the cross
   itself; a screen that cannot hover shows it all the time, or it could not be reached at all */
.document-logo-remove{opacity:0;transition:opacity .12s;}
.document-logo-frame:is(:hover,:focus-visible,:has(:focus-visible)) .document-logo-remove{opacity:1;}
@media (hover:none){.document-logo-remove{opacity:1;}}
.field-error{margin-top:.35rem;font-size:.75rem;color:var(--destructive);}

/* the city: changing it may change the branch's clock -- said before it is done */
.timezone-warning{margin-top:.5rem;padding:.7rem .9rem;border:1px solid var(--warning);border-radius:calc(var(--radius) - 2px);background:var(--warning-bg);font-size:.8125rem;line-height:1.45;}
.timezone-warning-actions{display:flex;gap:.5rem;margin-top:.6rem;}
/* the history of a branch: asked for with the button in the corner of the footer */
.branch-dialog-body[hidden]{display:none;}
/* the branch dialog as iOS rows (2026-10-30): groups of the windows' sheet rows edge to edge, a caption above each but
   the first; the document logo a thick row of its own, centred, no label */
.branch-dialog{--dialog-pad:1.4rem;}
.br-rows{border-top:1px solid var(--border);border-bottom:1px solid var(--border);}
.br-caption{margin:1.3rem 0 .45rem;}
.br-logo-row{justify-content:center;padding-block:1rem;}
.br-logo-row .document-logo-frame{margin:0 auto;}
.br-marks-row{justify-content:center;padding-block:.8rem;}
.br-rows .sheet-value{flex:0 1 20rem;}
.br-city{position:relative;display:block;width:100%;}
.br-city .city-field-menu{display:block;text-align:left;}
.br-city .city-field-menu[hidden]{display:none;}
.br-rows input:disabled{color:var(--muted-foreground);}
.branch-dialog-body:has(> .br-rows){padding-block:0 1.2rem;}
.branch-dialog-body > .br-rows:first-of-type{border-top:0;}
.branch-dialog-body > .alert:not([hidden]){margin:.9rem 0;}
.branch-dialog-body > .field-error,.branch-dialog-body > .timezone-warning{margin-top:.6rem;}
.icon-button{flex:none;display:grid;place-items:center;width:2.25rem;height:2.25rem;padding:0;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:none;color:var(--muted-foreground);font-size:1.1rem;cursor:pointer;}
.icon-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.icon-button.active{background:var(--accent);border-color:var(--border);color:var(--foreground);}
.history-list{margin:0;padding:0;list-style:none;}
.history-list li{padding:.6rem 0;}
.history-list li + li{border-top:1px solid var(--border);}
.history-change{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem .45rem;font-size:.8125rem;}
.history-change strong{flex:0 0 100%;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-foreground);}
.history-value{min-width:0;overflow-wrap:anywhere;}
.history-value:first-of-type{color:var(--muted-foreground);}
.history-arrow{color:var(--muted-foreground);}
.history-list small{display:block;margin-top:.15rem;font-size:.6875rem;color:var(--muted-foreground);}
.history-empty{margin:2rem 0;text-align:center;font-size:.8125rem;color:var(--muted-foreground);}
/* the processor picker (LibroMac's, /shared/processor-picker.js): this service's dress for its dialog --
   a second dialog over the item form; filled by the picker (.picker > header, .picker-search, .picker-options) */
.processor-picker-host{width:min(640px,calc(100% - 1.5rem));height:var(--list-dialog-height);max-height:var(--list-dialog-height);padding:0;overflow:hidden;}
.processor-picker-host .picker{display:flex;flex-direction:column;height:100%;}
.processor-picker-host .picker > header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1.2rem;}
.processor-picker-host .picker > header h2{margin:0;font-size:1rem;font-weight:700;}
.processor-picker-host .picker > header button{display:grid;place-items:center;width:2rem;height:2rem;border:none;border-radius:calc(var(--radius) - 3px);background:none;color:var(--muted-foreground);font-size:1.3rem;line-height:1;cursor:pointer;}
.processor-picker-host .picker > header button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.processor-picker-host .picker-search{padding:0 1.2rem .6rem;}
.processor-picker-host .picker-search input{width:100%;height:2.4rem;padding:0 .8rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);color:var(--foreground);font:inherit;font-size:.875rem;}
.processor-picker-host .picker-options{display:flex;flex-direction:column;min-height:0;flex:1 1 auto;overflow:hidden;}
.processor-picker-host .filter-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;padding:0 1.2rem .6rem;}
.processor-picker-host .filter-button{display:flex;align-items:center;gap:.5rem;min-width:0;min-height:2.6rem;padding:.35rem .6rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);color:var(--foreground);font:inherit;font-size:.8125rem;cursor:pointer;}
.processor-picker-host .filter-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.processor-picker-host .filter-button strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600;}
.processor-picker-host .visual{display:grid;place-items:center;flex:0 0 auto;width:1.6rem;height:1.6rem;overflow:hidden;border-radius:6px;}
.processor-picker-host .visual img{width:100%;height:100%;object-fit:contain;}
.processor-picker-host .visual.placeholder{background:var(--muted);color:var(--muted-foreground);}
.processor-picker-host .picker-grid{min-height:0;overflow-y:auto;padding:0 1.2rem 1rem;}
.processor-picker-host .processor-picker-grid{display:flex;flex-direction:column;gap:.15rem;}
.processor-picker-host .processor-caption{margin:.7rem 0 .2rem;color:var(--muted-foreground);font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;}
.processor-picker-host .processor-caption-vendor{color:var(--foreground);font-size:.8125rem;letter-spacing:0;text-transform:none;}
.processor-picker-host .processor-row{display:flex;align-items:center;gap:.6rem;width:100%;padding:.4rem .5rem;border:none;border-radius:calc(var(--radius) - 3px);background:none;color:var(--foreground);font:inherit;font-size:.8125rem;text-align:left;cursor:pointer;}
.processor-picker-host .processor-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.processor-picker-host .processor-row strong{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;}
.processor-picker-host .processor-row > .bi-check-lg{display:none;}
.processor-picker-host .processor-row[data-selected="true"] > .bi-check-lg{display:inline-block;margin-left:auto;color:var(--foreground);}   /* multi mode: the picked rows say so */
.processor-picker-host .processor-load-sentinel{height:1px;}
.processor-picker-host .empty{padding:1.2rem 0;color:var(--muted-foreground);font-size:.8125rem;text-align:center;}
/* one filter's tiles, in place of the list */
.processor-picker-host .picker-grid:not(.processor-picker-grid){display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:.5rem;align-content:start;}
.processor-picker-host .picker-option{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;padding:.6rem .4rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);color:var(--foreground);font:inherit;font-size:.8125rem;cursor:pointer;}
.processor-picker-host .picker-option:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.processor-picker-host .picker-option[data-selected="true"]{border-color:var(--primary);}
.processor-picker-host .picker-option strong{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600;}
.processor-picker-host .picker-option small{color:var(--muted-foreground);font-size:.6875rem;}
@media (max-width:560px){.processor-picker-host .filter-button{gap:.35rem;padding:.3rem .4rem;}}
/* the item form's processor: the chosen one and its button */
.wb-processor-choice{display:flex;align-items:center;gap:.6rem;min-width:0;}
.wb-processor-chosen{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.875rem;}
.wb-processor-empty{color:var(--muted-foreground);font-style:italic;}
.wb-processor-pick{flex:0 0 auto;}
/* the image editor (LibroMac's, /shared/image-editor.js): this service's dress for its dialog */
.crop-dialog{width:min(720px,calc(100% - 1.5rem));padding:1rem 1.2rem 1.2rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--card-foreground);box-shadow:var(--shadow-lg);}
.crop-dialog::backdrop{background:var(--overlay);}
.crop-editor > header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:-.1rem 0 .9rem;}
.crop-editor > header h2{margin:0;font-size:1rem;font-weight:700;}
.crop-header-actions{display:flex;gap:.2rem;}
.crop-header-actions button{display:grid;place-items:center;width:2rem;height:2rem;border:none;border-radius:calc(var(--radius) - 3px);background:none;color:var(--muted-foreground);font:inherit;font-size:1.1rem;cursor:pointer;}
.crop-header-actions button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.crop-help{margin-bottom:.7rem;padding:.7rem .9rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--muted);font-size:.75rem;}
.crop-help ul{margin:.4rem 0 0;padding:0;list-style:none;display:grid;gap:.3rem;}
.crop-help li{display:grid;grid-template-columns:8rem 1fr;gap:.6rem;}
.crop-help li span{color:var(--muted-foreground);}
/* the checkerboard is the EDITOR's: there it shows what is transparent while the picture is being
   composed. The result -- the logo in the dialog, and wherever else it is shown -- is on plain white. */
#crop-canvas{display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:repeating-conic-gradient(#e4e4e7 0% 25%,#fff 0% 50%) 50% / 16px 16px;touch-action:none;cursor:grab;}
#crop-canvas.background-pick-mode{cursor:crosshair;}
.crop-toolbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.3rem;margin-top:.6rem;}
/* LibroMac's tools: the icon over its word; the chosen tool stays chosen under the pointer (a hover never repaints it:
   white words on the hover's light grey were the flicker) */
.crop-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;height:2.75rem;padding:.25rem .15rem;
  border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);color:var(--muted-foreground);font:inherit;cursor:pointer;}
.crop-tool .bi{font-size:.95rem;line-height:1;}
.crop-tool span{max-width:100%;overflow:hidden;font-size:.625rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}
.crop-tool:is(:hover,:focus-visible,:has(:focus-visible)):not(:disabled):not([aria-pressed="true"]){background:var(--accent);color:var(--foreground);}
.crop-tool[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground);}
.crop-tool:disabled{opacity:.4;cursor:not-allowed;}
.crop-sliders{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:.8rem;}
.crop-slider{display:grid;gap:.25rem;font-size:.75rem;}
.crop-slider > span{display:flex;justify-content:space-between;}
.crop-slider b{font-weight:600;}
.crop-slider.muted{opacity:.45;}
.crop-slider input{width:100%;margin:0;}
.crop-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1rem;}
@media (max-width:640px){.crop-sliders{grid-template-columns:1fr;gap:.5rem;}.crop-help li{grid-template-columns:1fr;gap:0;}}

/* ---- settings: a row, the iPhone's settings way -- the label (its hint under it) left, the control right, a hairline
   between rows, the whole row lit under the pointer (templates/_controls.html) ---- */
.settings{padding:0;overflow:hidden;}
.setting{display:flex;align-items:center;gap:1rem;min-height:3.25rem;padding:.55rem 1.1rem;cursor:pointer;transition:background-color .12s;}
.setting[hidden]{display:none;}
.setting + .setting, .setting-next + .setting{border-top:1px solid var(--border);}
.setting:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.setting-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:.1rem;}
.setting-label{font-size:.875rem;font-weight:500;cursor:pointer;}
.setting-control{flex:none;display:inline-flex;align-items:center;justify-content:flex-end;max-width:100%;margin-left:auto;}
.setting-select{width:auto;min-width:10rem;max-width:16rem;}
.setting-hint{font-size:.75rem;color:var(--muted-foreground);}
.setting-input{width:14rem;max-width:100%;}
.setting-number{width:8rem;}
/* Настройки (settings.html): from the second branch on, an area per card under its heading -- the
   organization's, then the current branch's; under a switch just turned on, the link to its editor */
.settings-area + .settings-area{margin-top:1.5rem;}
.settings-area-title{margin:0 0 .5rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);}
.setting-next{margin:0;padding:0 1.1rem .7rem;font-size:.8125rem;color:var(--muted-foreground);}
.setting-next a{color:var(--foreground);text-decoration:underline;text-underline-offset:2px;}
.settings-empty{color:var(--muted-foreground);font-size:.875rem;}
.setting-number .input{text-align:right;font-variant-numeric:tabular-nums;}
/* on / off */
.toggle{position:relative;display:inline-flex;cursor:pointer;}
.toggle input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;}
.toggle-track{display:block;width:3rem;height:1.75rem;padding:.125rem;border-radius:999px;background:var(--border-strong,var(--border));transition:background .18s;}
.toggle-thumb{display:block;width:1.5rem;height:1.5rem;border-radius:999px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .18s;}
.toggle input:checked + .toggle-track{background:var(--success);}
.toggle input:checked + .toggle-track .toggle-thumb{transform:translateX(1.25rem);}
.toggle input:disabled + .toggle-track{opacity:.45;}
/* one of a few: large buttons, pressing one releases the other */
.choice-buttons{display:inline-flex;gap:.4rem;}
.choice-button{position:relative;display:inline-flex;cursor:pointer;}
.choice-button input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;}
.choice-button span{display:inline-flex;align-items:center;justify-content:center;min-width:6.5rem;height:2.75rem;padding:0 1.1rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);font-size:.875rem;font-weight:600;color:var(--muted-foreground);transition:background .12s,color .12s,border-color .12s,box-shadow .12s;}
.choice-button:is(:hover,:focus-visible,:has(:focus-visible)) span{background:var(--accent);}
.choice-button input:checked + span{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground);box-shadow:inset 0 2px 4px rgba(0,0,0,.25);}
.choice-button input:disabled + span{opacity:.45;}
/* a figure on a scale */
.slider{display:inline-flex;align-items:center;gap:.7rem;}
.slider input[type=range]{--filled:50%;appearance:none;-webkit-appearance:none;width:12rem;max-width:45vw;height:1.75rem;margin:0;background:transparent;cursor:pointer;}
.slider input[type=range]::-webkit-slider-runnable-track{height:.35rem;border-radius:999px;background:linear-gradient(to right,var(--primary) var(--filled),var(--border-strong,var(--border)) var(--filled));}
.slider input[type=range]::-moz-range-track{height:.35rem;border-radius:999px;background:linear-gradient(to right,var(--primary) var(--filled),var(--border-strong,var(--border)) var(--filled));}
.slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1.4rem;height:1.4rem;margin-top:-.525rem;border-radius:999px;border:1px solid var(--border);background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);}
.slider input[type=range]::-moz-range-thumb{width:1.4rem;height:1.4rem;border-radius:999px;border:1px solid var(--border);background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);}
.slider-value{min-width:3.2rem;font-size:.875rem;font-weight:600;text-align:right;font-variant-numeric:tabular-nums;}
@media (max-width:640px){
  .setting-input{width:11rem;}
  .choice-button span{min-width:0;padding:0 .9rem;}
  .slider input[type=range]{width:8rem;}
}
@media (prefers-reduced-motion:reduce){.toggle-track,.toggle-thumb,.choice-button span{transition:none;}}

/* A section as a page of tiles -- the design of the first Управление page (commit 099ed61), its
   styles as they were: a compact card, a small icon, the name and a line of what the area is for.
   The grid is tighter than it was (four areas fit one row), and the whole card is the link. */
.tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(12.5rem,1fr));gap:.75rem;}
.tile{display:flex;flex-direction:column;gap:.2rem;padding:1.1rem 1.2rem;text-decoration:none;color:inherit;}
.tile:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.tile-icon{width:1.4rem;height:1.4rem;margin-bottom:.4rem;color:var(--muted-foreground);}
i.tile-icon{font-size:1.4rem;line-height:1;}
.tile-title{font-size:.9375rem;font-weight:600;}
.tile{position:relative;}
/* a tile's count (Открытые накладные) in its top-right corner, never wrapping its title */
.tile-count{position:absolute;top:1rem;right:1rem;display:inline-block;min-width:1.25rem;padding:0 .4rem;border-radius:999px;background:var(--muted);color:var(--foreground);font-size:.75rem;line-height:1.25rem;text-align:center;font-variant-numeric:tabular-nums;}
.tile-note{font-size:.75rem;color:var(--muted-foreground);}
@media (max-width:640px){.tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.tile{padding:.9rem 1rem;}}
.tile-note{font-size:.75rem;color:var(--muted-foreground);}
.list-caption{margin:1.5rem 0 .5rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);}
.list{overflow:hidden;}
.list-open{overflow:visible;}                 /* rows with a tooltip that opens beyond the card */
.list-row{display:flex;align-items:center;gap:.85rem;padding:.7rem 1rem;text-decoration:none;color:inherit;}
.list-row + .list-row{border-top:1px solid var(--border);}
button.list-row{width:100%;border:none;border-radius:0;background:none;font:inherit;text-align:left;cursor:pointer;}
button.list-row + button.list-row{border-top:1px solid var(--border);}
button.list-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
a.list-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.list-dimmed .list-row{opacity:.6;}
.list-row-chevron{flex:none;width:.8rem;height:.8rem;color:var(--muted-foreground);transform:rotate(-90deg);}
.list-row-actions{display:flex;gap:.4rem;flex:none;}
.member-avatar{flex:none;display:grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:999px;background:var(--muted);color:var(--muted-foreground);font-size:.8125rem;font-weight:700;overflow:hidden;}
.member-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.member-avatar-large{width:4rem;height:4rem;font-size:1.25rem;}
.member-who{display:flex;flex-direction:column;min-width:0;flex:1 1 12rem;}
.member-who strong{font-size:.8125rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.member-who small,.member-facts small{font-size:.6875rem;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;}
/* the role: a column of its own at the right edge, the same in every row */
.member-facts{display:flex;flex-direction:column;align-items:flex-end;gap:.2rem;min-width:0;flex:0 0 9rem;font-size:.8125rem;text-align:right;}
@media (max-width:640px){.member-facts{flex:1 1 100%;align-items:flex-start;text-align:left;padding-left:3.1rem;}}
.member-head{display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem;}
.badge-role{background:var(--muted);color:var(--foreground);}
.badge-role-owner,.badge-role-cofounder{background:var(--primary);color:var(--primary-foreground);}
.badge-role-sysadmin{background:var(--info-bg);color:var(--info);}
.badge-role-manager{background:var(--success-bg);color:var(--success);}
.badge-role-engineer{background:var(--warning-bg);color:var(--warning);}
.badge-row{display:flex;flex-wrap:wrap;gap:.35rem;}
.form-page{max-width:40rem;padding:1.25rem 1.4rem;margin-bottom:1rem;}
.form-actions{display:flex;justify-content:flex-end;gap:.6rem;}
.fieldset{border:none;padding:0;margin-inline:0;min-width:0;}
.fieldset legend{padding:0;}
.section-title{display:flex;align-items:baseline;gap:.6rem;margin:0 0 .75rem;font-size:.9375rem;font-weight:600;}
.save-state{font-size:.6875rem;font-weight:400;color:var(--muted-foreground);}
.save-state-ok{color:var(--success);}
.save-state-error{color:var(--destructive);}
/* the note itself, drawn over the page where it appeared (save_note.js); its anchor stays empty and takes no room */
.save-note{position:absolute;z-index:30;display:inline-flex;align-items:center;white-space:nowrap;pointer-events:none;transition:opacity .3s;}
.save-note-gone{opacity:0;}
.choice-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:.6rem;}
.choice input:disabled + .choice-body{opacity:.55;cursor:default;}
.check-list{display:flex;flex-direction:column;gap:.15rem;}
.check-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;}
.check{display:flex;align-items:flex-start;gap:.55rem;padding:.35rem .4rem;border-radius:calc(var(--radius) - 4px);font-size:.8125rem;cursor:pointer;}
.check[hidden]{display:none;}
.check:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.check input{margin:.15rem 0 0;accent-color:var(--primary);}
.check input:disabled ~ span{opacity:.55;}
.check-block small{display:block;font-size:.6875rem;line-height:1.35;}
.inline-name{display:flex;align-items:center;gap:.5rem;flex:1 1 12rem;min-width:0;}
.inline-name .input{font-weight:600;}
.history{list-style:none;margin:0;padding:0;font-size:.8125rem;}
.history li{display:flex;justify-content:space-between;gap:1rem;padding:.4rem 0;}
.history li + li{border-top:1px solid var(--border);}
.history small{flex:none;font-size:.6875rem;color:var(--muted-foreground);text-align:right;}
@media (max-width:640px){
  .list-row{flex-wrap:wrap;}
  .list-row-chevron{display:none;}
  .history li{flex-direction:column;gap:.1rem;}
  .history small{text-align:left;}
}

/* ---- money: tables, amounts, the balance ---- */
.page-actions{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;}
/* THE shades of a choice -- the segmented control (Новое / Б/у), the item form's value pills, the kit's
   picture buttons: all read these, so they never drift apart. Built on the palette's own --accent and
   --border, they follow it into dark mode. */
/* the chosen one: the hover shade with a twentieth of the text colour in it -- darker on light, the
   same step further from the page on dark */
:root{
  /* a segment of a switch (tabs, Кратко | Подробно, the consignments' and deliveries' tabs): under the pointer 70 % of
     the page's colour leaning BLUE, pressed 70 % of it leaning GREY (2026-10-27) */
  --switch-hover:color-mix(in srgb,var(--background) 70%,#d6e3fb);
  --switch-on:color-mix(in srgb,var(--background) 70%,#d5d9e1);
  --choice-off:transparent;--choice-hover:var(--accent);--choice-on:color-mix(in srgb,var(--accent) 95%,var(--foreground));
      --choice-border:var(--border);
      --choice-text:var(--muted-foreground);--choice-text-on:var(--foreground);}
.segmented{display:inline-flex;max-width:100%;border:1px solid var(--choice-border);border-radius:calc(var(--radius) - 2px);overflow-x:auto;white-space:nowrap;}
.segmented-item{display:inline-flex;align-items:center;gap:.35rem;height:2.25rem;padding:0 .8rem;font-size:.8125rem;font-weight:500;background:var(--choice-off);color:var(--choice-text);text-decoration:none;}
.segmented-item + .segmented-item{border-left:1px solid var(--choice-border);}
.segmented-item:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--choice-hover);}
.segmented-item.active{background:var(--choice-on);color:var(--choice-text-on);}
.table-wrap{overflow-x:auto;}
.table{width:100%;border-collapse:collapse;font-size:.8125rem;}
.table th{padding:.6rem .8rem;text-align:left;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-foreground);border-bottom:1px solid var(--border);white-space:nowrap;}
.table td{padding:.6rem .8rem;vertical-align:top;border-bottom:1px solid var(--border);}
.table tr:last-child td{border-bottom:none;}
.table .num{text-align:right;font-variant-numeric:tabular-nums;}
.nowrap{white-space:nowrap;}
.cell-main{margin-top:.2rem;font-weight:500;}
/* a specific item in a table (a posted waybill's lines, the stock): its tag (_item_tag.html) and its name lead to its card */
.wb-posted-item{display:flex;align-items:flex-start;gap:.75rem;min-width:18rem;}
.wb-posted-tag{flex:none;display:block;text-decoration:none;}
.cell-link{display:block;color:inherit;text-decoration:none;}
.cell-link:is(:hover,:focus-visible,:has(:focus-visible)){text-decoration:underline;}
.wb-posted-head{padding:0;margin-bottom:1rem;overflow:visible;}
.wb-posted-facts{margin:0;padding:.6rem .9rem;}
.lot-state{display:inline-block;margin-left:.4rem;padding:.05rem .4rem;border-radius:3px;background:var(--wh-bg);color:var(--wh-ink);font-size:.6875rem;font-weight:600;vertical-align:middle;}
.lot-state-first{margin-left:0;margin-right:.25rem;}
.cell-note{font-size:.6875rem;color:var(--muted-foreground);}
.amount-in{color:var(--success);}
.amount-out{color:var(--destructive);}
.row-reversed td{color:var(--muted-foreground);}
.row-reversed .cell-main,.row-reversed .amount-in,.row-reversed .amount-out{text-decoration:line-through;color:var(--muted-foreground);}
.row-reversal td{background:var(--muted);}
.row-dimmed{opacity:.55;}
.badge-kind{background:var(--muted);}
.badge-kind-income{background:var(--success-bg);color:var(--success);}
.badge-kind-expense{background:var(--destructive-bg);color:var(--destructive);}
.badge-kind-transfer{background:var(--info-bg);color:var(--info);}
/* a value and its suffix (static/amount_fields.js): the number right-aligned, the suffix right after it -- the field
   keeps exactly the suffix's measured width (--suffix) and a small gap free at its right, nothing reserved beyond */
.amount-field{position:relative;--suffix-gap:.3rem;--suffix-edge:.7rem;}
.amount-field .input{padding-right:calc(var(--suffix,1.5rem) + var(--suffix-gap) + var(--suffix-edge));text-align:right;font-variant-numeric:tabular-nums;}
.amount-field-currency{position:absolute;right:var(--suffix-edge);top:50%;transform:translateY(-50%);font-size:.75rem;color:var(--muted-foreground);pointer-events:none;white-space:nowrap;}
/* a group's column of suffixes (data-suffix-group, the item form): every suffix box as wide as the widest, its text
   CENTRED -- the widest fills it, a shorter one ("₽" beside "шт") sits in its middle; a value that is not an input (the battery's figure)
   puts its number and its suffix the same way: the number ends a gap before the column, the suffix in it */
/* the column's end is the ROW's edge: the widest suffix ends as far from the row's right edge as the label begins from
   its left (the row's own padding) -- no inner margin of the field's on top of it */
[data-suffix-group],[data-suffix-group] .amount-field,[data-suffix-group] .suffixed-value{--suffix-gap:.3rem;--suffix-edge:0px;}
[data-suffix-group] .amount-field-currency{width:var(--suffix);text-align:center;}
.suffixed-value{display:inline-flex;align-items:baseline;justify-content:flex-end;padding-right:var(--suffix-edge);}
.value-suffix{display:inline-block;width:var(--suffix,auto);margin-left:var(--suffix-gap,.3rem);text-align:center;font-size:.75rem;font-weight:400;color:var(--muted-foreground);white-space:nowrap;}
.wb-item-dialog .slider-value.suffixed-value{min-width:0;font-size:.8125rem;font-weight:400;}
.balance-row .member-who{flex:1 1 auto;}
.balance-amount{flex:none;text-align:right;font-size:.9375rem;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;}
.balance-row-below{background:var(--warning-bg);}
.balance-row-below .balance-amount,.balance-row-below small{color:var(--warning);}
.list-row-total{background:var(--muted);}
.list-note{margin:-.2rem 0 .6rem;font-size:.75rem;color:var(--muted-foreground);}
/* a group's total; behind it, the people it is made of */
.balance-group > summary{cursor:pointer;list-style:none;}
.balance-group > summary::-webkit-details-marker{display:none;}
.balance-group-caret{flex:none;width:.8rem;height:.8rem;color:var(--muted-foreground);transition:transform .15s;}
.balance-group[open] .balance-group-caret{transform:rotate(180deg);}
.balance-group:not([open]) > summary{border-bottom:none;}
/* an account's default fee, on its row */
.fee-field{flex:none;display:inline-flex;align-items:center;gap:.3rem;font-size:.75rem;color:var(--muted-foreground);}
.fee-field .input{width:3.6rem;height:2rem;padding:0 .4rem;text-align:right;}
.list-subcaption{margin:1rem 0 .4rem;font-size:.8125rem;font-weight:600;}
.balance-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:1rem;margin-bottom:.5rem;}
.balance-summary-card{display:flex;flex-direction:column;gap:.25rem;padding:1rem 1.2rem;}
.balance-summary-card strong{font-size:1.25rem;font-variant-numeric:tabular-nums;}
.switch{flex:none;}

/* ---- goods: receipts, stock ---- */
/* the row's line is an inset shadow, so the active tab's underline is drawn OVER it without hanging below the row:
   a tab 1px over a real border overflowed, and the sideways scroll (overflow-x) made that pixel a vertical scrollbar */
/* TABS are the view switch (2026-10-27, one principle with Консигнации / Исходящие доставки): a framed row of
   segments, each a picture and its name, a hairline between them; the same hover and the same pressed colour */
.tabs{display:grid;width:fit-content;grid-auto-flow:column;grid-auto-columns:minmax(7.5rem,auto);max-width:100%;margin:0 auto 1rem;
  border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);overflow-x:auto;overflow-y:hidden;}
.tab{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;height:2.125rem;padding:0 1.1rem;color:var(--muted-foreground);
  font-size:.8125rem;font-weight:600;text-decoration:none;white-space:nowrap;}
.tab + .tab{border-left:1px solid var(--border);}
.tab > img{width:1.1rem;height:1.1rem;object-fit:contain;}
.tab:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--switch-hover);color:var(--foreground);}
.tab.active{background:var(--switch-on);color:var(--foreground);}
/* in the band under the header: no line under it any more -- the pill stands on the page by itself */
.strip:has(> .tabs){border-bottom:0;}
.hint + .strip{margin-top:0;min-height:0;}     /* under a hint the band is not the page's first thing: no pull up under the header */
.hint + .strip > .tabs{margin:0;}            /* 1rem above (the hint) and below (the strip), even */
.tab-count{display:inline-grid;place-items:center;min-width:1.25rem;white-space:nowrap;font-variant-numeric:tabular-nums;height:1.25rem;padding:0 .3rem;border-radius:999px;background:var(--muted);font-size:.6875rem;font-weight:600;}
.table-links tbody tr{position:relative;}
.table-links tbody tr:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.row-link{color:inherit;text-decoration:none;font-weight:600;}
.row-link::after{content:"";position:absolute;inset:0;}
/* a control in a row whose link covers it all stands above the link */
tr [data-delete]{position:relative;z-index:1;}
.table tfoot td{padding:.6rem .8rem;border-top:1px solid var(--border);}
.table-inputs td{vertical-align:middle;}
.table-inputs td:first-child{min-width:14rem;}
.input-cell{height:2rem;min-width:5rem;}
.input-number{text-align:right;font-variant-numeric:tabular-nums;max-width:7rem;}
.form-page-wide{max-width:none;}
.badge-status{vertical-align:.25em;margin-left:.4rem;background:var(--muted);color:var(--muted-foreground);}
.badge-status-in_delivery{background:var(--info-bg);color:var(--info);}
.badge-status-accepted{background:var(--success-bg);color:var(--success);}
.badge-status-cancelled{background:var(--destructive-bg);color:var(--destructive);}
.facts{margin:0;font-size:.8125rem;}
.facts div{display:flex;gap:1rem;padding:.3rem 0;}
.facts dt{flex:0 0 10rem;color:var(--muted-foreground);}
.facts dd{margin:0;}
.segmented-input .segmented-item{cursor:pointer;}
.segmented-input input{position:absolute;opacity:0;pointer-events:none;}
.segmented-input .segmented-item:has(input:checked){background:var(--choice-on);color:var(--choice-text-on);}
.btn-link{border:none;background:none;padding:0;margin-top:.35rem;font:inherit;font-size:.75rem;color:var(--muted-foreground);text-decoration:underline;text-underline-offset:2px;cursor:pointer;}
.btn-link:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
.city-field-item small{color:var(--muted-foreground);}
.search-bar{display:flex;gap:.6rem;max-width:40rem;margin-bottom:1rem;}

/* ---- the menu: sections with their items ---- */
.app-nav{display:flex;flex-direction:column;gap:.15rem;overflow-y:auto;}
.sidebar-gap{flex:none;height:.85rem;}               /* between the menu's groups (navigation.GROUPS) */
.sidebar-section > summary{list-style:none;cursor:pointer;user-select:none;}
.sidebar-section > summary::-webkit-details-marker{display:none;}
.sidebar-caret{margin-left:auto;width:.7rem;height:.7rem;transition:transform .12s;}
.sidebar-section[open] > summary .sidebar-caret{transform:rotate(180deg);}
.sidebar-section[open] > summary{color:var(--foreground);}
/* an item stands a little in from its section -- its picture under the section icon's right half --, never so far
   that a long name wraps */
.sidebar-sublink{padding:.4rem .7rem .4rem 1.65rem;font-weight:400;}
.sidebar-sublink:has(.sidebar-picture){padding-left:1.4rem;}
.sidebar-picture{flex:none;width:1em;font-size:.75rem;line-height:1;text-align:center;}   /* the size of the sections' own icons (1em of the link's 13px, a bi glyph fills more of its box) */
.sidebar-sublink.active{font-weight:500;}

/* ---- logos: a branch, an account ---- */
.logo{flex:none;display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;border-radius:calc(var(--radius) - 3px);vertical-align:middle;overflow:hidden;}
.logo svg{width:100%;height:100%;display:block;}
.logo img{width:100%;height:100%;object-fit:cover;display:block;}
.logo img[hidden]{display:none;}            /* an uploaded picture that a shape and a colour replaced */
.logo-small{width:1.15rem;height:1.15rem;border-radius:4px;}
.logo-large{width:3.25rem;height:3.25rem;}
.logo-empty{opacity:.3;}
.logo-green{color:#16a34a;} .logo-blue{color:#2563eb;} .logo-orange{color:#ea580c;} .logo-violet{color:#7c3aed;}
.logo-red{color:#dc2626;} .logo-teal{color:#0d9488;} .logo-amber{color:#d97706;} .logo-pink{color:#db2777;}
.logo-slate{color:#64748b;}
.logo-face,.logo-small.logo-face{border-radius:50%;}
.logo-mark img{object-fit:contain;}      /* a picture standing for no account: a Stack, a consignment owed, mixed */     /* a personal account: its owner's face (logos.account_view) */
.logo-indigo{color:#4f46e5;} .logo-lime{color:#65a30d;} .logo-brown{color:#92400e;}
.branch-lamp{position:relative;}
.branch-lamp-button{display:grid;place-items:center;width:2.25rem;height:2.25rem;padding:0;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:none;cursor:pointer;}
.branch-lamp-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.branch-lamp-menu{position:absolute;top:calc(100% + .4rem);right:0;min-width:13rem;max-height:70vh;overflow-y:auto;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:.3rem;z-index:20;}
.branch-lamp-item{display:flex;align-items:center;gap:.6rem;width:100%;padding:.4rem .6rem;border:none;border-radius:calc(var(--radius) - 4px);background:none;color:var(--foreground);font:inherit;font-size:.8125rem;text-align:left;cursor:pointer;}
.branch-lamp-item:is(:hover,:focus-visible,:has(:focus-visible)),.branch-lamp-item.active{background:var(--accent);}
.branch-lamp-item.active{font-weight:600;}
.logo-picker{display:flex;align-items:flex-start;gap:1rem;}
.logo-picker-choices{flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;min-width:0;}
/* shapes on ONE row, colours on one row, item under item; where the row is too narrow for them
   the items shrink, all alike -- they never wrap into a second row of their own */
.logo-picker-row{display:grid;grid-template-columns:repeat(var(--per-row,12),minmax(0,2rem));gap:.3rem;width:100%;}
/* The icons of accounts: rows of larger shapes, the colours in one row of the same width. */
.dialog.dialog-icons{width:min(560px,calc(100% - 2rem));}
.logo-picker-large{flex-direction:column;align-items:stretch;margin-bottom:1.25rem;}
.logo-picker-large .logo-picker-preview{align-self:center;}
.logo-picker-large .logo-picker-choices{align-items:stretch;gap:.9rem;}
.logo-picker-large .logo-picker-shapes{grid-template-columns:repeat(var(--shapes-per-row),minmax(0,1fr));gap:.4rem;}
.logo-picker-large .logo-picker-shapes .logo-choice{padding:22%;}
.logo-picker-large .logo-picker-row:not(.logo-picker-shapes){grid-template-columns:repeat(var(--per-row),minmax(0,1fr));}
/* An icon and a name as one control: the icon is as tall as the input beside it. */
.icon-name{display:flex;align-items:stretch;gap:.5rem;}
.icon-name > .input{flex:1 1 auto;min-width:0;}
.icon-name > .icon-name-icon{border-color:var(--input);}          /* in the form the hairline is always there */
.grid-2[hidden]{display:none;}                  /* a grid is a display of its own: say it for [hidden] */
/* Suppliers: static/suppliers.css (shared with FB-Admin, which loads it from here). The
   variables it draws with are this stylesheet's. */
:root{--fb-tint:var(--accent);--fb-line:var(--input);--fb-muted:var(--muted-foreground);--fb-card:var(--card);
      --fb-border:var(--border);--fb-shadow:var(--shadow-lg);--fb-radius:var(--radius);--fb-gap:var(--muted);
      --fb-dash:var(--border-strong,var(--muted-foreground));}
/* the open waybills: the supplier's picture (or a "?") and name are the link */
/* The open waybills: ONE line per draft, fixed columns, nothing wraps; small pictures and type.
   The "?" of a draft without a supplier is a supplier's picture box: the same square. */
.drafts-table{table-layout:fixed;font-size:.8125rem;min-width:48rem;}    /* narrower: the card scrolls sideways, no column collapses */
.drafts-table col.c-who{width:11rem;} .drafts-table col.c-lines{width:4.5rem;} .drafts-table col.c-total{width:8.5rem;}
.drafts-table col.c-date{width:9.5rem;} .drafts-table col.c-trash{width:3rem;}
.drafts-table td.draft-cell{vertical-align:middle;padding-top:.45rem;padding-bottom:.45rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.drafts-table td.num{text-align:right;font-variant-numeric:tabular-nums;}
.draft-who,.draft-link{display:flex;align-items:center;gap:.5rem;min-width:0;}
.draft-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.draft-link .draft-text{font-weight:600;}
.draft-icon.supplier-avatar,.draft-icon.member-avatar{flex:none;box-sizing:border-box;width:1.5rem;height:1.5rem;font-size:.6875rem;}
.draft-icon.supplier-avatar .icon{width:.95rem;height:.95rem;}
.supplier-avatar.draft-unknown{font-weight:700;font-size:.75rem;line-height:1;color:var(--muted-foreground);background:var(--muted);}
.draft-editing{flex:none;width:.4rem;height:.4rem;border-radius:999px;background:var(--primary);}
.draft-delete{width:1.75rem;height:1.75rem;}
.supplier-choice{width:100%;border:0;background:none;font:inherit;text-align:left;cursor:pointer;}
.supplier-choice:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.supplier-chosen{background:var(--accent);}
.form-actions-start{justify-content:flex-start;}
/* the waybill's toolbar (templates/waybill.html): author, how the goods arrive, supplier -- each a
   picture and a name, the last two open their dialog -- and delete at the far end */
.waybill-toolbar{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem;}
/* the three are ONE segmented panel: equal fixed widths, one frame, a hairline between them */
.waybill-segments{flex:0 1 auto;display:grid;grid-template-columns:repeat(3,minmax(0,12.5rem));min-width:0;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);overflow:hidden;}
.waybill-tool{display:flex;align-items:center;justify-content:center;gap:.5rem;min-width:0;height:2.75rem;padding:0 .6rem;border:0;border-radius:0;background:transparent;color:var(--foreground);font:inherit;font-size:.8125rem;font-weight:600;text-align:center;cursor:pointer;}
.waybill-tool + .waybill-tool{border-left:1px solid var(--border);}
@media (max-width:640px){.waybill-segments{flex:1 1 100%;grid-template-columns:repeat(3,minmax(0,1fr));}
  .waybill-segments:has(#currency-open){grid-template-columns:repeat(4,minmax(0,1fr));}}
button.waybill-tool:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.waybill-tool-static{cursor:default;}
.post-mode-off{opacity:.45;cursor:not-allowed;}
.post-mode-off :is(*){pointer-events:none;}
.wb-currency-note{margin:.6rem 0 0;font-size:.8125rem;}
.waybill-tool-icon.supplier-avatar,.waybill-tool-icon.member-avatar{flex:none;box-sizing:border-box;width:1.9rem;height:1.9rem;font-size:.75rem;}
.waybill-tool-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* four segments (the currency's among them): a little smaller pictures and type, so the names keep their room */
.waybill-segments:has(#currency-open) .waybill-tool{gap:.4rem;padding:0 .45rem;font-size:.75rem;}
.waybill-segments:has(#currency-open) .waybill-tool-icon.supplier-avatar,
.waybill-segments:has(#currency-open) .waybill-tool-icon.member-avatar{width:1.55rem;height:1.55rem;}
.waybill-tool-delete{margin-left:auto;}
/* a choice dialog: title, the list (scrolling inside itself, whatever its length), the footer below */
.dialog-choice[open]{display:flex;flex-direction:column;height:var(--list-dialog-height);max-height:var(--list-dialog-height);overflow:hidden;}
.dialog-choice > .dialog-title,.dialog-choice > .dialog-actions{flex:none;}
.dialog-choice > .supplier-list.dialog-choice-list{flex:0 1 auto;min-height:0;overflow-y:auto;
  border:0;border-radius:0;background:none;margin:0 calc(-1 * var(--dialog-pad)) -1px;}   /* open rows, edge to edge, no frame */
.dialog-choice > .dialog-choice-list > .supplier-row{padding-left:var(--dialog-pad);padding-right:var(--dialog-pad);}
/* every row closes with its own hairline, the last one too (a short list ends on a line, not in the air); the list
   reaches 1px into the footer, so at its end the last row's line and the footer's lie on the same pixel -- one line */
.dialog-choice > .dialog-choice-list > .supplier-row{border-top:0;border-bottom:1px solid var(--border);}
.dialog-choice > .dialog-choice-list > .wb-models-caption{border-top:0;}
.row-end{flex:none;display:inline-flex;align-items:center;margin-left:auto;}
.icon-button-destructive:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--destructive-bg);color:var(--destructive);}
.icon-button:disabled{opacity:.4;cursor:default;pointer-events:none;}
.logo-choice{display:grid;place-items:center;width:100%;height:auto;aspect-ratio:1;padding:15%;border:1px solid transparent;border-radius:calc(var(--radius) - 3px);background:none;color:var(--muted-foreground);cursor:pointer;}
.logo-choice svg{width:100%;height:100%;}
.logo-choice:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.logo-choice.active{border-color:var(--primary);color:var(--foreground);}
.logo-swatch::before{content:"";width:100%;height:100%;border-radius:999px;background:currentColor;}
.logo-swatch.logo-green{color:#16a34a;} .logo-swatch.logo-blue{color:#2563eb;} .logo-swatch.logo-orange{color:#ea580c;}
.logo-swatch.logo-violet{color:#7c3aed;} .logo-swatch.logo-red{color:#dc2626;} .logo-swatch.logo-teal{color:#0d9488;}
.logo-swatch.logo-amber{color:#d97706;} .logo-swatch.logo-pink{color:#db2777;} .logo-swatch.logo-slate{color:#64748b;}
.logo-swatch.logo-indigo{color:#4f46e5;} .logo-swatch.logo-lime{color:#65a30d;} .logo-swatch.logo-brown{color:#92400e;}
/* An icon that opens the picker: a box of exactly the .input's height, radius and hairline, so
   that beside a name field the two read as one control; the glyph (1.75rem less its air) sits
   centred in it. The hairline shows on hover -- with a quiet tint, never a ring. */
.logo-button{flex:0 0 2.25rem;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:2.25rem;min-width:0;max-width:2.25rem;height:2.25rem;padding:0;margin:0;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:none;cursor:pointer;}
.logo-button .logo{width:1.75rem;height:1.75rem;padding:12%;}
.logo-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);border-color:var(--input);}
.page-foot{display:flex;flex-wrap:wrap;align-items:center;gap:1.25rem;margin-top:1rem;}
.page-foot .btn-link{margin-top:0;}
.facts-totals{margin-top:.75rem;max-width:26rem;margin-left:auto;}
.facts-totals div{justify-content:space-between;}
.facts-totals dt{flex:1 1 auto;}

/* ---- minimal utilities used by templates (not a general framework) ---- */
.flex{display:flex;} .items-center{align-items:center;} .justify-between{justify-content:space-between;}
.gap-1{gap:.25rem;} .gap-2{gap:.5rem;} .gap-3{gap:.75rem;} .flex-col{flex-direction:column;}
.mt-1{margin-top:.25rem;} .mt-2{margin-top:.5rem;} .mt-3{margin-top:.75rem;} .mt-4{margin-top:1rem;}
.mb-1{margin-bottom:.25rem;} .mb-2{margin-bottom:.5rem;} .mb-3{margin-bottom:.75rem;}
.w-full{width:100%;} .text-center{text-align:center;} .text-muted{color:var(--muted-foreground);}
.text-sm{font-size:.8125rem;} .text-xs{font-size:.6875rem;} .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;}

/* ---- the goods of a draft waybill (templates/_waybill_items.html, static/waybill_items.js) ---- */
/* the filter row: Бренд · Тип · Выбрать, each a picture and a caption */
.wb-picker{display:grid;grid-template-columns:repeat(3,minmax(0,10rem));gap:.5rem;margin-bottom:1rem;}
.wb-picker-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;min-width:0;padding:.6rem .5rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);color:var(--foreground);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;}
/* lit: a soft grey with only a breath of blue -- lighter than the rows' blue (2026-10-27) */
.wb-picker-button:is(:hover,:focus-visible,:has(:focus-visible)){background:#f3f5f9;}
.wb-picker-button:disabled{opacity:.4;cursor:default;pointer-events:none;}
.wb-picker-active{border-color:var(--ring);}
.wb-picker-text{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-visual{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:calc(var(--radius) - 3px);overflow:hidden;color:var(--muted-foreground);}
.wb-visual img{width:100%;height:100%;object-fit:contain;}
.wb-visual .bi{font-size:1.4rem;line-height:1;}
@media (max-width:520px){.wb-picker{grid-template-columns:repeat(3,minmax(0,1fr));}}
/* the filter's tiles: "all" first, each with its count under the other filter */
.wb-tiles-dialog[open]{width:min(680px,calc(100% - 2rem));}
.wb-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;flex:0 1 auto;min-height:0;overflow-y:auto;padding-bottom:.6rem;}
@media (max-width:520px){.wb-tiles{grid-template-columns:repeat(3,minmax(0,1fr));}}
.wb-tile{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;padding:.6rem .4rem;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:none;color:var(--foreground);font:inherit;cursor:pointer;}
.wb-tile:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.wb-tile-chosen{background:var(--accent);border-color:var(--border);}
.wb-tile strong{max-width:100%;font-size:.75rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-tile small{font-size:.6875rem;color:var(--muted-foreground);}
/* the models, newest first */
.wb-model .wb-line-picture{width:2.5rem;height:2.5rem;}
.wb-model-year{flex:none;font-size:.75rem;}
/* a line: picture, name, its facts as badges, amount, two buttons -- one dense row */
.wb-lines{border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);}
.wb-line{display:grid;grid-template-columns:2.75rem minmax(0,1fr) auto auto;align-items:center;gap:.75rem;padding:.55rem .6rem;cursor:pointer;}
.wb-line + .wb-line{border-top:1px solid var(--border);}
.wb-line:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.wb-line-picture{display:grid;place-items:center;width:2.75rem;height:2.75rem;border-radius:calc(var(--radius) - 3px);overflow:hidden;color:var(--muted-foreground);flex:none;}
.wb-line-picture img{width:100%;height:100%;object-fit:contain;}
.wb-line-picture .bi{font-size:1.3rem;}
.wb-line-main{display:flex;flex-direction:column;gap:.3rem;min-width:0;}
.wb-line-name{display:flex;align-items:center;gap:.45rem;min-width:0;font-size:.875rem;font-weight:600;}
.wb-line-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-condition{flex:none;width:.5rem;height:.5rem;border-radius:999px;}
/* the condition dot: new is blue, used is red */
.wb-condition-new{background:#3b82f6;}
.wb-condition-used{background:#ef4444;}
.wb-line-facts{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;min-width:0;max-height:2.9rem;overflow:hidden;}
.wb-badge{display:inline-flex;align-items:center;gap:.2rem;max-width:9rem;padding:.05rem .4rem;border:1px solid var(--border);border-radius:999px;font-size:.6875rem;line-height:1.1rem;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-badge-code{max-width:12rem;font-variant-numeric:tabular-nums;}
.wb-line-actions{display:flex;gap:.1rem;}
.wb-line-actions form{margin:0;}
.wb-line-actions .icon-button{width:2rem;height:2rem;font-size:.95rem;}
.wb-lines-foot{display:flex;justify-content:flex-end;align-items:baseline;gap:.75rem;padding:.6rem .6rem 0;font-size:.8125rem;}
.wb-continue{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1rem;}
/* A waybill's documents (documents.js): the draft's button with its count, the window's tiles. */
.wb-docs-button{gap:.4rem;}
.docs-count{min-width:1.25rem;padding:0 .35rem;border-radius:999px;background:var(--wh-bg);color:var(--wh-ink);font-size:.6875rem;font-weight:700;line-height:1.25rem;text-align:center;}
.docs-count-none{display:none;}
.wh-b-locked{opacity:.55;cursor:default;}
.docs-dialog{width:min(44rem,calc(100% - 2rem));}
.docs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:.75rem;margin:0 0 var(--dialog-head);}  /* as far from the footer's line as from the head's */
.docs-tile{position:relative;aspect-ratio:3 / 4;min-width:0;border:1px solid var(--border);border-radius:6px;overflow:hidden;}
.docs-open{display:grid;place-items:center;width:100%;height:100%;background:var(--muted);color:var(--muted-foreground);text-decoration:none;}
.docs-open img{width:100%;height:100%;object-fit:cover;object-position:top;background:#fff;}
.docs-open .bi{font-size:2rem;}
.docs-tile:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--foreground);}
.docs-kind{position:absolute;left:.35rem;bottom:.35rem;padding:0 .3rem;border-radius:3px;background:#b91c1c;color:#fff;font-size:.625rem;font-weight:700;line-height:1rem;}
.docs-remove{position:absolute;top:.3rem;right:.3rem;width:1.75rem;height:1.75rem;background:var(--card);box-shadow:0 1px 2px rgba(0,0,0,.15);}
.docs-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;border-style:dashed;background:transparent;color:var(--muted-foreground);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;}
.docs-add .bi{font-size:1.5rem;}
.docs-add:disabled{cursor:progress;}
@media (max-width:640px){
  .wb-line{grid-template-columns:2.5rem minmax(0,1fr) auto;gap:.5rem;}
  .wb-line-actions{grid-column:3;grid-row:1 / span 2;flex-direction:column;}
  .wb-line-facts{max-height:none;}
  .wb-badge{max-width:6rem;}
  .wb-badge-code{max-width:8.5rem;}
}
/* the item form */
.wb-item-dialog[open]{width:min(640px,calc(100% - 2rem));max-height:min(92vh,56rem);overflow-y:auto;}
.wb-item-head{display:flex;align-items:center;gap:.75rem;}
.wb-item-head .dialog-title{margin:0;}
.wb-condition-switch{margin-bottom:1rem;}
.wb-chips{display:flex;flex-wrap:wrap;gap:.3rem;}
.wb-chip{max-width:100%;padding:.3rem .65rem;border:1px solid var(--border);border-radius:999px;background:none;color:var(--foreground);font:inherit;font-size:.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;}
.wb-chip:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.wb-chip[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground);}
.wb-kit-choices{display:flex;flex-wrap:wrap;gap:.4rem;}
/* COMPATIBILITY (compat_dialog.js): ONE badge of the chosen models' names, opening the picker; the picker's chips */
.wb-badge.compat-badge{max-width:100%;cursor:pointer;font:inherit;font-size:.8rem;padding:.15rem .6rem;background:var(--card);color:var(--foreground);border-color:var(--border);}
.wb-badge.compat-badge:is(:hover,:focus-visible){border-color:var(--primary);}
.wb-badge.compat-badge:disabled{opacity:1;color:var(--foreground);}
.compat-badge .compat-badge-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-badge.compat-badge-empty{color:var(--muted-foreground);border-style:dashed;}
.compat-badge:disabled{cursor:default;}
.compat-dialog{width:min(640px,calc(100% - 2rem));}
.compat-search{width:100%;margin-bottom:.75rem;}
.compat-list{display:flex;flex-wrap:wrap;gap:.35rem;max-height:min(55dvh,26rem);overflow-y:auto;padding-bottom:.75rem;}
.compat-chip{font-size:.8rem;}
.compat-old{opacity:.6;}
.wb-badge-compat{max-width:16rem;}
.wb-kit-choice{display:flex;flex-direction:column;align-items:center;gap:.2rem;width:4.6rem;padding:.5rem .25rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:none;color:var(--muted-foreground);font:inherit;cursor:pointer;}
.wb-kit-choice .bi{font-size:1.35rem;line-height:1;}
.wb-kit-choice small{max-width:100%;font-size:.625rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-kit-choice:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.wb-kit-choice[aria-pressed="true"]{border-color:var(--primary);background:var(--accent);color:var(--foreground);}
/* the item form: one field per row, the label on the left (as in the old system) */
.wb-picker{grid-template-columns:repeat(4,minmax(0,10rem));}
@media (max-width:520px){.wb-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;}.wb-picker-button{padding:.5rem .25rem;font-size:.75rem;}}
.wb-rows{border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);margin-bottom:1rem;}
/* 5px above and below (8, 6, 4px before, 2026-10-13); every row at least as tall as one holding a field -- the grid's
   row track is never under the field's 2.25rem, whatever the row holds (pills, a switch) -- and a row whose content
   wraps grows past it. The controls keep their own heights, label and value stay centred. */
.wb-row{display:grid;grid-template-columns:11rem minmax(0,1fr);grid-auto-rows:minmax(2.25rem,auto);align-items:center;gap:1rem;margin:0;padding:calc(.25rem + 1px) .75rem;border-top:1px solid var(--border);}
.wb-rows > .wb-row:first-child{border-top:0;}
.wb-row[hidden]{display:none;}
/* the item form's labels: a step lighter than the values beside them, not two -- darker than the muted grey,
   and at the values' own weight, so that they do not compete (2026-10-13) */
.wb-row-label{font-size:.8125rem;font-weight:400;color:var(--label-foreground);}
.wb-row-value{min-width:0;}

.wb-row .segmented{display:inline-flex;}
.wb-row .segmented-item{height:1.75rem;}          /* Новое / Б/у: about the pills' height, not over the row's fields */
@media (max-width:520px){.wb-row{grid-template-columns:1fr;gap:.35rem;}}
/* 03.10: shorter filter buttons; the model list and the item form one width; values to the right;
   the form's blocks apart; a property's "show all" -- small and quiet, a rare action */
.wb-picker-button{gap:.15rem;padding:.3rem .5rem;}
.wb-picker-button .wb-visual{width:1.9rem;height:1.9rem;}
.wb-picker-button .wb-visual .bi{font-size:1.15rem;}
.wb-wide-dialog[open]{width:min(640px,calc(100% - 2rem));}
.wb-rows + .wb-rows{margin-top:1rem;}
.wb-row-label{text-align:left;display:flex;align-items:center;gap:.3rem;}
.wb-row-value{display:flex;justify-content:flex-end;text-align:right;}
.wb-row-value > .input,.wb-row-value > select.input,.wb-row-value.amount-field > .input,.wb-row-value > .amount-field{width:100%;}
.wb-row-value .input{text-align:right;}
.wb-row-value select.input{text-align-last:right;}
.wb-row-value > .amount-field{position:relative;display:block;}
.wb-chips{justify-content:flex-end;}
.wb-kit-choices{justify-content:flex-end;}
.wb-more{display:inline-grid;place-items:center;width:1.25rem;height:1.25rem;padding:0;border:0;border-radius:999px;background:none;color:var(--muted-foreground);opacity:.45;font-size:.75rem;cursor:pointer;}
.wb-more:is(:hover,:focus-visible,:has(:focus-visible)){opacity:1;background:var(--accent);}
.wb-more:disabled{cursor:default;opacity:.3;background:none;}
@media (max-width:520px){.wb-row-value{justify-content:flex-start;text-align:left;}.wb-row-value .input:not(.amount-field .input){text-align:left;}.wb-chips,.wb-kit-choices{justify-content:flex-start;}}
/* the currency step: the symbol in the picture's place, the code beside the name */
.supplier-avatar.wb-currency-symbol{font-size:1.1rem;font-weight:700;color:var(--foreground);background:var(--accent);}
.supplier-avatar.wb-currency-code-only{font-size:.625rem;letter-spacing:.02em;}
.wb-currency-code{margin-left:.5rem;font-size:.75rem;font-weight:500;}
/* a property's control fills the value; its "show all" sits at the right end, after it */
.wb-property .wb-row-value{align-items:center;gap:.35rem;}
.wb-property-control{flex:1 1 auto;min-width:0;display:flex;justify-content:flex-end;}
.wb-property-control > select.input,.wb-property-control > .amount-field{width:100%;}
.wb-property-control > .amount-field{position:relative;}
.wb-property .wb-more{flex:none;}
/* a line's badges: the property's icon, a colour's swatch */
.wb-badge .bi{font-size:.7rem;line-height:1;}
.wb-swatch{flex:none;width:.6rem;height:.6rem;border-radius:999px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18);}
/* the battery slider in its row */
.wb-row .slider{width:100%;justify-content:flex-end;}
.it-battery{justify-content:flex-end;}                 /* the item page's battery: the item form's slider */
.it-battery input[type=range]{width:12rem;max-width:40vw;}
.wb-row .slider input[type=range]{flex:1 1 auto;width:auto;max-width:none;}
/* a property's values: the choices read as controls (a light tint, no frame); the chosen one is the
   card's own white with a dark ring -- clear, lighter than a solid black pill. The kit's picture
   buttons speak the same way. */
.wb-chip{background:var(--muted);border:1px solid transparent;color:var(--foreground);}
.wb-chip:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);border-color:var(--border);}
.wb-chip[aria-pressed="true"]{background:var(--card);border-color:var(--foreground);color:var(--foreground);font-weight:600;box-shadow:0 0 0 1px var(--foreground);}
.wb-kit-choice{background:var(--muted);border-color:transparent;}
.wb-kit-choice[aria-pressed="true"]{background:var(--card);border-color:var(--foreground);color:var(--foreground);box-shadow:0 0 0 1px var(--foreground);}
/* the model list's group captions (LibroMac's small list captions): "Смартфоны · Apple" */
.wb-models-caption{padding:.7rem var(--dialog-pad,1rem) .3rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--muted-foreground);background:var(--card);}
.wb-models-caption:not(:first-child){border-top:1px solid var(--border);}
.wb-models-caption + .supplier-row{border-top:0;}
/* no goods yet: a word in the list's place */
.wb-empty{padding:1.5rem 1rem;border:1px dashed var(--border);border-radius:calc(var(--radius) - 2px);text-align:center;font-size:.875rem;color:var(--muted-foreground);}
/* THE KINDS' COLOURS (2026-11-03, the owner): one palette for every account kind, wherever a kind is told by colour --
   the accounts list's rows and icons, the «Какие бывают счета» dots and rows, later the balance page. One family (the
   600s of one scale; the 400s in the dark), so no kind shouts louder than another: plain green, with a fee blue,
   employees violet, investors red, customers amber. */
:root{--kind-plain:#16a34a;--kind-fee:#2563eb;--kind-employees:#7c3aed;--kind-investor:#dc2626;--kind-customers:#d97706;--kind-tint-share:3%;}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--kind-plain:#4ade80;--kind-fee:#60a5fa;--kind-employees:#a78bfa;--kind-investor:#f87171;--kind-customers:#fbbf24;--kind-tint-share:6%;}}
:root[data-theme="dark"]{--kind-plain:#4ade80;--kind-fee:#60a5fa;--kind-employees:#a78bfa;--kind-investor:#f87171;--kind-customers:#fbbf24;--kind-tint-share:6%;}
.account-kind-plain,.account-guide-plain{--kind:var(--kind-plain);}
.account-kind-fee,.account-guide-fee{--kind:var(--kind-fee);}
.account-kind-employees,.account-guide-employees{--kind:var(--kind-employees);}
.account-kind-investor,.account-guide-investor{--kind:var(--kind-investor);}
.account-kind-customers,.account-guide-customers{--kind:var(--kind-customers);}
/* the accounts page: one list, the kind said on each row -- a faint tint of its colour (just enough to see the kinds
   apart, not a traffic light) and an icon in it whose title names the kind */
.account-row{background:color-mix(in srgb,var(--kind,transparent) var(--kind-tint-share),transparent);cursor:grab;}
.account-kind{flex:none;display:grid;place-items:center;width:1.4rem;height:1.4rem;color:var(--kind,var(--muted-foreground));font-size:.85rem;cursor:help;}
.account-row.drag-gap{background:var(--muted);outline:1px dashed var(--border);outline-offset:-1px;}
.account-row.drag-gap > *{visibility:hidden;}
.account-drag-copy{position:fixed;z-index:60;pointer-events:none;box-sizing:border-box;margin:0;display:flex;align-items:center;gap:.75rem;padding:.6rem 1rem;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 30px rgba(0,0,0,.12);opacity:.95;}
body.account-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none;}
/* an account's currency, when the organization holds money in more than one */
.account-currency{flex:none;padding:.1rem .45rem;border:1px solid var(--border);border-radius:999px;font-size:.6875rem;font-weight:600;letter-spacing:.02em;color:var(--muted-foreground);background:var(--card);}
/* the item form's value pills and kit buttons: the segmented control's shades (--choice-*, above) */
.wb-chip,.wb-kit-choice{background:var(--choice-off);border:1px solid var(--choice-border);box-shadow:none;color:var(--choice-text);font-weight:500;}
.wb-chip:is(:hover,:focus-visible,:has(:focus-visible)),.wb-kit-choice:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--choice-hover);border-color:var(--choice-border);}
.wb-chip[aria-pressed="true"],.wb-kit-choice[aria-pressed="true"]{background:var(--choice-on);border-color:var(--choice-border);box-shadow:none;color:var(--choice-text-on);font-weight:500;}
/* the draft waybill's page: the editor takes the content's whole width (the lines' card spans it; the
   toolbar too, its delete at the card's right edge); the toolbar as far from the header as from what
   follows it; the picker on the page itself, no card */
#waybill-editor{max-width:none;}
.waybill-toolbar{margin-top:calc(1rem - var(--content-top));}
.wb-items .wb-picker{margin-bottom:1rem;}
.wb-lines-card{padding:1.25rem 1.4rem;}
/* the names on the picker's tiles and on the filter row's buttons: ONE size, so they stay equal */
:root{--wb-filter-name-size:.6875rem;}
.wb-tile strong{font-size:var(--wb-filter-name-size);}
.wb-picker-button .wb-picker-text,.wb-picker-button{font-size:var(--wb-filter-name-size);}
/* the filter row: a chosen brand / type / family picture as it is -- transparent PNGs need no frame:
   no rounding, no clipping, no background (the picker's tiles keep theirs) */
.wb-picker-button .wb-visual{border-radius:0;overflow:visible;background:none;}
.wb-picker-button .wb-visual img{border-radius:0;}
/* a badge's text ends in "…" when it is too long -- inside the badge's own padding, the same on both
   sides (a flex box cannot ellipsise bare text: the text has a box of its own) */
.wb-badge{overflow:hidden;}
.wb-badge-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wb-badge > .bi,.wb-badge > .wb-swatch{flex:none;}
.sh-note{max-width:14rem;}                     /* an item's note on a sale's line (_shop.html note_badge) */
.sh-note > img{flex:none;width:.85rem;height:.85rem;object-fit:contain;}
/* the kit's badge: its icons side by side, the property badges' icon size; never cut short */
.wb-badge-kit{gap:.3rem;max-width:none !important;}
.wb-badge-kit .bi,.wb-badge-icon .bi{line-height:1.1rem;}   /* icons only: the height of a badge with text */
.wb-badge-sticker img{display:block;width:1.1rem;height:1.1rem;object-fit:contain;}   /* a sticker: its picture in a badge, a text badge's height */
/* the toolbar's panel and the filter row below it: ONE width -- the filter row's four columns at most
   (4 x 10rem and their gaps), the content's width when that is less -- so they line up edge to edge,
   left and right; the panel's three controls equal, the delete button on the next line when the
   panel takes the whole row */
:root{--wb-panel-width:41.5rem;}
.wb-picker{width:min(100%,var(--wb-panel-width));grid-template-columns:repeat(4,minmax(0,1fr));}
.waybill-segments{flex:0 0 auto;width:min(100%,var(--wb-panel-width));grid-template-columns:repeat(3,minmax(0,1fr));}
/* a fourth segment, the currency (2026-10-31): the same width as the others */
.waybill-segments:has(#currency-open){grid-template-columns:repeat(4,minmax(0,1fr));}
@media (max-width:640px){.waybill-segments{flex:0 0 auto;width:100%;}}
/* the waybill's lines on the page itself: no card -- hairlines between the rows, above the first and
   below the last. ONE grid for the whole list, every row a subgrid of it: the figures (quantity · unit
   price · batch price · RRP, right-aligned) and the two buttons stand in columns from row to row.
   The figures' widths have a FLOOR counted in CHARACTERS of their own font (tabular digits: 1ch is one
   digit): the value at least 3 digits for the quantity, 6 for each price (999 999 + the thousands' gap),
   then the unit -- so the columns line up in the normal case. A longer value is never cut: it widens its
   column, and since the columns are the list's (the rows are subgrids), every row's with it */
:root{--wb-digits-quantity:3ch;--wb-digits-price:calc(6ch + .3em);}
.wb-lines{border:0;border-radius:0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);
  display:grid;grid-template-columns:2.75rem minmax(0,1fr) repeat(4,auto) auto;column-gap:1rem;}
.wb-line{grid-column:1 / -1;grid-template-columns:subgrid;cursor:default;}
.wb-line .wb-line-picture,.wb-line .wb-line-main{cursor:pointer;}
.wb-line-numbers{display:contents;}
/* a figure's CELL -- its value's width, the unit, the row's height -- is all one target: a click anywhere
   in it starts typing; the gaps between the cells are the row's, inert */
.wb-line-number{align-self:stretch;text-align:right;font-size:.8125rem;font-variant-numeric:tabular-nums;white-space:nowrap;}
.wb-line-value{flex:none;min-width:var(--wb-digits-price);white-space:nowrap;text-align:right;}
.wb-line-number[data-field=quantity] .wb-line-value{min-width:var(--wb-digits-quantity);}
.wb-line-unit{flex:none;}
.wb-line-batch{font-weight:600;}
/* the three figures typed in place: a text cursor over them, and the field they turn into is the same
   glyphs in the same place -- no border, no underline, no background, no focus ring; the caret is all */
.wb-line-number{cursor:default;}
.wb-line-number.wb-line-editable{cursor:pointer;}
.wb-line-number{display:inline-flex;align-items:center;justify-content:flex-end;}
.wb-line-unit{margin-left:.25em;}
.wb-line-unit[hidden]{display:inline;visibility:hidden;}     /* no RRP: the unit keeps its place */
.wb-line-field{display:inline-block;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;
  color:inherit;font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;text-align:right;appearance:none;-webkit-appearance:none;}
.wb-line-field:focus,.wb-line-field:focus-visible{outline:none;box-shadow:none;border:0;background:transparent;}
.wb-line-rrp{color:var(--muted-foreground);}
@media (max-width:640px){
  .wb-lines{display:block;}
  .wb-line{grid-template-columns:2.5rem minmax(0,1fr) auto;}
  .wb-line-numbers{grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;gap:.15rem .75rem;}
  .wb-line-number{font-size:.75rem;}
}
.wb-lines-area .wb-lines-foot{padding:.6rem .6rem 0;}
/* the model list's search (more than 12 models) and its "nothing found" */
.wb-models-search{flex:none;margin-bottom:.75rem;}
.wb-models-search[hidden]{display:none;}
/* "nothing found" sits centred in the window's full-height list area */
.wb-models:has(> .wb-models-none){display:flex;flex-grow:1;}
.wb-models-none{flex:1 1 auto;display:flex;align-items:center;justify-content:center;padding:1.5rem 1rem;text-align:center;font-size:.875rem;color:var(--muted-foreground);}
/* ---- a model the catalogue lacks, asked for step by step (_model_wizard.html, static/model_wizard.js) ---- */
.wb-new-model{margin-left:auto;}
.nm-dialog[open]{display:flex;flex-direction:column;width:min(680px,calc(100% - 2rem));height:var(--list-dialog-height);max-height:var(--list-dialog-height);
  padding:var(--dialog-head) 1.4rem 1.4rem;overflow:hidden;--dialog-pad:1.4rem;}
.nm-found{margin-top:1rem;}
.nm-model{display:flex;align-items:center;gap:.75rem;padding:.6rem 0;}
.nm-model .wb-visual{width:3rem;height:3rem;flex:none;}
.nm-row{display:flex;justify-content:flex-end;gap:.6rem;margin-top:.75rem;flex-wrap:wrap;}
/* the footer: the buttons on the left, the robot in the right corner -- half behind the edge -- and what it says */
.nm-footer{position:relative;flex:none;min-height:6.2rem;margin:0 -1.4rem;padding:.6rem 1.4rem 1rem;border-top:1px solid var(--border);}
.nm-actions .btn[hidden]{display:none;}
.nm-say{position:absolute;right:4.6rem;bottom:3.4rem;max-width:min(18rem,calc(100% - 7rem));margin:0;padding:.55rem .8rem;
  border:1px solid var(--border);border-radius:1rem 1rem .25rem 1rem;background:var(--card);box-shadow:0 4px 14px rgba(0,0,0,.08);
  font-size:.875rem;font-weight:600;line-height:1.35;}
.nm-say:empty{display:none;}
.nm-say-in{animation:nm-say .35s ease-out both;}
/* the robot (templates/_model_wizard.html): drawn in layers, each part moved on its own. Its paints are the shared
   defs (#nm-r-*); data-mood picks the eyes and the mouth -- ask / think / happy. */
.nm-robot{position:absolute;z-index:2;right:-.7rem;bottom:-.05rem;width:4.2rem;height:auto;overflow:visible;}
.nm-robot-defs{position:absolute;width:0;height:0;overflow:hidden;}
.nm-robot *{transform-box:fill-box;}
.nm-r-shadow{fill:rgba(15,23,42,.16);}
.nm-r-shell{fill:url(#nm-r-shell);stroke:#b4bdc9;stroke-width:.8;}
.nm-r-hand,.nm-r-ear{fill:url(#nm-r-hand);}
.nm-r-gloss{fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;opacity:.9;}
.nm-r-stem{fill:none;stroke:#aeb7c3;stroke-width:2.4;stroke-linecap:round;}
.nm-r-bulb{fill:url(#nm-r-bulb);filter:url(#nm-r-glow);}
.nm-r-shine{fill:#fff;opacity:.85;}
.nm-r-light{fill:#46e1f5;filter:url(#nm-r-glow);opacity:.85;}
.nm-r-glass{fill:url(#nm-r-glass);}
.nm-r-glare{fill:none;stroke:rgba(255,255,255,.28);stroke-width:2;stroke-linecap:round;}
.nm-r-eyes{fill:#5ff0ff;stroke:#5ff0ff;filter:url(#nm-r-glow);}
.nm-r-eyes rect{stroke:none;}
.nm-r-eyes path,.nm-r-mouth path{fill:none;stroke-width:2.4;stroke-linecap:round;}
.nm-r-mouth{stroke:#5ff0ff;opacity:.85;filter:url(#nm-r-glow);}
.nm-r-mouth path{stroke-width:1.6;}
/* the moods: one set of eyes and one mouth shown at a time */
.nm-r-eyes > g,.nm-r-mouth > path{display:none;}
.nm-robot[data-mood="ask"] .nm-r-eyes-ask,.nm-robot[data-mood="ask"] .nm-r-mouth-ask,
.nm-robot[data-mood="think"] .nm-r-eyes-think,.nm-robot[data-mood="think"] .nm-r-mouth-think,
.nm-robot[data-mood="happy"] .nm-r-eyes-happy,.nm-robot[data-mood="happy"] .nm-r-mouth-happy{display:inline;}
/* the motions -- each part its own: the idle bob of the whole, the antenna's sway, blinking at uneven gaps (one
   long irregular cycle), a wave of the left arm (the right one is behind the edge) when the dialogue opens; thinking tilts the head and the eyes look
   about; happy gives a little hop */
.nm-r-all{transform-origin:50% 100%;animation:nm-bob 2.8s ease-in-out infinite;}
.nm-r-antenna{transform-origin:50% 100%;animation:nm-sway 3.4s ease-in-out infinite alternate;}
.nm-r-eyes-ask{transform-origin:50% 50%;animation:nm-blink 7.3s infinite;}
.nm-r-arm-left{transform-origin:50% 8%;}
.nm-r-leg{transform-origin:50% 4%;}
.nm-r-arm-right{transform-origin:50% 8%;}
.nm-r-head{transform-origin:50% 90%;transition:transform .35s ease;}
.nm-robot[data-mood="think"] .nm-r-head{transform:rotate(-6deg);}
.nm-robot[data-mood="think"] .nm-r-eyes-think{animation:nm-look 1.6s ease-in-out infinite alternate;}
.nm-robot[data-mood="think"] .nm-r-antenna{animation-duration:.9s;}
.nm-robot[data-mood="happy"] .nm-r-all{animation:nm-hop .9s ease-out 2, nm-bob 2.8s ease-in-out 1.8s infinite;}
.nm-waving .nm-r-arm-left{animation:nm-wave .5s ease-in-out .15s 4 alternate;}   /* the left one: the right is behind the edge */
.nm-say{transition:opacity .25s;}
/* the entrance (model_wizard.js): a door appears at 65% of the footer and swings open, the robot -- standing behind it --
   steps out and walks to his corner (his transform carried by a transition whose length comes from the distance: WALK_SPEED), the door closes
   behind him, and he waves once there. While he walks: legs alternate, the body dips a little with every step, the
   arms swing against the legs. The question appears when he has arrived. */
.nm-doorway,.nm-door{position:absolute;left:calc(65% - 1.7rem);bottom:0;width:3.4rem;height:5.5rem;border-radius:1.7rem 1.7rem 0 0;
  opacity:0;visibility:hidden;}
/* the door is there only for the entrance: it fades in when the dialogue opens and out once it has closed behind him */
.nm-door-shown .nm-doorway,.nm-door-shown .nm-door{opacity:1;visibility:visible;}
.nm-door-shown .nm-door{transition-delay:0s;}
/* the dark doorway is switched on only once the panel in front of it is solid, and off at once when the door goes:
   fading together, it showed through the half-transparent panel as a grey door */
.nm-door-shown .nm-doorway{transition:opacity 0s .2s,visibility 0s .2s;}
.nm-doorway{z-index:1;transition:none;background:linear-gradient(180deg,#1d2430,#0b0f16);box-shadow:inset 0 3px 8px rgba(0,0,0,.55),0 0 0 3px var(--muted,#f1f5f9),0 0 0 4px var(--border);}
.nm-door{z-index:3;transform-origin:0 50%;transform:perspective(260px) rotateY(0);transition:transform .7s cubic-bezier(.15,.55,.3,1),opacity .2s,visibility 0s .2s;   /* the swing moves at once, no slow start */
  background:linear-gradient(90deg,var(--card),var(--muted,#f1f5f9));box-shadow:inset 0 0 0 1px var(--border),inset -6px 0 10px rgba(0,0,0,.05);}
.nm-door::before{content:"";position:absolute;inset:.55rem .5rem 1.4rem;border-radius:1.2rem 1.2rem .3rem .3rem;border:1px solid var(--border);opacity:.8;}
.nm-door-knob{position:absolute;right:.45rem;top:58%;width:.32rem;height:.32rem;border-radius:999px;background:var(--muted-foreground);opacity:.7;}
.nm-door-open{transform:perspective(260px) rotateY(-108deg);}
.nm-entering .nm-say{visibility:hidden;}
/* behind the closed door he is not drawn at all -- not merely covered: while the door fades in it is see-through, and
   he showed through it. He becomes visible the moment it starts to swing, when the panel still covers him whole. */
.nm-robot.nm-behind-door{visibility:hidden;}   /* not opacity: the say-in animation would hold it at 1 */
/* one step (a leg's swing one way) lasts --nm-stride, set from the speed (model_wizard.js: STEP_PX / WALK_SPEED) so the feet
   never slide; the body dips twice a stride */
.nm-walking .nm-r-all{animation:nm-step calc(var(--nm-stride,.43s) / 2) ease-in-out infinite alternate;}
.nm-walking .nm-r-leg-left{animation:nm-stride var(--nm-stride,.43s) ease-in-out infinite alternate;}
.nm-walking .nm-r-leg-right{animation:nm-stride var(--nm-stride,.43s) ease-in-out infinite alternate-reverse;}
.nm-walking .nm-r-arm-left{animation:nm-swing var(--nm-stride,.43s) ease-in-out infinite alternate-reverse;}
.nm-walking .nm-r-arm-right{animation:nm-swing var(--nm-stride,.43s) ease-in-out infinite alternate;}
@keyframes nm-step{from{transform:translateY(0)}to{transform:translateY(-2.6px)}}
@keyframes nm-stride{from{transform:rotate(-17deg)}to{transform:rotate(17deg)}}
@keyframes nm-swing{from{transform:rotate(-12deg)}to{transform:rotate(12deg)}}
@keyframes nm-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2.2px)}}
@keyframes nm-sway{from{transform:rotate(-7deg)}to{transform:rotate(7deg)}}
@keyframes nm-blink{0%,20%,23.5%,57%,59.5%,62%,64.5%,86%,89.5%,100%{transform:scaleY(1)}21.7%,58.2%,63.2%,87.7%{transform:scaleY(.1)}}
@keyframes nm-look{from{transform:translateX(-3px)}to{transform:translateX(3px)}}
@keyframes nm-hop{0%,100%{transform:translateY(0)}35%{transform:translateY(-6px)}}
@keyframes nm-wave{from{transform:rotate(0)}to{transform:rotate(150deg)}}
@keyframes nm-say{from{opacity:0;transform:translateY(.3rem) scale(.96)}to{opacity:1;transform:none}}
/* the pill's small copy: the same robot, its own size */
.nm-pill-icon .nm-robot{position:static;width:1.9rem;margin:-.35rem 0 -.45rem;}
.nm-pill-icon .nm-r-shadow{display:none;}
/* reduced motion: a still robot in its pose -- no run-in, no bob, no blink, no wave */
@media (prefers-reduced-motion:reduce){
  .nm-r-all,.nm-r-antenna,.nm-r-eyes-ask,.nm-r-eyes-think,.nm-waving .nm-r-arm-left,.nm-walking .nm-r-leg,.nm-walking .nm-r-arm,
  .nm-robot[data-mood="happy"] .nm-r-all,.nm-say-in{animation:none !important;}
  .nm-r-head{transition:none;}
  .nm-doorway,.nm-door{display:none;}                       /* no door: he is simply standing in his corner */
  .nm-robot{transform:none !important;transition:none !important;}
  .nm-robot.nm-behind-door{visibility:visible;}
  .nm-entering .nm-say{visibility:visible;}
}
@media (max-width:560px){.nm-actions{max-width:none;}.nm-footer{min-height:8.5rem;}.nm-say{bottom:.9rem;right:4.2rem;max-width:calc(100% - 6rem);}}   /* below the buttons, left of the robot */
/* the request on its way: a pill at the bottom of the page */
.nm-pill{position:fixed;left:50%;bottom:1.25rem;z-index:50;display:flex;align-items:center;gap:.6rem;max-width:calc(100% - 2rem);
  transform:translateX(-50%);padding:.55rem .6rem .55rem .9rem;border:1px solid var(--border);border-radius:999px;background:var(--card);
  box-shadow:0 8px 24px rgba(0,0,0,.12);font-size:.875rem;}
.nm-pill[hidden]{display:none;}
.nm-pill-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.nm-pill-icon{display:grid;place-items:center;font-size:1.05rem;}
.nm-pill[data-state="running"] .nm-pill-icon .bi{animation:nm-spin 1s linear infinite;}
.nm-pill[data-state="done"] .nm-pill-icon{color:var(--success,#16a34a);}
.nm-pill[data-state="failed"] .nm-pill-icon{color:var(--destructive);}
.nm-pill .btn[hidden],.nm-pill .icon-button[hidden]{display:none;}
/* several models go by the typed name: the pill opens into a small panel with one button per variant */
.nm-pill-choices{display:flex;flex-wrap:wrap;gap:.4rem;}
.nm-pill-choices[hidden]{display:none;}
.nm-pill[data-state="choose"],.nm-pill.nm-pill-wide{flex-wrap:wrap;border-radius:14px;max-width:min(36rem,calc(100% - 2rem));}
.nm-pill[data-state="choose"] .nm-pill-text,.nm-pill.nm-pill-wide .nm-pill-text{white-space:normal;flex:1 1 12rem;}
.nm-pill[data-state="choose"] .nm-pill-choices,.nm-pill.nm-pill-wide .nm-pill-choices{flex-basis:100%;}
.nm-pill[data-state="choose"] .nm-pill-icon{color:var(--primary,#2563eb);}
@keyframes nm-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.nm-pill[data-state="running"] .nm-pill-icon .bi{animation:none;}}

/* the header's small mark while LibroMac is unreachable (catalogue.freshen): the names shown are the last copy */
.catalogue-offline{display:inline-grid;place-items:center;width:1.9rem;height:1.9rem;border-radius:999px;
  color:var(--muted-foreground);font-size:1rem;cursor:default;}
.catalogue-offline:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);background:var(--muted);}
/* EVERY modal that holds a LIST (the choice dialogs, the new-model dialogue, the processor picker) has ONE fixed
   height (2026-10-09), the same with three entries or thirty: the list scrolls inside it, the space below a short
   list stays empty and the footer keeps to the bottom. Relative to the viewport, so it never exceeds a phone's. */
:root{--list-dialog-height:min(85vh,40rem);}
@supports (height:1dvh){:root{--list-dialog-height:min(85dvh,40rem);}}
/* EVERY modal's header (2026-10-09): the title -- or the row it shares with a close button, a picture, the cropper's
   buttons, all on one centre line -- sits midway in a band of --dialog-head above and below, the footer's measure,
   and the footer's hairline, edge to edge, separates it from the body. A list starts right under the line (and
   scrolls up under it); anything else keeps --dialog-head of breathing room below it. */
.dialog .dialog-title{margin:0 0 var(--dialog-head);}
.dialog > .dialog-title:first-child,.dialog > form > .dialog-title:first-child,.dialog .wb-item-head,.dialog .nm-head,
.dialog > [data-close-body] > form > .dialog-title:first-child{   /* the last: a body drawn by the server (Закрыть продажу) */
  margin:0 calc(-1 * var(--dialog-pad));padding:0 var(--dialog-pad) var(--dialog-head);border-bottom:1px solid var(--border);}
.dialog .wb-item-head .dialog-title,.dialog .nm-head .dialog-title,.branch-dialog-head .dialog-title{margin:0;}
.dialog > .dialog-title:first-child + :not(.dialog-actions),.dialog > form > .dialog-title:first-child + :not(.dialog-actions),
.dialog > [data-close-body] > form > .dialog-title:first-child + :not(.dialog-actions){margin-top:var(--dialog-head);}
.dialog > .dialog-title:first-child + .dialog-choice-list,.dialog > .dialog-title:first-child + .wb-tiles{margin-top:0;}
.dialog-choice > .wb-tiles{padding-top:.6rem;}
/* the item form scrolls as a whole: its head stays pinned to the top edge, the rows scroll up under the line */
.wb-item-dialog .wb-item-head{position:sticky;top:calc(-1 * var(--dialog-head));z-index:1;margin-top:calc(-1 * var(--dialog-head));
  margin-bottom:var(--dialog-head);padding-top:var(--dialog-head);background:var(--card);}
.processor-picker-host .picker > header{border-bottom:1px solid var(--border);}
.processor-picker-host .picker-search{padding-top:.9rem;}
.crop-editor > header{margin:-.1rem -1.2rem .9rem;padding:0 1.2rem .9rem;border-bottom:1px solid var(--border);}
/* EVERY modal's footer (2026-10-09): a hairline from edge to edge separates it from the body, nothing stands between
   the line and the body -- a scrolling list runs right up to it -- and the buttons sit midway in a short band
   (--dialog-foot, the branch dialog's .branch-dialog-foot measure): the footer eats the dialog's own bottom padding
   (--dialog-pad) and pads itself instead. A static body keeps its own bottom margin as its breathing room. */
.dialog{--dialog-pad:1.5rem;--dialog-foot:.9rem;}
.dialog .dialog-actions{align-items:center;margin:0 calc(-1 * var(--dialog-pad)) calc(-1 * var(--dialog-pad));
  padding:var(--dialog-foot) var(--dialog-pad);border-top:1px solid var(--border);}
/* the item form scrolls as a whole: its footer stays pinned to the bottom edge, the rows scroll up under the line */
.wb-item-dialog .dialog-actions{position:sticky;bottom:calc(-1 * var(--dialog-pad));z-index:1;margin-top:1rem;background:var(--card);}
.crop-actions{align-items:center;margin:1rem -1.2rem -1.2rem;padding:.9rem 1.2rem;border-top:1px solid var(--border);}
.dialog-choice > .dialog-actions{margin-top:auto;}           /* a short list leaves the space above the footer */
/* ---- a new brand in the brand filter's window (_waybill_items.html, brand_logos.py) ---- */
/* the form scrolls, and a scroller clips: room on the sides (taken back by the margin) for a field's focus ring */
.wb-brand-form{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.9rem;
  margin:0 -.35rem;padding:var(--dialog-head) .35rem .9rem;}
.wb-brand-form[hidden],.wb-tiles[hidden]{display:none;}
.wb-brand-form .field{display:flex;flex-direction:column;gap:.35rem;margin:0;}
.wb-brand-form .field-label{font-size:.8125rem;font-weight:600;}
.wb-brand-form .field-hint{margin:0;}
.wb-brand-found{display:flex;align-items:center;gap:.6rem;padding:.55rem .7rem;border-radius:calc(var(--radius) - 2px);background:var(--accent);font-size:.8125rem;}
.wb-brand-found[hidden]{display:none;}
.wb-brand-found-text{flex:1 1 auto;min-width:0;}
/* the logo box: a square beside the name field, about twice its height; a placeholder until a logo is cropped */
.wb-brand-logo-box{flex:0 0 4rem;display:grid;place-items:center;width:4rem;height:4rem;overflow:hidden;border:1px solid var(--input);
  border-radius:calc(var(--radius) - 2px);color:var(--muted-foreground);font-size:2.5rem;}   /* the placeholder: about 5/8 of the box */
.wb-brand-logo-box > .bi{line-height:1;}
.wb-brand-form .icon-name{align-items:flex-end;}          /* the box and the field (under its label) share the bottom line */
.wb-brand-logo-box img{width:100%;height:100%;object-fit:contain;}
.wb-brand-logo-box img[hidden],.wb-brand-logo-set > .bi{display:none;}
.wb-brand-logo-set{background:var(--muted);}   /* as the twelve found: the checkerboard is the editor's only */
.wb-brand-allowance{color:var(--muted-foreground);}
/* the tiles: Отмена left, "Нет нужного бренда" right (alone, Отмена keeps the right); the form: Отмена left, Создать right */
.dialog-actions .wb-brand-new{margin-left:auto;}
.dialog-actions .wb-brand-back{margin-right:auto;}
.wb-brand-name{flex:1 1 auto;min-width:0;}
.dialog-actions [hidden]{display:none;}
/* LibroMac's picture chooser (/shared/image-picker.js): twelve slots, the search over them, the upload */
.taxonomy-create-image{min-width:0;}
.image-suggestion-stage{position:relative;}
.image-suggestion-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:.4rem;aspect-ratio:4/3;}
.image-suggestion-slot{display:grid;min-width:0;min-height:0;place-items:center;overflow:hidden;padding:.3rem;border:1px solid var(--border);
  border-radius:calc(var(--radius) - 3px);background:var(--muted);cursor:pointer;}
.image-suggestion-slot:not(:disabled):is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--primary);}
.image-suggestion-slot img{width:100%;height:100%;object-fit:contain;}
.image-suggestion-slot.placeholder{color:var(--muted-foreground);opacity:.6;cursor:default;}
.image-suggestion-slot .bi{font-size:1.4rem;}
.image-suggestion-stage.awaiting-search .image-suggestion-grid{filter:blur(1px);opacity:.42;}
.image-search-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;
  border:0;border-radius:calc(var(--radius) - 2px);background:color-mix(in srgb,var(--card) 40%,transparent);color:var(--foreground);font:inherit;cursor:pointer;}
.image-search-overlay[hidden]{display:none;}
.image-search-overlay:disabled,.image-suggestion-slot:disabled{cursor:default;}
.image-search-overlay small{color:var(--primary);}
.image-search-spinner{width:1.3rem;height:1.3rem;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:image-search-spin .75s linear infinite;}
@keyframes image-search-spin{to{transform:rotate(360deg);}}
.image-search-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.25rem .75rem;margin-top:.4rem;color:var(--muted-foreground);font-size:.6875rem;}
.image-search-summary:empty{display:none;}
.image-device-upload{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;margin-top:.6rem;padding:.55rem .9rem;
  border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);font-size:.8125rem;font-weight:500;cursor:pointer;}
.image-device-upload:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.image-device-upload.disabled{opacity:.45;cursor:not-allowed;}
.image-device-upload .file-input{display:none;}
/* the new brand's two logo buttons: upload at once, the search once a name is typed (muted before, its tooltip says why) */
.image-picker-actions{display:flex;gap:.5rem;flex-wrap:wrap;}
.image-picker-actions .image-device-upload,.image-search-button{flex:1 1 12rem;width:auto;margin:0;border-color:var(--input);}   /* the box's colour: box, lines and buttons alike */
.image-search-button{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.55rem .9rem;border:1px solid var(--border);
  border-radius:calc(var(--radius) - 2px);background:var(--card);color:var(--foreground);font:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;}
.image-search-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.image-search-button.disabled{opacity:.45;cursor:not-allowed;}
.image-search-button.disabled:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--card);}
.image-picker-buttons .image-suggestion-stage{margin-top:.6rem;}
.image-picker-buttons .image-suggestion-stage[hidden]{display:none;}
/* the twelve found logos under the two buttons: six by two */
.image-picker-buttons .image-suggestion-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:3/1;}

/* the logo's editor as a STEP of the brand filter's window (_crop_dialog.html, crop_inline): it takes the form's place
   and the footer's -- its own Cancel / Use are the window's footer, its "?" sits in the window's title row */
.crop-inline{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;
  margin:0 calc(-1 * var(--dialog-pad)) calc(-1 * var(--dialog-pad));padding:var(--dialog-head) var(--dialog-pad) 0;}
.crop-inline[hidden]{display:none;}
.crop-inline .crop-editor{display:flex;flex-direction:column;flex:1 0 auto;}
.crop-inline .crop-editor > header{position:absolute;top:calc(var(--dialog-head) - .35rem);right:var(--dialog-pad);margin:0;padding:0;border:0;}
.crop-inline .crop-editor > header h2,.crop-inline #crop-close{display:none;}
.crop-inline #crop-canvas{width:min(100%,20rem);margin:0 auto;}
.crop-inline .crop-actions{position:sticky;bottom:0;z-index:1;margin:auto calc(-1 * var(--dialog-pad)) 0;padding:var(--dialog-foot) var(--dialog-pad);
  background:var(--card);border-top:1px solid var(--border);}
#filter-dialog .dialog-actions[hidden]{display:none;}
/* .dialog-cancel-left -- the waybill page's six pickers (brand / type / family: one window; model, arrival, supplier): Отмена on the LEFT,
   the action on the right (its own margin-left:auto); a window with Отмена alone keeps it on the left too */
.dialog-cancel-left .dialog-actions{justify-content:flex-start;}
/* the hairlines joining the logo box to its two buttons (waybill_items.js, drawLinks; an experiment of 2026-10-10, kept) */
.wb-brand-form{position:relative;}
.wb-brand-linked .wb-brand-picker{margin-top:1.725rem;}   /* with the lines drawn: the buttons half a button's height lower, room for them */
.wb-brand-links{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;}
.wb-brand-links path{fill:none;stroke:var(--input);stroke-width:1;shape-rendering:crispEdges;}   /* the colour of the box's and the buttons' outlines */
/* "Нет нужного типа" in the type filter: a placeholder -- a disabled button in the wrapper that carries the reason
   (as _limited.html's limited_action) */
.dialog-actions .wb-type-new{margin-left:auto;}
.dialog-actions .se-upload{margin-left:auto;}          /* the services' icon window: Отмена left, the upload right */
.dialog-actions .wb-type-new[hidden]{display:none;}
/* ---- a model the catalogue lacks: ONE screen (_model_wizard.html, static/model_wizard.js), built like the brand form ---- */
.nm-one .dialog-title{flex:none;}
.nm-form{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;padding:0 0 1rem;}
.nm-form[hidden],.nm-picture-step[hidden]{display:none;}
.nm-taxonomy{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;}
.nm-taxonomy .wb-picker-button{border-color:var(--input);}
.nm-taxonomy .wb-picker-button:disabled{opacity:.5;cursor:default;}
/* a button's own border follows its state: grey, then the live blue once its value is set -- the line starts there */
.nm-taxonomy .wb-picker-button{transition:border-color .3s;}
.nm-taxonomy .wb-picker-active{border-color:var(--nm-live);}
/* the keyboard's focus mark in the same 1px weight as the borders and the lines */
/* the frame the hairlines enter: the picture box and the name, as one control */
.nm-frame{margin-top:1.75rem;padding:.9rem;border:1px solid var(--nm-live);border-radius:var(--radius);transition:opacity .35s,border-color .35s,box-shadow .35s;}
/* brand and type not both chosen: the frame is inactive -- dimmed, its outline grey, nothing in it takes a click */
.nm-frame.nm-frame-locked{opacity:.45;border-color:var(--input);}
.nm-frame.nm-frame-locked *{pointer-events:none;}
/* the moment both are chosen: it lights up once, as the current reaches it */
.nm-frame.nm-frame-lit{animation:nm-frame-lit .7s ease-out .35s;}
@keyframes nm-frame-lit{from{box-shadow:0 0 0 4px color-mix(in srgb,var(--nm-live) 35%,transparent);}to{box-shadow:0 0 0 0 transparent;}}
/* the lines from Бренд · Тип · Семейство: grey until chosen, then live -- the current runs along them once */
.nm-dialog{--nm-live:rgba(35,100,130,.5);}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .nm-dialog{--nm-live:rgba(90,170,205,.6);}}
:root[data-theme="dark"] .nm-dialog{--nm-live:rgba(90,170,205,.6);}
.nm-links .nm-link{fill:none;stroke:var(--input);stroke-width:1;shape-rendering:auto;transition:stroke .2s;}
.nm-links .nm-link.is-live{stroke:var(--nm-live);}   /* 1px like every stroke of the dialogue, grey or live */
.nm-links .nm-link-dashed{stroke-dasharray:5 4;}
.nm-links .nm-link-solid.is-flowing{stroke-dasharray:1;stroke-dashoffset:1;animation:nm-draw .5s ease-out forwards;}
.nm-links .nm-link-trunk.is-flowing{animation-delay:.25s;}
.nm-links .nm-link-dashed.is-flowing{animation:nm-march .45s linear 3;}
@keyframes nm-draw{to{stroke-dashoffset:0;}}
@keyframes nm-march{from{stroke-dashoffset:18;}to{stroke-dashoffset:0;}}
@media (prefers-reduced-motion:reduce){.nm-links .nm-link.is-flowing,.nm-frame.nm-frame-lit{animation:none;stroke-dasharray:none;}
  .nm-links .nm-link-dashed.is-flowing{stroke-dasharray:5 4;}}
.nm-frame .icon-name{align-items:flex-end;}
.nm-picture-box{padding:0;background:none;cursor:pointer;}
.nm-picture-box:disabled{opacity:.45;cursor:default;}            /* muted until a name is typed */
.nm-found-say{margin:.75rem 0 0;font-size:.8125rem;font-weight:600;}
.nm-section{margin-top:1.25rem;}
.nm-section[hidden]{display:none;}
.nm-section-title{margin:0 0 .55rem;font-size:.8125rem;font-weight:600;}
.nm-toggles{display:flex;flex-wrap:wrap;gap:.4rem;}
.nm-more{margin-top:.55rem;padding:0;border:0;background:none;color:var(--muted-foreground);font:inherit;font-size:.75rem;text-decoration:underline;cursor:pointer;}
.nm-more[hidden]{display:none;}
.nm-mode-auto[hidden]{display:none;}
.nm-allowance{margin:.5rem 0 0;color:var(--muted-foreground);}
/* rows touch: a gap between them added to each row's BOTTOM only and left its content near its own top border */
.nm-manual{display:grid;gap:0;}
.nm-value-row{align-items:center;padding-top:.6rem;padding-bottom:.6rem;}   /* the content midway between its border and the next */
.nm-value-row .wb-row-value{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;min-width:0;}
.nm-values{display:flex;flex-wrap:wrap;gap:.35rem;}
.nm-values-long{max-height:9rem;overflow-y:auto;}
.nm-values-filter{width:100%;}
.nm-value-count{font-size:.8125rem;color:var(--muted-foreground);}
.nm-number,.nm-number-add,.nm-number-edit{box-sizing:border-box;height:1.75rem;line-height:1;display:inline-flex;align-items:center;vertical-align:middle;}
.nm-number{gap:.3rem;}
.nm-number-remove{border:0;background:none;padding:0;color:var(--muted-foreground);cursor:pointer;line-height:1;display:inline-flex;}
.nm-number-remove:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
.nm-number-add{min-width:2rem;justify-content:center;}
/* the "+" badge's box exactly: same height, border and radius -- the input and its tick are one pill */
.nm-number-edit{position:relative;gap:.2rem;padding:0 .2rem 0 .65rem;border:1px solid var(--foreground);border-radius:999px;background:var(--card);}
.nm-number-edit.is-invalid{border-color:var(--destructive);}
.nm-number-input{width:4.5rem;height:100%;padding:0;border:0;outline:0;background:none;color:var(--foreground);font:inherit;font-size:.75rem;line-height:1;text-align:left;}
.nm-number-accept{display:inline-flex;align-items:center;justify-content:center;width:1.35rem;height:1.35rem;padding:0;border:0;border-radius:999px;background:var(--primary);color:var(--primary-foreground);cursor:pointer;font-size:.8rem;}
.nm-number-edit.is-invalid .nm-number-accept{background:var(--destructive);}
/* why a value is refused: under the pill, over what follows -- the row never grows */
.nm-number-error{position:absolute;top:calc(100% + .2rem);right:0;z-index:2;font-size:.75rem;line-height:1.2;color:var(--destructive);white-space:nowrap;pointer-events:none;}
.nm-number-error:empty{display:none;}
.nm-picture-step{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--dialog-head) 0 1rem;}
.nm-error{margin:.5rem 0 0;}
/* the picker's models still being made: found, muted, not pickable */
.wb-model-pending{opacity:.5;cursor:default;}
@media (max-width:520px){.nm-taxonomy{gap:.35rem;}.nm-frame{margin-top:1rem;}}
.nm-actions[hidden]{display:none;}
/* the name's suggestions: compact rows with the model's picture; the room for three is kept, so nothing below jumps */
.nm-suggest{display:flex;flex-direction:column;gap:.15rem;min-height:calc(5 * 2.25rem + 4 * .15rem);margin-top:.6rem;}
.nm-suggestion{display:flex;align-items:center;gap:.5rem;min-height:2.25rem;}
.nm-suggestion-take{display:flex;align-items:center;gap:.6rem;flex:1 1 auto;min-width:0;padding:.15rem .35rem;border:0;border-radius:calc(var(--radius) - 4px);
  background:none;color:var(--foreground);font:inherit;font-size:.8125rem;text-align:left;cursor:pointer;}
.nm-suggestion-take:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.nm-suggestion-take .wb-visual{width:1.75rem;height:1.75rem;flex:none;font-size:1rem;}
.nm-suggestion-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.nm-suggestion-exact .nm-suggestion-take{font-weight:600;}
.nm-toggle .bi{margin-right:.3rem;}
.nm-step-two{padding-top:var(--dialog-head);}          /* static content under the head line keeps the head's spacing */
.nm-step-two .nm-section:first-child{margin-top:0;}

/* the processor picker over the new-model dialogue (selectedAs: "top"): under the header ONE area scrolls -- the chosen
   processors as ordinary rows, a hairline, the search, the filters, the list; the footer below it. Everything chosen is
   reached by scrolling up; the script keeps what is on screen still as chosen rows come and go */
.processor-picker-host .picker-top .picker-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;}
.processor-picker-host .picker-top .picker-options{display:block;overflow:visible;}
.processor-picker-host .picker-top .picker-grid{overflow:visible;}
.processor-picker-host .processor-selected-top{display:flex;flex-direction:column;gap:.15rem;padding:0 1.2rem;}
.processor-picker-host .processor-selected-top[hidden]{display:none;}
.processor-picker-host .processor-selected-top:not(:empty){padding-bottom:.6rem;margin-bottom:.6rem;border-bottom:1px solid var(--border);}
/* the picker's footer in multi mode (Cancel / Apply) as every FruitBusiness modal's: a hairline, Отмена on the left */
.processor-picker-host .picker-multi-footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:var(--dialog-foot,.9rem) 1.2rem;border-top:1px solid var(--border);}
.processor-picker-host .picker-multi-footer button{display:inline-flex;align-items:center;justify-content:center;height:2.25rem;padding:0 .9rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:transparent;color:var(--foreground);font:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;}
.processor-picker-host .picker-multi-footer button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.processor-picker-host .picker-multi-footer .button{border-color:var(--positive-border);background:var(--positive);color:var(--positive-foreground);}
.processor-picker-host .picker-multi-footer .button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--positive-hover);border-color:var(--positive-hover-border);}
/* the name field: no focus ring (tried 2026-10-11 -- the frame around it already says where the typing goes); its label
   a few px higher and heavier */
.nm-frame #nm-name:focus-visible{outline:none;}
/* the label column sits at the frame's bottom: a margin above it moves nothing -- the label is nudged itself, 2px down */
.nm-frame .field-label{display:block;position:relative;top:2px;margin:0 0 .45rem;font-size:.8125rem;font-weight:600;}
/* the new model's picture step: two large cards, a line drawing over each label (ImagePicker cards) */
.image-picker-cards .image-picker-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;}
.image-picker-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.9rem;min-height:13rem;margin:0;padding:1.5rem 1rem;
  border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--foreground);font:inherit;font-size:.875rem;font-weight:600;
  text-align:center;cursor:pointer;transition:background-color .15s,border-color .15s;}
.image-picker-card:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.image-picker-card .file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}
.image-picker-art{display:block;width:8rem;height:8rem;}
.image-picker-art img{display:block;width:100%;height:100%;object-fit:contain;border-radius:calc(var(--radius) + 2px);}
.image-picker-card.disabled,.image-picker-card[aria-disabled="true"]{cursor:default;opacity:.45;}
.image-picker-card.disabled:is(:hover,:focus-visible,:has(:focus-visible)),.image-picker-card[aria-disabled="true"]:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--card);}
.image-picker-cards .image-suggestion-stage{margin-top:1rem;}
@media (max-width:520px){.image-picker-card{min-height:9rem;}.image-picker-art{width:5rem;height:5rem;}}
/* its title: "Картинка модели: <name>", one line, an ellipsis for a long name (the whole in its tooltip) */
.nm-dialog .dialog-title.nm-title-picture{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}

/* "Параметры оплаты" (_post_dialog.html, waybill_post.js): an ordinary modal -- centred, the list dialogs'
   fixed height, the common header and footer (hairlines, Отмена on the left); its body scrolls between them.
   The modes are the arrival step's rows; the radio itself is never seen -- the row is the choice. */
.post-dialog[open]{display:flex;flex-direction:column;width:min(560px,calc(100% - 2rem));height:var(--list-dialog-height);
                   max-height:var(--list-dialog-height);overflow:hidden;}
.post-dialog-form,.post-step{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;}
.post-step[hidden]{display:none;}
.post-step > .dialog-title{flex:none;margin:0 calc(-1 * var(--dialog-pad));padding:0 var(--dialog-pad) var(--dialog-head);
                           border-bottom:1px solid var(--border);}
.post-body{flex:1 1 auto;min-height:0;overflow-y:auto;margin:0 calc(-1 * var(--dialog-pad));
           padding:var(--dialog-head) var(--dialog-pad);}
.post-step > .dialog-actions{flex:none;}
.post-step > .dialog-actions .btn-primary{margin-left:auto;}
.post-mode{position:relative;cursor:pointer;}
.post-mode[hidden]{display:none;}
.post-mode-radio{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;}
.post-modes .post-mode-text{flex-direction:column;align-items:stretch;gap:.15rem;text-align:left;}
.post-modes .post-mode-text .supplier-name-text{text-align:left;white-space:normal;height:auto;overflow:visible;}
.post-mode-hint{font-size:.8125rem;line-height:1.35;color:var(--muted-foreground);white-space:normal;}
.post-modes{margin-bottom:1.1rem;}
.post-modes .supplier-avatar{width:2.5rem;height:2.5rem;}
.post-accounts{display:flex;flex-wrap:nowrap;gap:.4rem;overflow-x:auto;padding:2px;margin:-2px;}   /* one row; room for the ring */
.post-account{flex:none;display:grid;place-items:center;width:2.75rem;height:2.75rem;padding:0;border:1px solid var(--border);
              border-radius:var(--radius);background:var(--card);color:inherit;cursor:pointer;}
.post-account:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.post-account-chosen,.post-account-chosen:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--primary);box-shadow:0 0 0 1px var(--primary);background:var(--accent);}
.post-account .logo{width:1.75rem;height:1.75rem;}
.post-account-avatar{width:1.9rem;height:1.9rem;font-size:.75rem;}
.field-wrap[hidden]{display:none;}

/* An account's sticker (logos.ACCOUNT_STICKERS, static/accounts): drawn whole, no tint behind it; the picker
   (_sticker_picker.html) is a grid of them, the chosen one ringed. */
.logo-sticker{background:none;}
.logo-sticker img{object-fit:contain;border-radius:0;}
.sticker-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(3.25rem,1fr));gap:.4rem;margin:var(--dialog-head) 0;}
.sticker-choice{display:grid;place-items:center;aspect-ratio:1;padding:.3rem;border:1px solid var(--border);border-radius:var(--radius);
                background:var(--card);cursor:pointer;}
.sticker-choice img{width:100%;height:100%;object-fit:contain;display:block;}
.sticker-choice:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.sticker-choice.active{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary);background:var(--accent);}

/* the posting dialog's read-only pair: the toolbar's arrival and supplier, the same segments, two of them */
.post-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:var(--dialog-head);}
.post-pair .waybill-tool{pointer-events:none;}
/* a select with pictures (the posting dialog's accounts): a button like an input, a popup of rows under it */
.account-select{position:relative;}
.account-select-button{display:flex;align-items:center;gap:.6rem;width:100%;min-height:2.75rem;padding:.35rem .7rem;text-align:left;cursor:pointer;}
.account-select-value{flex:1 1 auto;display:flex;align-items:center;gap:.6rem;min-width:0;}
.account-select-empty{color:var(--muted-foreground);}
.account-select-chevron{flex:none;width:1rem;height:1rem;color:var(--muted-foreground);}
.account-select-list{position:fixed;z-index:10;display:flex;flex-direction:column;overflow-y:auto;padding:.3rem;
                     border:1px solid var(--border);border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow-lg);}
.account-select-list[hidden]{display:none;}
.account-select-option{display:flex;align-items:center;gap:.6rem;width:100%;padding:.45rem .55rem;border:0;border-radius:calc(var(--radius) - 3px);
                       background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;}
.account-select-option:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.account-select-option[aria-selected="true"]{background:var(--accent);font-weight:600;}
.account-select .logo,.account-select .post-account-avatar{width:1.9rem;height:1.9rem;flex:none;}
.account-select-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;}
.account-select-balance{margin-left:auto;padding-left:.75rem;color:var(--muted-foreground);font-size:.8125rem;font-variant-numeric:tabular-nums;white-space:nowrap;}
.account-select-option[hidden],.account-select-caption[hidden]{display:none;}
.account-select-caption{padding:.5rem .55rem .2rem;color:var(--muted-foreground);font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;}
.post-mode-hint a{color:inherit;text-decoration:underline;text-underline-offset:2px;}

/* The item form's fields sit quiet (2026-10-13): no boundary of their own at rest -- the row's hairline is the
   line, an underline above it read as two -- the value as plain text, a list keeps its arrow (it can be changed).
   Under the pointer and in focus it stays so (focus looks like hover, and here hover adds nothing): the caret
   shows where the typing goes. Only this form: the others keep their fields as they are. */
.wb-item-dialog .wb-rows .input,.post-dialog .wb-rows .input{border:0;border-bottom:1px solid transparent;border-radius:0;background-color:transparent;
                                 transition:border-color .12s,box-shadow .12s,background-color .12s;}
.wb-item-dialog .wb-rows .input:is(:hover,:focus-visible,:has(:focus-visible)),
.post-dialog .wb-rows .input:is(:hover,:focus-visible,:has(:focus-visible)){border-color:transparent;}

/* the payment dialog's body (2026-10-13): the mode cards of one arrival all as tall as the tallest (waybill_post.js
   equalize), never under two lines; below them, the item form's rows -- the label left, the quiet field right */
.post-modes .post-mode{min-height:4.25rem;}
/* a delivery waybill: the first mode alone; the other three FOLDED under it -- the second card's top peeks out
   (the list's grid row at its 4.75rem minimum), a fade from its top edge down into the card's colour over it, and
   "другие способы" at the bottom of the fade. Unrolled (0fr -> 1fr, like a scroll opening) the fade is gone. */
.post-more-list{position:relative;display:grid;grid-template-rows:minmax(4.75rem,0fr);transition:grid-template-rows .3s ease;}
.post-more-list.post-more-open{grid-template-rows:minmax(4.75rem,1fr);}
.post-more-list[hidden]{display:none;}
.post-more-inner{min-height:0;overflow:hidden;}
.post-more-inner > .post-mode{border-top:1px solid var(--border);}
.post-more{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;margin:0;padding:0 1rem .45rem;border:0;
  border-radius:0 0 var(--radius) var(--radius);background:linear-gradient(to bottom,transparent 0%,var(--card) 62%);
  color:var(--muted-foreground);font:inherit;font-size:.8125rem;cursor:pointer;}
.post-more[hidden]{display:none;}
.post-more:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
@media (prefers-reduced-motion:reduce){.post-more-list{transition:none;}}
.post-rows{margin-top:var(--dialog-head);}
.post-rows .wb-row{grid-template-columns:15rem minmax(0,1fr);}      /* the labels here are longer: one line each */
@media (max-width:560px){.post-rows .wb-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}
.post-rows .wb-row-value{align-items:center;}
.post-rows .wb-row-total .wb-row-value strong{font-size:1.0625rem;}   /* Итого: goods + delivery, before the account */
.post-goods-total{font-size:.875rem;font-weight:600;font-variant-numeric:tabular-nums;padding-right:.65rem;}
.post-rows .account-select{width:100%;}
.post-rows .account-select-button{justify-content:flex-end;min-height:2.25rem;padding-top:0;padding-bottom:0;}
.post-rows .account-select-value{flex:0 1 auto;}

/* a delivery destination (destinations.py): the logistics company's logo beside the address -- in the payment dialog's
   select, and next to a waybill's tracking number */
.destination-logo{flex:none;display:inline-grid;place-items:center;width:1.5rem;height:1.5rem;border-radius:calc(var(--radius) - 4px);
                  overflow:hidden;background:var(--muted);color:var(--muted-foreground);vertical-align:middle;}
.destination-logo img{width:100%;height:100%;object-fit:contain;display:block;background:#fff;}
.destination-logo .icon{width:.9rem;height:.9rem;}
.account-select .destination-logo{width:1.9rem;height:1.9rem;}
.destination-chip{display:inline-flex;align-items:center;gap:.4rem;vertical-align:middle;}
/* Библиотеки -> Адресаты доставки (addressees.html): the suppliers' rows. A row's company is CONTENT -- its logo and
   name, no frame at rest; a hover is the suppliers' quiet tint with a hairline. The add row (a form) has the select. */
.destination-new .destination-provider-select{flex:0 0 13rem;max-width:45%;}
.destination-provider-select .account-select-button{min-height:2.25rem;padding-top:.2rem;padding-bottom:.2rem;}
.destination-company{flex:0 0 13rem;max-width:45%;display:inline-flex;align-items:center;gap:.6rem;min-width:0;margin:-.2rem 0 -.2rem -.3rem;padding:.2rem .3rem;
  border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:transparent;color:inherit;font:inherit;font-size:.875rem;text-align:left;cursor:pointer;}
.destination-company:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--tint);border-color:var(--line);}
.destination-company .supplier-avatar{border:0;}
.destination-company-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.destination-problem,.destination-hint{margin:0;padding:0 1rem .7rem;}
@media (max-width:560px){.destination-new{flex-wrap:wrap;}.destination-new .destination-provider-select{flex:1 1 100%;max-width:none;}.destination-company{flex-basis:auto;max-width:50%;}}

/* В доставке (waybills_delivery.html): one list in two views -- the list's data-view shows the compact LINE or the
   expanded CARD of each waybill. Icons with tooltips rather than captions. */
.wd-head-bar{justify-content:center;margin-top:calc(1.25rem - var(--content-top));}   /* as far from the header's border as from the list */
.wd-list{display:flex;flex-direction:column;gap:1rem;}
/* the feed's marker after the list (waybill_feed.js): where the next page is asked; a quiet line while it loads */
.wd-feed-more{height:2.5rem;margin-top:.5rem;}
.wd-feed-more:not([hidden])::after{content:"";display:block;width:1.25rem;height:1.25rem;margin:0 auto;border:2px solid var(--border);border-top-color:var(--muted-foreground);border-radius:50%;animation:wd-spin .8s linear infinite;}
@keyframes wd-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.wd-feed-more::after{animation:none;}}
.wd-list[data-view="compact"]{gap:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);}
.wd-list[data-view="compact"] .wd-card,.wd-list[data-view="expanded"] .wd-row{display:none;}
.wd-item + .wd-item .wd-row{border-top:1px solid var(--border);}
.wd-hidden-price{color:var(--muted-foreground);letter-spacing:.1em;}
.wd-total{display:inline-flex;align-items:center;gap:.4rem;font-variant-numeric:tabular-nums;}
.wd-paid-with{display:inline-flex;align-items:center;gap:.35rem;font-size:.8125rem;font-weight:400;}
.wd-account .logo{width:1.4rem;height:1.4rem;}
/* several accounts: side by side, each whole, a "+" between them (2026-10-18; they used to overlap) */
.wd-accounts{display:inline-flex;align-items:center;gap:.2rem;}
.wd-accounts-plus{color:var(--muted-foreground);font-size:.75rem;font-weight:600;line-height:1;}   /* "+" between them */
.wd-later{color:var(--muted-foreground);}
/* the compact line: number, supplier, destination, date, days -- the goods' thumbnails take the rest (the first three
   shown, the others fading out and clipped) -- the total, Принять */
.wd-accept-form{display:inline;margin:0;}
.wd-accept-dialog{width:min(36rem,calc(100% - 2rem));}
.wd-accept-dialog .post-rows .wb-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
/* the expanded card: header, the lines, footer */
.wd-card{padding:0;overflow:visible;container-type:inline-size;}
.wd-card-action{margin-left:auto;}
.wd-lines{display:flex;flex-direction:column;}
.wd-line{display:grid;grid-template-columns:3rem minmax(0,1fr) auto;align-items:center;gap:.8rem;padding:.6rem 1rem;color:inherit;text-decoration:none;}
a.wd-line:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.wd-line + .wd-line{border-top:1px solid var(--border);}
/* price a unit · quantity · price of the lot: columns of a fixed width, every figure centred in its own -- so they
   stand one under another whatever the currency's sign (2026-11-01) */
.wd-line-numbers{display:grid;grid-template-columns:7.5rem 4.5rem 7.5rem;gap:.5rem;justify-items:center;text-align:center;
  font-size:.8125rem;font-variant-numeric:tabular-nums;}
.wd-line-number{white-space:nowrap;}
.wd-line-sum{font-weight:600;}
.wd-card-foot{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.6rem 1rem;border-top:1px solid var(--border);font-size:.8125rem;}
/* the comment of "Принято на склад", as the old CRM had it in the footer: text until clicked, a field until left */
.wd-comment{display:inline-flex;align-items:center;gap:.45rem;min-width:0;}
.wd-comment-icon{flex:none;width:1.4rem;height:1.4rem;object-fit:contain;}
.wd-comment-icon[data-editing-src]{cursor:pointer;}
.wd-comment-icon-off{filter:grayscale(1);opacity:.45;}
.wd-comment-text{min-width:0;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;text-align:left;overflow-wrap:anywhere;}
button.wd-comment-text{cursor:pointer;}
.wd-comment-empty{color:var(--muted-foreground);}
.wd-comment-field{width:28rem;max-width:100%;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;outline:none;}
.wd-comment-field[hidden],.wd-comment-text[hidden]{display:none;}
/* a consignment unit returned to the supplier: the line greyed, its prices struck, the mark beside its name */
.wd-line-returned .wb-line-title,.wd-line-returned .wb-line-facts{opacity:.5;}
.wd-line-returned .wd-line-numbers{color:var(--muted-foreground);text-decoration:line-through;}
.wd-line-reissued .wb-line-title,.wd-line-reissued .wb-line-facts,.wd-line-reissued .item-tag,.wd-line-reissued .wd-line-numbers{opacity:.5;}
/* the waybill page: what became of each item (items.balances_of), a position nothing is left of muted; the items whose
   value went into another waybill's in a section of their own, muted (2026-11-04) */
.wd-line:has(.wd-line-balances){grid-template-columns:3rem minmax(0,1fr) auto auto;}
.wd-line-balances{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.3rem;max-width:16rem;}
.wd-line-closed .wb-line-title,.wd-line-closed .wb-line-facts,.wd-line-closed .item-tag,.wd-line-closed .wd-line-numbers{opacity:.5;}
.wd-line-moved .wb-line-title,.wd-line-moved .wb-line-facts,.wd-line-moved .item-tag,.wd-line-moved .wd-line-numbers{opacity:.5;}
.wd-line-moved{position:relative;}
.wd-line-moved .wd-line-number{text-decoration:line-through;text-decoration-color:#dc2626;text-decoration-thickness:1.5px;}
.wd-moved-badge{position:absolute;left:50%;top:50%;z-index:1;transform:translate(-50%,-50%);display:inline-flex;align-items:center;
  gap:.4rem;height:1.9rem;padding:0 .6rem 0 .3rem;border-radius:4px;background:var(--wh-bg);color:var(--wh-ink);
  font-size:.75rem;font-weight:600;white-space:nowrap;}
.wd-moved-badge img{width:1.4rem;height:1.4rem;object-fit:contain;}
.wd-moved-all{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;color:var(--muted-foreground);}
.wd-moved-all img{width:1.5rem;height:1.5rem;object-fit:contain;}
.wd-returned-mark{flex:none;margin-left:.5rem;padding:.1rem .4rem;border-radius:4px;background:var(--muted);color:var(--muted-foreground);font-size:.6875rem;font-weight:600;text-transform:lowercase;}
/* a waybill cancelled after its goods came in: still listed, faded */
.wd-item-cancelled .wd-row,.wd-item-cancelled .wd-lines{opacity:.55;}
/* a posted waybill's page (waybill.html): the item page's rows, its actions, then its lines in a card of their own */
.wb-account .logo{width:1.875rem;height:1.875rem;}
.it-dest{display:inline-flex;align-items:center;gap:.45rem;padding:.15rem .4rem .15rem .15rem;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;}
.it-dest .wh-i{display:grid;place-items:center;width:1.6rem;height:1.6rem;}
.it-dest .wh-i img{width:100%;height:100%;object-fit:contain;}
button.it-dest{cursor:pointer;}
button.it-dest:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.it-link{padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer;}
.it-link:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--primary);}
.wb-accept-form .grid-2{display:flex;flex-wrap:wrap;gap:1rem;}
.wb-accept-form .field-wrap{margin:0;min-width:12rem;}
.wb-page-lines{margin-bottom:1rem;}
.wb-cancel{color:var(--destructive);}
/* the waybill page's own blocks after the facts (2026-10-18): its actions -- Принять, Отменить: buttons, each asking
   what it needs in its window (.wb-action-dialog) --, the history */
.wb-actions-card{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.75rem;padding:1rem;}
.wb-actions-card .tip,.wb-inline-form{display:inline-flex;}
.wb-accept{color:var(--info);}      /* Принять: as Отменить, the words blue instead of red */
/* Отменить накладную with a paid delivery: what the supplier gives back (waybill.html #cancel-dialog) */
.wb-action-dialog.wc-dialog{width:min(640px,calc(100% - 2rem));}
/* the options in ONE frame, a hairline between them */
.wc-options{display:flex;flex-direction:column;margin:var(--dialog-head) 0 0;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);overflow:hidden;}
.wc-option{display:flex;align-items:flex-start;gap:.5rem;padding:.55rem .7rem;font-size:.875rem;cursor:pointer;}
.wc-option + .wc-option{border-top:1px solid var(--border);}
.wc-option:has(input:checked){background:var(--accent);}
.wc-option input{margin-top:.2rem;}
.wc-loss{margin:.75rem 0 var(--dialog-foot,.9rem);padding:.6rem .8rem;border-radius:var(--radius);background:var(--destructive-bg);color:var(--destructive);font-size:.8125rem;}
.wc-rows .wb-row{grid-template-columns:minmax(0,1fr) 15rem;}   /* the label's room, then a value column of a set width */
.wc-off{visibility:hidden;}
.wc-case{margin:var(--dialog-head) 0 0;font-size:.875rem;line-height:1.45;}
.wc-note{margin:.75rem 0 var(--dialog-foot,.9rem);color:var(--muted-foreground);font-size:.875rem;}       /* not needed by the option chosen: invisible, its room kept -- the window never jumps */
@media (max-width:560px){.wc-rows .wb-row{grid-template-columns:1fr;}}
.wc-rows .wb-row[hidden]{display:none;}
.wb-action-dialog{width:min(460px,calc(100% - 2rem));}
.wb-action-dialog .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;}
.it-value .wd-comment-text,.it-value .wd-tracking-text{text-align:right;}
.it-value .wd-comment-field,.it-value .wd-tracking-field{text-align:right;}
.it-value .save-state{display:none;}      /* only an anchor (save_note.js): it takes no gap, the value meets the right edge */
/* a comment / a tracking number opens from a fair part of the footer -- from its left edge to about 40 % of it (more
   only when the text itself is longer) --, never from the right, where the total is; a row's from the whole row */
.wd-foot-notes{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:.5rem 1.75rem;min-width:40%;align-self:stretch;}
.wd-foot-notes > .wd-comment,.wd-foot-notes > .wd-tracking{flex:1;align-self:stretch;}
.wd-edit-area{cursor:pointer;}                  /* a place to click, like any other; the field itself shows the caret */
.wb-page{margin-bottom:1rem;}
.wd-tracking{display:inline-flex;align-items:center;gap:.45rem;min-width:0;color:var(--muted-foreground);}
.wd-tracking-end{justify-content:flex-end;}   /* the waybill page: the number, then its tracker pressed right */
.wd-tracker{flex:none;display:grid;place-items:center;width:1.6rem;height:1.6rem;border-radius:.3rem;}
.wd-tracker img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .12s;}
.wd-tracker[href]:is(:hover,:focus-visible,:has(:focus-visible)) img{transform:scale(1.1);}
.wd-tracker-off{cursor:default;}
.wd-tracker-off img{filter:grayscale(1);opacity:.45;}
.wd-tracking-text{min-width:0;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;font-variant-numeric:tabular-nums;text-align:left;}
button.wd-tracking-text{cursor:pointer;}
.wd-tracking-field{width:14rem;max-width:100%;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;outline:none;}
.wd-tracking-field[hidden],.wd-tracking-text[hidden]{display:none;}
@media (max-width:640px){
  .wd-line{grid-template-columns:3rem minmax(0,1fr);}
  .wd-line-numbers{grid-column:2;justify-items:start;}
  .wd-line:has(.wd-line-balances){grid-template-columns:3rem minmax(0,1fr);}
  .wd-line-balances{grid-column:2;justify-content:flex-start;max-width:none;}
}
/* an item's crafts (item.html, item_crafts.js): the absorb window's search over its list, each item's cost at the
   right, Поглотить at the right of the footer */
.it-absorb-search{margin:0 0 .5rem;}
.it-absorb-cost{margin-left:auto;padding-left:.75rem;color:var(--muted-foreground);white-space:nowrap;}
#absorb-dialog [data-absorb-submit]{margin-left:auto;}
.it-spawn-dialog{width:min(560px,calc(100% - 2rem));}
/* the balance page's key figures (money.key_figures): the goods' parts indented and muted under their total */
.balance-key .balance-key-part .member-who strong{padding-left:1rem;font-weight:400;color:var(--muted-foreground);}

/* --- messages (chat.py, 2026-10-20): Сводка's dialogues, a conversation, the header's envelope, the live notice ---- */
.header-mail{position:relative;display:inline-grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:var(--radius);color:var(--muted-foreground);}
.header-mail:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.header-mail img{width:1.5rem;height:1.5rem;object-fit:contain;}   /* the header counters' size */
.header-mail-count{position:absolute;top:.1rem;right:.05rem;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--info);color:#fff;font-size:.625rem;font-weight:700;line-height:1.05rem;text-align:center;}
/* Сводка's rates: the old CRM's six badges -- 120px, 28px high, a 24px picture at the left and the text centred */
/* one frame round the date, the time and the rates -- as wide as its badges (it wraps with them on a narrow
   screen); a hairline parts the date and time from the rates */
.rates-panel{display:flex;flex-wrap:wrap;gap:.5rem;width:fit-content;max-width:100%;margin-bottom:1rem;padding:.5rem;border:0;border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow-card);}   /* a white block on the tinted page, as every card */
.rates-badge{display:flex;align-items:center;width:120px;min-height:28px;padding:0 4px;border-radius:4px;background:var(--wh-bg);color:var(--wh-ink);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;text-decoration:none;}
.rates-badge > img{flex:none;width:24px;height:24px;object-fit:contain;}
.rates-badge > img.rates-flag[src*="/vendor/flags/"]{height:18px;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.08);}
.rates-code{flex:none;width:24px;font-size:9px;text-align:center;}
.rates-text{flex:1;min-width:0;padding:0 3px;text-align:center;overflow:hidden;text-overflow:ellipsis;}
.msg-starts{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;}
.msg-start{display:inline-flex;align-items:center;gap:.5rem;height:2.5rem;padding:0 .8rem 0 .45rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--foreground);font:inherit;font-size:.8125rem;font-weight:500;text-decoration:none;cursor:pointer;}
/* lit: it stays white and lifts off the page -- lighter than the page, never its colour */
.msg-start:is(:hover,:focus-visible,:has(:focus-visible)){background:#fbfcff;border-color:#c8d5ec;box-shadow:3px 4px 8px rgba(1,41,112,.14);}
.msg-start-icon{display:grid;place-items:center;width:1.75rem;height:1.75rem;}
.msg-start-icon img{width:100%;height:100%;object-fit:contain;}
.msg-start-face{border-radius:50%;overflow:hidden;background:transparent;}   /* a person: their avatar cut round, no disc behind it */
.msg-start-face img{object-fit:cover;}
.msg-start-face .msg-face-letter{font-size:.75rem;}
.msg-list-card{padding:0;overflow:hidden;}
.profile-card{display:flex;flex-direction:column;gap:1rem;padding:1.5rem;}
.profile-card .avatar-picker{margin-bottom:0;}
.profile-enter{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:.45rem;}
.profile-radio{display:flex;align-items:center;gap:.5rem;font-size:.875rem;cursor:pointer;}
.msg-dialogues-empty{padding:2.5rem 1.5rem;text-align:center;color:var(--muted-foreground);}
.msg-dialogues-empty h2{margin:0;font-size:.9375rem;font-weight:500;color:var(--muted-foreground);}
/* pressed: the button's own shape darkened -- the light fill a step darker (a light blue, still apart from the page),
   its border darkened as much */
.msg-start.is-on,.msg-start.is-on:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--choice-text-on);
  border-color:color-mix(in srgb,var(--border) 78%,#5d7399);box-shadow:none;}
span.msg-start.is-on{cursor:default;}
.msg-mode-count{align-self:center;}
.msg-dialogue{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--border);color:var(--foreground);text-decoration:none;}
.msg-dialogue:last-child{border-bottom:0;}
/* a dialogue's row: white at rest, 50 % of the page's colour under the pointer, 70 % while pressed (the owner, 2026-10-27) */
.msg-dialogue:is(:hover,:focus-visible,:has(:focus-visible)){background:color-mix(in srgb,var(--background) 50%,var(--card));}
.msg-dialogue:active{background:color-mix(in srgb,var(--background) 70%,var(--card));}
.msg-face{flex:none;display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:50%;overflow:hidden;background:var(--muted);}
.msg-face img{width:100%;height:100%;object-fit:cover;}
.msg-face img.msg-face-icon,.msg-bubble-face img.msg-face-icon{object-fit:contain;padding:.2rem;}
.msg-face-branch{border-radius:0;background:none;}
.msg-face-branch .logo,.msg-start-icon .logo{width:100%;height:100%;}
.msg-face-letter{font-weight:600;color:var(--muted-foreground);}
.msg-dialogue-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem;}
.msg-dialogue-head{display:flex;align-items:center;gap:.5rem;}
.msg-dialogue-side{flex:none;align-self:center;display:flex;align-items:center;gap:.5rem;}   /* the count and the time, centred on the row */
.msg-dialogue-name{flex:1;min-width:0;font-weight:600;font-size:.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.msg-dialogue-when{flex:none;font-size:.75rem;color:var(--muted-foreground);}
.msg-dialogue-text{font-size:.8125rem;color:var(--muted-foreground);white-space:pre-line;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}   /* the message as written, its line breaks kept, cut after two lines */
.msg-dialogue-author{color:var(--label-foreground);font-weight:500;}
.msg-dialogue.is-unread .msg-dialogue-text{color:var(--foreground);}
.msg-unread{flex:none;align-self:center;min-width:1.35rem;height:1.35rem;padding:0 .35rem;border-radius:999px;background:var(--info);color:#fff;font-size:.6875rem;font-weight:700;line-height:1.35rem;text-align:center;}
.msg-conversation{padding:1rem;display:flex;flex-direction:column;gap:.75rem;min-height:22rem;}
/* the messages' own scroller: the newest at its bottom (the inner box pushed down by margin-top:auto -- it stays
   scrollable to the top, unlike justify-content:flex-end), the older passing its top edge */
.msg-scroll{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;margin:0 -.5rem;padding:0 .5rem;}
.msg-scroll-inner{margin-top:auto;display:flex;flex-direction:column;gap:.75rem;}
.msg-scroll-inner:not(:has(.msg-bubble)){flex:1;justify-content:center;}   /* empty: the placeholder in the middle */
.msg-more{display:flex;justify-content:center;padding:.25rem 0;}
.msg-more[hidden]{display:none;}
.msg-more-spinner{width:1.1rem;height:1.1rem;border:2px solid var(--border);border-top-color:var(--muted-foreground);border-radius:50%;animation:msg-spin .8s linear infinite;}
@keyframes msg-spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion: reduce){.msg-more-spinner{animation:none;}}
.msg-bubbles{display:flex;flex-direction:column;gap:.6rem;}
.msg-conversation:has(.msg-bubble) .msg-conversation-empty{display:none;}   /* the empty conversation's placeholder */
.msg-bubble{display:flex;align-items:flex-end;gap:.5rem;max-width:85%;}
.msg-bubble.is-mine{align-self:flex-end;flex-direction:row-reverse;}
.msg-bubble-face{flex:none;display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;overflow:hidden;background:var(--muted);}
.msg-bubble-face img{width:100%;height:100%;object-fit:cover;}
.msg-bubble-box{min-width:0;padding:.5rem .75rem;border-radius:.9rem;background:var(--muted);font-size:.875rem;line-height:1.4;}
.msg-bubble.is-mine .msg-bubble-box{background:var(--info-bg);}
.msg-bubble-author{font-size:.75rem;font-weight:600;color:var(--label-foreground);margin-bottom:.15rem;}
.msg-bubble-text{overflow-wrap:anywhere;}
.msg-bubble-text a{color:var(--info);}
.msg-bubble-foot{display:flex;align-items:center;justify-content:flex-end;gap:.35rem;margin-top:.2rem;font-size:.6875rem;color:var(--muted-foreground);}
.msg-bubble-action{display:inline-grid;place-items:center;width:1.25rem;height:1.25rem;padding:0;border:0;border-radius:4px;background:none;color:var(--muted-foreground);font-size:.75rem;cursor:pointer;opacity:0;}
.msg-bubble:is(:hover,:focus-visible,:has(:focus-visible)) .msg-bubble-action{opacity:1;}
.msg-bubble-action:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
.msg-bubble-delete:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--destructive);}
.msg-bubble-delete .icon{width:.8rem;height:.8rem;}
.msg-bubble-edited{font-style:italic;}
/* the time always at the bubble's EDGE -- right in one's own, left in the other side's --, "изменено" next to it and
   the actions (reply, edit, delete) towards the middle */
.msg-bubble:not(.is-mine) .msg-bubble-foot{justify-content:flex-start;}
.msg-bubble.is-mine .msg-bubble-foot > .msg-bubble-action{order:-1;}
.msg-bubble.is-mine .msg-bubble-foot > .msg-bubble-when{order:1;}
.msg-bubble:not(.is-mine) .msg-bubble-foot > .msg-bubble-when{order:-1;}
.msg-bubble:not(.is-mine) .msg-bubble-foot > .msg-bubble-action{order:1;}
.msg-quote{display:flex;flex-direction:column;align-items:flex-start;width:100%;max-width:22rem;margin:0 0 .3rem;padding:.2rem .5rem;border:0;border-left:3px solid var(--info);border-radius:.3rem;background:color-mix(in srgb,var(--info) 8%,transparent);color:var(--foreground);font:inherit;font-size:.75rem;text-align:left;cursor:pointer;}
.msg-quote:is(:hover,:focus-visible,:has(:focus-visible)){background:color-mix(in srgb,var(--info) 15%,transparent);}
.msg-quote-author{font-weight:600;color:var(--info);}
.msg-quote-text{max-width:100%;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@keyframes msg-flash{from{box-shadow:0 0 0 3px color-mix(in srgb,var(--info) 45%,transparent);}to{box-shadow:0 0 0 3px transparent;}}
.msg-bubble.is-flash .msg-bubble-box{animation:msg-flash 1.6s ease-out;}
.msg-context[hidden]{display:none;}
.msg-context{display:flex;align-items:center;gap:.6rem;padding:.35rem .5rem .35rem .65rem;border-left:3px solid var(--info);border-radius:.3rem;background:color-mix(in srgb,var(--info) 8%,transparent);font-size:.8125rem;}
.msg-context > .bi{color:var(--info);}
.msg-context-text{flex:1;min-width:0;display:flex;flex-direction:column;}
.msg-context-text strong{font-size:.75rem;color:var(--info);}
.msg-context-text span{color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.msg-context-close{flex:none;display:grid;place-items:center;width:1.75rem;height:1.75rem;padding:0;border:0;border-radius:4px;background:none;color:var(--muted-foreground);cursor:pointer;}
.msg-context-close:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.msg-things{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.4rem;}
.msg-picture{display:block;width:8rem;height:8rem;border-radius:.5rem;overflow:hidden;background:var(--card);}
.msg-picture img{width:100%;height:100%;object-fit:cover;}
.msg-thing{display:inline-flex;align-items:center;gap:.45rem;max-width:16rem;padding:.3rem .7rem .3rem .4rem;border-radius:.5rem;background:var(--card);border:1px solid var(--border);color:var(--foreground);font-size:.75rem;text-decoration:none;}
a.msg-thing:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.msg-thing-picture{flex:none;width:1.75rem;height:1.75rem;}
.msg-thing-picture img{width:100%;height:100%;object-fit:contain;}
.msg-thing-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.msg-composer{display:flex;flex-direction:column;gap:.4rem;padding-top:.75rem;border-top:1px solid var(--border);background:var(--card);flex:none;}
.msg-composer-row{display:flex;align-items:flex-end;gap:.4rem;}
/* one line = an ordinary 2.5rem field with the text on its midline (the paperclip's square beside it); each new line
   grows the box (messages.js grow) */
textarea.msg-input{flex:1;box-sizing:border-box;height:2.5rem;min-height:2.5rem;max-height:15rem;resize:none;padding:calc(.625rem - 1px) .75rem;line-height:1.25rem;}
.msg-attach,.msg-send{flex:none;display:inline-grid;place-items:center;width:2.5rem;height:2.5rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--foreground);font-size:1.05rem;cursor:pointer;}
.msg-attach:is(:hover,:focus-visible,:has(:focus-visible)),.msg-send:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.msg-send{background:var(--positive);border-color:var(--positive-border);color:var(--positive-foreground);}
.msg-send:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--positive-hover);border-color:var(--positive-hover-border);}
.msg-send:disabled{opacity:.35;cursor:default;}
.msg-error{font-size:.8125rem;color:var(--destructive);}
.msg-counter{align-self:flex-end;margin-right:2.9rem;font-size:.75rem;color:var(--muted-foreground);font-variant-numeric:tabular-nums;}
.msg-counter.is-full{color:var(--destructive);}
.msg-chosen[hidden]{display:none;}
.msg-chosen{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.35rem;}   /* as much room under the chosen things as above them (.75rem) */
.msg-chip{display:inline-flex;align-items:center;gap:.45rem;max-width:16rem;height:2.1rem;padding:0 .7rem 0 .4rem;border:1px solid var(--border);border-radius:.5rem;background:var(--muted);color:var(--foreground);font:inherit;font-size:.75rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;}
.msg-chip:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--destructive);}
.msg-chip img{width:1.6rem;height:1.6rem;object-fit:cover;border-radius:.3rem;}
.msg-attach-kinds{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;padding:0 0 .75rem;}
.msg-attach-kind{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:.6rem .3rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--foreground);font:inherit;font-size:.75rem;cursor:pointer;}
.msg-attach-kind:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.msg-attach-kind img{width:2rem;height:2rem;object-fit:contain;}
/* the support desk's read-only view of a member's item or waybill (support_thing.html, chat.desk_thing) */
.st-page{display:flex;flex-direction:column;gap:1rem;}
.st-note{margin:0;font-size:.8125rem;color:var(--muted-foreground);}
.st-note a{color:inherit;}
.st-card{padding:1rem 1.25rem;}
.st-head{display:flex;align-items:center;gap:1rem;margin-bottom:.75rem;}
.st-head h1{margin:.1rem 0 0;font-size:1.125rem;}
.st-kind{font-size:.75rem;color:var(--muted-foreground);}
.st-picture{flex:none;display:grid;place-items:center;width:4rem;height:4rem;}
.st-picture img{max-width:100%;max-height:100%;object-fit:contain;}
.st-facts{display:grid;grid-template-columns:max-content 1fr;gap:.45rem 1.5rem;margin:0;font-size:.875rem;}
.st-facts dt{color:var(--muted-foreground);}
.st-facts dd{margin:0;}
.st-badges{display:inline-flex;flex-wrap:wrap;gap:.25rem;}
.st-lines{padding:0;}
.st-line{display:grid;grid-template-columns:2.5rem minmax(0,1fr) auto 7rem;align-items:center;gap:.75rem;padding:.6rem 1.25rem;border-bottom:1px solid var(--border);font-size:.875rem;}
.st-line-picture img{width:2.5rem;height:2.5rem;object-fit:contain;}
.st-line-name{display:flex;flex-direction:column;gap:.25rem;min-width:0;}
.st-number{margin-right:.4rem;font-size:.75rem;color:var(--muted-foreground);}
.st-line-figures{color:var(--muted-foreground);white-space:nowrap;}
.st-line-total{text-align:right;font-weight:600;white-space:nowrap;}
.st-total{padding:.75rem 1.25rem;text-align:right;font-weight:600;}
/* the kinds' window is small, its four tiles in a row; the search window: the filters and the text above the list */
.msg-attach-dialog[open]{width:min(26rem,calc(100% - 2rem));}
.msg-find-head{flex:none;display:flex;flex-direction:column;gap:.5rem;margin:0 calc(-1 * var(--dialog-pad));padding:.75rem var(--dialog-pad);border-bottom:1px solid var(--border);}
.msg-find-head .msg-find-filters{width:100%;margin:0;grid-template-columns:repeat(3,minmax(0,1fr));}
.msg-find-head .msg-find-filters[hidden]{display:none;}
.msg-notices{position:fixed;right:1rem;bottom:1rem;z-index:60;display:flex;flex-direction:column;gap:.5rem;width:min(22rem,calc(100% - 2rem));pointer-events:none;}
.msg-notice{display:flex;align-items:center;gap:.65rem;padding:.65rem .8rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);color:var(--foreground);box-shadow:var(--shadow-lg);text-decoration:none;pointer-events:auto;transform:translateY(1rem);opacity:0;transition:transform .25s ease,opacity .25s ease;}
.msg-notice.is-in{transform:none;opacity:1;}
.msg-notice.is-out{opacity:0;transform:translateY(.5rem);transition-duration:.5s;}
.msg-notice:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.msg-notice-text{display:flex;flex-direction:column;min-width:0;font-size:.8125rem;}
.msg-notice-who{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.msg-notice-line{color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media (prefers-reduced-motion: reduce){.msg-notice{transition:none;transform:none;}}

/* Консигнации (consignments.html, 2026-10-20; Legacy's waybills?consignation): a card per supplier, its waybills as
   small badges, a lot per row in the waybill-line idiom -- tick · item · days · bag · unit price (edited in place) ·
   quantity · debt · give back; the payment card at the end. The "под реал" plate (_consignment.html) everywhere. */
.cn-page{display:flex;flex-direction:column;gap:1rem;}
.cn-tab{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;text-decoration:none;line-height:2.125rem;}
.cn-tab img{width:1.1rem;height:1.1rem;object-fit:contain;}
.cn-supplier{padding:0;overflow:hidden;}
.cn-supplier-head{display:flex;align-items:center;gap:.6rem;padding:.75rem 1rem;border-bottom:1px solid var(--border);}
.cn-supplier-head .supplier-avatar{width:2rem;height:2rem;}
.cn-waybill{padding:.55rem 1rem .1rem;color:var(--muted-foreground);font-size:.6875rem;font-weight:500;letter-spacing:.02em;}
/* a hint for newcomers (_hint.html): a light-blue frame with an (i); gone when the person switched hints off */
.hint{display:flex;align-items:flex-start;gap:.6rem;margin:0 0 1rem;padding:.65rem .85rem;border:0;border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow-card);color:var(--foreground);font-size:.8125rem;line-height:1.5;}
.hint > i{flex:none;display:flex;align-items:center;height:1.21875rem;color:var(--info);font-size:1rem;line-height:1;}   /* .8125rem x 1.5: the first line's own height, so the (i) sits on its middle */
/* a search field's native cross: never flush against the text (every search field) */
input[type="search"]::-webkit-search-cancel-button{margin-inline-start:.5rem;cursor:pointer;}
.no-hints .hint,.no-hints .rc-memo{display:none;}      /* the salary's memo (i) too */
.hint[hidden]{display:none;}
/* a hint INSIDE a card (the personal accounts' -- the member page, a transfer): no card of its own on the card, the old
   slight yellow instead */
.card .hint{box-shadow:none;background:color-mix(in srgb,var(--warning-bg) 50%,transparent);}
.profile-switch-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;font-size:.875rem;cursor:pointer;}
#cn-pay-form .cn-row{cursor:pointer;}
/* the columns as narrow as their figures: an amount has room for six digits and its sign ("999 999 ₽"), a quantity
   for two digits and "шт"; the item's column takes what is left */
.cn-row{display:grid;grid-template-columns:1.5rem 3rem minmax(0,1fr) 6.5ch 7ch calc(10ch + .5rem) 6ch 10ch 2.25rem;align-items:center;gap:.55rem;padding:.6rem 1rem;font-size:.8125rem;}
.cn-row + .cn-row{border-top:1px solid var(--border);}
.cn-row.cn-cols{padding-top:.35rem;padding-bottom:.35rem;color:var(--muted-foreground);cursor:default;}
.cn-cols > span{font-size:.6875rem;font-weight:500;min-width:0;justify-self:stretch;}
/* the row itself keeps the rows' font: the columns are in ch, and a bolder or smaller "0" would widen or narrow them */
.cn-cols > .cn-col-action{text-align:center;font-size:.8125rem;}      /* the small type on the words, never the row: the columns are in ch of the row */
/* the item column to the left, every other column -- its heading and its figures -- centred */
.cn-cols > .cn-days,.cn-cols > .cn-bag-col,.cn-cols > .cn-num{text-align:center;}
.cn-row > .cn-bag,.cn-row > .cn-action,.cn-row > .cn-status{justify-self:center;}
.cn-status{display:inline-flex;align-items:center;gap:.25rem;}
.cn-split{width:1.6rem;height:1.6rem;}
.cn-split img{width:1.1rem;height:1.1rem;object-fit:contain;}
.cn-cols > .cn-col-item{grid-column:1 / 4;}             /* "Товар" over the tick, the picture and the name: one column */
.cn-row > .cn-unit{display:flex;justify-content:center;align-items:center;}
.cn-cols + .cn-waybill,.cn-row + .cn-waybill{border-top:1px solid var(--border);}
.cn-cols + .cn-group,.cn-group + .cn-group{border-top:1px solid var(--border);}
.cn-row-ticked{background:var(--row-ticked);}
.cn-row.cn-row-settled{grid-template-columns:3rem minmax(0,1fr) 13ch 7ch calc(10ch + .5rem) 6ch 10ch;cursor:default;}
.cn-row-settled.cn-cols > .cn-col-item{grid-column:1 / 3;}           /* no tick on a settled lot: "Товар" over picture and name */
.cn-status-icon{width:1.1rem;height:1.1rem;object-fit:contain;}
.cn-check{display:grid;place-items:center;cursor:pointer;}
.cn-item{display:block;}
.cn-name{color:inherit;text-decoration:none;}
.cn-name:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--primary);}
.cn-days{color:var(--muted-foreground);white-space:nowrap;text-align:center;font-variant-numeric:tabular-nums;}
.cn-num{text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap;}
.cn-debt{font-weight:600;}
.cn-bag{display:grid;place-items:center;font-size:1.05rem;}
.cn-bag-none{color:#b91c1c;}
.cn-bag-part{color:#1d4ed8;}
.cn-bag-all{color:#15803d;}
.cn-price{padding:.1rem .25rem;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;font-variant-numeric:tabular-nums;cursor:text;}
.cn-price:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.cn-price-field{width:100%;max-width:6.5rem;padding:.1rem .25rem;border:0;outline:none;background:transparent;font:inherit;font-variant-numeric:tabular-nums;text-align:center;}   /* centred like the figure it replaces */
.cn-unit .save-state{display:none;}
.cn-action{display:grid;place-items:center;}
.cn-action .icon-button img{width:1.25rem;height:1.25rem;object-fit:contain;}
.cn-action .icon-button:disabled img{filter:grayscale(1);opacity:.35;}
.cn-mark{color:var(--muted-foreground);font-size:.75rem;}
.cn-settled{padding:0;overflow:hidden;}
.cn-pay{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:1rem;padding:.75rem 1rem;}
/* the payment panel is the list's footer, as the cart's: joined to the card above it, one line between them */
.cn-page > .card:has(+ .cn-pay){border-bottom-left-radius:0;border-bottom-right-radius:0;}
.cn-page > .cn-pay{margin-top:calc(-1rem - 1px);border-top-left-radius:0;border-top-right-radius:0;}
/* the account: the cart's tiles and the box naming the one chosen (account_tiles) */
.account-tiles{display:inline-flex;align-items:center;gap:.6rem;flex-wrap:wrap;}
.account-tiles .ct-account .member-avatar{width:1.75rem;height:1.75rem;}   /* a face the size of the cart's stickers */
.cn-pay-label{margin-right:-.4rem;font-size:.875rem;}      /* the label hugs the account it names */
.cn-pay-total{display:inline-flex;align-items:center;gap:.6rem;}
.cn-pay-total strong{font-size:1rem;font-variant-numeric:tabular-nums;}
.wb-badge-consignment{border-color:rgba(185,28,28,.35);color:#b91c1c;text-decoration:none;}
.wb-badge-consignment i{color:#b91c1c;}
@media (max-width:860px){
  .cn-row{grid-template-columns:1.5rem 3rem minmax(0,1fr) auto;}
  .cn-row.cn-cols{display:none;}            /* the narrow layout stacks the figures: no columns to name */
  .cn-row > .cn-days,.cn-row > .cn-bag,.cn-row > .cn-bag-col{display:none;}
  .cn-row > .cn-num,.cn-row > .cn-action{grid-column:3 / -1;justify-self:start;}
  .cn-row.cn-row-settled{grid-template-columns:3rem minmax(0,1fr) auto;}
  .cn-row-settled > .cn-days,.cn-row-settled > .cn-status{display:none;}
}
:root[data-theme="dark"] .wb-badge-consignment,:root[data-theme="dark"] .wb-badge-consignment i{color:#f87171;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .wb-badge-consignment,:root:not([data-theme="light"]) .wb-badge-consignment i{color:#f87171;}}

/* Поиск товаров (search.html, _search_results.html, search.js; the old CRM's items.php): the filter tiles row (the waybill
   picker's buttons, four of them), the search bar, a card per MODEL with its lots in rows -- the tag, the facts as badges,
   the branch, the days since arrival in Legacy's six colours, what is free, the retail price (marked up / down while
   recently changed), the cart. */
/* the four filter buttons and the search bar under them: ONE width, edge to edge (the waybill panel's) */
.sr-filters{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:1.25rem;}   /* the search bar sits midway: 1.25rem above and below */
.sr-bar{display:flex;gap:.5rem;align-items:center;width:min(100%,var(--wb-panel-width));margin-bottom:1.25rem;}
.sr-bar .input{flex:1;}
.sr-bar .btn{gap:.4rem;}
.sr-results{display:flex;flex-direction:column;gap:.75rem;}
/* Библиотеки → Товары (catalogue.html, catalogue_browse.js): the waybill picker's three filters and its search on the
   page, the panel's width, and the models as rows under them -- picture, name, "brand · type", the year; a row is a link */
.cb-filters{grid-template-columns:repeat(3,minmax(0,1fr));}
.cb-list{width:min(100%,var(--wb-panel-width));padding:0;overflow:hidden;}
.cb-list:empty{display:none;}
.cb-model{text-decoration:none;text-align:left;}
.cb-list .cb-model .wb-model-year{color:var(--muted-foreground);font-size:.8125rem;}
a.cb-model:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.cb-list > .supplier-row + .supplier-row,.cb-list > .wb-models-caption + .supplier-row{border-top:1px solid var(--border);}
.cb-list > .wb-models-caption + .supplier-row{border-top:0;}
.cb-model .wb-line-picture img{width:100%;height:100%;object-fit:contain;}
.cb-list .cb-model-name{flex-direction:column;align-items:flex-start;gap:.1rem;}
.cb-model-name .supplier-name-text{max-width:100%;}
.cb-model-kind{max-width:100%;font-size:.75rem;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cb-list .wb-models-none{padding:1.5rem 1rem;color:var(--muted-foreground);text-align:center;}
.sr-empty{padding:2rem 0;color:var(--muted-foreground);text-align:center;}
/* a model's card, the old CRM's: its picture a column of its own at the left, centred down the card's whole height;
   at the right the name -- a short caption, no line under it -- and the lots' rows, tight, no lines between them */
/* ONE standard gap at the left, .75rem: the frame -> the picture, and the picture -> the text (the column gap .375rem +
   the name's / the rows' own .375rem in front of the item number) */
.sr-model{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:.375rem;padding:0;overflow:hidden;}
/* a model's page (model.html): its items as the search's rows, under the model's head; what is to come, below */
.md-picture{display:grid;place-items:center;flex:none;width:5rem;height:5rem;color:var(--muted-foreground);font-size:2rem;}
.md-picture img{max-width:100%;max-height:100%;object-fit:contain;}
/* the model's properties: a button each (its icon and name), its allowed values in the tooltip -- one line of them */
.md-label{margin:1.25rem 0 .5rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);}   /* a block's caption, the settings' way */
.md-properties{display:flex;flex-wrap:wrap;gap:.3rem;padding:.5rem .6rem;}
.md-property{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;width:8rem;padding:.4rem .35rem .35rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);font-size:.6875rem;font-weight:500;cursor:default;}
.md-property .bi{color:var(--muted-foreground);font-size:1.1rem;line-height:1;}
.md-property-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.md-property:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
/* the items' sections: folded cards, their title and how many units they hold; a lot a row as the search's */
.md-section{margin-top:1rem;padding:0;overflow:hidden;}
.md-section > summary{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.1rem;cursor:pointer;list-style:none;font-weight:600;font-size:.9375rem;}
.md-section > summary::-webkit-details-marker{display:none;}
.md-section > summary::before{content:"";width:.45rem;height:.45rem;border-right:2px solid var(--muted-foreground);border-bottom:2px solid var(--muted-foreground);transform:rotate(-45deg);transition:transform .15s;margin-right:.2rem;}
.md-section[open] > summary::before{transform:rotate(45deg);}
.md-section > summary:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.md-section-totals{margin-left:auto;font-weight:600;}
.md-rows{padding:.25rem .5rem .5rem;border-top:1px solid var(--border);}
.md-lot{display:grid;grid-template-columns:auto minmax(0,1fr) 2rem auto 7rem;align-items:center;gap:.75rem;padding:.2rem .5rem .2rem .375rem;border-radius:4px;color:inherit;text-decoration:none;}
.md-lot .sr-number{margin-right:-.375rem;}
.md-lot:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.md-balances{display:flex;gap:.25rem;justify-content:flex-end;}
@media (max-width:860px){.md-lot{grid-template-columns:auto minmax(0,1fr) auto;}.md-lot .sr-branch,.md-lot .sr-price{display:none;}}
.it-model-link{color:inherit;text-decoration:none;}
.it-model-link:is(:hover,:focus-visible,:has(:focus-visible)){text-decoration:underline;text-underline-offset:3px;}
.sr-model-picture{display:grid;place-items:center;align-self:center;width:3.25rem;height:3.25rem;margin-left:.75rem;color:var(--muted-foreground);font-size:1.5rem;}
.sr-model-picture img{max-width:100%;max-height:100%;object-fit:contain;}
.sr-model-body{min-width:0;padding:.45rem .5rem calc(.15rem + 1px) 0;}   /* .5rem on the right: a lit row stops short of the card's edge */   /* the last row's badges and cart end as far from the frame as the name begins */
.sr-model-head{padding:0 .5rem 0 .375rem;margin-bottom:.2rem;line-height:1.3;}   /* in line with the rows' item numbers */
.sr-model-name{font-weight:500;font-size:.9375rem;}
/* a model's part numbers (catalogue.CODES): at the right of a search card's head; on its page under its name */
.sr-model-head:has(.sr-codes){display:flex;align-items:center;gap:.5rem;}
.sr-codes{margin-left:auto;display:inline-flex;gap:.25rem;flex:none;}
.sr-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;max-width:none;}
.sr-codes-many{cursor:default;}
.md-codes{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;margin-top:.35rem;}
.md-codes-label{font-size:.75rem;color:var(--muted-foreground);margin-right:.15rem;}
.md-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;max-width:none;}
/* the model's name leads to its page: never underlined -- a little lighter at rest, the full text colour under the pointer */
.sr-model-link{color:color-mix(in srgb,var(--foreground) 78%,var(--background));text-decoration:none;cursor:pointer;}
.sr-model-link:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
/* the figures' columns have a FLOOR, never a cap (a longer value widens its own): days 3 digits (1.5rem), quantity
   "999 шт" as one unit (2.9rem), price "100 000 ₽" (4.5rem) -- measured in the rows' fonts --, each centred in its
   column; every column gap the same .75rem */
.sr-lot{display:grid;grid-template-columns:auto minmax(0,1fr) 2rem minmax(1.5rem,max-content) minmax(2.9rem,max-content) minmax(4.5rem,max-content) 2rem;align-items:center;gap:.75rem;padding:.05rem .5rem .05rem .375rem;border-radius:4px;cursor:pointer;}
.sr-lot > .sr-days,.sr-lot > .sr-qty,.sr-lot > .sr-price{justify-self:center;text-align:center;}
/* lit: 80 % of the page's colour into the white, pressed the page's colour itself -- never darker than the page */
.sr-lot:is(:hover,:focus-visible,:has(:focus-visible)){background:color-mix(in srgb,var(--background) 80%,var(--card));}
.sr-lot:active{background:var(--background);}
/* the item's number on its condition's colour (blue new, red used -- the item tag's --tag) */
/* the item's number: small, tight -- room for four digits always (rows line up), a fifth widens it a little */
.sr-number{--tag:#4f7bbf;justify-self:start;margin-right:-.375rem;   /* half the row's gap moved to its left (.sr-lot's padding) */box-sizing:border-box;min-width:calc(4ch + .3rem);padding:0 .15rem;border-radius:3px;background:var(--tag);color:#fff;font-size:.625rem;font-weight:600;line-height:1rem;text-align:center;text-decoration:none;font-variant-numeric:tabular-nums;}
.sr-number.item-tag-used{--tag:#d2645f;}
.sr-lot-away{opacity:.6;}
.sr-lot-ended{opacity:.45;}
.sr-facts{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;min-width:0;}
.sr-warranty .bi{font-size:.8rem;}
.sr-model-badge{max-width:16rem;font-weight:600;}
/* an item's page in a modal (search.js): the page itself in a frame, almost the whole window */
/* as wide as the page's content -- its blocks (--item-width) and the frame's own padding --, so that fitting it to the
   frame's content once loaded (search.js) changes nothing; the close button outside its right edge, where it covers nothing */
.item-modal{width:min(calc(var(--item-width) + 2.5rem + 2px),calc(94vw - 3.5rem));height:90vh;max-width:none;max-height:none;padding:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--background);overflow:visible;}
.item-modal iframe{border-radius:var(--radius);}
.item-modal::backdrop{background:rgba(0,0,0,.45);}
.item-modal iframe{display:block;width:100%;height:100%;border:0;background:var(--background);}
.item-modal-close{position:absolute;top:0;right:-3rem;z-index:1;display:grid;place-items:center;width:2.25rem;height:2.25rem;border:1px solid var(--border);border-radius:999px;background:var(--card);color:var(--foreground);cursor:pointer;box-shadow:var(--shadow-lg);}
.item-modal-close:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.embedded .embedded-content{padding:1rem 1.25rem 2rem;}     /* fixed: the modal's width counts on it */
.sr-branch{display:grid;place-items:center;}
.sr-days{justify-self:end;font-size:.75rem;font-variant-numeric:tabular-nums;font-weight:600;}
.sr-days-1{color:#2f7d43;} .sr-days-2{color:#6a8f2a;} .sr-days-3{color:#a08a1f;}
.sr-days-4{color:#b8701d;} .sr-days-5{color:#c2502b;} .sr-days-6{color:#b42f2f;}
.sr-qty{justify-self:end;font-size:.8125rem;font-variant-numeric:tabular-nums;white-space:nowrap;}
.sr-ended{color:var(--muted-foreground);font-size:.75rem;}
.sr-price{justify-self:end;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;}
.sr-price:has(.sr-price-other){display:flex;flex-direction:column;align-items:center;line-height:1.2;}
.ct-currency{flex:none;}
.ct-part-amount{display:inline-flex;align-items:center;gap:.3rem;}
.ct-part-symbol{color:var(--muted-foreground);font-size:.8125rem;min-width:1.2rem;}
.ct-account[hidden]{display:none;}
.ct-face{position:relative;display:inline-flex;overflow:visible;background:none;}
.ct-mixed-account[hidden]{display:none;}
.ct-mixed-one .face-currency{display:none;}
.ct-face > .face-currency{position:absolute;right:-.45rem;bottom:-.3rem;}
.sr-price-other{font-size:.6875rem;font-weight:500;color:var(--muted-foreground);}
.sr-price-mark{display:inline-flex;align-items:center;gap:.1rem;padding:.05rem .35rem;border:0;border-radius:6px;font:inherit;font-weight:600;cursor:pointer;}
.sr-price-up{background:#dcfce7;color:#166534;}
.sr-price-down{background:#fee2e2;color:#991b1b;}
.sr-cart{justify-self:end;}
.sr-cart-button{display:grid;place-items:center;width:2rem;height:2rem;margin-block:-1px;padding:.25rem;border:0;background:none;}   /* the tallest thing of a row: 1px into the row's edge on each side keeps the hover band 1px tighter over the text */
.sr-cart-button img{width:100%;height:100%;object-fit:contain;}
.sr-cart-button:disabled{opacity:.35;cursor:default;}
.sr-added{font-size:1.25rem;color:var(--success, #15803d);}   /* the transfer list's modal: added */
/* there the whole row adds (search.js): a pointer only where something can still be added */
.sr-page[data-pick] .sr-lot:not(:has([data-transfer-lot])){cursor:default;}
.tl-add-modal{width:min(52rem,calc(94vw - 3.5rem));}
/* the search inside it: the filters and the search bar stretched over the modal's whole width */
.embedded .sr-page[data-pick] .sr-filters,.embedded .sr-page[data-pick] .sr-bar{width:100%;}
.sr-more{display:grid;place-items:center;padding:1rem;}
.sr-more[hidden]{display:none;}
.sr-spinner{width:1.25rem;height:1.25rem;border:2px solid var(--border);border-top-color:var(--muted-foreground);border-radius:50%;animation:sr-spin .8s linear infinite;}
@keyframes sr-spin{to{transform:rotate(360deg);}}
@media (max-width:860px){
  .sr-filters{grid-template-columns:repeat(4,minmax(0,1fr));}
  .sr-model-picture{width:2.25rem;height:2.25rem;}
  /* two lines: the facts, then the branch (another one's), days, what is free, the price and the cart -- nothing of the
     wide row is left out (until 2026-11-14 the cart and the branch were, so a phone could not put an item in the cart) */
  .sr-lot{grid-template-columns:auto minmax(0,1fr) auto auto auto auto;row-gap:.15rem;column-gap:.6rem;
          grid-template-areas:"tag facts facts facts facts facts" ". branch days qty price cart";padding-top:.3rem;}
  .sr-lot .sr-number{grid-area:tag;align-self:center;margin-top:0;margin-right:.15rem;min-width:0;padding:0 .2rem;font-size:.5625rem;line-height:.95rem;}
  .sr-lot{padding-left:0 !important;}   /* in the middle of its facts, however many lines */ .sr-lot .sr-facts{grid-area:facts;} .sr-lot .sr-days{grid-area:days;}
  .sr-lot .sr-qty{grid-area:qty;} .sr-lot .sr-price{grid-area:price;} .sr-lot .sr-cart{grid-area:cart;}
  .sr-lot .sr-branch{grid-area:branch;justify-self:start;}
  .sr-lot:not(:last-child){padding-bottom:.3rem;border-bottom:1px solid color-mix(in srgb,var(--border) 60%,transparent);border-radius:0;}
  /* the transfer list's modal is this narrow by design: the row stays ONE line -- no branch column (only this branch's
     lots can go), the facts take what is left -- and its button stays at the right */
  .sr-page[data-pick] .sr-lot{grid-template-columns:auto minmax(0,1fr) minmax(1.5rem,max-content) minmax(2.9rem,max-content) minmax(4.5rem,max-content) 2rem;grid-template-areas:none;gap:.5rem;}
  .sr-page[data-pick] .sr-lot > *{grid-area:auto;}
  .sr-page[data-pick] .sr-lot .sr-cart{display:grid;}
  .sr-page[data-pick] .sr-model-picture{width:3.25rem;height:3.25rem;}
}

/* Reserve, write-off, company use (holds.py, 2026-10-20): В резерве / На обеспечении, a card per held lot -- who, when,
   how long (the page's age scale, Legacy's colours green → red), the lot's line, its action; the item page's window */
.hd-page{display:flex;flex-direction:column;gap:.75rem;}
.hd-card{padding:0;overflow:hidden;}
.hd-head{display:flex;align-items:center;gap:.6rem;padding:.55rem 1rem;border-bottom:1px solid var(--border);font-size:.8125rem;color:var(--muted-foreground);}
.hd-who{display:inline-flex;align-items:center;gap:.35rem;color:var(--foreground);}
.hd-who img{width:1.25rem;height:1.25rem;border-radius:50%;object-fit:cover;}
.hd-age-1{color:#3f7f4f;}
.hd-age-2{color:#8a9a2f;}
.hd-age-3{color:#a88a2c;}
.hd-age-4{color:#c0782f;}
.hd-age-5{color:#c24444;}
/* the figures' columns in ch of the row, as the consignments': a sum 6 digits and its currency (10ch), a quantity two
   digits and "шт" (6ch) */
.hd-line{display:grid;grid-template-columns:3rem minmax(0,1fr) 10ch 6ch 10ch auto;align-items:center;gap:.55rem;padding:.6rem 1rem;font-size:.8125rem;}
.hd-num{text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap;}
.hd-total{font-weight:600;}
.hd-act{display:inline-flex;align-items:center;gap:.35rem;justify-content:flex-end;}
.hd-act img{width:1.25rem;height:1.25rem;}
.hd-release .bi{font-size:1.15rem;line-height:1;}
.hd-comment-row{display:flex;align-items:center;gap:.75rem;padding:.4rem 1rem .6rem;border-top:1px solid var(--border);font-size:.8125rem;}
.hd-comment-row > .hd-comment{flex:1 1 auto;min-width:0;}
/* the reservation's timer, before the comment: muted until set */
.hd-expiry{flex:none;display:inline-flex;align-items:center;gap:.35rem;padding:.15rem .5rem;border:1px solid var(--border);border-radius:999px;background:none;color:var(--muted-foreground);font:inherit;font-size:.75rem;cursor:pointer;white-space:nowrap;}
.hd-expiry:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);color:var(--foreground);}
.hd-expiry.hd-expiry-on{border-color:color-mix(in srgb,var(--info) 40%,var(--border));color:var(--info);}
.hd-expiry-dialog{width:min(520px,calc(100% - 2rem));}
.hd-expiry-dialog .dialog-actions{flex-wrap:nowrap;}
.hd-expiry-fields{display:flex;align-items:center;gap:.6rem;margin:.5rem 0;}
.hd-expiry-fields > .input{width:6rem;}
.hd-comment{padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;text-align:left;cursor:pointer;width:100%;}
.hd-comment:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--primary);}
.hd-comment-empty,.hd-comment-text{color:var(--muted-foreground);}
.hd-comment-field{width:100%;padding:0;border:0;background:transparent;font:inherit;color:var(--foreground);}
.hd-stepper{display:flex;align-items:center;gap:.5rem;}
.hd-stepper .input{width:4rem;text-align:center;}
/* the item page's hold window: "Количество", − n + and "из N свободных" each on its own line, centred */
.hd-qty-centered{text-align:center;}
.hd-qty-centered .field{display:block;}
.hd-qty-centered .hd-stepper{justify-content:center;flex-wrap:wrap;}
.hd-qty-centered .hd-stepper > .text-muted{flex-basis:100%;}
/* Вернуть на склад (company_use.html): the item, then label / control rows, then the calculator */
.hd-return-dialog{width:min(560px,calc(100% - 2rem));}
.hd-return-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem;margin-bottom:1rem;font-size:.8125rem;}
.hd-return-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;min-height:2.25rem;margin-bottom:.75rem;}
.hd-return-row[hidden]{display:none;}
.hd-return-what{display:grid;grid-template-columns:3rem minmax(0,1fr);align-items:center;gap:.8rem;min-width:0;}
.hd-return-out{display:flex;flex-direction:column;align-items:center;min-width:4.5rem;padding-left:.8rem;border-left:1px solid var(--border);}
.hd-return-out-n{font-size:1.25rem;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;}
.hd-return-out-label{font-size:.6875rem;color:var(--muted-foreground);text-align:center;}
.hd-return-label{font-size:.875rem;font-weight:500;}
.hd-return-body{margin-top:.25rem;}
.hd-return-intro{margin:0 0 1rem;padding:.65rem .8rem;border:1px solid var(--border);border-radius:var(--radius);font-size:.8125rem;line-height:1.45;color:var(--muted-foreground);}
.hd-calc{margin-top:.25rem;}
.hd-calc-slider{width:100%;margin:.4rem 0 1rem;accent-color:var(--destructive);}
.hd-calc-ends{display:flex;justify-content:space-between;gap:1rem;font-size:.8125rem;font-variant-numeric:tabular-nums;}
.hd-calc-red{color:var(--destructive);}
.hd-calc-result{display:grid;gap:.35rem;padding:.65rem .8rem;border-radius:var(--radius);background:var(--muted);}
.hd-calc-line{display:flex;justify-content:space-between;gap:1rem;font-size:.875rem;font-variant-numeric:tabular-nums;}
.hd-calc-expense strong{color:var(--destructive);}
.hd-return-notes{display:grid;margin-top:.4rem;padding-top:.5rem;border-top:1px solid var(--border);}
.hd-return-note{grid-area:1/1;margin:0;font-size:.8125rem;line-height:1.45;color:var(--muted-foreground);}
.hd-return-note.is-off{visibility:hidden;}
.hd-line-lead{grid-template-columns:3rem minmax(0,1fr) auto 10ch 6ch 10ch auto;}
.hd-tabs{grid-auto-columns:minmax(12rem,auto);}
.hd-tabs .view-switch-item{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;text-decoration:none;}
.hd-tabs .view-switch-item img{width:1.1rem;height:1.1rem;object-fit:contain;}
@media (max-width:700px){.hd-line{grid-template-columns:3rem minmax(0,1fr) auto auto;}.hd-line .hd-num:not(.hd-total){display:none;}
  .hd-line-lead{grid-template-columns:3rem minmax(0,1fr) auto auto auto;}}
/* --- crafts (S7): the item page's history of crafts, the Unstack window, ЗАМЕНА's item form without figures --- */
.it-crafts{list-style:none;margin:.25rem 0 0;padding:0;}
.it-craft{display:flex;align-items:center;gap:.75rem;padding:.55rem 0;border-top:1px solid var(--border);}
.it-craft:first-child{border-top:0;}
.it-craft-body{display:flex;flex-direction:column;gap:.1rem;min-width:0;flex:1 1 auto;}
.it-craft-what{font-size:.875rem;}
.it-craft-meta{font-size:.75rem;color:var(--muted-foreground);}
.it-craft-undone .it-craft-what{color:var(--muted-foreground);text-decoration:line-through;}
.it-craft-undone-mark{color:var(--destructive);}
.it-craft-undo{flex:0 0 auto;gap:.35rem;}
.it-craft-undo img{width:1rem;height:1rem;}
.it-unstack-figures{margin-bottom:.75rem;}
.it-unstack-range{width:100%;}
.it-unstack-split{display:flex;justify-content:space-around;margin:.5rem 0 .25rem;text-align:center;}
.it-unstack-split span{display:flex;flex-direction:column;}
.it-unstack-split strong{font-size:1.5rem;font-variant-numeric:tabular-nums;}
.wb-item-dialog[data-mode="replace"] [data-price-row]{display:none;}

/* The shop (shop.py, 2026-10-20, PORT_PLAN.md S3): Услуги and its window, Библиотеки -> Услуги, Корзина and its payment
   windows, Отчет. Legacy's facts and colours (blue new, red used, a service framed blue; red expenses, green incomes,
   red-brown payouts, dark-blue sales) in our tokens. */
:root{--row-hover:var(--background);--row-ticked:#edf2fc;--row-ticked-hover:#e3ebfa;
  /* the cart's and the consignments' rows, a LADDER (2026-10-27): under the pointer < TICKED < ticked under the pointer */
  --sh-red:rgba(160,40,60,.07);--sh-green:rgba(40,160,60,.07);--sh-blue:rgba(40,60,180,.08);--sh-brown:#8a3b2a;--sh-sale:#24407a;}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--row-hover:rgba(130,150,250,.05);--row-ticked:rgba(130,150,250,.1);--row-ticked-hover:rgba(130,150,250,.16);--sh-red:rgba(240,110,130,.14);--sh-green:rgba(110,220,130,.12);--sh-blue:rgba(130,150,250,.14);--sh-brown:#e5a089;--sh-sale:#a9c1f5;}}
:root[data-theme="dark"]{--row-hover:rgba(130,150,250,.05);--row-ticked:rgba(130,150,250,.1);--row-ticked-hover:rgba(130,150,250,.16);--sh-red:rgba(240,110,130,.14);--sh-green:rgba(110,220,130,.12);--sh-blue:rgba(130,150,250,.14);--sh-brown:#e5a089;--sh-sale:#a9c1f5;}
.logo-tiny{width:.9rem;height:.9rem;border-radius:3px;}
.sh-face{width:1.5rem;height:1.5rem;font-size:.6875rem;}
.sh-face-small{width:1rem;height:1rem;font-size:.5625rem;}
.sh-performer img{width:1rem;height:1rem;}
.sh-tag{flex:none;text-decoration:none;}
.item-tag-service{--tag:#4f7bbf;}
.sh-caption{display:flex;flex-direction:column;gap:.2rem;min-width:0;}
.sh-name{font-weight:600;font-size:.8125rem;color:var(--sh-sale);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sh-facts{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;}
.sh-pill{display:inline-flex;align-items:center;gap:.35rem;padding:.15rem .5rem;border-radius:4px;background:var(--muted);font-size:.8125rem;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;}

/* Услуги */
.sv-card{padding:0;overflow:hidden;}
.sv-title{display:flex;align-items:center;justify-content:center;position:relative;padding:.75rem 1rem;}
.sv-title h2{margin:0;font-size:.9375rem;font-weight:600;}
.sv-title > :last-child{position:absolute;right:.75rem;}
/* the four right columns -- performer, price, payout, action -- one width each */
.sv-row{display:grid;grid-template-columns:3rem minmax(0,1fr) 10rem repeat(3,5.5rem);align-items:center;gap:.5rem;padding:.4rem 1rem;border-top:1px solid var(--border);font-size:.875rem;}
.sv-head{color:var(--muted-foreground);font-size:.75rem;font-weight:600;}
.sv-head > span:not(:nth-child(2)),.sv-performer,.sv-action{justify-self:center;}
.sv-num{justify-self:center;font-variant-numeric:tabular-nums;}   /* the price and the payout, centred under their column icons */
.sv-picture{display:grid;place-items:center;width:2.25rem;height:2.25rem;color:var(--muted-foreground);font-size:1.2rem;}
.sv-picture img{max-width:100%;max-height:100%;object-fit:contain;}
.sv-face{width:1.75rem;height:1.75rem;}
.sv-performer{display:inline-flex;align-items:center;gap:.4rem;max-width:100%;min-width:0;height:2rem;font-size:.8125rem;}
.sv-performer > img,.sv-performer > .member-avatar{flex:none;width:1.5rem;height:1.5rem;}
.sv-performer > span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sv-in-cart > :not(.sv-action){opacity:.35;}
.sv-badge{display:inline-block;margin-left:.4rem;padding:.05rem .4rem;border-radius:3px;background:var(--wh-bg);color:var(--wh-ink);font-size:.6875rem;font-weight:600;}
.sv-cart img{width:1.4rem;height:1.4rem;}
/* a row answers the pointer with the faintest tint (both tables, not their headings) */
.sv-card > .sv-row:not(.sv-head):not(.drag-gap){transition:background-color .12s;}
.sv-card > .sv-row:not(.sv-head):not(.drag-gap):is(:hover,:has(:focus-visible)){background:color-mix(in srgb,var(--background) 55%,var(--card));}
/* the action is pressed from its WHOLE cell: the cell reaches the row's edges (its padding, half the gap), and the
   button's ::before covers it -- a press or a hover there is the button's, so it lights up within its own bounds and
   its tooltip shows before the pointer reaches it */
.sv-row:not(.sv-head) > .sv-action{position:relative;align-self:stretch;justify-self:stretch;display:grid;place-items:center;margin:-.4rem -1rem -.4rem -.25rem;}
.sv-action > .icon-button::before{content:"";position:absolute;inset:0;}
.sv-empty{padding:2rem;text-align:center;}
/* Услуги -> Редактор (services.html, services_editor.js): the same columns, every cell edited in place -- the icon and
   the performer open their windows, the texts are fields that look like text until touched; a hidden row is muted and
   offers restore and remove; the add row on top has real fields */
.se-row{grid-template-columns:3rem minmax(0,1fr) 10rem 6.5rem 6.5rem 5.5rem 1.5rem;}
/* the grip: the row's last cell, the one place it is dragged by */
.se-grip{display:grid;place-items:center;height:2rem;color:var(--muted-foreground);font-size:1.1rem;cursor:grab;touch-action:none;}
.se-grip:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
.se-row.drag-gap{background:var(--muted);outline:1px dashed var(--border);outline-offset:-1px;}
.se-row.drag-gap > *{visibility:hidden;}
.se-drag-copy{position:fixed;z-index:60;pointer-events:none;box-sizing:border-box;margin:0;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 30px rgba(0,0,0,.12);opacity:.95;}
body.se-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none;}
.se-icon{display:grid;place-items:center;width:2.25rem;height:2.25rem;padding:.1rem;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:none;color:var(--muted-foreground);font-size:1.2rem;cursor:pointer;}
.se-icon:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--input);background:var(--accent);}
.se-icon img{max-width:100%;max-height:100%;object-fit:contain;}
.se-icon-empty{border:1px dashed var(--input);}
.se-icon-empty img{width:1.4rem;height:1.4rem;}
.se-text{width:100%;min-width:0;height:2rem;padding:0 .45rem;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:transparent;color:inherit;font:inherit;font-size:.875rem;}
/* INVISIBLE fields, the other libraries' way: no frame, no fill -- hovered or typed in, only the caret says it is a field */
.se-text{cursor:text;}
.se-text:is(:hover,:focus-visible,:has(:focus-visible)),.se-text:focus{border-color:transparent;background:transparent;outline:none;box-shadow:none;}
.se-number{text-align:right;font-variant-numeric:tabular-nums;}
/* the add block: a card of its own above the list, one line -- icon, name, performer, price, payout, Добавить */
.se-new{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin-bottom:1.5rem;padding:.75rem 1rem;}
.se-new .input{height:2.25rem;padding:0 .6rem;font-size:.875rem;}
.se-new .se-new-name{flex:1 1 14rem;min-width:0;}
.se-new .se-new-figure{flex:0 0 11rem;}
.se-new .se-add{flex:none;}
/* the list's column headings: above its frame, on the rows' own grid */
.sv-headings{margin:0 1px;border-top:0;padding-top:0;padding-bottom:.35rem;white-space:nowrap;}   /* the list's headings above its frame */
.se-headings{margin:0 1px;border-top:0;padding-top:0;padding-bottom:.35rem;color:var(--muted-foreground);font-size:.75rem;font-weight:600;white-space:nowrap;}   /* 1px: the frame's border */
.se-headings > :nth-child(2){padding-left:calc(.45rem + 1px);}        /* over the name field's text */
.se-headings > :not(:nth-child(2)){text-align:center;}               /* every column but the name: centred */
/* the rows: every cell but the name centred in its column -- the icon, the performer, the figures, the actions */
.se-row > .se-icon,.se-row > .se-performer{justify-self:center;}
.se-row > .se-number{text-align:center;}
.se-row > .se-actions{justify-content:center;}
.se-page > .sv-row:first-child,.sv-card > .sv-head:first-child{border-top:0;}  /* the card's own border is the top line */
.se-performer{display:inline-flex;align-items:center;gap:.4rem;max-width:100%;min-width:0;height:2rem;padding:0 .5rem 0 .25rem;border:1px solid transparent;border-radius:999px;background:none;color:inherit;font:inherit;font-size:.8125rem;cursor:pointer;}
.se-performer:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--input);background:var(--accent);}
.se-performer > img,.se-performer > .member-avatar{flex:none;width:1.5rem;height:1.5rem;}
.se-performer > span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.se-actions{display:flex;align-items:center;justify-content:flex-end;gap:.1rem;}
.se-actions .icon-button img{width:1.4rem;height:1.4rem;}
.se-hidden > :not(.se-actions):not(.se-grip){opacity:.38;filter:grayscale(1);}   /* the platforms' muted row */
.se-upload{display:inline-flex;align-items:center;gap:.4rem;cursor:pointer;}
.se-upload img{width:1.1rem;height:1.1rem;}
.se-people .wb-visual .member-avatar{width:2rem;height:2rem;}
@media (max-width:700px){
  /* the services' list on a phone: the picture, the name, the performer's face alone, the price, the cart -- the payout
     and the headings go */
  .sv-row:not(.se-row){grid-template-columns:2.25rem minmax(0,1fr) 1.75rem 4.25rem 2rem;padding-inline:.75rem;}
  .sv-row:not(.sv-head) > .sv-action{margin-right:-.75rem;}
  .sv-row:not(.se-row) > :nth-child(5),.sv-headings{display:none;}
  .sv-performer > span:last-child{display:none;}
  .se-row{grid-template-columns:2.5rem minmax(0,1fr) 5.5rem 5.5rem 1.5rem;row-gap:.25rem;}
  .se-row > :nth-child(7){grid-column:5;grid-row:span 2;}
  .se-headings{display:none;}
  .se-new .se-new-figure{flex:1 1 8rem;}
  .se-row > :nth-child(1){grid-row:span 2;}
  .se-row > :nth-child(2){grid-column:2 / 4;} .se-row > :nth-child(6){grid-column:4;grid-row:1;}
  .se-row > :nth-child(3){grid-column:2;grid-row:2;} .se-row > :nth-child(4){grid-column:3;grid-row:2;}
  .se-row > :nth-child(5){grid-column:4;grid-row:2;}
}
.sv-dialog{width:min(560px,calc(100% - 2rem));}
.sv-dialog-name{margin:0 0 .5rem;font-weight:600;}
.sv-chapter{margin:1rem 0 .5rem;font-size:.8125rem;font-weight:600;color:var(--muted-foreground);}
/* the performers: cards of two lines -- the face, then "Фамилия И." in small type --, in a rounded frame; six to a row */
.sv-people{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.4rem;}
.sv-person{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;padding:.5rem .1rem .4rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);font:inherit;font-size:.65rem;line-height:1.2;letter-spacing:-.01em;opacity:.45;cursor:pointer;}
.sv-person > span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sv-person img,.sv-person .member-avatar{flex:none;width:2rem;height:2rem;border-radius:50%;object-fit:cover;}
@media (max-width:520px){.sv-people{grid-template-columns:repeat(auto-fill,minmax(4.5rem,1fr));}}
.sv-person.active{opacity:1;border-color:var(--primary);}
.sv-person:is(:hover,:focus-visible,:has(:focus-visible)){opacity:1;}
.sv-fields{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;align-items:end;}
.sv-fields .field-wrap{margin:0;}
/* a figure's field with its total for the quantity inside it, at the right, read-only (the pointer goes through) */
.sv-figure{position:relative;display:block;}
.sv-figure > .input{width:100%;}
.sv-figure:has(.sv-figure-total:not([hidden])) > .input{padding-right:7.5rem;}
.sv-figure-total{position:absolute;top:50%;right:.75rem;transform:translateY(-50%);max-width:7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8125rem;color:var(--muted-foreground);pointer-events:none;}
.sv-figure-total[hidden]{display:none;}
/* Библиотеки -> Услуги: the performer, the pay and the price after the name */
.sl-head{display:none;}
.sl-cell{flex:none;}
.sl-performer .input{width:9rem;height:2rem;padding:0 .4rem;font-size:.8125rem;}
.sl-number{width:6rem;height:2rem;text-align:right;font-variant-numeric:tabular-nums;}

/* Корзина */
.ct-page{display:flex;flex-direction:column;gap:.75rem;}
.ct-empty{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2.5rem;color:var(--muted-foreground);}
.ct-empty img{width:2.5rem;height:2.5rem;opacity:.6;}
.ct-leads{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;}
/* above the cart: the currency, a gap, the lead sources -- the same tiles (2026-10-31) */
.ct-strip{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 2rem;margin:0 0 .75rem;}
/* the currency: a switch -- its positions joined in one frame, each the lead tiles' size, no caption */
.ct-currency{display:inline-flex;}
.ct-currency input{position:absolute;opacity:0;pointer-events:none;}
.ct-currency .ct-lead{position:relative;border-radius:0;margin-left:-1px;}
.ct-currency .ct-lead:first-child{margin-left:0;border-radius:calc(var(--radius) - 2px) 0 0 calc(var(--radius) - 2px);}
.ct-currency .ct-lead:last-child{border-radius:0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0;}
.ct-currency .ct-lead:has(input:checked){z-index:1;}
.ct-currency-item{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;width:5.5rem;padding:0 .5rem;
  font-weight:600;cursor:pointer;}
.ct-currency-item img{width:1.25rem;height:1.25rem;object-fit:contain;border-radius:2px;}
.ct-lead:has(input:checked){background:var(--choice-on);color:var(--choice-text-on);border-color:var(--choice-on);}
.ct-lead-caption{min-width:9rem;padding:.45rem .9rem;border-radius:calc(var(--radius) - 2px);background:var(--card);border:1px solid var(--border);font-size:.8125rem;text-align:center;}
.ct-lead{height:2.25rem;padding:0 .7rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);font:inherit;font-size:.8125rem;cursor:pointer;}
.ct-lead.active{background:var(--choice-on);color:var(--choice-text-on);border-color:var(--choice-on);}
.ct-lead-picture{display:inline-grid;place-items:center;width:2.25rem;padding:.2rem;}
.ct-lead-picture img{width:100%;height:100%;object-fit:contain;}
.ct-lead:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.ct-card{padding:0;overflow:visible;}
/* Трансфер-лист (transfer_list.html): the cart's rows and footer, its own columns -- the tick, the item, its cost, how
   many, the price, the total, the trash; a price above the cost (the sender's profit) in green. The footer: the comment
   where the cart has its customer, the branch's tile, two JOINED tiles (one on, the other muted) per choice. */
.tl-row{display:grid;grid-template-columns:2rem minmax(0,1fr) 5.5rem 6.5rem 6.5rem 2.5rem;align-items:center;gap:.5rem;padding:.45rem 1rem .45rem .5rem;border-top:1px solid var(--border);}
.tl-row.ct-head > span{justify-self:center;}
.tl-row > .ct-tick{justify-self:center;display:grid;place-items:center;}   /* the box under the head's tick, centred alike */
.tl-row.ct-head > span:nth-child(2){justify-self:start;}
.tl-markup{color:var(--success, #15803d);}
.tl-comment{margin-right:auto;flex:1 1 8rem;min-width:6rem;max-width:16rem;}
.tl-target .logo{width:1.5rem;height:1.5rem;}
.tl-empty{font-size:1.15rem;color:var(--muted-foreground);}
/* the toolbar above the list: the waybill draft's, two segments -- the branch, the mode */
.tl-toolbar .waybill-segments{grid-template-columns:minmax(0,9rem) 2.5rem minmax(0,9rem) minmax(0,20rem) minmax(0,8rem);width:calc(48.5rem + 2px);max-width:100%;}
.tl-toolbar .tl-toolbar-arrow{padding:0;color:var(--muted-foreground);font-size:1rem;}
.tl-toolbar .tl-toolbar-arrow + .waybill-tool{border-left:0;}
.tl-toolbar .waybill-segments > .waybill-tool + .tl-toolbar-arrow{border-left:0;}   /* exactly its two segments: no empty end */
#tl-modes{width:min(33rem,94vw);}
#tl-modes .supplier-name-text{white-space:normal;overflow:visible;}
@media (max-width:640px){.tl-toolbar .waybill-segments{grid-template-columns:minmax(0,1fr) 2rem minmax(0,1fr);}.tl-toolbar .tl-add{grid-column:1 / -1;}}
.tl-toolbar .supplier-avatar .logo{width:100%;height:100%;}
/* how it is paid follows the mode (the footer's data-mode): one tile and its box, or the two accounts */
.tl-pay{display:none;align-items:center;gap:.5rem;}
.tl-foot[data-mode="now_debt"] .tl-pay-debt,.tl-foot[data-mode="delivery_debt"] .tl-pay-debt,
.tl-foot[data-mode="delivery_on_receipt"] .tl-pay-receipt,
.tl-foot[data-mode="now_paid"] .tl-pay-now,.tl-foot[data-mode="delivery_paid"] .tl-pay-now{display:inline-flex;}
.tl-pay .ct-account{cursor:default;}
.tl-select{display:block;width:12rem;}
.tl-pay-arrow{color:var(--muted-foreground);}
/* on the way: one card per transfer -- whose, what, how settled, the sum, Принять */
.tl-transit{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;align-items:center;gap:.75rem;padding:.7rem 1rem;margin-bottom:.5rem;}
.tl-transit-branch{width:2rem;height:2rem;}
.tl-transit-branch .logo{width:100%;height:100%;}
.tl-transit-what{display:flex;flex-direction:column;min-width:0;font-size:.8125rem;}
.tl-transit-what .text-muted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tl-transit-mode{font-size:.75rem;}
.tl-transit-sum{font-variant-numeric:tabular-nums;white-space:nowrap;}
#tl-receive .tl-select{width:14rem;}
/* an account's face with its branch's badge (.ap-branch-badge, the transfers' own) */
.tl-face{position:relative;display:inline-flex;flex:none;}
.tl-face .ap-branch-badge .logo{width:1rem;height:1rem;font-size:.5rem;}
.tl-face .ap-branch-badge svg,.tl-face .ap-branch-badge img{width:100%;height:100%;}
@media (max-width:700px){.tl-row{grid-template-columns:2rem minmax(0,1fr) auto auto auto;}.tl-row > :nth-child(4){display:none;}.tl-row.ct-head{display:none;}.tl-comment{width:100%;}}
.ct-row{display:grid;grid-template-columns:2rem minmax(0,1fr) 4rem 5.5rem 6.5rem 6.5rem 2.5rem;align-items:center;gap:.5rem;padding:.45rem 1rem;border-top:1px solid var(--border);}
.ct-head{border-top:0;color:var(--muted-foreground);font-size:.75rem;font-weight:600;}
.ct-head > span:not(:nth-child(2)){justify-self:center;}
.ct-row > .ct-tick{justify-self:center;display:grid;place-items:center;}   /* the box under the head's tick, centred alike */
/* the row starts at the gap's width (.5rem): the box -- centred in its column -- has as much room on its left as on its
   right, the card's edge to the box and the box to the name */
.ct-row{padding-left:.5rem;}
.ct-tick input{margin:0;}
.ct-line.ct-ticked{background:var(--row-ticked);}
.ct-what{display:flex;align-items:center;gap:.6rem;min-width:0;cursor:pointer;}
.ct-num{justify-self:center;display:inline-flex;align-items:center;gap:.25rem;font-size:.875rem;font-variant-numeric:tabular-nums;}
.ct-left{color:var(--muted-foreground);}
.ct-total{font-weight:600;}
.ct-step{display:grid;place-items:center;padding:0;border:0;background:none;color:var(--foreground);font-size:1rem;cursor:pointer;}
/* − n +: room for two digits, so the buttons never move when 9 becomes 10; the figure as every other figure of the
   row, centred between the buttons on their line */
.ct-qty{gap:.3rem;}
.ct-qty [data-qty]{display:inline-block;min-width:2ch;text-align:center;}
.ct-step{height:1.25rem;line-height:1;}
.ct-step-off{opacity:.3;cursor:default;}
.ct-price-text{padding:0;border:0;background:none;font:inherit;color:var(--foreground);cursor:pointer;}
/* the cart's price: an INVISIBLE field -- the figure itself turns editable, no frame (the waybill's lines' way) */
.ct-price-field{width:8ch;margin:0;padding:0;border:0;outline:none;box-shadow:none;background:transparent;color:inherit;font:inherit;font-variant-numeric:tabular-nums;text-align:center;}
.ct-trash{justify-self:center;margin:0;}
.ct-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.6rem;padding:.7rem 1rem;border-top:1px solid var(--border);}
.ct-customer{position:relative;margin-right:auto;}
.ct-customer-button{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .5rem;border:0;border-radius:calc(var(--radius) - 2px);background:none;font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;}
.ct-customer-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.ct-customer-button img,.ct-customer-row img,.ct-mini,.dr-mini{width:1.25rem;height:1.25rem;object-fit:contain;}
.ct-customer-search{width:16rem;}
.ct-customer-results{position:absolute;left:0;bottom:calc(100% + .3rem);z-index:20;width:20rem;padding:.3rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow-lg);}
.ct-customer-row{display:flex;align-items:center;gap:.5rem;width:100%;padding:.4rem .5rem;border:0;border-radius:4px;background:none;font:inherit;font-size:.8125rem;text-align:left;cursor:pointer;}
.ct-customer-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.ct-accounts{display:flex;flex-wrap:wrap;gap:.3rem;}
.ct-account{display:grid;place-items:center;width:2.25rem;height:2.25rem;padding:.2rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);cursor:pointer;}
.ct-account img{width:1.5rem;height:1.5rem;object-fit:contain;}
.ct-market-head{display:flex;align-items:center;gap:.5rem;}
.ct-market-picture{width:1.75rem;height:1.75rem;object-fit:contain;flex:none;}
.ct-account.active{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 25%,transparent);}
.ct-account:is(:hover,:focus-visible,:has(:focus-visible)):not(:disabled){background:var(--accent);}
.ct-account:disabled{opacity:.4;cursor:default;}
/* the chosen way to pay: ONE width -- "Смешанный платеж" fits, a longer name is cut (whole in its tooltip) -- so the
   footer never jumps */
.ct-chosen{box-sizing:border-box;width:10.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.45rem .8rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);font-size:.8125rem;text-align:center;}
/* the sum's box -- the cart's, the consignments' --: ONE width, the figure centred in tabular digits, so it never pushes
   what stands beside it; a figure past the width (beyond 9 999 999) is cut */
.ct-sum{box-sizing:border-box;width:9.5rem;padding:.45rem .8rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ct-pay{gap:.4rem;}
.ct-dialog{width:min(560px,calc(100% - 2rem));}
.ct-rows{display:flex;flex-direction:column;margin-bottom:.75rem;}
.ct-pay-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.45rem 0;border-bottom:1px solid var(--border);font-size:.875rem;}
.ct-pay-total{font-weight:700;}
.ct-amount{padding:0;border:0;background:none;font:inherit;font-weight:600;border-bottom:1px dashed var(--border);cursor:pointer;}
.ct-amount-field{width:8rem;height:2rem;text-align:right;}
.ct-modes{display:flex;flex-wrap:wrap;gap:.4rem;margin:.5rem 0 .75rem;}
.ct-mode-small{height:1.9rem;padding:0 .6rem;font-size:.75rem;}
.ct-mixed-accounts{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.75rem;}
.ct-mixed-account{position:relative;display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .6rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);font:inherit;font-size:.8125rem;cursor:pointer;}
.ct-mixed-account.active{border-color:var(--primary);}
.ct-mixed-order:not(:empty){display:grid;place-items:center;width:1.1rem;height:1.1rem;border-radius:3px;background:var(--primary);color:var(--primary-foreground);font-size:.6875rem;font-weight:700;}
.ct-split-row{display:grid;grid-template-columns:1fr 2fr 1fr;align-items:center;gap:.6rem;font-size:.8125rem;}
.ct-split-row span:last-child{text-align:right;}
.ct-split-row input{width:100%;}
.ct-part{margin-top:.6rem;}
.ct-client-exists{margin-bottom:1rem;}
/* the repair intake's "new customer" window: Legacy's rows, the iOS way -- edge to edge, a line between them; the
   field invisible on the right, then its mark (required: a faint red asterisk, optional: a faint blue circle) */
.rp-client-rows{margin:0 calc(-1 * var(--dialog-pad));}
.dialog > form > .dialog-title:first-child + .rp-client-rows{margin-top:0;}
/* the last row's line is the footer's: nothing between them unless there is something to say */
.rp-client-rows ~ [data-error]:empty{display:none;}
.rp-client-rows ~ [data-error]:not(:empty){margin:0;padding:.6rem 0;border-top:1px solid var(--border);}
.rp-client-rows ~ .ct-client-exists:not([hidden]){margin:0;padding:.6rem 0;border-top:1px solid var(--border);}
.rp-client-row{display:grid;grid-template-columns:1.1rem auto minmax(0,1fr) .9rem;align-items:center;gap:.6rem;min-height:2.75rem;
  padding:0 var(--dialog-pad);border-top:1px solid var(--border);cursor:text;}
.rp-client-row:first-child{border-top:0;}
.rp-client-row:is(:hover,:focus-within){background:var(--accent);}
.rp-client-icon{color:var(--muted-foreground);font-size:1rem;}
.rp-client-label{font-size:.875rem;white-space:nowrap;}
.rp-client-input{width:100%;min-width:0;padding:0;border:0;background:transparent;font:inherit;font-size:.875rem;text-align:right;color:var(--foreground);}
/* a field's mark (_field_mark.html): one of its three icons, by data-marker -- on the mark or on its row */
.field-mark{display:inline-flex;align-items:center;justify-content:center;justify-self:center;width:.9rem;font-size:.7rem;line-height:1;}
.field-mark > i{display:none;}
:is(.field-mark[data-marker="red"],[data-marker="red"] > .field-mark) > .fm-required{display:inline-block;color:rgba(180,80,80,.55);}
:is(.field-mark[data-marker="blue"],[data-marker="blue"] > .field-mark) > .fm-optional{display:inline-block;color:rgba(80,80,180,.45);}
:is(.field-mark[data-marker="green"],[data-marker="green"] > .field-mark) > .fm-filled{display:inline-block;color:var(--success);font-size:.8rem;}
.ct-required{font-size:.5rem;color:var(--destructive);vertical-align:super;}
@media (max-width:760px){
  .ct-row{grid-template-columns:minmax(0,1fr) auto auto auto auto;gap:.35rem;padding:.45rem .6rem;}
  .ct-row > .ct-tick{display:none;}
  .ct-head{display:none;}
  .ct-left{display:none;}
  .ct-line.ct-ticked{box-shadow:inset 3px 0 0 var(--primary);}
  .ct-customer{flex-basis:100%;}
}

/* Отчет */
.dr-page{display:flex;flex-direction:column;gap:.9rem;}
.dr-periods{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;}
/* Legacy's strip: the period buttons of one width each, white, lifted by a soft shadow */
.dr-period{display:inline-grid;place-items:center;width:8.5rem;height:2.125rem;padding:0 .6rem;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);background:var(--card);box-shadow:var(--shadow-card);color:var(--foreground);font:inherit;font-size:.8125rem;text-decoration:none;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dr-period.dr-scope{width:auto;min-width:8.5rem;}
.dr-period:has(+ .dr-scope),.dr-period[data-choose-dates]{width:auto;min-width:8.5rem;}
.dr-period.active{background:var(--sh-blue);border-color:color-mix(in srgb,var(--primary) 40%,var(--border));}
.dr-period:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.dr-view{margin-left:auto;}
.dr-card{padding:0;overflow:hidden;}
.dr-card-head{display:flex;align-items:center;justify-content:center;gap:.6rem;width:100%;padding:.6rem 1rem;border:0;background:none;color:var(--dr-head, var(--foreground));font:inherit;cursor:pointer;}
.dr-card-head > img{width:1.25rem;height:1.25rem;object-fit:contain;}
.dr-card-title{font-size:.875rem;font-weight:600;letter-spacing:.25em;text-transform:uppercase;}
.dr-card-count{min-width:1.4rem;padding:0 .35rem;border-radius:999px;background:var(--muted);color:var(--muted-foreground);font-size:.6875rem;font-weight:600;}
.dr-chevron{transition:transform .15s;}
.dr-card[data-closed] .dr-chevron{transform:rotate(-90deg);}
.dr-card[data-closed] .dr-card-body{display:none;}
/* the heads' colours, Legacy's per card */
.dr-card-repairs,.dr-card-expenses{--dr-head:rgb(214,80,80);}
.dr-card-incomes,.dr-card-posted,.dr-card-accepted,.dr-card-crafts,.dr-card-shipped,.dr-card-goods_in,.dr-card-goods_out,.dr-card-preorders{--dr-head:rgb(62,62,160);}
.dr-card-transfers{--dr-head:rgb(40,80,130);}
.dr-card-cancelled{--dr-head:rgb(140,60,70);}
.dr-card-consignments{--dr-head:rgb(170,105,105);}
.dr-card-ship_cancelled{--dr-head:rgb(120,50,50);}
.dr-card-sales{--dr-head:rgb(50,150,70);}
.dr-card-write_offs{--dr-head:rgb(160,40,50);}
/* a light answer to the pointer: a faint tint of the card head's own colour */
.dr-card-head{transition:background-color .15s;}
.dr-card-head:is(:hover,:focus-visible,:has(:focus-visible)){background:color-mix(in srgb,var(--dr-head, var(--foreground)) 4%,transparent);}
.dr-card-body{border-top:1px solid var(--border);}
.dr-loading{padding:1rem;text-align:center;color:var(--muted-foreground);font-size:.8125rem;}
.dr-card-foot{padding:.5rem 1rem;border-top:1px solid var(--border);text-align:right;font-size:.8125rem;font-weight:600;}
.dr-card-foot.dr-muted{color:var(--muted-foreground);font-weight:500;}   /* a card whose rows moved no money */
.dr-red{color:#b23a52;} .dr-green{color:#2e7d43;} .dr-blue{color:var(--sh-sale);}
/* a journal row: branch · who · when · the kind's pill · caption · the value -- every column a set width but the
   caption, so the pills and the amounts stand in line row under row */
.dr-row{--dr-who:130px;--dr-date:94px;--dr-pill:var(--dr-who);--dr-money:9.5rem;--dr-value:var(--dr-money);display:grid;grid-template-columns:auto var(--dr-who) var(--dr-date) var(--dr-pill) minmax(0,1fr) var(--dr-value);align-items:center;gap:.6rem;padding:.35rem 1rem;border-top:1px solid var(--border);font-size:.8125rem;}
.dr-row:first-child{border-top:0;}
.dr-row:not(:has(.dr-branch)){grid-template-columns:var(--dr-who) var(--dr-date) var(--dr-pill) minmax(0,1fr) var(--dr-value);}
.dr-row:has(> .dr-pills){--dr-pill:calc(2 * var(--dr-who) + .4rem);}  /* two pills, each the who badge's width */
.dr-foreign{opacity:.75;}
.dr-greyed{color:var(--muted-foreground);}
.dr-pill.dr-pill-muted{background:var(--muted);color:var(--muted-foreground);font-weight:500;}
.dr-pill-muted .dr-pi{opacity:.5;filter:grayscale(1);}
.dr-who{display:flex;align-items:center;gap:.35rem;min-width:0;min-height:1.75rem;padding:0 .45rem 0 .25rem;border-radius:4px;background:var(--wh-bg);color:var(--wh-ink);font-weight:600;font-size:.75rem;}
.dr-who-name{flex:1;min-width:0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-who > img.dr-face{flex:none;object-fit:contain;}
.dr-face{width:1.25rem;height:1.25rem;font-size:.5625rem;}
.dr-when{color:var(--muted-foreground);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:center;}
/* a pill (Legacy's imgwithcaptiongroup): its picture pinned at the left, its words centred in the room that is left;
   in a row's column it fills the column, in a receipt's head it is at least 7.5rem; inline (`dr-pill-inline`, in a
   caption) as wide as its words */
.dr-pill{display:flex;align-items:center;gap:.25rem;min-width:0;min-height:1.75rem;padding:0 .5rem 0 .25rem;border-radius:4px;background:var(--muted);color:var(--foreground);font-size:.75rem;text-decoration:none;white-space:nowrap;}
.dr-pill:not(:has(> .dr-pi)){padding-left:.5rem;}
.dr-pi{flex:none;display:inline-grid;place-items:center;width:1.3rem;height:1.3rem;}
.dr-pi > img{max-width:1.15rem;max-height:1.15rem;object-fit:contain;}
.dr-pi .logo{width:1.15rem;height:1.15rem;}
.dr-pt{flex:1;min-width:0;text-align:center;overflow:hidden;text-overflow:ellipsis;}
.dr-pill-inline{display:inline-flex;vertical-align:middle;}
.dr-pill-inline .dr-pt{flex:none;}
/* what follows a repair's action pill -- a comment, a person, a sum -- at the row's gap: one line, cut, the whole text in the tooltip when cut */
.dr-comment{display:inline-block;margin-left:.6rem;max-width:calc(100% - var(--dr-pill) - .6rem);vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-comment > span{display:inline;}
/* a part used in a repair: its picture, then its number on its condition's colour (blue new, red used) */
.dr-part{--tag:#4f7bbf;display:inline-flex;align-items:center;gap:.35rem;margin-left:.6rem;vertical-align:middle;text-decoration:none;}
.dr-part.item-tag-used{--tag:#d2645f;}
.dr-part > img,.dr-part > i{width:1.6rem;height:1.6rem;object-fit:contain;font-size:1.2rem;color:var(--muted-foreground);}
.dr-part-number{padding:.15rem .4rem;border-radius:4px;background:var(--tag);color:#fff;font-size:.75rem;font-weight:600;font-variant-numeric:tabular-nums;}
.dr-part:is(:hover,:focus-visible) .dr-part-number{background:color-mix(in srgb,var(--tag) 85%,#000);}
a.dr-comment{color:var(--primary);text-decoration:none;}
a.dr-comment:is(:hover,:focus-visible,:has(:focus-visible)){opacity:.8;}
/* a square pill holding only a picture (the arrow to whom a repair was assigned) */
.dr-pill.dr-pill-square{width:1.75rem;padding:0;justify-content:center;}
.dr-who.dr-who-inline{display:inline-flex;vertical-align:middle;width:var(--dr-who);}
/* the money's badge keeps its room at the right edge of the value column; what goes with it ("+N") stands left of it */
.dr-money-slot{flex:none;display:flex;width:var(--dr-money);}
.dr-more{flex:none;}                 /* "+N": never squeezed by the money's slot, two digits and more */
/* an inline pill of the columns' width (the repair's last action: as wide as the repair's button and who) */
.dr-pill-inline.dr-pill-col{width:var(--dr-pill);}
.dr-pill-inline.dr-pill-col .dr-pt{flex:1;}
.dr-caption > .dr-pill-inline.dr-pill-col{width:var(--dr-who);}   /* in the caption one badge's width, even where the row's
   pill column holds two (a preorder's customer after its state) */
/* a receipt's head: every pill -- the sale, who, when, the customer, the platform, the lead source… -- ONE width (the who
   badge's) while the page has room, all shrinking alike when it has not; the thumbnails take what is left */
.dr-sale-head > .dr-pill,.dr-sale-head > .dr-who{flex:0 1 130px;width:130px;min-width:2.4rem;max-width:130px;}
.dr-sale-head > .dr-pill .dr-pt{min-width:0;padding:0 .2rem;}
/* a pill that turns into another on hover: both pictures and both words in one place, the second fading in */
.dr-morph-pi,.dr-morph-pt{display:grid;}
.dr-morph-pi > *,.dr-morph-pt > *{grid-area:1 / 1;transition:opacity .2s;}
.dr-morph-pt > *{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-morph-b{opacity:0;}
a.dr-morph:is(:hover,:focus-visible) .dr-morph-a{opacity:0;}
a.dr-morph:is(:hover,:focus-visible) .dr-morph-b{opacity:1;}
.dr-sale-head > .dr-cols,.dr-sale-head > .dr-thumbs{flex:none;}
.dr-pill-value{width:100%;font-size:.8125rem;font-weight:600;font-variant-numeric:tabular-nums;}
/* EVERY money badge of the report is one width (2026-11-09, the owner): an account's picture and "1 000 000 RSD"
   (`--dr-money`), its column no wider -- what stands before it comes right up to it. The repairs' column also holds
   «+N» left of the money's slot. */
.dr-card-repairs .dr-row{--dr-value:calc(var(--dr-money) + 4.2rem);}
a.dr-pill:is(:hover,:focus-visible){filter:brightness(.96);}
/* a waybill's goods in the report: a chip per model -- its picture, its name (cut, whole in the tooltip), its quantity
   as a small counter inside the chip's right end */
.dr-models{display:flex;align-items:center;gap:.4rem;}
.dr-models-note{margin-left:.2rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}   /* after the chip: the row's gap */
.dr-model{display:inline-flex;align-items:center;gap:.35rem;min-width:0;flex:0 1 auto;color:inherit;text-decoration:none;}
a.dr-model:is(:hover,:focus-visible) .dr-model-name{color:var(--primary);}   /* a link answers by its colour, never an underline */
a.dr-model .dr-model-name{transition:color .15s;}
.dr-model > img,.dr-model > i{flex:none;width:1.4rem;height:1.4rem;object-fit:contain;font-size:1rem;color:var(--muted-foreground);}
.dr-model-name{min-width:0;max-width:9.5rem;overflow:hidden;white-space:nowrap;}   /* «Кабель Apple USB-C», then it fades */
.dr-model-name.dr-faded{-webkit-mask-image:linear-gradient(to right,#000 70%,transparent);mask-image:linear-gradient(to right,#000 70%,transparent);}
.dr-models-sep{flex:none;width:2px;height:1.2rem;border-radius:1px;background:color-mix(in srgb,var(--muted-foreground) 55%,transparent);}   /* between the two models */
.dr-craft{gap:.5rem;}
.dr-craft-arrow{flex:none;color:var(--muted-foreground);}
.dr-craft-note{flex:0 1 auto;min-width:0;padding-left:.5rem;border-left:1px solid var(--border);color:var(--muted-foreground);}
.dr-craft-note > span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-model-count{margin-left:.15rem;flex:none;color:var(--muted-foreground);font-weight:600;font-variant-numeric:tabular-nums;}
.dr-model-more{flex:none;}
/* the item's number on its condition's colour (the item tags' blue / red), «разн.» grey when the model is several items */
.dr-model-id{--tag:#4f7bbf;flex:none;padding:.05rem .25rem;border-radius:3px;background:var(--tag);color:#fff;font-size:.5625rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.35;}
.dr-model-id.item-tag-used{--tag:#d2645f;}
.dr-model-id.dr-model-mixed{background:var(--muted);color:var(--muted-foreground);}
.dr-models{gap:.7rem;}
.dr-chip{display:inline-block;max-width:100%;margin-right:.3rem;padding:.1rem .45rem;border-radius:4px;background:var(--muted);font-size:.75rem;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;}
.dr-arrow{width:1rem;height:1rem;object-fit:contain;opacity:.6;}
.dr-pill-account{display:inline-flex;max-width:13rem;}
.dr-amounts{display:flex;flex-direction:column;align-items:flex-end;font-size:.75rem;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;}
.dr-amount{font-weight:600;font-variant-numeric:tabular-nums;}
.dr-pill-red{background:var(--sh-red);} .dr-pill-green{background:var(--sh-green);} .dr-pill-blue{background:var(--sh-blue);}
.dr-pill-brown{background:var(--sh-red);color:var(--sh-brown);}
.dr-caption{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-when + .dr-caption{grid-column:span 2;}            /* a row with no kind's pill (a transfer): its caption takes that room too */
.dr-transfer{display:flex;align-items:center;gap:.4rem;}
.dr-transfer-note{flex:1 1 0;min-width:0;display:flex;}
.dr-transfer-note > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}   /* the money keeps to the right */
/* a transfer's money: one badge of the money's width, two lines inside when a fee or an exchange made
   what left and what arrived differ */
.dr-pill.dr-pill-sum{flex:none;width:var(--dr-money);justify-content:center;padding:0 .4rem;font-size:.8125rem;font-weight:600;font-variant-numeric:tabular-nums;}
.dr-pill.dr-pill-two{flex-direction:column;align-items:center;justify-content:center;gap:0;padding:.1rem .4rem;font-size:.6875rem;line-height:1.15;}
.dr-pills{display:grid;grid-template-columns:1fr 1fr;gap:.4rem;min-width:0;}
.dr-value{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:.4rem;min-width:0;}
.dr-clickable{cursor:pointer;}
/* its negative block margins keep it from growing the row it appears in: shown, nothing moves */
.dr-cancel-row{position:absolute;right:calc(100% + .4rem);display:inline-flex;align-items:center;gap:.3rem;margin-block:-.4rem;padding:.2rem .6rem;border:1px solid var(--destructive);border-radius:4px;background:var(--card);color:var(--destructive);font:inherit;font-size:.75rem;font-weight:600;cursor:pointer;}
.dr-none{font-size:.75rem;}
.dr-hidden-row{color:var(--muted-foreground);}
.dr-sale{border-top:1px solid var(--border);}
.dr-sale:first-child{border-top:0;}
/* the band between receipts right under the footer: a white gap above it read as the footer's, its total sitting high */
.dr-sale + .dr-sale{border-top-width:6px;border-top-color:var(--muted);}
.dr-sale-head{display:flex;flex-wrap:nowrap;align-items:center;gap:.4rem;padding:.45rem 1rem;border-bottom:1px solid var(--border);}
.dr-thumbs{display:none;gap:.3rem;--thumb:1.9rem;}
.dr-cols{display:grid;grid-template-columns:5rem 3rem 5.5rem;margin-left:auto;color:var(--muted-foreground);text-align:center;}
.dr-sale-body{display:grid;grid-template-columns:3rem minmax(0,1fr);}
.dr-printer{display:grid;place-items:center;border-right:1px solid var(--border);}
.dr-sale-line{display:flex;align-items:center;gap:.6rem;min-height:2.75rem;padding:.35rem 1rem;border-top:1px solid var(--border);}
.dr-sale-line:first-child{border-top:0;}
.dr-line-what{display:flex;align-items:center;gap:.6rem;flex:1;min-width:0;}
.dr-line-values{display:grid;grid-template-columns:5rem 3rem 5.5rem;text-align:center;font-weight:700;font-size:.8125rem;font-variant-numeric:tabular-nums;}
.dr-sale-foot{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.4rem 1rem;border-top:1px solid var(--border);}
.dr-sale-total{display:inline-flex;align-items:center;gap:.5rem;}
/* the day report's «Отменить» (a sale's, a manual operation's, a transfer's) stands left of the sum it belongs to --
   measured from that sum, on every screen (2026-11-18: only the phone had it, and on a computer the button went off
   past the card's left edge, invisible) */
.dr-sale-total,.dr-row .dr-value,.dr-group-line{position:relative;}
.dr-total{display:inline-flex;align-items:center;gap:.3rem;color:var(--sh-sale);font-weight:700;font-variant-numeric:tabular-nums;}
.dr-payout-text{color:var(--sh-brown);font-weight:700;font-size:.8125rem;}
.dr-payout-text.dr-blue{color:var(--sh-sale);}
.dr-cancelled-word{color:var(--sh-brown);font-size:.8125rem;}
.dr-struck .dr-sale-lines{opacity:.5;}
.dr-struck .dr-line-values{text-decoration:line-through;text-decoration-color:#c0392b;text-decoration-thickness:2px;}
/* «Кратко»: the card's groups instead of its rows; an opened group shows a line of badges to each thing's page. */
.dr-groups{display:none;}
.dr-compact .dr-groups{display:block;}
.dr-compact .dr-card-body > :is(.dr-row,.dr-sale){display:none;}
/* «Кратко» is as wide as an item page's blocks (the switches above stay the page's width) */
.dr-compact :is(.dr-card,.dr-counter){width:100%;max-width:var(--item-width);}
.dr-group-links{display:none;flex-wrap:wrap;gap:.4rem;padding:.45rem 1rem .6rem 3.2rem;background:color-mix(in srgb,var(--foreground) 3%,transparent);}
.dr-group.dr-open + :is(.dr-group-links,.dr-group-lines){display:flex;}
/* no group row (2026-11-10, the owner: it repeated the card's footer): in «Кратко» the lines show at once -- the card's
   own head folds them */
.dr-group{display:none !important;}
.dr-compact .dr-group-lines{display:flex;background:none;padding:.15rem 1rem .3rem;}
/* «Кратко» reads light (2026-11-10, the owner): bold only in the cards' heads and totals -- the lines' numbers, sums
   and labels at the ordinary weight */
.dr-group-lines :is(.dr-group-no,.dr-group-no .dr-pt,.dr-group-sum,.dr-line-label){font-weight:400;}
.dr-compact-only{display:none;}
.dr-compact .dr-compact-only{display:block;}
.dr-group-lines{display:none;flex-direction:column;padding:.2rem 1rem .4rem 2rem;background:color-mix(in srgb,var(--foreground) 3%,transparent);}
.dr-group-line{display:flex;align-items:center;gap:.6rem;padding:.25rem 0;}
.dr-group-line + .dr-group-line{border-top:1px solid var(--border);}
.dr-group-line > .dr-pill.dr-group-no{flex:none;width:4.2rem;justify-content:center;padding:0 .4rem;font-weight:600;text-decoration:none;}
.dr-group-when{flex:none;min-width:5rem;color:var(--muted-foreground);font-variant-numeric:tabular-nums;white-space:nowrap;}
.dr-face.dr-group-face{flex:none;display:grid;place-items:center;width:1.75rem;height:1.75rem;border-radius:4px;background:var(--wh-bg);overflow:visible;}   /* a square: the who badge without its name */
.dr-face.dr-group-face > img{width:1.25rem;height:1.25rem;object-fit:contain;border-radius:0;}
.dr-group-accounts{flex:none;display:flex;align-items:center;gap:.2rem;}   /* the sum right beside its accounts, however many */
.dr-group-thumbs{display:flex;flex:1;min-width:0;gap:.3rem;overflow:hidden;--thumb:1.9rem;}
.dr-group-pay{flex:none;margin-left:auto;display:flex;align-items:center;gap:.5rem;padding:.15rem .25rem .15rem .5rem;border-radius:4px;cursor:default;}
/* «Кратко»: a row's «Отменить» stands just left of its money once the money is clicked; the swipe's button is the phone's */
.dr-group-line > .dr-group-cancel{position:static;margin-left:auto;margin-block:0;flex:none;}
.dr-group-line > .dr-group-cancel:not([hidden]) + .dr-group-pay{margin-left:0;}
.dr-group-pay.dr-clickable{cursor:pointer;}
@media (min-width:481px){.dr-line-cancel{display:none !important;}}
.dr-group-pay:is(:hover,:focus-visible){background:color-mix(in srgb,var(--foreground) 5%,transparent);}
.dr-line-pic{flex:none;display:grid;place-items:center;width:1.75rem;height:1.75rem;background:none !important;border:0;}   /* the face's square, centred on the line; the picture alone, no frame */
.dr-line-pic > img{width:1.45rem;height:1.45rem;object-fit:contain;}
.dr-line-label{flex:none;font-weight:600;font-size:.8125rem;}
.dr-line-text{display:flex;min-width:0;color:var(--muted-foreground);font-size:.8125rem;}
.dr-line-text > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-line-arrow{color:var(--muted-foreground);font-size:.75rem;}
.dr-line-muted .dr-group-sum{color:var(--muted-foreground);}
.dr-group-thumbs{align-items:center;}
.dr-group-sum{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;}
.dr-group-pay.dr-struck .dr-group-sum,.dr-group-line.dr-struck .dr-group-sum{text-decoration:line-through;color:var(--muted-foreground);}
.dr-groups > .dr-group-lines + .dr-group{border-top:1px solid var(--border);}
.dr-group-links > .dr-pill{flex:none;}
.dr-group{display:grid;grid-template-columns:1rem 1.6rem minmax(0,1fr) auto auto minmax(var(--dr-money,9.5rem),auto);align-items:center;gap:.6rem;width:100%;
  padding:.5rem 1rem;border:0;border-top:1px solid var(--border);background:none;color:inherit;font:inherit;font-size:.875rem;text-align:left;cursor:pointer;}
.dr-groups > .dr-group:first-child{border-top:0;}
.dr-groups > .dr-group-links + .dr-group{border-top:1px solid var(--border);}
.dr-group:is(:hover,:focus-visible,:has(:focus-visible)){background:color-mix(in srgb,var(--foreground) 3%,transparent);}
.dr-group-chev{color:var(--muted-foreground);transition:transform .15s;}
.dr-group.dr-open .dr-group-chev{transform:rotate(90deg);}
.dr-group.dr-open{background:color-mix(in srgb,var(--foreground) 3%,transparent);}
.dr-group-pic{display:grid;place-items:center;width:1.6rem;height:1.6rem;}
.dr-group-pic > img{max-width:1.4rem;max-height:1.4rem;object-fit:contain;}
.dr-group-name{min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dr-group-count{padding:.05rem .55rem;border-radius:999px;background:var(--muted);color:var(--muted-foreground);font-size:.75rem;white-space:nowrap;}
.dr-group-faces{display:flex;padding-left:6px;}
.dr-group-faces > *{margin-left:-6px;border:2px solid var(--card);border-radius:50%;}
.dr-group-money{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;}
.dr-card-expenses .dr-group-money,.dr-card-posted .dr-group-money,.dr-card-accepted .dr-group-money,.dr-card-consignments .dr-group-money,.dr-card-goods_out .dr-group-money{color:var(--dr-head);}
.dr-card-sales .dr-group-money,.dr-card-incomes .dr-group-money,.dr-card-repairs .dr-group-money,.dr-card-preorders .dr-group-money{color:#2e7d43;}
@media (max-width:700px){.dr-group{grid-template-columns:1rem 1.6rem minmax(0,1fr) auto;}.dr-group-faces{display:none;}.dr-group-money{grid-column:3 / -1;}}
.dr-compact .dr-sale-body{display:none;}
.dr-compact .dr-thumbs{display:inline-flex;}
.dr-compact .dr-cols{display:none;}
.dr-counter{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem;}
.dr-profit{color:#2e7d43;font-weight:700;opacity:0;transition:opacity .15s;}
.dr-received.dr-received-muted{color:var(--muted-foreground);font-weight:600;}
.dr-profit-costs{color:var(--muted-foreground);font-weight:600;}
.dr-counter:is(:hover,:focus-visible,:has(:focus-visible)) .dr-profit{opacity:1;}
.dr-received{margin-left:auto;display:inline-flex;align-items:center;gap:.35rem;line-height:1.25rem;color:var(--sh-sale);font-weight:700;}
.dr-cancel-dialog{width:min(720px,calc(100% - 2rem));max-height:90dvh;overflow:auto;}
.dr-cancel-lines{border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);margin-bottom:.75rem;}
.dr-cancel-sum{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.4rem;margin:.5rem 0;padding-inline-end:1rem;font-size:.875rem;}   /* pressed right, under the lines' sums */
.dr-cancel-list{margin:.25rem 0 .75rem;padding-left:1.2rem;font-size:.8125rem;}
.dr-cancel-options{display:flex;flex-direction:column;gap:.5rem;margin-bottom:.75rem;}
.dr-option{display:flex;gap:.6rem;align-items:flex-start;padding:.55rem .7rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);cursor:pointer;font-size:.8125rem;}
.dr-option > span{display:flex;flex-direction:column;gap:.25rem;}
.dr-option select{margin-top:.25rem;max-width:18rem;}
.dr-cancel-account{display:block;margin-top:.25rem;max-width:18rem;}
.dr-cancel-warning{display:block;margin-top:.4rem;padding:.45rem .65rem;border:1px solid var(--warning);border-radius:calc(var(--radius) - 2px);background:var(--warning-bg);color:var(--foreground);font-size:.8125rem;line-height:1.4;}
.dr-cancel-warning[hidden]{display:none;}
.dr-cancel-warning .bi{color:var(--warning);}
.dr-option:has(input:checked){border-color:var(--primary);background:var(--sh-blue);}
@media (max-width:860px){
  /* a journal row flows: who, when, what (a phone: their pictures), the money at the right, its caption under them --
     nothing left out (until 2026-11-14 the date and the document's pill were, and a repair's row named no repair) */
  .dr-row,.dr-row:not(:has(.dr-branch)){display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .4rem;padding:.4rem .6rem;}
  .dr-row > *{flex:none;}
  .dr-row .dr-when{font-size:.75rem;color:var(--muted-foreground);}
  .dr-row .dr-value{margin-left:auto;}
  .dr-row .dr-caption{flex:1 1 100%;order:3;min-width:0;}
  .dr-cols{display:none;}
  .dr-sale-body{grid-template-columns:minmax(0,1fr);}
  .dr-sale-line{flex-wrap:wrap;}
  .dr-view{margin-left:0;}
}
.ct-modes[hidden],.ct-pay-row[hidden],.ct-split[hidden],.ct-customer-results[hidden],.dr-cancel-row[hidden]{display:none;}
@media (max-width:860px){
  .dr-sale-line{flex-wrap:wrap;}
  .dr-line-what{flex-basis:100%;}
  .dr-line-values{margin-left:auto;}
  .sh-name{white-space:normal;}
}

/* --- Marketplace deliveries (S4, deliveries.py): the marketplaces' commission, the cart's marketplace window,
   Исходящие доставки, the report's two cards --- */
.ct-market{font-size:1.1rem;}
.ct-market-info{margin:0 0 .75rem;padding:.6rem .8rem;border-radius:calc(var(--radius) - 2px);background:var(--muted);font-size:.8125rem;color:var(--muted-foreground);}
.ct-market-info p{margin:0;}
.ct-market-info p + p{margin-top:.2rem;}
.ct-market-note{display:flex;align-items:center;gap:.5rem;padding:.4rem 0;border-bottom:1px solid var(--border);font-size:.8125rem;}
.ct-market-green{color:#2e7d43;} .ct-market-red{color:#b23a52;}
.ct-market-section{display:flex;flex-direction:column;gap:.4rem;margin:.75rem 0;}
.ct-couriers{display:flex;flex-wrap:wrap;gap:.35rem;}
.ct-courier{display:grid;place-items:center;width:2rem;height:2rem;padding:.15rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);cursor:pointer;}
.ct-courier img{width:100%;height:100%;object-fit:contain;}
.ct-courier:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.ct-courier.active{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 25%,transparent);}
.od-number{color:var(--sh-sale);font-weight:600;}
.od-cols{display:grid;grid-template-columns:6.5rem 3rem 7rem;gap:.8rem;margin-left:auto;color:var(--muted-foreground);}
.od-cols span{text-align:center;}   /* centred over their figures (hd-num centres them) */
.od-line{display:grid;grid-template-columns:minmax(0,1fr) 6.5rem 3rem 7rem;align-items:center;gap:.8rem;padding:.55rem 1rem;border-bottom:1px solid var(--border);font-size:.8125rem;}
.od-what{display:flex;align-items:center;gap:.6rem;min-width:0;}
.od-foot{display:flex;align-items:center;gap:1rem;padding:.55rem 1rem;font-size:.8125rem;}
.od-shipping{display:flex;flex-direction:column;gap:.35rem;min-width:0;}
.od-courier{display:inline-flex;align-items:center;gap:.45rem;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;text-align:left;}
button.od-courier{cursor:pointer;}
button.od-courier:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--primary);}
.od-courier-logo{display:grid;place-items:center;width:1.6rem;height:1.6rem;}
.od-courier-logo img{width:100%;height:100%;object-fit:contain;}
.od-actions{display:inline-flex;gap:.5rem;margin-left:auto;}
.od-close-lines{margin-bottom:.5rem;}
.od-close-lines .od-line{padding:.45rem 0;}
.od-account{min-width:14rem;}
.dr-ship-age-1{background:rgba(40,160,60,.14);} .dr-ship-age-2{background:rgba(140,170,40,.16);}
.dr-ship-age-3{background:rgba(200,170,40,.18);} .dr-ship-age-4{background:rgba(220,130,40,.18);}
.dr-ship-age-5{background:rgba(200,50,60,.16);}
.dr-pill-link{cursor:pointer;}
.dr-pill-link:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
@media (max-width:700px){
  .dr-wide-only{display:none;}
  .od-cols{display:none;}
  .od-line{grid-template-columns:minmax(0,1fr) auto;}
  .od-line .hd-num:not(.hd-total){display:none;}
}

/* ---- Обслуживание: the board, the intake, a repair, the payouts (repairs_pages.py; Legacy's repairs.php) ---- */
:root{--rp-d1:#3f7f4f;--rp-d2:#7d8a2a;--rp-d3:#a8742c;--rp-d4:#c2532f;}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--rp-d1:#7fcf8f;--rp-d2:#c5d26a;--rp-d3:#e2ae6a;--rp-d4:#f08a6a;}}
:root[data-theme="dark"]{--rp-d1:#7fcf8f;--rp-d2:#c5d26a;--rp-d3:#e2ae6a;--rp-d4:#f08a6a;}
.rp-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;align-items:start;}
.rp-column{display:flex;flex-direction:column;gap:.5rem;min-width:0;}
.rp-column-head{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);font-size:.875rem;font-weight:600;}
.rp-column-head img{width:1.5rem;height:1.5rem;object-fit:contain;}
.rp-column-title{flex:1;text-align:center;}
.rp-column-count{min-width:1.6rem;padding:0 .4rem;border-radius:999px;background:var(--sh-blue);color:var(--sh-sale);font-size:.75rem;text-align:center;font-variant-numeric:tabular-nums;}
.rp-card{display:grid;grid-template-columns:3rem minmax(0,1fr);gap:.6rem;padding:.5rem .6rem;color:inherit;text-decoration:none;}
.rp-card:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.rp-card-tag{display:flex;flex-direction:column;align-items:stretch;}
.rp-card-picture{display:grid;place-items:center;height:3rem;}
.rp-card-picture img{max-width:100%;max-height:100%;object-fit:contain;}
.rp-card-number{border-radius:4px;background:var(--muted);color:var(--muted-foreground);font-size:.75rem;text-align:center;font-variant-numeric:tabular-nums;}
.rp-card-body{display:flex;flex-direction:column;gap:.25rem;min-width:0;font-size:.75rem;}
.rp-card-device{color:var(--sh-sale);font-weight:600;overflow-wrap:anywhere;}
.rp-card-customer,.rp-card-time{display:inline-flex;align-items:center;gap:.3rem;}
.rp-card-customer img,.rp-card-time img{width:1rem;height:1rem;object-fit:contain;}
.rp-card-time{align-self:flex-start;padding:.1rem .45rem;border-radius:4px;background:var(--muted);font-weight:600;}
.rp-duration-1{color:var(--rp-d1);} .rp-duration-2{color:var(--rp-d2);} .rp-duration-3{color:var(--rp-d3);} .rp-duration-4{color:var(--rp-d4);}
.rp-intake-room{container-type:inline-size;}
.rp-intake{--rp-width:600px;padding:0;max-width:var(--rp-width);}
/* the customer: a field, then a chip; its panel stands in the room right of the form (below the field when there is none) */
.cp{position:relative;}
.cp-chip{display:inline-flex;align-items:center;gap:.45rem;max-width:100%;height:2.25rem;padding:0 .7rem;border:0;border-radius:4px;background:var(--sh-blue);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;}
.cp-chip img{width:1.25rem;height:1.25rem;object-fit:contain;}
.cp-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cp-chip[hidden],.cp-panel[hidden],.rp-value>.input[hidden]{display:none;}
.cp-panel{position:absolute;left:0;top:calc(100% + .3rem);z-index:20;width:20rem;max-width:100%;padding:.3rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow-lg);}
.cp-panel-head,.cp-panel-note{padding:.25rem .5rem .35rem;font-size:.75rem;color:var(--muted-foreground);}
.cp-panel .ct-customer-row strong{font-weight:600;}
.cp-panel .cp-typed strong{font-weight:400;}
@container (min-width: 952px){   /* --rp-width + the panel and its gap */
  .rp-intake .cp{position:static;}
  .rp-field[data-required="customer"]{position:relative;}
  .rp-intake .cp-panel{left:calc(100% + 1.25rem);top:0;max-width:none;}
}
.rp-field{display:grid;grid-template-columns:.75rem 13rem minmax(0,1fr);align-items:center;gap:.75rem;padding:.6rem 1rem;border-top:1px solid var(--border);}
.rp-field:first-child{border-top:0;}
.rp-field[hidden]{display:none;}
.rp-label{font-size:.8125rem;font-weight:600;color:var(--label-foreground);}
.rp-value{min-width:0;}
.rp-intake .ct-customer{margin:0;}
.rp-intake .ct-customer-results,.rp-model-results{position:absolute;left:0;top:calc(100% + .3rem);bottom:auto;z-index:20;width:22rem;max-width:100%;padding:.3rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow-lg);}
.rp-model{position:relative;}
.rp-model-results[hidden]{display:none;}
.rp-model-picked{padding:.3rem .6rem;border:0;border-radius:4px;background:var(--sh-blue);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;}
.rp-model-picked[hidden]{display:none;}
.rp-text{width:100%;resize:vertical;}
/* every value on the RIGHT of its row, the inputs INVISIBLE (no frame, no background -- the text and the placeholder
   alone, right-aligned), the iOS Settings way; a row lights up under the pointer and while its field is being typed in,
   and a click anywhere on it puts the caret in its field (repairs.js) */
.rp-field{grid-template-columns:1.5rem auto minmax(0,1fr) .9rem;min-height:2.75rem;box-sizing:border-box;padding-block:.35rem;cursor:text;}
/* what stands in a row instead of a field is no taller than one: every row the same height */
.rp-intake .cp-chip,.rp-intake .rp-model-picked{height:1.9rem;padding:0 .6rem;display:inline-flex;align-items:center;gap:.4rem;}
.rp-intake .cp-chip[hidden],.rp-intake .rp-model-picked[hidden]{display:none;}
.rp-field:is(:hover,:focus-within){background:var(--accent);}
.rp-value{display:flex;justify-content:flex-end;}
.rp-intake .rp-value > .input,.rp-intake .rp-value > .rp-text,.rp-intake .amount-field .input{width:100%;height:auto;min-height:1.5rem;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;text-align:right;font-size:.875rem;}
.rp-intake .rp-value > .input::placeholder,.rp-intake .rp-text::placeholder{color:var(--muted-foreground);opacity:.75;}
.rp-intake .rp-value > input[type="search"]::-webkit-search-cancel-button{display:none;}
.tr-customer input[type="search"]::-webkit-search-cancel-button{display:none;}
/* a multi-line field: one line fills exactly the single-line field's height, so its text sits on the row's centre
   like theirs until it grows */
.rp-intake .rp-text{display:block;resize:none;field-sizing:content;min-height:1.5rem;max-height:8rem;line-height:1.5rem;}
.rp-intake .amount-field{justify-content:flex-end;align-items:baseline;gap:.25rem;}
.rp-intake .amount-field .input{width:7rem;font-variant-numeric:tabular-nums;}
.rp-intake .amount-field .amount-field-currency{position:static;transform:none;}
/* the basis: an invisible select -- the choice (or "Не выбрано") and the caret on the right, no frame; its list as wide
   as it needs */
.rp-basis .account-select{min-width:13rem;}
.rp-intake .rp-basis .account-select-button{min-height:0;height:1.9rem;padding:0 0 0 .4rem;border-color:transparent;background:transparent;box-shadow:none;justify-content:flex-end;gap:.35rem;font-size:.875rem;}
.rp-intake .rp-basis .account-select-value{flex:0 1 auto;justify-content:flex-end;}
.rp-intake .rp-basis .account-select-button:is(:hover,:focus-visible){background:transparent;}
/* Legacy's picture before each row's name; the lamp (red: required and empty, green: filled, blue: optional) after the value */
.rp-icon{width:1.5rem;height:1.5rem;object-fit:contain;}
.rp-basis-icon{width:1.4rem;height:1.4rem;object-fit:contain;flex:none;}
.rp-field .rp-basis .account-select-button,.rp-field .cp-chip,.rp-field .rp-model-picked{cursor:pointer;}
.rp-model-picked{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rp-intake .rp-model-results{left:auto;right:0;}
.rp-intake .cp-panel{left:auto;right:0;}
@container (min-width: 952px){ .rp-intake .cp-panel{left:calc(100% + 1.25rem);right:auto;} }
/* the model's results: the customer's panel -- in the room right of the form, else right under the row */
@container (min-width: 952px){
  .rp-intake .rp-model{position:static;}
  .rp-field[data-required="model"]{position:relative;}
  .rp-intake .rp-model-results{left:calc(100% + 1.25rem);right:auto;top:0;width:20rem;max-width:none;}
}
/* the chosen model and customer: picture and name as plain text, no badge */
.rp-intake .cp-chip{padding:0;background:transparent;font-size:.875rem;font-weight:400;}
.rp-intake .rp-model-picked{padding:0;background:transparent;font-size:.875rem;font-weight:400;}
.rp-intake .rp-model-picked img{width:1.4rem;height:1.4rem;object-fit:contain;flex:none;}
.rp-intake .rp-model-picked span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rp-intake-error{padding:0 1rem;}
.rp-intake-foot{display:flex;justify-content:flex-end;padding:.6rem 1rem;border-top:1px solid var(--border);}
.rp-page{display:flex;flex-direction:column;gap:.75rem;}
.rp-print{display:flex;gap:.3rem;justify-content:flex-end;}
.rp-print img{width:1.25rem;height:1.25rem;}
.rp-identity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;}
.rp-who{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;}
.rp-who > img{width:2.25rem;height:2.25rem;object-fit:contain;}
.rp-who > span{display:flex;flex-direction:column;}
.rp-strong{font-weight:600;}
.rp-sub{color:var(--muted-foreground);font-size:.8125rem;}
.rp-rows{padding:0;}
.rp-chips{display:flex;flex-wrap:wrap;border-top:1px solid var(--border);}
.rp-chips:first-child{border-top:0;}
.rp-chip{display:flex;flex:1 1 12rem;align-items:center;gap:.6rem;padding:.55rem 1rem;border-left:1px solid var(--border);font-size:.875rem;}
.rp-chip:first-child{border-left:0;}
.rp-chip img{width:1.5rem;height:1.5rem;object-fit:contain;}
.rp-chip-error{color:var(--destructive);}
.rp-avatar{width:1.5rem;height:1.5rem;border-radius:50%;object-fit:cover;}
.rp-detail{display:flex;align-items:center;gap:.6rem;padding:.55rem 1rem;border-top:1px solid var(--border);font-size:.875rem;}
.rp-detail img{width:1.5rem;height:1.5rem;object-fit:contain;}
.rp-detail-text{white-space:pre-line;overflow-wrap:anywhere;}
.rp-struck{opacity:.3;text-decoration:line-through;}
.rp-pill{display:inline-flex;align-items:center;gap:.3rem;padding:.1rem .45rem;border-radius:4px;background:var(--sh-blue);color:var(--foreground);font-size:.75rem;text-decoration:none;white-space:nowrap;vertical-align:middle;}
.rp-pill img{width:1rem;height:1rem;object-fit:contain;}
.rp-pill .rp-avatar{width:1rem;height:1rem;}
.rp-pill-plain{background:var(--muted);}
.rp-pill-used{background:var(--sh-red);}
.rp-actions{display:flex;flex-wrap:wrap;gap:.5rem;padding:.75rem;}
.rp-action{display:flex;flex-direction:column;align-items:center;gap:.3rem;width:5.25rem;padding:.35rem .2rem;border:0;border-radius:calc(var(--radius) - 2px);background:transparent;color:var(--foreground);font:inherit;cursor:pointer;}
.rp-action:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.rp-action-icon{display:grid;place-items:center;width:3rem;height:3rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);}
.rp-action-icon img{width:1.75rem;height:1.75rem;object-fit:contain;}
.rp-action-label{font-size:.75rem;line-height:1.2;text-align:center;}
/* the history: rows edge to edge, no padding of the card around them; each row a little taller */
.rp-history{padding:0;overflow:hidden;}
.rp-event{display:grid;grid-template-columns:8rem 8.5rem minmax(0,1fr);gap:.5rem;align-items:center;min-height:2.6rem;box-sizing:border-box;
  padding:.45rem .8rem;border-top:1px solid var(--border);font-size:.8125rem;}
.rp-event:first-child{border-top:0;}
.rp-event-who,.rp-event-when{display:inline-flex;align-items:center;gap:.35rem;min-width:0;font-size:.75rem;}
.rp-event-who span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rp-event-when{color:var(--muted-foreground);font-variant-numeric:tabular-nums;}
.rp-event-when img,.rp-event-who > img{width:1.1rem;height:1.1rem;object-fit:contain;}
.rp-event-text{overflow-wrap:anywhere;}
.rp-comment{white-space:pre-line;font-style:italic;}
.rp-red{color:#b23a52;} .rp-green{color:#2e7d43;} .rp-blue{color:var(--sh-sale);}
.rp-dialog{width:min(560px,calc(100% - 2rem));}
/* a repair assigned to the viewer, not taken yet: the bar on its page and its window's device */
/* the page's rhythm: the gap of a group's caption above it (.ig-caption's 1.25rem), the next caption's below */
.rp-incoming-bar{display:flex;align-items:center;gap:.75rem;margin:1.25rem 0 0;padding:.7rem .75rem .7rem 1rem;background:var(--sh-blue);font-size:.875rem;font-weight:600;line-height:1.35;}
.rp-incoming-bar > img{flex:none;width:1.5rem;height:1.5rem;object-fit:contain;}
.rp-incoming-bar > span{flex:1 1 0;min-width:0;}
.rp-incoming-bar > .btn{flex:none;margin-left:auto;}
@media (max-width:600px){.rp-incoming-bar{flex-wrap:wrap;}.rp-incoming-bar > .btn{width:100%;}}
.rp-incoming-device{display:flex;align-items:center;gap:.8rem;margin-bottom:.8rem;}
.rp-incoming-device > span:last-child{display:flex;flex-direction:column;min-width:0;}
.rp-incoming-picture{flex:none;display:grid;place-items:center;width:3.5rem;height:3.5rem;}
.rp-incoming-picture > img{max-width:100%;max-height:100%;object-fit:contain;}
/* a choice row of a repair's window: the radio hidden, the row lit and ticked when chosen */
.rp-choices{max-height:20rem;overflow:auto;}
.rp-choice{cursor:pointer;}
.rp-choice > input[type="radio"]{position:absolute;opacity:0;pointer-events:none;}
.rp-choice-tick{margin-left:auto;color:var(--primary);visibility:hidden;}
.rp-choice > .sheet-value + .rp-choice-tick{margin-left:0;}
.rp-choice:has(input:checked){background:var(--sh-blue);}
.rp-choice:has(input:checked) .rp-choice-tick{visibility:visible;}
.rp-choice .rp-avatar,.rp-choice img{width:1.4rem;height:1.4rem;object-fit:contain;flex:none;}
.rp-consent[hidden]{display:none;}
#rp-payouts{display:flex;flex-direction:column;gap:1rem;}   /* the mode and every section apart */
.rp-mode{display:flex;}
.rp-mode .rp-chip{flex:0 0 auto;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--card);}
.rp-payouts{padding:0;}
.rp-payouts-head{padding:.5rem 1rem;border-bottom:1px solid var(--border);font-size:.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;}
.rp-payout{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.5rem 1rem;border-top:1px solid var(--border);}
.rp-payout:first-of-type{border-top:0;}
.rp-payout-actions{display:inline-flex;gap:.4rem;margin-left:auto;}
.rp-share{display:block;max-width:8rem;}
.rp-report-foot{display:flex;padding:.5rem 1rem;}
@media (max-width:860px){
  .rp-board{grid-template-columns:repeat(2,minmax(0,1fr));}
  .rp-field{grid-template-columns:1.5rem minmax(0,1fr) .6rem;}
  .rp-field .rp-value{grid-column:1 / -1;}
  .rp-field .field-mark{grid-row:1;grid-column:3;}
  .rp-identity{grid-template-columns:minmax(0,1fr);}
  .rp-event{grid-template-columns:minmax(0,1fr) auto;}
  .rp-event-text{grid-column:1 / -1;}
}
@media (max-width:520px){.rp-board{grid-template-columns:minmax(0,1fr);}}

/* The header's counters (header_counts.py, layout_app.html): Legacy's badges -- a picture with its number in the
   corner, the envelope's scale; several repairs open a short list. */
.header-count{position:relative;display:inline-grid;place-items:center;width:2.25rem;height:2.25rem;padding:0;border:none;border-radius:var(--radius);background:none;cursor:pointer;}
.header-count:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.header-count img{width:1.5rem;height:1.5rem;object-fit:contain;}
.header-count-number{position:absolute;top:.05rem;right:0;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--destructive);color:#fff;font-size:.625rem;font-weight:700;line-height:1.05rem;text-align:center;}
.header-count-menu{position:relative;}
.user-menu-balance-text{display:flex;flex-direction:column;line-height:1.25;}   /* the avatar menu's organization balance */
.user-menu-balance-text > span{font-size:.75rem;color:var(--muted-foreground);}
.user-menu-balance-text > b{white-space:nowrap;}
/* every counter its own, and the one "!" with their sum only while they do not fit (layout_app's script: .hc-collapsed) */
.header-count-combined{display:none;}
.app-header.hc-collapsed .header-count-single{display:none;}
.app-header.hc-collapsed .header-count-combined{display:block;}
.header-count-popover{position:absolute;top:calc(100% + .4rem);right:0;min-width:12rem;max-height:20rem;overflow:auto;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:.3rem;z-index:20;}
.header-count-popover .user-menu-item img{width:1rem;height:1rem;}

/* The phone's menu (app_drawer.js): under 800px the hamburger opens the sidebar as a drawer over the page. */
.app-drawer-button{display:none;place-items:center;width:2.25rem;height:2.25rem;margin-left:-.5rem;padding:0;border:none;border-radius:var(--radius);background:none;color:var(--foreground);cursor:pointer;}
.app-drawer-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.app-drawer-button .icon{width:1.25rem;height:1.25rem;}
.app-drawer-backdrop{position:fixed;inset:0;z-index:59;background:rgb(0 0 0 / .4);}
@media (max-width:800px){
  .app-drawer-button{display:inline-grid;flex:none;}
  .app-header{padding:0 1rem;}
  .app-drawer-open .app-sidebar{display:flex;position:fixed;left:0;top:0;bottom:0;height:100dvh;width:min(17rem,85vw);z-index:60;overflow-y:auto;background:var(--surface);box-shadow:var(--shadow-lg);}
  .app-header-actions{gap:.3rem;}
}
@media (min-width:801px){.app-drawer-backdrop{display:none;}}

/* The item's history (item.html, items.history): Legacy's rows -- the event's label with its picture, what happened,
   who and when, a link (the receipt, the repair, the waybill). */
.it-event-label{flex:0 0 9.5rem;display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;font-weight:600;color:var(--muted-foreground);}
.it-event-label img{width:1.25rem;height:1.25rem;flex:none;}
.it-event-qty{font-weight:600;}
.it-event-qty-direct{color:var(--success,#16a34a);}
.it-event-amount{font-weight:600;white-space:nowrap;}
.it-event-amount-sale,.it-event-amount-delivered{color:var(--success,#16a34a);}
.it-event-amount-shipped{color:var(--info);}
.it-event-amount-sale_cancelled,.it-event-amount-delivered_cancelled,.it-event-amount-delivery_refused{text-decoration:line-through;color:var(--muted-foreground);}
.it-event-amount-repair_part{color:var(--destructive);}
.it-event-link{flex:0 0 auto;}
.it-event-link img{width:1rem;height:1rem;}
@media (max-width:600px){
  .it-events .it-craft{flex-wrap:wrap;gap:.35rem .75rem;}
  .it-event-label{flex-basis:100%;}
}

/* An empty list (Legacy's empty.png beside "Нет результатов"): the placeholder of a list with nothing in it -- ONE line,
   the picture at the text's left, everywhere the class is used. */
.placeholder-empty{display:flex;align-items:center;justify-content:center;gap:.75rem;}
.placeholder-empty::before{content:"";flex:none;width:3rem;height:3rem;background:url("/static/icons/empty.png") center / contain no-repeat;opacity:.85;}
.placeholder-empty > h2{margin:0;}
/* Управление → Тариф (plan.html): the item page's rows for the plan and the limits, the sign-up's choice below */
.plan-card{margin-bottom:1rem;padding:0;}
.plan-change{padding:1.25rem 1.5rem;}
.plan-effect-shown{margin-top:1rem;font-size:.875rem;}
.plan-effect-shown p,.plan-confirm-body p{margin:.25rem 0;}
.plan-refused{color:var(--destructive);}
.plan-change-actions{display:flex;justify-content:flex-end;margin-top:1rem;}
/* A deactivated branch (team.set_branch_active): muted in the list and the switcher, read-only everywhere */
.branch-deactivated{opacity:.6;}
.badge-muted{background:var(--muted);color:var(--muted-foreground);margin-left:auto;}
.branch-lamp-deactivated{color:var(--muted-foreground);white-space:nowrap;}
.branch-lamp-note{margin-left:auto;font-size:.6875rem;color:var(--muted-foreground);}
.app-content>.branch-read-only{margin-bottom:1rem;}
.hd-question{margin:0 0 1rem;font-size:.9375rem;}
.hd-question[hidden]{display:none;}

/* THE switch of a library's row (online platforms, services): an old-style square rocker, ON / OFF written on its track
   (lab variant 5, static/lab/switches.html), a calm steel blue, 51 x 20 */
.rocker{all:unset;flex:none;display:inline-flex;align-items:center;cursor:pointer;border-radius:3px;}
.rocker:focus-visible{box-shadow:0 0 0 3px var(--accent);}
.rocker-track{position:relative;display:block;width:51px;height:20px;box-sizing:border-box;border-radius:3px;border:1px solid #c9cdd3;
  background:#e8eaed;color:#9aa1ab;font-size:8.25px;font-weight:700;letter-spacing:.04em;line-height:1;transition:background .15s,border-color .15s;}
.rocker-track::before{content:"OFF";position:absolute;right:5px;top:50%;transform:translateY(-50%);}
.rocker-track::after{content:"";position:absolute;top:1px;left:1px;width:18px;height:16px;box-sizing:border-box;border-radius:2px;
  background:linear-gradient(#fff,#eef0f3);border:1px solid #c3c8cf;transition:transform .15s;}
.rocker[aria-pressed=true] .rocker-track{background:#7591b3;border-color:#647f9f;color:#fff;}
.rocker[aria-pressed=true] .rocker-track::before{content:"ON";left:6px;right:auto;}
.rocker[aria-pressed=true] .rocker-track::after{transform:translateX(29px);}
@media (prefers-reduced-motion:reduce){.rocker-track,.rocker-track::after{transition:none;}}
/* a list whose rows are removed by DRAGGING them onto the add block: while a row is dragged the block (.drop-bin-host)
   gives way to its trash (.drop-bin, sortable.js dropZone); over it, the trash fills red */
.drop-bin-host{position:relative;}
.drop-bin{display:none;}
.drop-bin-host.drop-bin-open > :not(.drop-bin){visibility:hidden;}
.drop-bin-host.drop-bin-open > .drop-bin{display:flex;position:absolute;inset:0;align-items:center;justify-content:center;gap:.5rem;
  border:1.5px dashed var(--destructive);border-radius:inherit;color:var(--destructive);font-size:.875rem;font-weight:500;background:var(--card);}
.drop-bin .icon{width:1.1rem;height:1.1rem;}
.drop-bin-host.drop-over > .drop-bin{background:var(--destructive);color:#fff;border-style:solid;}

/* Библиотеки → Товары: "Добавить модель" is the fourth button; the waybill's picker it borrows stays unseen (its windows
   open in the top layer all the same) */
.cb-filters:has(#catalogue-add,.catalogue-add-off){grid-template-columns:repeat(4,minmax(0,1fr));}
.cb-adder > .wb-items > .wb-picker{display:none;}
/* the libraries' width: the filters, the search and the list fill the page's column, as every library's rows do */
#catalogue-browse > .cb-filters,#catalogue-browse > .cb-bar,#catalogue-browse > .cb-list{width:100%;max-width:none;}

/* a HIDDEN model found by typing (the catalogue page, the waybill's model list): a grey badge "архив", its picture in
   black and white */
.wb-model-hidden{flex:none;display:inline-flex;align-items:center;gap:.3rem;height:1.35rem;padding:0 .5rem;border-radius:999px;
  border:1px solid var(--border);background:var(--muted);color:var(--muted-foreground);font-size:.6875rem;font-weight:600;
  text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;}
.wb-model-hidden .bi{font-size:.75rem;line-height:1;}
:is(.cb-model,.wb-model-row,button):has(> .wb-model-hidden) .wb-line-picture{filter:grayscale(1);opacity:.6;}
/* a platform's sale: its lead is the platform -- the sources muted, the caption naming it stays clear */
.ct-leads.ct-leads-off{pointer-events:none;}
.ct-leads.ct-leads-off > :not(.ct-lead-caption){opacity:.35;filter:grayscale(1);}
.ct-customer-soon .ct-customer-button:disabled{opacity:.5;cursor:default;background:none;}   /* the customer: in development */

/* the payment windows (a platform's shipment, a mixed payment): what is sold at the top -- each ticked line again */
.ct-order{display:flex;flex-direction:column;margin:0 0 .75rem;}   /* no frame: plain rows, each closing with its line */
.ct-order-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto 7rem;align-items:center;gap:.6rem;padding:.4rem 0;border-bottom:1px solid var(--border);font-size:.8125rem;}
/* a smaller tag, really smaller (a transform kept the full size's room and the rows uneven) */
.ct-order-row .item-tag{width:2.4rem;}
.ct-order-row .item-tag-picture{height:2.4rem;}
.ct-order-row .item-tag-number{font-size:.625rem;}
.ct-order-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;}
.ct-order-qty{color:var(--muted-foreground);font-variant-numeric:tabular-nums;}
.ct-order-sum{text-align:right;font-variant-numeric:tabular-nums;font-weight:600;}
/* an iOS row: the name on the left, an INVISIBLE field on the right */
.ct-ios-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.55rem 0;border-bottom:1px solid var(--border);font-size:.875rem;cursor:text;}
.ct-ios-row > span{display:inline-flex;align-items:center;gap:.4rem;flex:none;}
.ct-ios-field{flex:1 1 auto;min-width:0;margin:0;padding:0;border:0;outline:none;box-shadow:none;background:transparent;color:inherit;font:inherit;text-align:right;}
.ct-ios-field::placeholder{color:var(--muted-foreground);}
/* the mixed payment: pinned to the top of the screen, so that what comes in under the accounts never moves the rest */
.ct-mixed{margin-top:6vh;margin-bottom:auto;}
.ct-mixed .ct-mixed-accounts{display:grid;grid-template-columns:repeat(auto-fill,minmax(6.5rem,1fr));gap:.4rem;}
.ct-mixed .ct-mixed-account{flex-direction:column;justify-content:center;gap:.3rem;min-height:4.25rem;padding:.5rem .3rem;text-align:center;}
.ct-mixed-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.6875rem;line-height:1.2;}
.ct-mixed .ct-mixed-order:not(:empty){position:absolute;top:.25rem;right:.25rem;}
/* the mixed payment's amounts: invisible fields on the right of their rows, the iOS way */
.ct-sheet .ct-amount-field{width:9rem;height:auto;padding:0;border:0;box-shadow:none;background:transparent;text-align:right;font-size:.875rem;font-variant-numeric:tabular-nums;}
.wb-tax-form{display:flex;flex-direction:column;gap:.5rem;margin-top:var(--dialog-head);}
.wb-tax-form[hidden]{display:none;}
.wb-tax-text{height:auto;min-height:6rem;padding:.5rem .65rem;resize:vertical;}
.dialog-actions .wb-tax-back[hidden],.dialog-actions .wb-tax-send[hidden]{display:none;}
.dialog-actions .wb-tax-send{margin-left:auto;}
/* the payment windows' rows -- the order's, the sum, the notes, the iOS rows -- ONE rhythm: the same padding above and
   below, the same height for the plain ones; the order starts right under the header's line, like any list */
.ct-dialog > .dialog-title:first-child + .ct-order{margin-top:0;}
.ct-order-row{padding-block:.5rem;}

/* THE payment windows' layout (.ct-sheet: a platform's shipment, an account with a surcharge, the mixed payment):
   the order's rows; its sum pressed to the right; a row and a half of space; the window's own rows as ONE group, a line
   above it and one under every row; the same space; the footer. Every row runs edge to edge -- its line unbroken by
   the dialog's padding -- and the plain ones share one height. */
.ct-sheet .ct-order{margin:0;}
.ct-sheet .ct-order-row,.ct-sheet-sum,.ct-sheet-block{margin-inline:calc(-1 * var(--dialog-pad));}
.ct-sheet .ct-order-row,.ct-sheet-sum,.ct-sheet-block .ct-pay-row,.ct-sheet-block .ct-market-note,.ct-sheet-block .ct-ios-row,
.ct-sheet-block .ct-sheet-row{padding-inline:var(--dialog-pad);}
.ct-sheet-sum{display:flex;align-items:center;justify-content:flex-end;gap:.6rem;box-sizing:border-box;min-height:2.75rem;
  padding-block:.4rem;margin-bottom:4.125rem;font-size:.875rem;}
.ct-sheet-sum strong{font-variant-numeric:tabular-nums;}
.ct-sheet-block{border-top:1px solid var(--border);margin-bottom:4.125rem;}
.ct-sheet-block .ct-pay-row,.ct-sheet-block .ct-market-note,.ct-sheet-block .ct-ios-row,.ct-sheet-block .ct-sheet-row{
  box-sizing:border-box;min-height:2.75rem;padding-block:.4rem;margin:0;border-bottom:1px solid var(--border);}
.ct-sheet-block .ct-modes{align-items:center;}
.ct-sheet-block .ct-mixed-accounts{padding-block:.6rem;}
.ct-sheet-block .ct-part{margin:0;}
.ct-sheet .field-hint-error:empty{display:none;}
/* the mixed payment: small tiles, six or so to a row -- the picture larger, the frame close round it; no line above them */
.ct-mixed .ct-sheet-block{border-top:0;}
.ct-mixed .ct-mixed-accounts{grid-template-columns:repeat(auto-fill,minmax(4.4rem,1fr));gap:.35rem;}
.ct-mixed .ct-mixed-account{min-height:0;padding:.35rem .2rem .3rem;gap:.2rem;}
.ct-mixed .ct-mixed-account .logo{width:1.9rem;height:1.9rem;}
.ct-mixed-name{font-size:.625rem;}
/* the slider between the two accounts' pictures */
.ct-split-row{grid-template-columns:auto 1fr auto;}
.ct-split-row > span{display:inline-grid;place-items:center;}
.ct-split-row .logo{width:1.75rem;height:1.75rem;}
/* the modes -- Стандарт / Без комиссии / Округлить / Вручную --, each with its picture, centred */
.ct-sheet .ct-modes{justify-content:center;}
/* two storeys: the picture above, the word under it -- four of one width */
.ct-sheet .ct-modes{display:grid;grid-template-columns:repeat(4,minmax(0,6.5rem));justify-content:center;gap:.4rem;}
.ct-sheet .ct-modes[hidden]{display:none;}             /* an account without a surcharge: no modes */
.ct-sheet .ct-modes .btn{flex-direction:column;justify-content:center;gap:.2rem;height:auto;min-height:2.9rem;padding:.35rem .3rem;font-size:.6875rem;line-height:1.15;white-space:normal;text-align:center;}
.ct-sheet .ct-modes .btn .bi{font-size:1rem;line-height:1;}
/* each account's rows in its own tint, as Legacy grouped them: the first blue, the second green; the tiles' numbers too */
.ct-part[data-part="1"] > *{background:color-mix(in srgb,var(--info) 4%,var(--card));}
.ct-part[data-part="2"] > *{background:color-mix(in srgb,var(--success) 4.5%,var(--card));}
.ct-mixed .ct-mixed-account[data-n="1"]{border-color:color-mix(in srgb,var(--info) 55%,var(--border));}
.ct-mixed .ct-mixed-account[data-n="2"]{border-color:color-mix(in srgb,var(--success) 55%,var(--border));}
.ct-mixed .ct-mixed-account[data-n="1"] .ct-mixed-order{background:color-mix(in srgb,var(--info) 75%,var(--card));color:#fff;}
.ct-mixed .ct-mixed-account[data-n="2"] .ct-mixed-order{background:color-mix(in srgb,var(--success) 75%,var(--card));color:#fff;}
/* the one account with a surcharge: the modes come first, with no line above them */
#ct-terminal .ct-sheet-block{border-top:0;}
/* the mixed payment before two accounts are chosen: the tiles centred, no line under them; "Итого" pressed to its sum,
   and so is each surcharged account's own total */
.ct-mixed .ct-mixed-accounts{display:flex;flex-wrap:wrap;justify-content:center;}
.ct-mixed .ct-mixed-account{width:4.6rem;}
.ct-mixed .ct-sheet-block:has(> .ct-split[hidden]) .ct-mixed-accounts{border-bottom:0;}
.ct-mixed .ct-pay-total,.ct-mixed .ct-part-total{justify-content:flex-end;gap:.6rem;}
.ct-part-total strong{font-variant-numeric:tabular-nums;}
/* a total's caption with its picture (or its (i)): picture, words and sum on ONE centre line */
.ct-pay-total{align-items:center;}
.ct-pay-total > span{display:inline-flex;align-items:center;gap:.35rem;line-height:1.2;}
.ct-pay-total > span > .ct-mini,.ct-pay-total > span > .bi{display:block;flex:none;}
.ct-pay-total > strong{line-height:1.2;}
.ct-sheet-block .ct-pay-total{border-bottom:0;}   /* the total closes the group: no line after it */
.hd-expiry-dialog .dialog-actions [hidden]{display:none;}
.hd-expiry-dialog .hd-expiry-clear,.hd-expiry-dialog .hd-expiry-clear[hidden] + [data-confirm]{margin-left:auto;}   /* Отмена alone on the left; switch-off and save on the right */
/* the timer's window: as much room under its fields as above its text */
.hd-expiry-dialog .hd-expiry-fields{margin-bottom:var(--dialog-head);}
.hd-expiry-dialog .field-hint-error:empty{display:none;}
/* the close window: the fixed figures as text, the net an invisible field, all on the right in the same plain type;
   taller rows */
.od-close-form .ct-pay-row{box-sizing:border-box;min-height:2.75rem;}
.od-figure{font-weight:400;font-variant-numeric:tabular-nums;}
.od-net-row{cursor:text;}
.od-net-field{font-weight:400;font-variant-numeric:tabular-nums;}
/* its account: an INVISIBLE select -- the chosen account (or "Не выбран") and the caret on the right, no frame; the row
   as tall as the others */
.od-close-form .od-account .account-select-button{min-height:0;height:1.9rem;padding:0 .2rem 0 .4rem;border-color:transparent;background:transparent;box-shadow:none;justify-content:flex-end;gap:.35rem;}
.od-close-form .od-account .account-select-button:is(:hover,:focus-visible,:has(:focus-visible)),.od-close-form .od-account .account-select-button[aria-expanded="true"]{background:var(--accent);}
.od-close-form .od-account .account-select-value{justify-content:flex-end;text-align:right;}
.od-close-form .od-account .logo,.od-close-form .od-account .post-account-avatar{width:1.4rem;height:1.4rem;}
/* every row edge to edge; the account's row as tall as the others and without a line of its own (the footer's closes it) */
.od-close-form .ct-pay-row,.od-close-form .od-close-lines .od-line{margin-inline:calc(-1 * var(--dialog-pad));padding-inline:var(--dialog-pad);}
.od-close-form .ct-pay-row{height:2.75rem;min-height:0;padding-block:0;}
/* as the cart's windows: a row and a half of space above the group and under it, a line above its first row and
   under its last */
.od-close-form .ct-rows{margin:4.125rem 0;border-top:1px solid var(--border);}
.od-close-form .od-close-lines{margin-bottom:0;}
.od-close-form .ct-rows{margin-inline:calc(-1 * var(--dialog-pad));}
.od-close-form .ct-rows .ct-pay-row{margin-inline:0;}
.od-close-form .field-hint-error:empty{display:none;}
.od-net-text{padding:0;border:0;background:none;color:inherit;font:inherit;font-variant-numeric:tabular-nums;cursor:text;}
.od-net-text[hidden],.od-net-field[hidden]{display:none;}

/* Настройки: the (?) left of a row says what the setting does (its tooltip); the switches are the libraries' rocker --
   the profile's too */
.setting-about{flex:none;display:inline-grid;place-items:center;width:1.25rem;height:1.25rem;color:var(--muted-foreground);font-size:1rem;cursor:help;}
.setting-about:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
:is(.settings,.pf-page) .toggle-track{position:relative;display:block;width:51px;height:20px;padding:0;box-sizing:border-box;border-radius:3px;border:1px solid #c9cdd3;
  background:#e8eaed;color:#9aa1ab;font-size:8.25px;font-weight:700;letter-spacing:.04em;line-height:1;transition:background .15s,border-color .15s;}
:is(.settings,.pf-page) .toggle-track::before{content:"OFF";position:absolute;right:5px;top:50%;transform:translateY(-50%);}
:is(.settings,.pf-page) .toggle-thumb{position:absolute;top:1px;left:1px;width:18px;height:16px;box-sizing:border-box;border-radius:2px;
  background:linear-gradient(#fff,#eef0f3);border:1px solid #c3c8cf;box-shadow:none;transition:transform .15s;}
:is(.settings,.pf-page) .toggle input:checked + .toggle-track{background:#7591b3;border-color:#647f9f;color:#fff;}
:is(.settings,.pf-page) .toggle input:checked + .toggle-track::before{content:"ON";left:6px;right:auto;}
:is(.settings,.pf-page) .toggle input:checked + .toggle-track .toggle-thumb{transform:translateX(29px);}
:is(.settings,.pf-page) .toggle:is(:hover,:focus-visible,:has(:focus-visible)) .toggle-track{box-shadow:none;}
/* a tag with no number tab under its picture (another organisation's item): the frame closed all round */
.item-tag:not(:has(.item-tag-number)) .item-tag-picture{border-bottom:1px solid color-mix(in srgb,var(--tag) 55%,transparent);border-radius:4px;}
/* the cart's and the consignments' rows answer the pointer: the ladder hover < ticked < ticked under the pointer */
.ct-line:is(:hover,:focus-visible,:has(:focus-visible)),#cn-pay-form .cn-row[data-batch]:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--row-hover);}
.ct-line.ct-ticked:is(:hover,:focus-visible,:has(:focus-visible)),#cn-pay-form .cn-row-ticked:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--row-ticked-hover);}
.sidebar-items{overflow:hidden;}   /* the menu's section items: their height animated as it unfolds / folds (layout_app.html) */
.sidebar-items{display:flex;flex-direction:column;gap:.15rem;}

/* Клиенты (customers.html) and a customer's card (customer.html) */
.cu-page{display:flex;flex-direction:column;gap:.75rem;}
.cu-finder{width:min(100%,var(--wb-panel-width));padding:0;}
.cu-search-form{display:flex;flex-direction:column;gap:.5rem;padding:1rem;}
.cu-call{font-size:.9375rem;font-weight:600;}
.cu-search-row{display:flex;gap:.5rem;}
.cu-search-box{position:relative;flex:1;min-width:0;}
.cu-search-box > .bi{position:absolute;left:.7rem;top:50%;transform:translateY(-50%);color:var(--muted-foreground);pointer-events:none;}
.cu-search{padding-left:2.1rem;}
.cu-results{width:min(100%,var(--wb-panel-width));}   /* as wide as the search above it */
.cu-results[hidden],.cu-headings[hidden]{display:none;}
.cu-list{padding:0;overflow:hidden;}
/* the columns' names above the card (Услуги's way): muted, small, each over its column, the counters' centred */
.cu-row.cu-headings{min-height:0;padding-top:0;padding-bottom:.35rem;border-top:0;color:var(--muted-foreground);font-size:.75rem;font-weight:600;white-space:nowrap;}
.cu-row.cu-headings:is(:hover,:focus-visible,:has(:focus-visible)){background:none;}
/* a column of its own for each, fixed: the name, the phone (one under another), repairs, purchases, the balance */
.cu-row{display:grid;grid-template-columns:1.5rem minmax(0,1fr) 8.5rem 4.5rem 4.5rem 5rem;align-items:center;gap:.5rem;
  min-height:2.75rem;padding:0 1rem;border-top:1px solid var(--border);color:inherit;text-decoration:none;font-size:.875rem;}
.cu-row:first-child{border-top:0;}
.cu-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--row-hover);}
/* where a consent is asked: the faintest green -- given --, the faintest red -- not; a shade deeper under the pointer */
.cu-row-consented{background:rgba(22,163,74,.025);}
.cu-row-consented:is(:hover,:focus-visible,:has(:focus-visible)){background:rgba(22,163,74,.06);}
.cu-row-unconsented{background:rgba(220,38,38,.022);}
.cu-row-unconsented:is(:hover,:focus-visible,:has(:focus-visible)){background:rgba(220,38,38,.055);}
.cu-face{width:1.4rem;height:1.4rem;object-fit:contain;}
.cu-who{display:flex;align-items:baseline;gap:.75rem;min-width:0;}
.cu-row .cu-who{display:contents;}           /* the name and the phone: two cells of the row's grid */
.cu-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cu-row > .cu-count,.cu-row > .cu-who > .cu-phone,.cu-row.cu-headings > :nth-child(n+2){justify-self:center;}   /* the phone and the counters: centred */
.cu-head-who{grid-column:1 / span 2;}          /* "Клиент" over the picture and the name together */
.cu-zero{opacity:.55;}
.cu-minus{color:var(--destructive);}
.cu-phone{flex:none;color:var(--muted-foreground);font-variant-numeric:tabular-nums;}
.cu-count{display:inline-flex;align-items:center;gap:.3rem;color:var(--muted-foreground);font-variant-numeric:tabular-nums;}
.cu-count img{width:1.1rem;height:1.1rem;object-fit:contain;}
.cu-doubt{color:#d4a017;font-size:.8125rem;}
.cu-empty{padding:1rem;color:var(--muted-foreground);font-size:.875rem;text-align:center;}
.cu-card-page{display:flex;flex-direction:column;gap:.5rem;--dialog-pad:1rem;}
.cu-caption{margin:.9rem 0 .1rem;font-size:.8125rem;font-weight:600;color:var(--muted-foreground);}
.cu-head{display:flex;align-items:center;gap:1rem;padding:1rem;}
.cu-head-face{width:3rem;height:3rem;object-fit:contain;}
.cu-head-incognito{display:grid;place-items:center;font-size:2rem;color:var(--muted-foreground);}
.cu-actions{display:flex;align-items:center;gap:.25rem;}
.cu-actions{gap:.4rem;}
/* the card's buttons are VISIBLE at rest -- a frame and a fill --, and answer the pointer by changing both */
.cu-actions .icon-button{font-size:1.15rem;border-color:var(--input);background:var(--card);color:var(--foreground);
  box-shadow:0 1px 2px rgba(1,41,112,.06);transition:background-color .12s,border-color .12s,color .12s;}
.cu-actions .icon-button:is(:hover,:focus-visible,:has(:focus-visible)){border-color:#b5c9ee;background:var(--accent);}
.cu-actions .icon-button-destructive:is(:hover,:focus-visible,:has(:focus-visible)){border-color:color-mix(in srgb,var(--destructive) 45%,transparent);background:var(--destructive-bg);color:var(--destructive);}
.cu-actions .icon-button:disabled{opacity:1;color:var(--muted-foreground);background:var(--muted);border-color:var(--border);box-shadow:none;}
.cu-actions .cu-consent-given{color:var(--success);border-color:color-mix(in srgb,var(--success) 40%,transparent);background:var(--success-bg);}
.cu-actions .cu-consent-given:is(:hover,:focus-visible,:has(:focus-visible)){border-color:color-mix(in srgb,var(--success) 65%,transparent);background:color-mix(in srgb,var(--success) 18%,var(--card));color:var(--success);}
.cu-anonymize-dialog{width:min(30rem,calc(100% - 2rem));}
.cu-consent-dialog{width:min(34rem,calc(100% - 2rem));}          /* one width for every step: the window never jumps */
.cu-consent-step{min-height:15rem;}
.cu-consent-step[hidden]{display:none;}
.cu-consent-list{margin:0 0 1rem;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);}
.cu-consent-row{display:flex;align-items:center;gap:.6rem;padding:.35rem .6rem;border-top:1px solid var(--border);font-size:.875rem;}
.cu-consent-row:first-child{border-top:0;}
.cu-consent-row > .text-muted{flex:1;font-size:.8125rem;}
.cu-consent-dialog .image-picker-card{text-decoration:none;}
.cu-consent-step[data-step="qr"]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.6rem;}
.cu-consent-step[data-step="qr"][hidden]{display:none;}
.cu-consent-qr{display:grid;place-items:center;width:13rem;height:13rem;margin-top:.5rem;}
.cu-consent-art-qr{display:grid;place-items:center;}
.cu-consent-art-qr .bi{font-size:6.5rem;line-height:1;color:#3b4a9e;}
.cu-consent-qr svg{display:block;width:13rem;height:13rem;}
.cu-consent-wait{margin:0;font-size:.875rem;}
.cu-consent-link{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.6875rem;}
.cu-consent-dialog [data-back]{margin-right:auto;gap:.35rem;}
.cu-consent-dialog [data-back][hidden]{display:none;}
.cu-anonymize-text{margin:0 0 1rem;font-size:.875rem;line-height:1.5;}
.cu-head-text{flex:1;min-width:0;}
.cu-head-name{font-size:1.125rem;font-weight:700;}
.cu-head-sub{color:var(--muted-foreground);font-size:.8125rem;}
.cu-fields{padding:0;overflow:hidden;}
.cu-similar{padding:0;overflow:hidden;}
.cu-similar-hint{margin:0;padding:.75rem 1rem;color:var(--muted-foreground);font-size:.8125rem;}
.cu-similar-row{display:grid;grid-template-columns:1.5rem minmax(0,1fr) auto auto auto;align-items:center;gap:.75rem;
  min-height:2.75rem;padding:.35rem 1rem;border-top:1px solid var(--border);font-size:.875rem;}
.cu-similar-name{color:inherit;}
.cu-reasons{display:flex;gap:.3rem;}
.cu-reason{padding:.1rem .45rem;border-radius:4px;background:var(--muted);color:var(--muted-foreground);font-size:.75rem;white-space:nowrap;}
.cu-links{padding:0;overflow:hidden;}
.cu-link-row{display:grid;grid-template-columns:1.5rem auto minmax(0,1fr) auto;align-items:center;gap:.75rem;min-height:2.6rem;
  padding:.3rem 1rem;border-top:1px solid var(--border);color:inherit;text-decoration:none;font-size:.875rem;}
.cu-link-row:first-child{border-top:0;}
a.cu-link-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.cu-link-row > img{width:1.3rem;height:1.3rem;object-fit:contain;}
.cu-link-sub{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted-foreground);}
.cu-link-date{color:var(--muted-foreground);font-size:.8125rem;white-space:nowrap;}
.cu-history-row{grid-template-columns:1.5rem minmax(0,1fr) auto auto;}
/* a preorder: a row (the card's fold, the window's list) is a button opening its card -- picture, number and what,
   amount and state, the day; a closed one muted */
button.cu-preorder{width:100%;margin:0;border:0;border-top:1px solid var(--border);background:none;font:inherit;color:inherit;
  text-align:left;cursor:pointer;}
.cu-preorder{grid-template-columns:1.8rem minmax(0,1fr) auto auto;}
.cu-preorder:is(:hover,:focus-visible){background:var(--accent);}
.cu-preorder > img{width:1.8rem;height:1.8rem;object-fit:contain;}
.cu-preorder .cu-link-main{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cu-preorder-closed > *{opacity:.55;}
.cu-po-row{display:grid;}
.cu-po-list > .cu-po-row:first-child{border-top:0;}
.cu-preorder-dialog{width:min(36rem,calc(100vw - 2rem));}
.cu-po-new{display:flex;justify-content:center;padding:0 0 var(--dialog-head);}
.cu-po-new + .cu-po-list{border-top:1px solid var(--border);}
.cu-preorder-dialog .rp-model{position:relative;flex:1 1 auto;justify-content:flex-end;}
.cu-preorder-dialog .rp-model-results{left:auto;right:0;}
.cu-preorder-dialog .rp-model-picked{display:inline-flex;align-items:center;gap:.4rem;height:1.9rem;}
.cu-preorder-dialog .rp-model-picked[hidden]{display:none;}
.cu-preorder-dialog .rp-model-picked img{width:1.3rem;height:1.3rem;object-fit:contain;}
.cu-po-card-head{display:flex;align-items:center;gap:.8rem;margin-bottom:var(--dialog-head);}
.cu-po-card-head > img{width:2.6rem;height:2.6rem;object-fit:contain;}
.cu-po-card-head .dialog-title{margin:0;}
.cu-po-state{font-size:.8125rem;color:var(--muted-foreground);}
.cu-po-state-open{color:var(--success,#16a34a);}
.cu-po-state-cancelled{color:var(--destructive);}
.cu-po-what{white-space:normal;text-align:right;}
.cu-po-terms{white-space:pre-line;font-size:.875rem;}
.cu-po-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;padding:var(--dialog-head) 0;}
.cu-po-actions[hidden],.cu-po-cancel[hidden]{display:none;}
/* a preorder's cancel: what becomes of the prepayment -- three rows to pick, the other account's select in its row */
.cu-po-cancel-head{margin:var(--dialog-head) 0 .5rem;font-weight:600;}
.cu-po-cancel .sheet-row{gap:.6rem;cursor:pointer;}
.cu-po-cancel .sheet-row > input[type=radio]{flex:none;margin:0;accent-color:var(--primary);}
.cu-po-cancel-account{max-width:13rem;}
.cu-po-actions .btn{display:inline-flex;align-items:center;gap:.4rem;}
.cu-history-icon{color:var(--muted-foreground);text-align:center;}
.cu-merge-intro{margin:0 0 var(--dialog-head);color:var(--muted-foreground);font-size:.8125rem;}
.cu-merge-rows{display:flex;flex-direction:column;margin:0 calc(-1 * var(--dialog-pad));}
.cu-merge-row{display:grid;grid-template-columns:8rem minmax(0,1fr) minmax(0,1fr);align-items:center;gap:.5rem;
  padding:.5rem var(--dialog-pad);border-top:1px solid var(--border);font-size:.875rem;}
.cu-merge-row[hidden]{display:none;}
.cu-merge-label{font-weight:600;}
.cu-merge-choice{display:flex;align-items:center;gap:.4rem;min-width:0;cursor:pointer;}
.cu-merge-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media (max-width:640px){
  .cu-row{grid-template-columns:1.5rem minmax(0,1fr);}
  .cu-row .cu-who{display:flex;flex-direction:column;gap:0;}
  .cu-row .cu-count,.cu-headings{display:none;}
  .cu-similar-row{grid-template-columns:1.5rem minmax(0,1fr) auto;}
  .cu-similar-row .cu-reasons,.cu-similar-row .cu-phone{display:none;}
}

/* a found customer: the line picks them, the link beside it opens their card */
.cp-line{display:flex;align-items:center;gap:.2rem;}
.cp-line > .ct-customer-row{flex:1;min-width:0;}
.cp-edit{flex:none;color:var(--muted-foreground);}
.ct-client-exists[hidden]{display:none;}
/* the cart's customer: the shared picker in the footer -- a field, the panel opening ABOVE it (the footer is low) */
.ct-customer .cp-search{width:16rem;}
.ct-customer .cp-panel{top:auto;bottom:calc(100% + .3rem);}
.ct-customer .cp-chip{height:2.25rem;padding:0 .4rem;background:transparent;font-size:.875rem;font-weight:400;}
.ct-customer .cp-chip:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.ct-customer .cp-search[hidden]{display:none;}
.btn-destructive-outline{color:var(--destructive);}
.btn-destructive-outline:disabled{color:var(--muted-foreground);}
.cu-head .tip{display:inline-flex;}
/* the cart's customer, folded: "Клиент не указан" as text with its picture, a field once clicked */
.cp-open{display:inline-flex;align-items:center;gap:.45rem;height:2.25rem;padding:0 .5rem;border:0;border-radius:calc(var(--radius) - 2px);
  background:none;font:inherit;font-size:.875rem;color:var(--muted-foreground);cursor:pointer;}
.cp-open img{width:1.25rem;height:1.25rem;object-fit:contain;}
.cp-open:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.cp-open[hidden]{display:none;}
/* a customer's card: the folded sections -- the head a row with the figure on the right, the rows inside as the lists' */
.cu-fold{padding:0;overflow:hidden;}
.cu-fold-head{display:flex;align-items:center;gap:.75rem;min-height:2.9rem;padding:0 1rem;cursor:pointer;list-style:none;font-size:.875rem;font-weight:600;}
.cu-fold-head::-webkit-details-marker{display:none;}
.cu-fold-head img{width:1.4rem;height:1.4rem;object-fit:contain;}
.cu-fold-head::after{content:"";width:.5rem;height:.5rem;margin-left:.25rem;border-right:2px solid var(--muted-foreground);border-bottom:2px solid var(--muted-foreground);transform:rotate(-45deg);transition:transform .15s;}
.cu-fold[open] > .cu-fold-head::after{transform:rotate(45deg);}
.cu-fold-head:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.cu-fold-figure{margin-left:auto;font-variant-numeric:tabular-nums;}
.cu-fold > .cu-link-row:first-of-type{border-top:1px solid var(--border);}
.cu-fold-icon{width:1.4rem;text-align:center;font-size:1.1rem;color:var(--muted-foreground);}

/* THE SHEET -- a window's body as iOS rows (the repair's windows first, 2026-10-26): edge to edge right under the
   title's line, a hairline between the rows, the footer's line closing the last; a row is a picture and a name on the
   left and the value -- text, or an invisible field -- on the right; a text to write is a row of its own, its field
   over the whole width; a row lights up under the pointer and while its field is typed in */
.sheet-rows{margin:0 calc(-1 * var(--dialog-pad));}
.dialog > form > .dialog-title:first-child + .sheet-rows{margin-top:0;}
.sheet-row{position:relative;display:flex;align-items:center;gap:.65rem;min-height:2.75rem;box-sizing:border-box;padding:.35rem var(--dialog-pad);
  border-top:1px solid var(--border);font-size:.875rem;}
.sheet-rows > .sheet-row:first-child,.sheet-rows > :first-child > .sheet-row:first-child{border-top:0;}
.rp-choices > .sheet-row:first-child{border-top:0;}
.sheet-rows > .rp-choices + .sheet-row,.sheet-rows > .sheet-row + .rp-choices:not(:empty){border-top:1px solid var(--border);}
label.sheet-row,.sheet-text-row{cursor:text;}
.sheet-row:not(.sheet-static):is(:hover,:focus-within){background:var(--accent);}
.sheet-row > img{width:1.4rem;height:1.4rem;object-fit:contain;flex:none;}
.sheet-label{min-width:0;}
.sheet-value{margin-left:auto;display:inline-flex;align-items:center;justify-content:flex-end;gap:.3rem;min-width:0;text-align:right;
  font-variant-numeric:tabular-nums;}
strong.sheet-value{font-weight:600;}
.sheet-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;text-align:right;outline:none;}
.sheet-input::placeholder,.sheet-text::placeholder{color:var(--muted-foreground);opacity:.8;}
.sheet-input-left{text-align:left;}
.sheet-amount{flex:0 1 10rem;}
.sheet-amount .sheet-input{font-variant-numeric:tabular-nums;}
.sheet-currency{color:var(--muted-foreground);}
.sheet-select{font-size:.875rem;}
.sheet-text-row{flex-direction:column;align-items:stretch;gap:.2rem;padding-block:.6rem;}
.sheet-text{width:100%;min-height:3rem;max-height:12rem;padding:0;border:0;background:transparent;color:var(--foreground);font:inherit;
  line-height:1.45;resize:none;field-sizing:content;outline:none;}
.sheet-counter{align-self:flex-end;min-height:1em;line-height:1;color:var(--muted-foreground);font-size:.6875rem;font-variant-numeric:tabular-nums;}
.sheet-muted{color:var(--muted-foreground);font-size:.8125rem;}
.sheet-check{gap:.5rem;cursor:pointer;}
.sheet-check[hidden]{display:none;}
.sheet-search > i{color:var(--muted-foreground);}
.sheet-error:empty{display:none;}
.sheet-error:not(:empty){margin:0;padding:.6rem 0;}
/* an account to pick, in a sheet's row: the invisible picture select -- the chosen account and its caret on the right */
.sheet-account{flex:0 1 16rem;}
.sheet-account .account-select{width:100%;}
.sheet-account .account-select-button{min-height:0;height:1.9rem;padding:0 .1rem 0 .4rem;border-color:transparent;background:transparent;box-shadow:none;
  justify-content:flex-end;gap:.35rem;font-size:.875rem;}
.sheet-account .account-select-button:is(:hover,:focus-visible,:has(:focus-visible)),.sheet-account .account-select-button[aria-expanded="true"]{background:transparent;}
.sheet-account .account-select-value{flex:0 1 auto;justify-content:flex-end;text-align:right;}
.sheet-account .logo,.sheet-account .post-account-avatar{width:1.4rem;height:1.4rem;}
.rp-list-dialog .rp-choices{min-height:6rem;}
.sheet-account .account-select-list{text-align:left;}

/* ---- a repair's page, the iOS groups (2026-10-27) ---- */
.rp-page{gap:0;}
.ig-caption{margin:1.25rem 0 .45rem .9rem;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);}
.ig-caption-small{display:block;font-size:.6875rem;color:var(--muted-foreground);}
.ig-group{padding:0;overflow:hidden;}
.ig-row{display:flex;align-items:center;gap:.75rem;min-height:2.85rem;padding:.4rem 1rem;font-size:.875rem;position:relative;}
.ig-row + .ig-row::before{content:"";position:absolute;top:0;left:3.15rem;right:0;border-top:1px solid var(--border);}
.ig-row > img,.ig-row > .rp-avatar,.ig-row > .rp-device-picture,.rp-combo-cell > img{width:1.4rem;height:1.4rem;object-fit:contain;flex:none;}
.ig-row > .rp-avatar{border-radius:50%;object-fit:cover;}
.ig-label{min-width:0;}
.ig-value{margin-left:auto;text-align:right;color:var(--muted-foreground);font-variant-numeric:tabular-nums;}
.ig-strong{color:var(--foreground);font-weight:600;}
.ig-due{color:var(--warning);}
.ig-mono{color:var(--foreground);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em;}
.ig-error .ig-value{color:var(--destructive);}
.ig-text-row{align-items:flex-start;padding-block:.6rem;}
.ig-text-row > img{margin-top:.1rem;}
.ig-text{display:flex;flex-direction:column;gap:.1rem;min-width:0;overflow-wrap:anywhere;}
.rp-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1rem;}
/* the head: the status pill on the left, the prints on the right */
.rp-top{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;}
.rp-status-pill{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .75rem .3rem .45rem;border-radius:999px;background:var(--card);box-shadow:var(--shadow-card);font-size:.8125rem;font-weight:600;}
.rp-status-pill img{width:1.2rem;height:1.2rem;object-fit:contain;}
.rp-status-finished,.rp-status-issued{color:var(--success);}
.rp-status-unrepaired,.rp-status-issued_unrepaired{color:var(--destructive);}
.rp-print-button{display:inline-flex;align-items:center;gap:.35rem;height:2rem;padding:0 .75rem;border-radius:999px;background:var(--card);box-shadow:var(--shadow-card);color:var(--foreground);font-size:.8125rem;text-decoration:none;}
button.rp-print-button{border:0;font-family:inherit;cursor:pointer;}
.rp-consent-given{cursor:default;color:var(--muted-foreground);border:1px solid transparent;transition:border-color .2s,color .2s;}
/* under the pointer (the tip around it: a disabled button takes none): no fill of the tip's own, a green outline, and
   the tick flows into a thumbs-up */
.rp-consent-tip:is(:hover,:focus-visible,:has(:focus-visible)){background:none;}
.rp-consent-tip:is(:hover,:focus-visible,:has(:focus-visible)) .rp-consent-given{border-color:color-mix(in srgb,var(--success) 55%,transparent);color:var(--foreground);}
.rp-consent-mark{position:relative;display:inline-block;width:1rem;height:1rem;color:var(--success);font-size:1rem;line-height:1;}
.rp-consent-mark .bi{position:absolute;inset:0;transition:opacity .25s,transform .25s;}
.rp-consent-mark .bi-hand-thumbs-up-fill{opacity:0;transform:scale(.6) rotate(-20deg);}
.rp-consent-tip:is(:hover,:focus-visible,:has(:focus-visible)) .rp-consent-mark .bi-check-circle-fill{opacity:0;transform:scale(.6);}
.rp-consent-tip:is(:hover,:focus-visible,:has(:focus-visible)) .rp-consent-mark .bi-hand-thumbs-up-fill{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){.rp-consent-mark .bi{transition:none;}}
.rp-print-button:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.rp-print-button img{width:1.05rem;height:1.05rem;}
/* customer and device */
.rp-identity{gap:1rem;}
.ig-hero{display:flex;align-items:center;gap:.85rem;padding:.85rem 1rem;color:inherit;text-decoration:none;}
a.ig-hero:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.ig-hero-picture{display:grid;place-items:center;width:2.75rem;height:2.75rem;flex:none;border-radius:.6rem;background:var(--muted);}
.ig-hero-picture img{width:1.9rem;height:1.9rem;object-fit:contain;}
.ig-hero-text{display:flex;flex-direction:column;min-width:0;}
.ig-chevron{margin-left:auto;color:var(--muted-foreground);}
/* the roadmap: steps on a line, compact -- a dot, the step's name and when */
.rp-road{display:flex;padding:.85rem .75rem .75rem;}
.rp-step{flex:1;display:flex;flex-direction:column;align-items:center;gap:.2rem;position:relative;min-width:0;text-align:center;}
.rp-step + .rp-step::before{content:"";position:absolute;top:.6rem;right:calc(50% + .8rem);left:calc(-50% + .8rem);height:2px;border-radius:2px;background:var(--border);}
.rp-step-done + .rp-step::before{background:var(--success);}
.rp-step-dot{display:grid;place-items:center;width:1.2rem;height:1.2rem;border-radius:50%;border:2px solid var(--border);background:var(--card);font-size:.7rem;}
.rp-step-done .rp-step-dot{border-color:var(--success);background:var(--success);color:#fff;}
.rp-step-current .rp-step-dot{border-color:var(--info);color:var(--info);font-size:.45rem;box-shadow:0 0 0 3px var(--info-bg);}
.rp-step-name{font-size:.75rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.rp-step-todo .rp-step-name{color:var(--muted-foreground);font-weight:500;}
.rp-step-current .rp-step-name{color:var(--info);}
.rp-step-at{font-size:.6875rem;color:var(--muted-foreground);font-variant-numeric:tabular-nums;min-height:1em;}
/* the actions: ONE row, equal buttons sharing the width; more than fit -- the row scrolls sideways */
.rp-actions{display:flex;flex-wrap:nowrap;gap:.25rem;padding:.6rem;overflow-x:auto;}
.rp-action{flex:1 1 0;min-width:5.25rem;width:auto;}
.rp-action-icon{border:0;background:var(--muted);border-radius:.7rem;}
.rp-action-main .rp-action-icon{background:var(--info-bg);}
.rp-action-main .rp-action-label{color:var(--info);font-weight:600;}
/* the history: by days (the day once, small caps), newest first; an event -- its picture on a thin axis, the text, who
   and its time on the right, quiet */
.rp-history{padding:.25rem 0 .5rem;}
.rp-day{padding:.85rem 1rem .3rem;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);}
.rp-history .rp-event{grid-template-columns:1.75rem minmax(0,1fr) auto 2.6rem;gap:.65rem;min-height:2.4rem;padding:.3rem 1rem;border-top:0;position:relative;}
.rp-event-icon{display:grid;place-items:center;width:1.75rem;height:1.75rem;border-radius:50%;background:var(--muted);position:relative;z-index:1;}
.rp-event-icon img{width:1rem;height:1rem;object-fit:contain;}
.rp-history .rp-event + .rp-event::before{content:"";position:absolute;left:calc(1rem + .875rem - 1px);top:-.55rem;height:1.1rem;border-left:2px solid var(--muted);}
.rp-history .rp-event-text{grid-column:auto;}                 /* the old narrow-screen rule spread it over the row */
.rp-history .rp-event-who{color:var(--muted-foreground);justify-self:end;}
.rp-history .rp-event-when{justify-self:end;}
@media (max-width:760px){
  .rp-groups{grid-template-columns:minmax(0,1fr);}
  .rp-identity{grid-template-columns:minmax(0,1fr);gap:.6rem;}
  .rp-step-at{display:none;}
  .rp-step-current .rp-step-at{display:block;}
  .rp-history .rp-event{grid-template-columns:1.75rem minmax(0,1fr) 2.6rem;}
  .rp-history .rp-event-who{display:none;}
}

/* the screen a customer signs their consent on (consent_sign.html): the shop's tablet or their own phone */
.auth-card.consent-card{width:min(44rem,calc(100% - 1.5rem));max-width:none;}
.consent-sign{display:flex;flex-direction:column;gap:.75rem;}
.consent-title{margin:0;font-size:1.125rem;font-weight:700;text-align:center;}
.consent-operator,.consent-who{margin:0;font-size:.875rem;}
.consent-text{font-size:.875rem;line-height:1.55;}
.consent-text h3{margin:.75rem 0 .25rem;font-size:.875rem;}
.consent-text p,.consent-text ul{margin:.35rem 0;}
.consent-text .pr-box{margin:.5rem 0;padding:.5rem .6rem;border:1px solid var(--border);border-radius:4px;font-weight:600;}
.consent-agree{display:flex;align-items:flex-start;gap:.5rem;font-size:.875rem;cursor:pointer;}
.consent-agree input{margin-top:.2rem;width:1.1rem;height:1.1rem;}
.consent-pad-caption{display:flex;justify-content:space-between;align-items:center;font-size:.8125rem;color:var(--muted-foreground);}
.consent-pad{display:block;width:100%;border:1px dashed var(--input);border-radius:calc(var(--radius) - 2px);background:#fff;touch-action:none;cursor:crosshair;}
.consent-brand{gap:.6rem;}
.consent-logo{max-height:2.5rem;max-width:8rem;object-fit:contain;}
.consent-done{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 1rem;text-align:center;}
.consent-done .bi{font-size:3rem;color:var(--success);}
.consent-gone .bi{color:var(--muted-foreground);}
.consent-done[hidden],.consent-sign[hidden]{display:none;}

.setting-confirm-dialog{width:min(32rem,calc(100% - 2rem));}
.setting-confirm-text{margin:0 0 .5rem;font-size:.875rem;line-height:1.55;white-space:pre-line;}

/* a repair's description: a COMBINED row -- two fields side by side, a hairline between (repair.html) */
.rp-combo{display:grid;grid-template-columns:1fr;align-items:stretch;gap:0;padding-block:.6rem;}
.rp-combo-two{grid-template-columns:1fr 1fr;}
.rp-combo-cell{display:flex;align-items:flex-start;gap:.75rem;min-width:0;}
.rp-combo-cell > img{margin-top:.1rem;}
.rp-combo-two .rp-combo-cell + .rp-combo-cell{margin-left:1rem;padding-left:1rem;border-left:1px solid var(--border);}
@media (max-width:640px){.rp-combo-two{grid-template-columns:1fr;}
  .rp-combo-two .rp-combo-cell + .rp-combo-cell{margin:.6rem 0 0;padding:.6rem 0 0;border-left:0;border-top:1px solid var(--border);}}
.rp-rework{margin-left:.75rem;flex:none;}
.ig-error-text{color:var(--destructive);}

/* a dialog's two parts apart (the refund: what is cancelled / the account): one EMPTY row of a row's height --
   no fill, no hover, no click */
.sheet-gap{height:2.75rem;box-sizing:border-box;margin:0 calc(-1 * var(--dialog-pad));border-top:1px solid var(--border);border-bottom:1px solid var(--border);pointer-events:none;}
.sheet-rows [hidden]{display:none;}
.rp-account-shown{display:inline-flex;align-items:center;gap:.4rem;}

/* the part picker's rows: the item's picture as it is (no circle), the name on one line cut with "…" (the whole in its
   tooltip), the cost in a column wide enough for a six-figure sum and its sign -- never wrapped */
.rp-choice > .rp-part-picture{width:1.8rem;height:1.8rem;object-fit:contain;border-radius:0;flex:none;}
.rp-part-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rp-part-cost{flex:none;min-width:6.5rem;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
[data-part-results] .rp-choice > .rp-pill{flex:none;min-width:3.4rem;justify-content:center;}   /* the numbers one width: the names start in one column */
[data-part-results] .rp-choice-tick{display:none;}   /* the cost at the right edge: a chosen part is told by its row's fill */

/* a tooltip drawn from a <template> (tooltip.js data-tip-html): compact rows -- a picture, the name cut short, the sum */
.tip-text{max-width:22rem;white-space:normal;line-height:1.35;}
.tip-text + .tip-text{margin-top:.35rem;}
.tip-text-muted{color:var(--muted-foreground);font-size:.75rem;}
.tip-rows{display:flex;flex-direction:column;gap:.3rem;min-width:16rem;white-space:normal;}   /* the bubble keeps line breaks: not here */
.tip-row{display:flex;align-items:center;gap:.45rem;font-size:.75rem;line-height:1.3;}
.tip-row > img,.tip-row > .logo{flex:none;width:1.25rem;height:1.25rem;object-fit:contain;}
.tip-row > .tip-row-face{border-radius:50%;object-fit:cover;}
.tip-row-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tip-row-sum{flex:none;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums;}

.od-cancel-text{margin:0 0 .25rem;font-size:.875rem;line-height:1.5;white-space:pre-line;}   /* the outgoing delivery's cancel window: what happens */
.od-net-above{gap:.5rem;justify-content:flex-start;color:#b45309;font-size:.8125rem;font-weight:600;}   /* the net above the original total */
.od-net-above[hidden]{display:none;}

/* the board's «Архив»: a tile after the last column's cards, and its window -- a search box, the repairs found */
.rp-archive-tile{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;padding:.75rem;border:0;font:inherit;
  font-size:.875rem;font-weight:600;color:var(--muted-foreground);cursor:pointer;}
.rp-archive-tile img{width:1.6rem;height:1.6rem;object-fit:contain;}
.rp-archive-tile:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);background:var(--row-hover);}
.rp-archive-dialog{width:min(40rem,calc(100% - 2rem));height:min(85dvh,36rem);}
.rp-archive-dialog[open]{display:flex;flex-direction:column;}
.rp-archive-search{display:block;flex:none;margin:var(--dialog-head) 0 .5rem;}   /* not the search box's flex:1 -- the list grows, not the box */
.rp-archive-row .rp-card-tag{flex:none;width:3.25rem;}
.rp-archive-list{flex:1;overflow:auto;margin:0 calc(-1 * var(--dialog-pad,1.5rem));border-top:1px solid var(--border);}
.rp-archive-row{display:flex;align-items:center;gap:.75rem;padding:.5rem var(--dialog-pad,1.5rem);border-bottom:1px solid var(--border);color:inherit;text-decoration:none;}
.rp-archive-row:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--row-hover);}
.rp-archive-main{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0;}
.rp-archive-side{display:flex;flex-direction:column;align-items:flex-end;gap:.15rem;font-size:.8125rem;text-align:right;}
.rp-archive-state{font-weight:600;}
.rp-archive-empty{padding:1.5rem;text-align:center;color:var(--muted-foreground);}

/* the cart's customers' balances (sales.balance_holders): the tile muted while the chosen balance is short of the cart;
   whose balance, a list of the customers holding money, a short one muted (still picked for a mixed payment) */
.ct-account.ct-account-short{opacity:.45;cursor:not-allowed;}
.ct-holders .dialog-choice-list{display:flex;flex-direction:column;}
.ct-holder{display:flex;align-items:center;gap:.65rem;width:100%;min-height:2.8rem;padding:.4rem var(--dialog-pad);border:0;
  border-bottom:1px solid var(--border);background:none;font:inherit;text-align:left;cursor:pointer;}
.ct-holder:is(:hover,:focus-visible){background:var(--accent);}
.ct-holder > img{width:1.5rem;height:1.5rem;object-fit:contain;}
.ct-holder-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ct-holder-short{opacity:.5;cursor:not-allowed;}
/* a repair's payment from its customer's balance: one row-button of the payment window, pressed = it pays */
button.rp-holder{width:100%;border:0;border-top:1px solid var(--border);background:none;font:inherit;color:inherit;text-align:left;}
.rp-holder.rp-holder-on{background:var(--sh-blue);}
.rp-holder.rp-holder-on .rp-choice-tick{visibility:visible;}
.sheet-rows [data-account-row][hidden]{display:none;}
.dr-cancel-balance{margin:.4rem 0 .8rem;padding:.55rem .8rem;border-radius:var(--radius);background:var(--sh-blue);font-size:.875rem;}
.dr-cancel-balance p{margin:.1rem 0;}
/* the preorders' list under the header's counter: number, customer and what -- one line, cut */
.header-count-link span{max-width:22rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* a repair's photos: thumbnails in the history, each opening the picture whole */
.rp-photos{display:inline-flex;flex-wrap:wrap;gap:.3rem;vertical-align:middle;}
.rp-photo{display:inline-block;width:3rem;height:3rem;border-radius:4px;overflow:hidden;border:1px solid var(--border);}
.rp-photo img{width:100%;height:100%;object-fit:cover;display:block;}
.rp-photo:is(:hover,:focus-visible){border-color:var(--primary);}
/* a category's picture in the select with pictures (the expense / income form) */
.category-picture{width:1.6rem;height:1.6rem;object-fit:contain;flex:none;}
.category-picture-empty{display:inline-block;}
/* a new expense / income (record_new.html): first the category -- a row each with its picture --, then the details
   under the category picked (its picture and name, the way back on the left) */
.rc-categories,.rc-form{max-width:36rem;padding:0;overflow:hidden;--rc-head:3.25rem;--rc-row:2.75rem;--dialog-pad:1.2rem;}
.rc-title{display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--rc-head);margin:0;padding:0 1.2rem;font-size:1rem;font-weight:600;border-bottom:1px solid var(--border);}
.rc-category{display:flex;align-items:center;gap:.7rem;box-sizing:border-box;height:var(--rc-row);padding:0 1.2rem;border-top:1px solid var(--border);color:inherit;text-decoration:none;font-size:.875rem;font-weight:400;}
.rc-title + .rc-category{border-top:0;}
.rc-category:is(:hover,:focus-visible){background:var(--accent);}
.rc-category img,.rc-category-empty{width:1.6rem;height:1.6rem;object-fit:contain;flex:none;}
.rc-empty{padding:1rem 1.2rem;margin:0;}
.rc-head{display:flex;align-items:center;justify-content:center;gap:.6rem;position:relative;box-sizing:border-box;height:var(--rc-head);margin:0;padding:0 1.2rem;border-bottom:1px solid var(--border);}
.rc-head img{width:1.8rem;height:1.8rem;object-fit:contain;}
.rc-head-name{font-size:1rem;font-weight:600;}
.rc-back{position:absolute;left:.6rem;top:50%;transform:translateY(-50%);}
.rc-people{display:flex;flex-wrap:wrap;gap:.4rem;justify-content:flex-end;}
/* the second step's rows: the card's own padding is the rows' inset, the rows run edge to edge */
.rc-rows{margin:0;border-bottom:1px solid var(--border);}
.rc-rows .sheet-row{box-sizing:border-box;min-height:var(--rc-row);padding-block:0;gap:.7rem;}
.rc-rows .sheet-row > img{width:1.6rem;height:1.6rem;}       /* the first step's pictures */
.rc-form .form-actions{margin:0;padding:.75rem 1.2rem;}
/* the currency switch of an expense / income (2026-10-31): the accounts follow it */
.currency-switch{display:inline-flex;padding:2px;border-radius:calc(var(--radius) - 2px);background:var(--muted);gap:2px;}
.currency-switch-item{display:inline-flex;align-items:center;gap:.3rem;padding:.2rem .6rem;border-radius:calc(var(--radius) - 4px);
  font-size:.8125rem;font-weight:500;color:var(--muted-foreground);cursor:pointer;}
.currency-switch-item input{position:absolute;opacity:0;pointer-events:none;}
.currency-switch-item img{width:1rem;height:1rem;object-fit:contain;border-radius:2px;}
.currency-switch-item:is(:hover,:focus-visible,:has(:focus-visible)){color:var(--foreground);}
.currency-switch-item:has(input:checked){background:var(--card);color:var(--foreground);box-shadow:var(--shadow-sm);}
/* a personal account in another currency: its currency on the face's corner */
.member-avatar:has(> .face-currency){position:relative;overflow:visible;}
.face-currency{position:absolute;right:-.35rem;bottom:-.25rem;padding:0 .2rem;border-radius:3px;background:var(--primary);
  color:#fff;font-size:.5rem;font-weight:700;line-height:1.35;letter-spacing:.02em;}
.rc-month{width:auto;cursor:pointer;text-align-last:right;}
.rc-comment{flex:0 1 20rem;}
.rc-rows .rc-whom{justify-content:center;padding-block:.5rem;}
.rc-whom .rc-people{justify-content:center;}
.rc-whom .rc-person{width:7rem;padding:.35rem .3rem;}
.rc-whom .rc-person img{width:2rem;height:2rem;}
.rc-person{display:flex;flex-direction:column;align-items:center;gap:.25rem;width:5.2rem;padding:.45rem .3rem;border:1px solid var(--border);
  border-radius:var(--radius);background:var(--card);font-size:.75rem;text-align:center;cursor:pointer;opacity:.55;}
.rc-person input{position:absolute;opacity:0;pointer-events:none;}
.rc-person img{width:2.4rem;height:2.4rem;border-radius:50%;object-fit:cover;}
.rc-person .bi{font-size:1.8rem;}
.rc-person span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rc-person:is(:hover,:focus-visible,:has(:focus-visible)){opacity:.85;}
.rc-person:has(input:checked){opacity:1;border-color:var(--primary);background:var(--sh-blue);}
.rc-memo{position:absolute;right:1.2rem;top:50%;transform:translateY(-50%);color:var(--muted-foreground);font-size:1rem;cursor:help;}
.rc-memo-text{white-space:normal;}           /* the bubble keeps line breaks (pre-line); the template's own are not text */
.rc-memo-text p{margin:0 0 .5rem;}
.rc-memo-text p:last-child{margin:0;}
.rc-memo-plus,.rc-memo-minus{padding:.05rem .35rem;border-radius:4px;font-weight:600;white-space:nowrap;}
.rc-memo-plus{background:#dcfce7;color:#166534;}
.rc-memo-minus{background:#fee2e2;color:#991b1b;}
.rc-memo:is(:hover,:focus-visible){color:var(--primary);}
.hint-line{display:block;}
.hint-line + .hint-line{margin-top:.35rem;}
.hint-list{display:flex;flex-direction:column;gap:.35rem;margin:.4rem 0 0;}
.hint-item{position:relative;padding-left:1.2rem;}
.hint-para{display:block;margin-top:.2rem;}
/* a folded kind (2026-11-02): its first line a HEADER row -- the dot, the name, «подробнее» at the right edge -- on a
   faint band; what it folds under it, indented */
details.hint-item{padding-left:0;}
details.hint-item::before{content:none;}
details.hint-item > summary{list-style:none;cursor:pointer;position:relative;display:flex;align-items:baseline;gap:.4rem;
  padding:.4rem .6rem .4rem 1.6rem;border-radius:calc(var(--radius) - 2px);background:color-mix(in srgb,var(--info) 7%,transparent);}
details.hint-item > summary::before{content:"";position:absolute;left:.55rem;top:.68rem;width:.65rem;height:.65rem;border-radius:50%;
  background:var(--muted-foreground);}
details.hint-item > summary:is(:hover,:focus-visible,:has(:focus-visible)){background:color-mix(in srgb,var(--info) 12%,transparent);}
details.hint-item[open] > summary{border-bottom-left-radius:0;border-bottom-right-radius:0;}
details.hint-item > .hint-para,details.hint-item > .hint-bullets{margin-left:1.6rem;margin-right:.6rem;}
details.hint-item > .hint-para:first-of-type{margin-top:.45rem;}
details.hint-item > summary .hint-text{flex:1;min-width:0;}
details.hint-item > summary::-webkit-details-marker{display:none;}
/* «подробнее ⌄» / «свернуть ⌃»: a link-like word in the accent colour says the line opens (2026-11-02) */
.hint-more{display:inline-flex;align-items:center;gap:.2rem;margin-left:auto;color:var(--info);font-size:.75rem;font-weight:500;white-space:nowrap;}
.hint-more-close{display:none;}
details.hint-item[open] .hint-more-open{display:none;}
details.hint-item[open] .hint-more-close{display:inline;}
.hint-fold{display:inline-block;font-size:.65rem;transition:transform .15s;}
details.hint-item[open] .hint-fold{transform:rotate(180deg);}
details.hint-item > summary:is(:hover,:focus-visible,:has(:focus-visible)) .hint-more{text-decoration:underline;text-underline-offset:2px;}
.hint-bullets{display:block;margin:.2rem 0 0;padding-left:1.1rem;}
.hint-bullet{display:list-item;list-style:disc;}
/* a larger dot than a list's, in its kind's colour (the accounts list's kind icons): «Какие бывают счета» */
.hint-item::before{content:"";position:absolute;left:.1rem;top:.38em;width:.65rem;height:.65rem;border-radius:50%;background:var(--muted-foreground);}
#rights .personal-account-balance{margin-top:.8rem;margin-bottom:0;}
/* a transfer's form (transfer_new.html, 2026-10-30): the expense's rows; the yellow frame of a personal account under them */
.tr-personal{margin:.75rem 1.2rem 0;}
/* from -> to on ONE row twice as tall (Legacy's transfers.php): two buttons, a picture over its caption, an arrow between;
   each opens a window of the accounts as tiles (account_picker) */
.rc-rows .tr-pair{min-height:calc(var(--rc-row) * 2);padding:.4rem 1.2rem;gap:.5rem;align-items:stretch;}
.ap-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.3rem;flex:1 1 0;min-width:0;
  padding:.3rem .5rem;border:0;border-radius:calc(var(--radius) - 2px);background:none;color:var(--foreground);font:inherit;
  font-size:.875rem;cursor:pointer;}
.ap-button:is(:hover,:focus-visible){background:var(--accent);}
.ap-button .ap-face img,.ap-button .ap-face .logo,.ap-button .ap-face .post-account-avatar{width:2.2rem;height:2.2rem;object-fit:contain;}
.ap-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ap-face{display:inline-flex;flex:none;}
.tr-arrow{flex:none;align-self:center;display:grid;place-items:center;width:2.4rem;height:2.4rem;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;}
.tr-arrow img{grid-area:1/1;width:1.8rem;height:1.8rem;object-fit:contain;transition:opacity .15s,transform .25s;}
.tr-arrow .tr-arrow-swap{opacity:0;transform:rotate(-90deg);}
.tr-arrow:is(:hover,:focus-visible,:has(:focus-visible)) .tr-arrow-still{opacity:0;}
.tr-arrow:is(:hover,:focus-visible,:has(:focus-visible)) .tr-arrow-swap{opacity:1;transform:none;}
.tr-arrow:active .tr-arrow-swap{transform:rotate(180deg);}
.ap-dialog{width:min(32rem,calc(100% - 2rem));}
.ap-group{margin:.8rem 0 .4rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);}
.ap-dialog > .dialog-title + .ap-group{margin-top:0;}
.ap-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;}   /* four to a row (2026-11-17) */
.ap-dialog > .dialog-title + .ap-tiles{margin-top:0;}
.ap-option{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;padding:.5rem .3rem;border:1px solid var(--border);
  border-radius:calc(var(--radius) - 2px);background:none;color:var(--foreground);font:inherit;font-size:.8125rem;cursor:pointer;}
.ap-option .ap-face .logo,.ap-option .ap-face .post-account-avatar{width:2rem;height:2rem;}
.ap-option-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ap-option:is(:hover,:focus-visible){background:var(--accent);}
.ap-option[aria-selected="true"]{border-color:var(--primary);background:var(--sh-blue);}
.ap-dialog .dialog-actions{margin-top:var(--dialog-head);}
/* the plain transfer's accounts in sets by currency: the symbol as the caption, the accounts under it */
.ap-currency{margin:.9rem 0 0;padding:0;border:0;min-width:0;}
.ap-currency[hidden]{display:none;}
.ap-currency-label{display:block;width:100%;padding:0;margin-bottom:.4rem;font-size:.875rem;font-weight:600;color:var(--foreground);}
.ap-currency > .ap-group:first-of-type{margin-top:.2rem;}
/* a new account (account_new.html): the kinds a row each, the chosen one ticked; then the details */
.an-kind{cursor:pointer;}
.an-kind input{position:absolute;opacity:0;pointer-events:none;}
.an-kind > img{width:1.6rem;height:1.6rem;object-fit:contain;}
.rc-rows .an-kind{padding-block:.45rem;}
.an-kind-text{display:flex;flex-direction:column;min-width:0;}
.an-kind-text small{font-size:.75rem;}
.an-kind-check{margin-left:auto;color:var(--primary);font-size:1.15rem;visibility:hidden;}
.an-kind:has(input:checked) .an-kind-check{visibility:visible;}
.an-details{border-top:1px solid var(--border);margin-top:var(--rc-row);}     /* one empty row between the groups */
.an-icon{padding:0;border:0;background:none;cursor:pointer;}
.an-name-row{gap:.7rem;}
.an-name-row .sheet-input{flex:1 1 auto;}
/* the sticker stands where every other row's picture does: the same box, no button frame around it */
.an-name-row .an-icon{flex:0 0 1.6rem;width:1.6rem;min-width:0;max-width:1.6rem;height:1.6rem;margin:0;padding:0;border:0;}
.an-name-row .an-icon .logo{width:1.6rem;height:1.6rem;padding:0;}
.an-fee[hidden]{display:none;}
/* the currency: a row's button opening a window of the main currencies, then «Другая валюта» (every one, searched) */
.cu-pick{display:inline-flex;align-items:center;gap:.4rem;padding:0;border:0;background:none;color:var(--foreground);font:inherit;font-size:.875rem;font-weight:500;cursor:pointer;}
.cu-pick img{width:1.3rem;height:1.3rem;object-fit:contain;border-radius:3px;}
.cu-pick img[hidden]{display:none;}
.cu-pick .bi{font-size:.75rem;color:var(--muted-foreground);}
.cu-dialog{width:min(26rem,calc(100% - 2rem));}
.cu-search{flex:none;margin:0 0 var(--dialog-head);}
.cu-search[hidden]{display:none;}
.cu-list{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow-y:auto;margin:0 calc(-1 * var(--dialog-pad)) -1px;border-top:1px solid var(--border);}
.cu-option{display:flex;align-items:center;gap:.65rem;width:100%;min-height:2.8rem;padding:.4rem var(--dialog-pad);border:0;
  border-bottom:1px solid var(--border);background:none;color:var(--foreground);font:inherit;font-size:.875rem;text-align:left;cursor:pointer;}
.cu-option[hidden]{display:none;}
.cu-option:is(:hover,:focus-visible){background:var(--accent);}
.cu-option.cu-chosen{background:var(--sh-blue);}
.cu-option img,.cu-blank{width:1.5rem;height:1.5rem;object-fit:contain;flex:none;border-radius:3px;}
.cu-option strong{min-width:2.6rem;}
.cu-other{color:var(--primary);}
.cu-other .bi{width:1.5rem;text-align:center;}
.tr-rate{flex:0 1 16rem;}                       /* "1 USD =" before the rate, the other currency after it */
.tr-rate .sheet-currency{white-space:nowrap;}
.tr-rate .sheet-input{flex:0 0 auto;width:auto;min-width:1.5ch;field-sizing:content;}
.tr-hint-row{justify-content:flex-end;min-height:2rem !important;}
/* OUT: the customer chosen in a window of those who hold money (searchable) */
.tr-holder-open{width:100%;border:0;border-top:1px solid var(--border);background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;}
.rc-rows > .tr-holder-open:first-child{border-top:0;}
.tr-holder-open .sheet-value{gap:.5rem;}
#holder-name{font-weight:500;}
.tr-holders-search{flex:none;margin:0 0 var(--dialog-head);}
.tr-holders-list{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow-y:auto;margin:0 calc(-1 * var(--dialog-pad)) -1px;border-top:1px solid var(--border);}
.tr-holder{display:flex;align-items:center;gap:.65rem;width:100%;min-height:2.8rem;padding:.4rem var(--dialog-pad);border:0;
  border-bottom:1px solid var(--border);background:none;color:var(--foreground);font:inherit;font-size:.875rem;text-align:left;cursor:pointer;}
.tr-holder[hidden]{display:none;}
.tr-holder:is(:hover,:focus-visible){background:var(--accent);}
.tr-holder-chosen{background:var(--sh-blue);}
.tr-holder > img{width:1.5rem;height:1.5rem;object-fit:contain;flex:none;}
.tr-holder-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tr-holders-none{margin:0;padding:1rem var(--dialog-pad);}
.tr-customer{flex:0 1 20rem;}
.rc-form:has(.tr-customer){overflow:visible;}     /* the picker's panel reaches past the card */
.tr-customer .cp-panel{text-align:left;}
.tr-customer .cp{width:100%;}
.tr-customer .cp-search{text-align:right;border:0;background:transparent;box-shadow:none;padding:0 1px 0 .35rem;height:auto;}  /* a little room at the left: with none the first letter was clipped */
/* the member page's «Права и настройки»: rows inside a card that has its own padding -- the rows add none at the sides,
   and do not light up */
#rights .setting{min-height:0;padding:.6rem 0;cursor:default;}
#rights .setting:is(:hover,:focus-visible,:has(:focus-visible)){background:none;}
#rights .settings{border-top:1px solid var(--border);}
/* the member page's face: the picture itself (a transparent PNG of the palette) -- no grey disc behind it */
.member-head .member-avatar:has(img){background:none;border-radius:0;}
/* a right the role fixes (on: the role has it; off: not for this role): its lock says which, the label muted when off */
.rights-lock{color:var(--muted-foreground);font-size:.85rem;margin-right:.35rem;cursor:help;}
#rights .setting[data-fixed="none"] .setting-label{color:var(--muted-foreground);}
#rights .setting[data-fixed] .toggle{cursor:default;}
.ap-option[hidden]{display:none;}
.ap-tiles[hidden],.ap-group[hidden]{display:none;}

/* a foreign waybill's total: each currency's sum followed by its own accounts' logos (_waybill_total.html total_with) */
.wd-total-split{display:inline-flex;align-items:center;gap:.35rem;flex-wrap:wrap;}
.wd-total-plus{color:var(--muted-foreground);}

/* Управление -> Счета: the currency goods' prices are shown in (prices.py) */
.pc-card{margin-bottom:1rem;padding:0;overflow:hidden;--dialog-pad:1rem;}
.pc-row .hint-help{color:var(--muted-foreground);cursor:help;}

/* the waybill item form: a price beside its figure in the prices' currency (prices.py) -- two fields on one row; the
   purchase price's other figure is read only */
.wb-row-value.wb-pair{display:grid;grid-template-columns:repeat(2,6.25rem);gap:.2rem;justify-content:end;}
.wb-row-value.wb-pair > .amount-field{position:relative;display:block;min-width:0;--suffix-gap:.2rem;--suffix-edge:.45rem;}
.wb-row-value.wb-pair .input{width:100%;padding-left:.45rem;}
.wb-pair-shown .input{background:var(--muted);color:var(--muted-foreground);cursor:default;}

/* a money account's sticker with its currency on it (an account chooser of several currencies) */
.face-wrap{position:relative;display:inline-flex;flex:none;}
/* Прочее -> Предзаказы (preorders.html): a row per preorder, opening its card on the customer's page */
.po-list{padding:0;overflow:hidden;}
.po-row{display:grid;grid-template-columns:2.6rem minmax(0,1fr) auto auto;align-items:center;gap:.8rem;padding:.6rem 1rem;
  border-bottom:1px solid var(--border);color:var(--foreground);text-decoration:none;}
.po-row:last-child{border-bottom:0;}
.po-row:is(:hover,:focus-visible){background:var(--accent);}
.po-picture{width:2.6rem;height:2.6rem;object-fit:contain;}
.po-main,.po-money,.po-when{display:flex;flex-direction:column;min-width:0;}
.po-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.po-sub{font-size:.8125rem;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.po-money{align-items:flex-end;}
.po-paid{display:inline-flex;align-items:center;gap:.35rem;font-weight:600;}
.po-when{align-items:flex-end;font-size:.875rem;white-space:nowrap;min-width:9rem;}
.po-state-done{color:var(--success,#15803d);}
.po-state-cancelled{color:var(--destructive);}
@media (max-width:640px){.po-row{grid-template-columns:2.6rem minmax(0,1fr) auto;}.po-when{grid-column:2 / -1;align-items:flex-start;}}
/* Клиенты: what was typed, offered as a new customer, above what was found (customers.js) */
.cu-add{margin-bottom:.6rem;}
.cu-add-row{display:flex;align-items:center;gap:.6rem;width:100%;padding:.65rem 1rem;border:0;background:none;
  color:var(--foreground);font:inherit;text-align:left;cursor:pointer;}
.cu-add-row img{width:1.4rem;height:1.4rem;object-fit:contain;}
.cu-add-row:is(:hover,:focus-visible){background:var(--accent);}
/* the finish windows: «Согласовать другую сумму» beside the automatic payout (2026-11-01) */
.rp-payout-other{margin-left:.6rem;flex:none;}
.rp-payout-other.active{background:var(--accent);}

/* an investor's interest under its row on the balance page (money.investor_interest, 2026-11-02) */
.interest-row{gap:.75rem;padding-top:.35rem;padding-bottom:.35rem;font-size:.8125rem;}
.interest-what{flex:1;min-width:0;padding-left:2.4rem;color:var(--muted-foreground);}
.interest-figures{display:inline-flex;align-items:center;gap:.6rem;font-variant-numeric:tabular-nums;}
/* the repair payment's surcharge choice (2026-11-02): the mode in force marked */
.rp-modes{justify-content:center;padding:.5rem var(--dialog-pad, 1rem);}
.rp-modes .ct-mode-small.active{border-color:var(--primary);background:var(--sh-blue);}

/* the finish windows (2026-11-02): the price is typed -- a dashed line under it says so; what follows from it is plain */
.rp-dialog input[data-price]{flex:none;width:auto;min-width:2ch;border-radius:0;font-variant-numeric:tabular-nums;
  --price-dash:color-mix(in srgb,var(--muted-foreground) 45%,transparent);
  padding-inline:0;background:linear-gradient(to right,var(--price-dash) 60%,transparent 0) center bottom/7px 1px repeat-x;}
  /* as wide as the figure (repairs.js sizes it); a light grey dash under it, longer than a border's dots */
.rp-dialog input[data-price]:is(:hover,:focus-visible,:has(:focus-visible)){--price-dash:var(--primary);}
.rp-dialog input[data-price]:focus{background:none;}          /* typing: no dash */

.hint > span:has(.hint-list){flex:1;min-width:0;}      /* the folded rows run the whole width, folded or not */
details.hint-item{display:block;width:100%;}
/* the folded rows from the hint's left edge, under its (i) too; an open one framed in its header's colour, rounded below */
.hint-list:has(details.hint-item){margin-left:-1.6rem;}
details.hint-item[open]{border:1px solid color-mix(in srgb,var(--info) 7%,transparent);border-radius:calc(var(--radius) - 2px);
  padding-bottom:.5rem;}
details.hint-item[open] > summary{margin:-1px -1px 0;}
details.hint-item > .hint-para:first-of-type,details.hint-item > .hint-bullets:first-child{margin-top:.45rem;}

/* between branches (2026-11-02): an account's face carries its branch's badge in the corner */
.ap-face{position:relative;}
.ap-branch-badge{position:absolute;right:-.35rem;bottom:-.3rem;display:inline-flex;border-radius:50%;background:var(--card);
  box-shadow:0 0 0 2px var(--card);}
.ap-face .ap-branch-badge .logo,.ap-button .ap-face .ap-branch-badge .logo,.ap-option .ap-face .ap-branch-badge .logo{
  width:1rem;height:1rem;font-size:.5rem;}
.ap-face .ap-branch-badge svg,.ap-face .ap-branch-badge img{width:100%;height:100%;}
.ap-face:has(.ap-branch-badge) .face-currency{left:-.4rem;right:auto;}      /* the currency left, the branch right */
.tr-arrow.tr-arrow-fixed{cursor:default;}

/* Управление → Счета: «Какие бывают счета» unfolded (2026-11-03) -- paragraphs with air between them, a slightly
   larger line height; the fees as a list, each name in bold; an EXAMPLE in a warm box, what it means IN THE BALANCES
   in a cool one, a NOTE in a neutral one -- each box with its small caption and icon */
.guide-body{display:flex;flex-direction:column;gap:.6rem;margin:.55rem .7rem .7rem 1.6rem;font-size:.8125rem;line-height:1.55;color:var(--foreground);}
.guide-para{display:block;}
.guide-fees{display:flex;flex-direction:column;gap:.3rem;margin:-.25rem 0 0;padding-left:1.1rem;}
.guide-fee{display:list-item;list-style:disc;}
.guide-fee::marker{color:var(--muted-foreground);}
.guide-box{display:block;padding:.55rem .75rem;border-radius:calc(var(--radius) - 2px);border-left:3px solid;}
.guide-box-label{display:flex;align-items:center;gap:.35rem;margin-bottom:.2rem;font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;}
.guide-example{background:#fff8e6;border-color:#e0a526;}
.guide-example .guide-box-label{color:#9a6a00;}
.guide-balance{background:#eef4ff;border-color:#5b8def;}
.guide-balance .guide-box-label{color:#2f5fc4;}
.guide-note{background:#f3f4f6;border-color:#9ca3af;}
.guide-note .guide-box-label{color:#4b5563;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .guide-example{background:#3a2f12;}:root:not([data-theme="light"]) .guide-balance{background:#1b2742;}:root:not([data-theme="light"]) .guide-note{background:#24272d;}:root:not([data-theme="light"]) .guide-example .guide-box-label{color:#f2c25b;}:root:not([data-theme="light"]) .guide-balance .guide-box-label{color:#9db9f5;}:root:not([data-theme="light"]) .guide-note .guide-box-label{color:#c3c8d0;}}
:root[data-theme="dark"] .guide-example{background:#3a2f12;}
:root[data-theme="dark"] .guide-balance{background:#1b2742;}
:root[data-theme="dark"] .guide-note{background:#24272d;}
:root[data-theme="dark"] .guide-example .guide-box-label{color:#f2c25b;}
:root[data-theme="dark"] .guide-balance .guide-box-label{color:#9db9f5;}
:root[data-theme="dark"] .guide-note .guide-box-label{color:#c3c8d0;}

/* «Какие бывают счета» (2026-11-04, the owner): each folded row in the very tint of the accounts list's rows of its
   kind, a touch more under the pointer and while open, and half as tall again; the kind told by its SYMBOL -- the
   list's own (wallet, percent, piggy bank; a badge for employees, a heart for customers) -- in the kind's colour */
details.hint-item[class*="account-guide-"] > summary{align-items:center;min-height:2.6rem;box-sizing:border-box;padding:.55rem .6rem .55rem 2rem;
  background:color-mix(in srgb,var(--kind) calc(var(--kind-tint-share) * 2),var(--card));}
details.hint-item[class*="account-guide-"] > summary:is(:hover,:focus-visible,:has(:focus-visible)),
details.hint-item[class*="account-guide-"][open] > summary{background:color-mix(in srgb,var(--kind) calc(var(--kind-tint-share) * 3.5),var(--card));}
details.hint-item[class*="account-guide-"][open]{border-color:color-mix(in srgb,var(--kind) 12%,transparent);}
details.hint-item[class*="account-guide-"] > summary::before{content:none;}
.guide-kind{position:absolute;left:.6rem;top:50%;transform:translateY(-50%);color:var(--kind);font-size:.95rem;line-height:1;}
details.hint-item[class*="account-guide-"] > .guide-body{margin-left:2rem;}
/* a transfer between branches in the waybill lists: its own number, the transfer's picture before it */
.wh-num-pic{width:1rem;height:1rem;object-fit:contain;margin-right:.25rem;vertical-align:-.15rem;}
/* Исходящие переносы: the total with how it is settled, at the card's foot (the report's receipt total) */
.ot-total{display:inline-flex;align-items:center;gap:.4rem;margin-left:auto;font-weight:700;}
.od-number .wh-num-pic{margin-right:.3rem;}
/* В другой филиал: the toolbar sits under the tabs, not pulled up under the header as a draft's */
.tl-page .waybill-toolbar.tl-toolbar{margin-top:0;}
/* В другой филиал: the tabs and the toolbar under them, one size -- the tabs a little larger, the toolbar a little
   smaller than a draft's -- both centred */
.hd-tabs.tl-tabs{grid-auto-columns:minmax(9rem,auto);}
.hd-tabs.tl-tabs .view-switch-item{height:2.5rem;padding:0 1.4rem;font-size:.875rem;}
.hd-tabs.tl-tabs .view-switch-item img{width:1.3rem;height:1.3rem;}
.tl-page .waybill-toolbar.tl-toolbar{justify-content:center;}
.tl-toolbar .waybill-tool{height:2.5rem;font-size:.8125rem;}
.tl-toolbar .waybill-tool-icon.supplier-avatar{width:1.6rem;height:1.6rem;}
/* Поиск товаров with several branches: a fifth button -- where to look -- in the four's width; every branch searched,
   another branch's rows a little faded (no cart for them) */
.sr-filters:has([data-scope]){grid-template-columns:repeat(5,minmax(0,1fr));}
.sr-filters [data-scope] .wb-visual .logo{width:100%;height:100%;}
.sr-lot.sr-lot-foreign{opacity:.6;}
.sr-lot.sr-lot-foreign:is(:hover,:focus-visible,:has(:focus-visible)){opacity:.85;}
/* the item / waybill page's «Филиал» row: the branch's own avatar on the midline, the size of the rows' pictures */
.it-icon.it-branch-face .logo{width:1.6rem;height:1.6rem;}
/* a lot held whole (a reserve, the transfer list, a cart): listed with 0 free, muted, what holds it in the cart's place */
.sr-lot.sr-lot-held{opacity:.5;}
/* a branch's avatar in a waybill header's badge (goods from another branch) */
.wh-i.wh-i-face .logo{width:100%;height:100%;}
/* a waybill total's tooltip rows: when, quietly */
.tip-row-when{color:var(--muted-foreground);font-weight:400;}
.wd-settle-pic{width:1.25rem;height:1.25rem;object-fit:contain;}
.wt-rows{min-width:20rem;}
.wt-rows .tip-row-name{white-space:normal;overflow:visible;}
.wt-caption{font-size:.6875rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;margin-top:.15rem;}
.wt-caption.wt-red{color:#c2410c;}
.wt-caption.wt-green{color:#15803d;}
.wt-rows .tip-row{align-items:center;}


/* the window accepting goods from another branch (2026-11-04): the route, the switch, the two accounts in rows */
.ta-dialog{width:min(36rem,calc(100vw - 2rem));}
.ta-route{position:relative;display:grid;grid-template-columns:1fr 1fr;margin:var(--dialog-head, .9rem) 0 1rem;
  --ta-a:color-mix(in srgb,#64748b 13%,var(--card));
  --ta-b:color-mix(in srgb,#3b5b8c 24%,var(--card));--ta-seam:5.5rem;}
/* each half: its branch at its outer edge */
.ta-half{display:flex;align-items:center;min-width:0;min-height:7.5rem;}
.ta-half-from{background:var(--ta-a);justify-content:flex-start;border-radius:var(--radius) 0 0 var(--radius);}
.ta-half-to{background:var(--ta-b);justify-content:flex-end;border-radius:0 var(--radius) var(--radius) 0;}
.ta-branch{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;max-width:calc(100% - 3.25rem);padding:0 1rem;text-align:center;}
.ta-face .logo{width:3rem;height:3rem;}
.ta-branch-name{font-weight:600;font-size:.9375rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ta-branch small{color:var(--muted-foreground);font-size:.75rem;}
/* on the seam's vertical line, the goods in the middle of the upper arrow, the amount of the lower one */
.ta-goods-pic,.ta-total{position:absolute;left:50%;z-index:2;transform:translate(-50%,-50%);}
.ta-goods-pic{top:25%;width:2.5rem;height:2.5rem;object-fit:contain;}
.ta-total{top:75%;font-weight:700;font-size:1rem;white-space:nowrap;font-variant-numeric:tabular-nums;}
.ta-debt-mode .ta-total{color:var(--destructive);}
/* an arrow at the seam, of the colour of the half it comes from, thrust into the other one: its shaft as high as half
   the block -- the goods' the top half, the money's the bottom one --, its head only a little higher, its barbs
   standing out past the block's edge and over the middle into the other arrow's half */
.ta-arrow{position:absolute;z-index:1;width:var(--ta-seam);height:calc(50% + 2 * var(--barb));--barb:.4rem;--head:1.4rem;}
.ta-arrow-goods{left:50%;top:calc(-1 * var(--barb));background:var(--ta-a);
  clip-path:polygon(0 var(--barb),calc(100% - var(--head)) var(--barb),calc(100% - var(--head)) 0,
                    100% 50%,calc(100% - var(--head)) 100%,calc(100% - var(--head)) calc(100% - var(--barb)),0 calc(100% - var(--barb)));}
.ta-arrow-money{right:50%;top:calc(50% - var(--barb));background:var(--ta-b);
  clip-path:polygon(100% var(--barb),var(--head) var(--barb),var(--head) 0,
                    0 50%,var(--head) 100%,var(--head) calc(100% - var(--barb)),100% calc(100% - var(--barb)));}
.ta-switch{display:grid;grid-template-columns:1fr 1fr;width:100%;margin-bottom:.75rem;}
.ta-switch .view-switch-item{height:2.5rem;padding:0 .6rem;white-space:nowrap;}
.ta-rows{display:flex;flex-direction:column;min-height:6.5rem;}
.ta-rows[hidden]{display:none;}
.ta-row{display:grid;grid-template-columns:minmax(0,1fr) 15rem;align-items:center;gap:1rem;min-height:3.25rem;
  border-bottom:1px solid var(--border);}
.ta-row:last-child{border-bottom:0;}
.ta-row-label{display:flex;align-items:center;gap:.6rem;min-width:0;font-size:.9375rem;}
.ta-row-label .logo,.ta-small-face .logo{width:1.75rem;height:1.75rem;flex:none;}
.ta-small-face{display:inline-flex;flex:none;}
.ta-row-value .account-select{width:100%;}
.ta-debt{display:flex;align-items:center;gap:.8rem;padding:.9rem 1rem;min-height:6.5rem;box-sizing:border-box;border-radius:var(--radius);
  background:color-mix(in srgb, var(--destructive) 6%, var(--card));font-size:.875rem;line-height:1.45;}
.ta-debt[hidden]{display:none;}
.ta-debt img{width:2rem;height:2rem;object-fit:contain;flex:none;}
.ta-error:empty{display:none;}
@media (max-width:560px){.ta-row{grid-template-columns:1fr;gap:.35rem;padding:.5rem 0;}}
@media (max-width:560px){
  .ta-route{--ta-seam:4.5rem;}
  .ta-face .logo{width:2.25rem;height:2.25rem;}
  .ta-branch{padding:0 .4rem;min-width:0;}
  .ta-total{font-size:.8125rem;}
  .ta-goods-pic{width:2rem;height:2rem;}
}
/* the balance as a tree (balance.html, balance_view.py, 2026-11-06): a section -- picture, name, sum --, under it a
   card of rows; a row with rows of its own folds them */
.bv-switches .tab{border:0;background:transparent;font:inherit;cursor:pointer;}
.bv-switches .tab .logo{width:1.1rem;height:1.1rem;}
.bv-section{margin-bottom:1.5rem;}
.bv-pic{flex:none;display:inline-grid;place-items:center;width:2rem;height:2rem;}
.bv-pic img{width:100%;height:100%;object-fit:contain;}
.bv-pic .logo{width:2rem;height:2rem;}
.bv-pic img.bv-face{border-radius:50%;object-fit:cover;}
.bv-card{padding:0;overflow:hidden;}
.bv-row{display:flex;align-items:center;gap:.75rem;min-height:3.25rem;padding:.4rem 1rem;}
.bv-card > .bv-row + .bv-row,.bv-card > .bv-row + .bv-group,.bv-card > .bv-group + .bv-row,.bv-card > .bv-group + .bv-group,
.bv-group > .bv-row{border-top:1px solid var(--border);}
.bv-depth-2{padding-left:2.5rem;min-height:2.75rem;background:color-mix(in srgb,var(--muted) 40%,var(--card));}
.bv-depth-2 .bv-pic,.bv-depth-3 .bv-pic{width:1.6rem;height:1.6rem;}
.bv-depth-2 .bv-pic .logo{width:1.6rem;height:1.6rem;}
.bv-depth-3{padding-left:6rem;min-height:2.5rem;}
.bv-name{flex:1;display:flex;flex-direction:column;min-width:0;}
.bv-label{font-weight:600;font-size:.9375rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bv-depth-2 .bv-label{font-weight:500;}
.bv-name small{color:var(--muted-foreground);font-size:.75rem;}
.bv-amount{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:.15rem;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;}
.bv-interest .bv-amount{flex-direction:row;align-items:center;gap:.6rem;}
.bv-below .bv-amount{color:var(--destructive);}
.bv-tip-mark{color:var(--muted-foreground);font-size:.85rem;}
.bv-group > summary{display:flex;align-items:center;list-style:none;cursor:pointer;padding-right:.75rem;}
.bv-group > summary::-webkit-details-marker{display:none;}
.bv-group > summary .bv-row{flex:1;padding-right:.5rem;}
.bv-caret{flex:none;width:1rem;height:1rem;color:var(--muted-foreground);transition:transform .15s;}
.bv-group[open] > summary .bv-caret{transform:rotate(180deg);}
.bv-group > summary:is(:hover,:focus-visible){background:color-mix(in srgb,var(--muted) 50%,var(--card));}
/* the balance's groups (2026-11-06): a modest caption top left, the rows tinted in their kind's colour */
.bv-sub + .bv-sub{margin-top:.9rem;}
.bv-caption{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding:0 .35rem .35rem;
  color:var(--muted-foreground);font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;}
.bv-caption-sum{text-align:right;font-variant-numeric:tabular-nums;text-transform:none;letter-spacing:0;}
.bv-row.bv-kind{background:color-mix(in srgb,var(--kind) var(--kind-tint-share),var(--card));}
.bv-fee{flex:none;font-size:.8125rem;font-weight:500;color:rgba(160,40,40,.6);font-variant-numeric:tabular-nums;white-space:nowrap;cursor:help;}
.bv-nowrap{white-space:nowrap;}
/* an investor's row: the rate as a small rounded badge, a calculator per month (the expense it suggests) */
.bv-rate{flex:none;display:inline-grid;place-items:center;min-width:2.4rem;height:1.6rem;padding:0 .4rem;border-radius:6px;
  background:color-mix(in srgb,var(--kind-investor) 10%,var(--card));color:var(--kind-investor);font-size:.75rem;font-weight:700;cursor:help;}
.bv-calc{flex:none;display:inline-grid;place-items:center;width:1.6rem;height:1.6rem;border-radius:6px;color:var(--muted-foreground);
  text-decoration:none;font-size:.95rem;}
a.bv-calc:is(:hover,:focus-visible){background:var(--muted);color:var(--foreground);}
.bv-info{flex:none;margin-right:.75rem;color:var(--muted-foreground);font-size:.85rem;cursor:help;}
.bv-fees{cursor:help;}
/* the report's period of one's own (static/date_range.js, 2026-11-07): two dates side by side, a month's calendar */
.dr-dates-dialog{width:min(23rem,calc(100vw - 2rem));}
.drp-ends{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.5rem;margin:var(--dialog-head, .9rem) 0;}
.drp-calendar{margin-top:0;}
.drp-end{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;padding:.5rem .7rem;border:1px solid var(--border);
  border-radius:var(--radius);background:var(--card);font:inherit;text-align:left;cursor:pointer;}
.drp-end small{color:var(--muted-foreground);font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;}
.drp-end span{font-size:.9rem;font-weight:600;white-space:nowrap;}
.drp-end:is(:hover,:focus-visible){border-color:color-mix(in srgb,var(--primary) 40%,var(--border));}
.drp-end.is-active{border-color:#2563eb;box-shadow:0 0 0 2px color-mix(in srgb,#2563eb 18%,transparent);}
.drp-arrow{color:var(--muted-foreground);}
.drp-month{display:flex;align-items:center;justify-content:space-between;margin-bottom:.4rem;}
.drp-title{font-weight:700;}
.drp-nav{display:grid;place-items:center;width:2rem;height:2rem;border:0;border-radius:var(--radius);background:transparent;color:inherit;cursor:pointer;}
.drp-nav:is(:hover,:focus-visible){background:var(--muted);}
.drp-nav:disabled{opacity:.3;cursor:default;}
.drp-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:auto repeat(6,2.3rem);row-gap:.2rem;margin-bottom:var(--dialog-head, .9rem);}
.drp-wd{padding:.3rem 0;color:var(--muted-foreground);font-size:.7rem;font-weight:600;text-align:center;text-transform:uppercase;}
.drp-day{height:2.3rem;border:0;background:transparent;color:inherit;font:inherit;font-size:.875rem;cursor:pointer;border-radius:var(--radius);
  font-variant-numeric:tabular-nums;}
.drp-day:is(:hover,:focus-visible){background:var(--muted);}
.drp-day:disabled{color:var(--muted-foreground);opacity:.4;cursor:default;background:transparent;}
.drp-day.is-today{box-shadow:inset 0 0 0 1px var(--border);}
.drp-day.is-between{border-radius:0;background:color-mix(in srgb,#2563eb 10%,var(--card));}
.drp-day.is-from,.drp-day.is-to{background:#2563eb;color:#fff;font-weight:700;}
.drp-day.is-from:not(.is-to){border-radius:var(--radius) 0 0 var(--radius);}
.drp-day.is-to:not(.is-from){border-radius:0 var(--radius) var(--radius) 0;}
.drp-calendar[hidden]{display:none;}
.drp-ends[hidden]{display:none;}
.drp-prompt{margin:var(--dialog-head, .9rem) 0 .6rem;padding:.55rem .75rem;border-radius:var(--radius);text-align:center;
  background:color-mix(in srgb,#2563eb 8%,var(--card));color:#1d4ed8;font-size:.875rem;font-weight:600;}
.drp-navs{display:inline-flex;gap:.15rem;}
.drp-pick{display:inline-flex;align-items:center;gap:.1rem;}
.drp-title-month{min-width:6.5rem;text-align:center;}
.drp-title-year{min-width:3rem;text-align:center;}
.dr-cancel-row img{width:1rem;height:1rem;}
.dr-cancel-row[hidden]{display:none;}
.dr-sale-head > .dr-pill.dr-pill-icon{flex:none;min-width:0;padding:0 .3rem;}
.dr-profit.dr-profit-minus{color:#b23a52;} .dr-profit.dr-profit-zero{color:var(--sh-sale);}
.dr-received .dr-mini{flex:none;}          /* on the words' midline: the line is the picture's height */

/* Статистика → Основные показатели (statistics.py, Legacy's statistics table) */
.st-page{display:flex;flex-direction:column;gap:.75rem;}
.st-table{padding:0;overflow:hidden;}
.st-row{display:grid;grid-template-columns:9.5rem repeat(5,minmax(0,1fr));   /* the same columns in every row, header and totals alike */
align-items:stretch;min-height:2.9rem;border-top:1px solid var(--border);}
.st-table > .st-row:first-child{border-top:0;}
/* every cell its column's middle, top to bottom and side to side; the month at the left */
.st-row > span{display:flex;align-items:center;justify-content:center;gap:.4rem;padding:.55rem .75rem;font-variant-numeric:tabular-nums;white-space:nowrap;}
.st-row > span:first-child{justify-content:center;}   /* the month too: every column in its middle */
.st-row > span + span{border-left:1px solid color-mix(in srgb,var(--border) 60%,transparent);}
.st-header{min-height:3.2rem;}
.st-header > span{font-size:.75rem;font-weight:600;color:var(--muted-foreground);}
.st-header img{width:1.2rem;height:1.2rem;object-fit:contain;flex:none;}
.st-month{font-weight:600;}
.st-year{color:var(--muted-foreground);font-weight:400;}
.st-red{color:#b23a52;} .st-green{color:#2e7d43;}
.st-deepgreen{color:#1f6b34;font-weight:700;} .st-deepred{color:#a01f3c;font-weight:700;}
.st-row:not(.st-header):is(:hover,:focus-within){background:color-mix(in srgb,var(--foreground) 2.5%,transparent);}
@media (max-width:800px){.st-row{grid-template-columns:7rem repeat(5,minmax(5.5rem,1fr));}.st-table{overflow-x:auto;}}
.st-pane{display:flex;flex-direction:column;gap:.75rem;}
.st-pane[hidden]{display:none;}
.st-chart{padding:.5rem .75rem 0;}
/* Статистика's panel of sections, and Источники лидов: a column per source (their number varies) */
.st-section{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;width:auto;min-width:8.5rem;padding:0 .9rem;}   /* the sections: as wide as their words, never under a period button's width */
.st-section > img{width:1.1rem;height:1.1rem;object-fit:contain;}
.st-scope{display:flex;gap:.4rem;margin-left:auto;}
.st-leads{overflow-x:auto;}
.st-leads .st-row{grid-template-columns:9.5rem repeat(var(--st-cols),minmax(7rem,1fr)) minmax(8.5rem,1fr);
  min-width:calc(9.5rem + var(--st-cols) * 7rem + 8.5rem);}   /* every row the same grid, the card's whole width; too narrow, it scrolls */
.st-leads .st-groups{min-height:2rem;}
.st-group{font-size:.6875rem;letter-spacing:.06em;text-transform:uppercase;border-bottom:2px solid var(--border);}
.st-source{flex-direction:column;gap:.2rem !important;white-space:normal !important;text-align:center;}
.st-source > img,.st-source > i{width:1.4rem;height:1.4rem;object-fit:contain;font-size:1.1rem;}
.st-source-name{max-width:7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.st-zero{color:var(--muted-foreground);opacity:.5;}
.st-foot{background:color-mix(in srgb,var(--foreground) 2.5%,transparent);font-weight:600;}
.st-leads.st-narrow .st-row{grid-template-columns:7rem repeat(var(--st-cols),minmax(4.25rem,1fr)) minmax(5rem,1fr);
  min-width:calc(7rem + var(--st-cols) * 4.25rem + 5rem);}
.st-leads.st-narrow .st-source-name,.st-leads.st-narrow .st-header > span > img + :not(img){display:none;}
.st-leads.st-narrow .st-row > span{padding-left:.35rem;padding-right:.35rem;}
a.view-switch-item{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:inherit;}   /* a switch's position as a link (Статистика's spans) */
/* Статистика → Склад (stock_stats.py): Сводка is ONE card, one column -- the age pie, the goods' tree, the main types'
   tree --; the trees are folds (Legacy's tree-plus / tree-minus), every row of a level its words in one line: a row
   with no fold carries an empty place the mark's size (.st-fold-space) */
.st-stack{padding:0;overflow:hidden;width:100%;}
.st-block{display:flex;flex-direction:column;margin-top:.5rem;}
.st-block > .it-block-caption{margin:0 0 .4rem .25rem;}
.st-stack-part + .st-stack-part{border-top:1px solid var(--border);}
.st-age{padding:.75rem .75rem .25rem;}
.st-age-average{margin:.25rem 0 .5rem;text-align:center;color:var(--muted-foreground);font-size:.875rem;}
.st-tree{padding:0;overflow:hidden;}
.st-tree-row{display:grid;grid-template-columns:minmax(0,1fr) 7rem 10rem;align-items:center;min-height:2.6rem;
  border-top:1px solid var(--border);font-variant-numeric:tabular-nums;}
.st-tree > .st-tree-row:first-child,.st-tree > .st-fold:first-child > .st-tree-row{border-top:0;}
.st-tree-row > span{padding:.45rem .75rem;white-space:nowrap;text-align:right;}
.st-tree-row > span:first-child{text-align:left;}
.st-tree-name{display:flex;align-items:center;gap:.5rem;min-width:0;}
.st-tree-row > span.st-tree-name{white-space:normal;line-height:1.25;}   /* a long name wraps rather than being cut */
.st-tree-name > img:not(.st-fold-mark),.st-tree-name > i{width:1.5rem;height:1.5rem;object-fit:contain;flex:none;}
.st-tree-cols{min-height:2.2rem;font-size:.75rem;font-weight:600;color:var(--muted-foreground);}
.st-l0{font-weight:600;}
.st-l1 > .st-tree-name{padding-left:2rem;}
.st-l2 > .st-tree-name{padding-left:3.4rem;color:var(--muted-foreground);}
.st-fold > summary{list-style:none;cursor:pointer;}
.st-fold > summary::-webkit-details-marker{display:none;}
.st-fold > summary:is(:hover,:focus-visible){background:color-mix(in srgb,var(--foreground) 2.5%,transparent);}
.st-fold-mark,.st-fold-space{flex:none;width:.85rem;height:.85rem;object-fit:contain;opacity:.7;}
.st-fold > summary .st-fold-open,.st-fold[open] > summary .st-fold-mark{display:none;}
.st-fold[open] > summary .st-fold-open{display:inline;}
@media (max-width:560px){.st-tree-row{grid-template-columns:minmax(0,1fr) 4.5rem 7.5rem;}}
/* Продажи: the units / sum switch -- two small icon buttons on the legend's line, top right */
.st-chart-measured{position:relative;}
.st-measure{position:absolute;top:.55rem;right:.75rem;z-index:2;display:flex;}
/* the second level: small tabs fastened to the card under them (that card's top-left corner square), clearly
   smaller than the sections' panel above; `.st-tabbar-end` -- a compact switch at the bar's right end */
.st-tabbar{display:flex;align-items:flex-end;gap:2px;margin-top:.75rem;margin-bottom:-.75rem;position:relative;z-index:1;}
.st-tab{display:inline-flex;align-items:center;gap:.35rem;height:1.85rem;padding:0 .8rem;border:0;
  border-radius:calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;background:color-mix(in srgb,var(--foreground) 6%,var(--background));
  color:var(--muted-foreground);font:inherit;font-size:.75rem;font-weight:600;text-decoration:none;cursor:pointer;white-space:nowrap;}
.st-tab > img{width:.95rem;height:.95rem;object-fit:contain;}
.st-tab:is(:hover,:focus-visible){color:var(--foreground);background:color-mix(in srgb,var(--foreground) 3%,var(--card));}
.st-tab.active{background:var(--card);color:var(--foreground);}
.st-tabbar + .card,.st-tabbar + .st-pane > .card:first-child,.st-tabbar + .st-pane > .st-table:first-child{border-top-left-radius:0;}
.st-tabbar-end{margin-left:auto;display:flex;gap:.5rem;align-self:center;padding-bottom:.25rem;}
.st-minis{display:flex;}
.st-mini{display:inline-flex;align-items:center;justify-content:center;gap:.3rem;height:1.6rem;min-width:1.9rem;padding:0 .55rem;
  border:1px solid var(--border);background:var(--card);color:var(--muted-foreground);font:inherit;font-size:.6875rem;font-weight:600;
  text-decoration:none;cursor:pointer;}
.st-mini + .st-mini{margin-left:-1px;}
.st-mini:first-child{border-radius:calc(var(--radius) - 4px) 0 0 calc(var(--radius) - 4px);}
.st-mini:last-child{border-radius:0 calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0;}
.st-mini > img{width:1rem;height:1rem;object-fit:contain;opacity:.55;}
.st-mini:is(:hover,:focus-visible){color:var(--foreground);background:var(--switch-hover);}
.st-mini.active{background:var(--switch-on);color:var(--foreground);}
.st-mini.active > img{opacity:1;}
/* Эффективность моделей: the model wide, eight figures; sortable headings; the marks */
.st-models{overflow-x:auto;}
.st-models .st-row{grid-template-columns:minmax(14rem,2.2fr) repeat(9,minmax(5.5rem,1fr));min-width:calc(14rem + 9 * 5.5rem);}
.st-models .st-row > span{padding-left:.4rem;padding-right:.4rem;}
.st-mark{white-space:nowrap;}
.st-models .st-header > span{flex-direction:column;gap:.2rem;white-space:normal;text-align:center;line-height:1.15;}   /* the picture over the words, Legacy's header */
.st-models .st-header > span[data-sort]{cursor:pointer;user-select:none;}
.st-models .st-header > span[data-sort]:is(:hover,:focus-visible){color:var(--foreground);}
.st-models .st-header > span.st-sorted{color:var(--foreground);}
.st-models .st-header > span.st-sorted::after{content:"↓";font-size:.8rem;}
.st-models .st-header > span.st-sorted-up::after{content:"↑";}
.st-models .st-row > span.st-model{justify-content:flex-start;gap:.6rem;white-space:normal;}
.st-model > img,.st-model > i{width:2rem;height:2rem;object-fit:contain;flex:none;font-size:1.3rem;color:var(--muted-foreground);}
.st-model-name{display:flex;flex-direction:column;min-width:0;line-height:1.25;}
.st-model-name a{color:inherit;text-decoration:none;}
.st-model-name a:is(:hover,:focus-visible){color:var(--primary);}
.st-model-name small{color:var(--muted-foreground);font-size:.75rem;}
.st-mark{margin-left:.35rem;font-size:.6875rem;font-weight:600;padding:.1rem .45rem;border-radius:.3rem;}
.st-mark-restock{background:color-mix(in srgb,#2e7d43 14%,transparent);color:#2e7d43;}
.st-mark-idle{background:color-mix(in srgb,#b23a52 12%,transparent);color:#b23a52;}
/* Продажи's table: a column per month of the last six and one for all time, every heading and figure in its column's
   middle; too narrow, it scrolls */
.st-tree-sales{overflow-x:auto;}
.st-tree-sales .st-tree-row{grid-template-columns:minmax(14rem,1fr) repeat(var(--st-cols),minmax(5rem,6.5rem));
  min-width:calc(14rem + var(--st-cols) * 5rem);}   /* --st-cols: the months and all time */
.st-tree-sales .st-tree-row > span:not(:first-child){text-align:center;padding-left:.35rem;padding-right:.35rem;}
/* the score: Legacy's strip of six stars, five shown (the image 6/5 of the box), the coloured one clipped to the fill */
.st-stars{position:relative;display:block;width:5.25rem;height:1.05rem;overflow:hidden;}
.st-stars > img{position:absolute;left:0;top:0;width:120%;height:100%;object-fit:contain;object-position:left center;}
.st-stars-bg{opacity:.3;}
.st-stars-fill{clip-path:inset(0 calc(100% - var(--fill, 100%)) 0 0);}
.st-stars-none > img{width:100%;}
.st-tip-note{margin-top:.35rem;max-width:18rem;white-space:normal;color:var(--muted-foreground);font-size:.8125rem;}
.st-model-line{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.st-model-name{flex:1 1 auto;}
/* A member's activity (activity.py, member_activity.html): the figures as tiles, the history as rows */
.ac-page{display:flex;flex-direction:column;gap:.5rem;}
.ac-page .member-head{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem;}
.ac-period{margin-left:auto;}
.ac-box{padding:0;overflow:hidden;border-top-left-radius:0;}   /* the four figures' box, its tabs on its corner */   /* the figures' box, its tabs on its corner */
.ac-caption{margin:.35rem 0 0;font-size:.8125rem;font-weight:600;color:var(--muted-foreground);}
.ac-figs{display:grid;grid-template-columns:repeat(auto-fit,minmax(6.5rem,1fr));gap:0;padding:0;overflow:hidden;
}
.ac-fig{display:flex;flex-direction:column;align-items:center;gap:.2rem;padding:.75rem .5rem;text-align:center;
  border-left:1px solid color-mix(in srgb,var(--border) 60%,transparent);}
.ac-fig:first-child{border-left:0;}
.ac-fig > img{width:1.5rem;height:1.5rem;object-fit:contain;}
.ac-fig-value{font-size:1.05rem;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;}
.ac-fig-label{font-size:.75rem;color:var(--muted-foreground);line-height:1.2;}
.ac-history-head{display:flex;align-items:flex-end;justify-content:space-between;margin-top:.5rem;}
.ac-history-head .it-block-caption{margin-bottom:.4rem;}
.ac-history-head .st-mini{margin-bottom:.4rem;border-radius:calc(var(--radius) - 4px);}
.ac-list{padding:0;overflow:hidden;}
.ac-row{display:flex;align-items:baseline;gap:.75rem;padding:.45rem .9rem;border-top:1px solid var(--border);font-size:.875rem;white-space:nowrap;}   /* ONE line a row (the owner) */
.ac-row:first-child{border-top:0;}
.ac-when{flex:none;width:7.5rem;color:var(--muted-foreground);font-variant-numeric:tabular-nums;font-size:.8125rem;}
.ac-what{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;gap:.6rem;overflow:hidden;}
.ac-what > a,.ac-what > span{flex:none;}
.ac-what a{color:inherit;text-decoration:none;}
.ac-what a:is(:hover,:focus-visible){color:var(--primary);}
.ac-what small{flex:1 1 auto;min-width:0;color:var(--muted-foreground);font-size:.75rem;overflow:hidden;text-overflow:ellipsis;}
.ac-view{color:var(--muted-foreground);}
.ac-refused{flex:none;font-size:.6875rem;font-weight:600;color:#b23a52;}
.ac-more{align-self:center;margin-top:.25rem;}
/* Статистика → Сотрудники: a row per member, a link to their activity */
.st-staff{overflow-x:auto;}
.st-staff .st-row{grid-template-columns:minmax(13rem,2fr) repeat(var(--st-cols),minmax(6rem,1fr));
  min-width:calc(13rem + var(--st-cols) * 6rem);text-decoration:none;color:inherit;}   /* --st-cols: the figure columns */
.st-staff .st-header > span{flex-direction:column;gap:.2rem;white-space:normal;text-align:center;line-height:1.15;}
.st-staff .st-row > span.st-model{justify-content:flex-start;gap:.6rem;}
.st-face{width:2rem;height:2rem;border-radius:50%;object-fit:cover;flex:none;}
a.st-staff-row:is(:hover,:focus-visible){background:color-mix(in srgb,var(--foreground) 3%,transparent);}
.st-staff-off{opacity:.55;}
.mb-actions{padding:1rem;}   /* the member's actions: a form-page's width and gap, centred buttons */
.mb-actions .it-action{width:9.5rem;}   /* «История изменений» with room on both sides */
.mb-on{display:contents;}
.mb-off{color:#b23a52;}
.ac-box .st-row{grid-template-columns:repeat(4,minmax(0,1fr));}   /* the member's four: headings with pictures, then the values */
.ac-box .st-header > span{flex-direction:column;gap:.2rem;white-space:normal;text-align:center;line-height:1.15;}
.ac-page > .st-tabbar{margin-bottom:-.5rem;}   /* the page's gap is .5rem: the tabs sit exactly on the box */
/* The profile (profile.html): an item page's width, iOS rows in white groups, captions above them */
.pf-page{display:flex;flex-direction:column;gap:.5rem;}
.pf-avatar{display:flex;flex-direction:column;align-items:center;gap:.4rem;margin:0 auto .5rem;}
.pf-name{font-weight:600;font-size:1.05rem;}
.pf-card{padding:0;overflow:hidden;--dialog-pad:1rem;}
.pf-card .sheet-rows{margin:0;}
.pf-card .sheet-value{flex:0 1 16rem;}
.pf-card .sheet-select{width:auto;max-width:100%;cursor:pointer;text-align:right;text-align-last:right;}
.pf-page .it-block-caption{margin-top:.5rem;margin-bottom:-.15rem;}
.pf-note{margin:-.15rem .25rem 0;color:var(--muted-foreground);font-size:.75rem;line-height:1.35;}
button.pf-row-button{width:100%;border:0;border-top:1px solid var(--border);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;}
.sheet-rows > button.pf-row-button:first-child{border-top:0;}
.pf-chevron{color:var(--muted-foreground);font-size:.75rem;margin-left:.35rem;}
.pf-pending .btn-link{margin:0 0 0 .25rem;font-size:.75rem;}
.pf-email-form{display:flex;flex-direction:column;gap:.75rem;}
/* a page switch's own page (the one open, aria-current): no link to itself -- pressing it again would only reload it */
a.view-switch-item[aria-current=page],a.st-tab.active,a.st-mini.active{pointer-events:none;cursor:default;}
.error-page{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.5rem;}
.error-code{font-size:3rem;font-weight:700;line-height:1;color:var(--muted-foreground);opacity:.5;}
.error-text{margin:0 0 .75rem;color:var(--muted-foreground);}
.error-actions{display:flex;gap:.5rem;}

/* ===== THE PHONE (2026-11-14, the owner: the narrowest screen is an iPhone 13 mini, 375px) =====================
   ONE breakpoint for the phone: 480px and narrower. `m-hide` -- not drawn on a phone; `m-only` -- drawn only there.
   What a phone does not show is one tap away (a tooltip on tap, or the next page) -- no function is lost. */
@media (min-width:481px){.m-only{display:none !important;}}
@media (max-width:480px){
  .m-hide{display:none !important;}
  /* iOS zooms the page into any field typed in below 16px: the layouts' viewport says maximum-scale=1, which stops that
     zoom (iOS still lets a person pinch), so the fields keep their small type */
  /* the header: the menu, the page's own title (the path above it is the menu's), the counters as one, the envelope and
     the avatar */
  .app-header{gap:.4rem;padding:0 .6rem;}
  .app-crumbs > :not(.crumb-current){display:none;}
  .app-crumbs .crumb-current{overflow:hidden;text-overflow:ellipsis;font-size:1rem;line-height:1.2;}
  .header-count-all{display:flex;align-items:center;gap:.5rem;}
  .header-count-all span{flex:1;}
  .header-count-popover{position:fixed;top:3.6rem;left:.6rem;right:.6rem;min-width:0;max-height:70dvh;}
  /* the item search's row: the model's name is the card's -- no badge of it again; a colour is its dot; S/N and IMEI
     their last characters (the whole on the item's page) */
  .sr-lot .sr-model-badge:not(.sr-model-alone){display:none;}   /* the card says the model -- unless the row has no
                                                                     property at all: then it is its only word */
  /* a row as the cart's, ONE line: 75% the number and the facts; 25% what is free (the figure alone), the price
     (small, the figure alone) and the cart button -- the days in stock left out (the item's page has them); another
     branch's logo before the price */
  .sr-lot{grid-template-columns:auto minmax(0,1fr) auto 6% 13% 6% !important;column-gap:.2rem;
          grid-template-areas:"tag facts branch qty price cart" !important;}
  .sr-lot .sr-days,.sr-lot .sr-warranty{display:none !important;}   /* days in stock and the warranty: the item's page */
  .sr-lot .sr-price{grid-area:price;justify-self:center;font-size:.5625rem;}
  .sr-lot .sr-price-other{font-size:.4rem;}
  .sr-lot .sr-qty{grid-area:qty;justify-self:center;font-size:.5625rem;color:var(--muted-foreground);}
  .sr-lot .sr-branch{grid-area:branch;}
  .sr-lot .sr-branch .logo{width:1rem;height:1rem;}
  .sr-lot .sr-cart{grid-area:cart;justify-self:end;}
  .sr-lot .sr-cart-button{width:1.5rem;height:1.5rem;padding:.1rem;}
  .sr-lot{padding-right:.1rem !important;}
  .wb-badge:has(> .wb-swatch) > .wb-badge-text{display:none;}     /* a colour is its dot, everywhere (its name on a tap) */
  /* …and as tall as its neighbours wherever it stands: an invisible zero-width character gives it their line box */
  .wb-badge:has(> .wb-swatch){gap:0;padding-left:.3rem;padding-right:.3rem;}
  .wb-badge > .wb-swatch{width:1.1em;height:1.1em;}   /* the badge's own type size: a little larger, in every list */
  .wb-badge:has(> .wb-swatch)::after{content:"\200b";width:0;overflow:hidden;}
  .sr-model-head{font-size:.875rem;}
  /* the model's picture goes up beside its name: the rows take the card's whole width */
  .sr-model{position:relative;grid-template-columns:minmax(0,1fr);}
  .sr-model-picture{position:absolute;top:.35rem;left:.5rem;width:1.75rem !important;height:1.75rem !important;margin:0;}
  .sr-model-body{padding:.45rem .4rem .2rem .35rem;}
  .sr-model-head{min-height:1.75rem;display:flex;align-items:center;padding-left:2.35rem;margin-bottom:.3rem;}
  .sr-facts{gap:.2rem;}
  /* every badge of a row one height -- a colour's and a sticker's too; a sticker's picture with a little room */
  .sr-facts .wb-badge{box-sizing:border-box;height:1.15rem;font-size:.625rem;padding:0 .3rem;align-items:center;}
  .sr-facts .wb-badge:has(> .wb-swatch){padding:0 .3rem;}
  .sr-facts .wb-badge-sticker{padding:0 .3rem;}
  .sr-facts .wb-badge-sticker img{width:.8rem;height:.8rem;}
  /* the filters' words a little smaller: «Все семейства» fits */
  .sr-filters{--wb-filter-name-size:.625rem;}
  .sr-filters .wb-picker-button{padding:.4rem .15rem;}
  .sr-filters .wb-picker-text{letter-spacing:-.01em;}
  /* iOS-Settings rows (an item, a waybill, a repair...): the icon first, then the label, the value at the right -- the
     icon's own column in the middle cost a third of the width */
  .it-rows{grid-template-columns:2.6rem minmax(0,1fr) minmax(0,1.25fr);grid-auto-flow:row dense;}
  .it-row > .it-icon{grid-column:1;padding-left:.6rem;}
  .it-row > .it-label{grid-column:2;padding-left:.35rem;font-size:.875rem;}
  .it-row > .it-value{grid-column:3;padding-right:.75rem;font-size:.875rem;}
  .it-icon img{width:1.5rem;height:1.5rem;}
  .it-icon .bi{font-size:1.15rem;}
  .it-chips .wb-chip{padding:.2rem .55rem;font-size:.8125rem;}
  /* actions and crafts: four to a row, the picture over a short word */
  .it-actions{gap:.35rem;padding:.6rem;}
  .it-actions .it-action{width:calc(25% - .27rem);min-height:3.6rem;padding:.4rem .15rem;font-size:.625rem;white-space:normal;}
  .it-actions .tip{width:calc(25% - .27rem);}
  .it-actions .tip > .it-action{width:100%;}
  .it-actions-crafts{flex-wrap:wrap;}
  .it-actions-crafts > .tip{flex:0 0 calc(25% - .3rem);}
  /* history rows: when, what and who on one line, the content under them */
  .it-history{padding:.75rem .6rem;}
  /* history rows on one line: when as bare text on two lines (date / time), what as its picture, who as the avatar;
     the content takes the rest and wraps inside itself */
  .hs-row{flex-wrap:nowrap !important;align-items:center;gap:.25rem;}
  .hs-content{order:0 !important;flex:1 1 auto !important;flex-basis:auto !important;flex-wrap:wrap;white-space:normal;row-gap:.2rem;}
  .hs-badge{width:auto;height:1.6rem;padding:0 .2rem;gap:0;font-size:.625rem;}
  .hs-badge > span:last-child{flex:none;}
  .hs-when{width:2.2rem;height:auto;padding:0;background:transparent;color:var(--muted-foreground);font-size:.5625rem;line-height:1.15;}
  .hs-when img{display:none;}
  .hs-when > span:last-child{white-space:normal;text-align:left;overflow:visible;}
  .hs-when > span:last-child > span{display:block;white-space:nowrap;}
  .hs-what,.hs-who{width:1.6rem;justify-content:center;}
  .hs-what > span:last-child,.hs-who > span:last-child{display:none;}
  .hs-what img,.hs-who img{width:1.05rem;height:1.05rem;}
  .hs-who{margin-left:0 !important;order:1;}
  .hs-chip{height:1.6rem;font-size:.6875rem;}
  .hs-text{line-height:1.6rem;}
  /* a waybill's line: price · quantity · sum share the line's width (three fixed columns were 20rem) */
  .wd-line{gap:.6rem;padding:.5rem .6rem;}
  .wd-line-numbers{grid-template-columns:auto auto auto;justify-content:space-between;justify-items:stretch;width:100%;gap:.4rem;font-size:.8125rem;}
  /* a waybill card's header on a phone: number, supplier, destination, days, the action -- the payment mode, the
     documents and who wrote it are on the waybill's own page (a tap on its number) */
  .wh-b-mode,.wh-b-docs,.wh-b-flex,.wh-b-blank,.wh-b-person{display:none !important;}
  /* the day report: the period's select and the view switch on one line */
  .dr-page .dr-periods{flex-wrap:nowrap;}
  .dr-period-select{flex:1;min-width:0;height:2.25rem;}
  .dr-scope{width:auto;max-width:6rem;}
  .dr-view{grid-auto-columns:auto;}
  .dr-view .view-switch-item{padding:0 .6rem;}
  /* «Кратко»'s lines: tighter, and what does not fit -- the money -- goes under the line at its right, never past
     the card's edge */
  .dr-compact .dr-group-lines{padding:.1rem .5rem .25rem;}
  .dr-group-line{gap:.35rem;flex-wrap:wrap;row-gap:.1rem;}
  .dr-group-line > .dr-pill.dr-group-no{width:3.3rem;padding:0 .2rem;font-size:.75rem;}
  .dr-group-when{min-width:0;font-size:.6875rem;}
  .dr-group-line .dr-line-text,.dr-group-line .dr-line-label{font-size:.75rem;}
  .dr-group-pay{gap:.3rem;padding:.1rem .1rem .1rem .3rem;}
  .dr-card-title{font-size:.8125rem;letter-spacing:.12em;}
  /* «Подробно» on a phone: a pill with a picture is the picture alone (its words on a tap); the money keeps its figure */
  .dr-pill:has(> .dr-pi):not(.dr-pill-value):not(.dr-morph) > .dr-pt{display:none;}
  .dr-pill:has(> .dr-pi):not(.dr-pill-value):not(.dr-morph){width:auto !important;min-width:0;padding:0 .3rem;}
  .dr-row .dr-who-name{display:none;}                  /* who: the face (the surname on a tap) */
  .dr-row .dr-who{width:auto;padding:0 .25rem;}
  .dr-row .dr-when{font-size:.6875rem;}
  .dr-row .dr-pill-value{font-size:.75rem;}
  /* Статистика fits the phone -- nothing scrolls sideways (the owner): small figures, little padding, headers as their
     pictures alone (the words in their tooltips), the year and the currency's room given up */
  .st-page,.st-page > *{min-width:0;max-width:100%;}
  .st-table{overflow:hidden !important;}
  .st-row{grid-template-columns:3.4rem repeat(5,minmax(0,1fr));}
  .st-row > span{padding:.35rem .12rem;font-size:.5625rem;letter-spacing:-.01em;gap:.15rem;}
  .st-row > span + span{border-left:0;}
  .st-row.st-header > span{font-size:0;gap:0;padding:.4rem .1rem;}
  .st-row.st-header > span > img{width:1.15rem;height:1.15rem;}
  .st-year{display:none;}
  .st-month{font-size:.625rem !important;}
  /* the lead sources: every source a column, the receipts the last */
  .st-leads .st-row,.st-leads.st-narrow .st-row{grid-template-columns:3.4rem repeat(var(--st-cols),minmax(0,1fr)) minmax(0,1.2fr);min-width:0;}
  .st-leads .st-row > span{padding-left:.08rem;padding-right:.08rem;}
  /* models' efficiency: the model, then margin, profit a year, life cycle, sold, score, weight -- the average purchase
     and sale and the frequency on a wider screen */
  .st-models .st-row{grid-template-columns:4.6rem repeat(6,minmax(0,1fr));min-width:0;}
  .st-models .st-row > span:nth-child(2),.st-models .st-row > span:nth-child(3),.st-models .st-row > span:nth-child(6){display:none;}
  .st-models .st-row > span.st-model{gap:.25rem;font-size:.5625rem;}
  .st-models .st-row > span.st-model img{width:1.4rem;height:1.4rem;}
  .st-models .st-model-name small{display:none;}
  .st-models .st-model-line{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.15;}
  .st-staff .st-model-name small{font-size:.5rem;}
  .st-staff .st-model-line{font-size:.5625rem;}
  .st-models .st-header > span{flex-direction:row;}
  .st-stars{transform:scale(.7);transform-origin:center;}
  .st-staff .st-row{grid-template-columns:5.6rem repeat(var(--st-cols),minmax(0,1fr));min-width:0;}
  .st-staff .st-model{gap:.25rem;}
  .st-staff .st-face{width:1.3rem;height:1.3rem;}
  /* the stock tree: the name, then its two figures, narrow */
  .st-tree-row{grid-template-columns:minmax(0,1fr) 3.6rem 5.4rem;font-size:.6875rem;}
  /* Статистика's sections: one line, the pictures alone but the chosen one's word too */
  .st-page > .dr-periods{flex-wrap:nowrap;gap:.3rem;}
  .st-section{min-width:0;padding:0 .55rem;}
  .st-section:not(.active){font-size:0;gap:0;flex:none;}
  .st-section.active{flex:1;min-width:0;font-size:.75rem;}
  /* Статистика's second-level tabs: the picture alone, the active one's word too (Legacy's stock tabs did so); the
     compact switches above them, on a line of their own */
  .st-tabbar{flex-wrap:wrap;}
  .st-tab:not(.active):has(> img){font-size:0;gap:0;padding:0 .7rem;}   /* a tab of words alone (the months) keeps them */
  .st-tab:not(.active) > img{width:1.05rem;height:1.05rem;}
  .st-tab{padding:0 .5rem;font-size:.6875rem;}
  .st-tabbar-end{order:-1;flex-basis:100%;justify-content:flex-end;margin-left:0;padding-bottom:.45rem;}
  /* Сводка: the date, the time and the first rate (the first pair of the country's list), on one line
     (2026-11-14, the owner); every rate is on a wider screen */
  .rates-panel{flex-wrap:nowrap;width:100%;gap:.35rem;padding:.4rem;}
  .rates-panel > .rates-badge{flex:1 1 0;width:auto;min-width:0;}
  .rates-panel > .rates-badge:nth-child(n+4){display:none;}
  .rates-panel > .rates-badge{padding:0 3px;font-size:11.5px;}
  .rates-panel > .rates-badge > img{width:auto;height:18px;max-width:26px;object-fit:contain;}
  /* a repair's actions: four to a row, wrapping -- never scrolled out of sight */
  .rp-actions{flex-wrap:wrap;overflow-x:visible;gap:.2rem;padding:.5rem .4rem;}
  .rp-action{flex:0 0 calc(25% - .15rem);min-width:0;padding:.3rem .1rem;}
  .rp-action-label{font-size:.625rem;}
  .rp-action-icon{width:2.6rem;height:2.6rem;}
  /* Сводка: the chats to start, their pictures alone on one line (the words on a tap); the dialogues' faces smaller,
     in the middle of their row */
  .msg-starts{flex-wrap:nowrap;gap:.35rem;}
  .msg-start{flex:1 1 0;justify-content:center;min-width:0;height:2.6rem;padding:0;gap:0;}
  .msg-start-text{display:none;}
  .msg-start-icon{width:1.6rem;height:1.6rem;}
  .msg-dialogue{align-items:center;gap:.6rem;padding:.6rem .75rem;}
  .msg-dialogue > .msg-face{width:2rem;height:2rem;}
  /* Услуги: a small picture, the name the most room, the performer's face and the price small, little padding */
  /* the list: picture, name, price, cart -- the performer is chosen in the window that adds it to the cart */
  .sv-row:not(.se-row){grid-template-columns:1.6rem minmax(0,1fr) 3.4rem 1.8rem;gap:.4rem;padding:.3rem .5rem;font-size:.8125rem;}
  .sv-row:not(.se-row) > .sv-performer{display:none;}
  .sv-row:not(.se-row) > .sv-num{justify-self:center;text-align:center;}
  .sv-row:not(.sv-head) > .sv-action{margin-right:-.5rem;}
  .sv-picture{width:1.5rem;height:1.5rem;}
  .sv-performer > img,.sv-performer > .member-avatar{width:1.1rem;height:1.1rem;}
  .sv-row:not(.se-row) > .sv-num{font-size:.75rem;}
  .sv-action .icon-button img{width:1.2rem;height:1.2rem;}
  /* the editor: the add block on one line -- picture, name, price, «Добавить»; the performer is who puts it in the cart
     and the payout is left out (both are set at the sale or on a wider screen) */
  .se-new{flex-wrap:nowrap;gap:.35rem;padding:.5rem;}
  .se-new .se-performer,.se-new input[name="pay"]{display:none;}
  .se-new .se-new-name{flex:1 1 auto;}
  .se-new .input{font-size:.75rem;padding:0 .4rem;}
  .se-new .se-new-figure{flex:0 0 4.6rem;padding:0 .4rem;}
  .se-new .se-icon{width:1.9rem;height:1.9rem;flex:none;}
  .se-new .se-add{padding:0 .6rem;font-size:.8125rem;}
  /* its rows on one line: picture, name, price, the rocker, the grip -- no performer, no payout */
  .se-row{grid-template-columns:1.5rem minmax(0,1fr) 3.4rem auto .7rem;gap:.35rem;padding:.3rem .45rem;font-size:.8125rem;}
  .se-row > *{grid-row:1 !important;grid-column:auto !important;}
  .se-row > :nth-child(3),.se-row > :nth-child(5){display:none;}
  .se-row .se-icon{width:1.5rem;height:1.5rem;padding:0;}
  .se-row .se-text{font-size:.8125rem;}
  .se-row .se-number{font-size:.75rem;}
  .se-row .rocker{zoom:.7;}                             /* zoom, not a transform: its room shrinks too */
  .se-row .se-text{padding:0 .25rem;}
  /* the cart's lead sources on ONE line: the chosen one's name in a box half as wide, smaller; the pictures a little
     lower, sharing what is left */
  .ct-leads{flex-wrap:nowrap;gap:.2rem;}
  .ct-lead-caption{flex:none;width:4.5rem;min-width:0;padding:.3rem .25rem;font-size:.625rem;line-height:1.15;
                   overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .ct-leads > .ct-lead{flex:none;width:1.65rem;height:1.65rem;min-width:0;max-width:none;box-sizing:border-box;
                       display:grid;place-items:center;padding:.2rem;}   /* a square, its picture centred, the same room all round */
  .ct-leads > .ct-lead > img{width:100%;height:100%;object-fit:contain;}
  .ct-leads > .ct-lead-caption{flex:1 1 auto;width:auto;min-width:2.5rem;max-width:4.5rem;display:flex;align-items:center;justify-content:center;
                               height:1.65rem;box-sizing:border-box;padding:0 .25rem;}   /* the squares' height; it gives way when they are many */
  /* the cart's line: what it is across the card (the trash at its right), then quantity, price and sum under it */
  /* the cart's line, two floors: the picture, the model's name on the first (cut), its facts on the second (fading
     out) -- quantity × price over the line's sum at the right, a third of the width at most; the trash is under the
     line, shown by sliding the line to the left (shop.js) */
  /* one row: what it is, then -- for a stack only -- the quantity between its arrows (a swipe up / down on it does
     the same), then the price of ONE, edited in place; the line's sum is the footer's business */
  /* two parts, strictly: 70% what it is (the picture, the name over the facts -- each fading out at its end when
     longer), 30% the numbers -- the quantity's spinner in 40% of them (an empty place for a single item), the price of
     ONE in the other 60%, centred */
  .ct-row.ct-line{position:relative;overflow:hidden;grid-template-columns:70% 12% 18%;
                  grid-template-areas:"what qty price";column-gap:0;row-gap:0;padding:.3rem .45rem;touch-action:pan-y;}
  .ct-line > .ct-what{grid-area:what;gap:.35rem;min-width:0;padding-right:.3rem;}
  .ct-line > .ct-qty{grid-area:qty;justify-self:center;display:flex;flex-direction:column;align-items:center;gap:0;line-height:1;touch-action:none;}
  .ct-line:not(:has(.ct-step)) > .ct-qty{visibility:hidden;}
  .ct-line > .ct-qty{min-height:3.2rem;justify-content:center;}   /* the spinner's height for every line, a single item's too */
  .ct-line > .ct-qty > [data-step="1"]{order:-1;}
  .ct-line > .ct-qty > [data-step="-1"]{order:1;}
  .ct-line > .ct-qty .ct-step{padding:0 .3rem;line-height:.8;}
  .ct-line > .ct-price{grid-area:price;justify-self:stretch;justify-content:center;text-align:center;white-space:nowrap;min-width:0;overflow:hidden;}
  .ct-line > .ct-total{display:none;}
  .ct-line > .ct-trash{width:3.4rem;background:var(--destructive);}
  .ct-line > .ct-trash .icon-button{color:#fff;}
  .ct-page .ct-line .item-tag{width:1.75rem;}
  .ct-page .ct-line .item-tag-picture{height:1.75rem;}
  .ct-page .ct-line .item-tag-picture img{padding:0;object-position:center bottom;}   /* the picture sits on the number's bar */
  .ct-page .ct-line .item-tag-picture{align-items:end;}
  .ct-page .ct-line .item-tag-number{font-size:.5rem;line-height:.75rem;min-height:.75rem;padding:0 .1rem;}
  .ct-page .ct-line .sh-caption{gap:.3rem;}
  .ct-page .ct-line .sh-caption{flex:1;min-width:0;}
  .ct-page .ct-line .sh-name{display:block;font-size:.75rem !important;line-height:1.2;white-space:nowrap !important;
                             overflow:hidden;text-overflow:clip;
                             -webkit-mask-image:linear-gradient(to right,#000 82%,transparent);mask-image:linear-gradient(to right,#000 82%,transparent);}
  .ct-page .ct-line .sh-facts{flex-wrap:nowrap;overflow:hidden;
                              -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .ct-page .ct-line .wb-badge{flex:none;box-sizing:border-box;height:.95rem;font-size:.5rem;padding:0 .25rem;line-height:.85rem;}
  .ct-page .ct-line .wb-badge .bi{font-size:.55rem;}
  .ct-page .ct-line :is(.ct-num,.ct-price-text,[data-unit],[data-qty]){font-size:.6875rem !important;}
  .ct-line .ct-qty .ct-step{font-size:.75rem;}
  /* the customer: a block of its own under the card (shop.js moves it there) */
  .ct-page{gap:.55rem;}                                 /* the blocks as far apart as the page from the screen's sides */
  .ct-customer-card{margin-top:0;padding:.6rem .75rem;}
  /* the footer: the account as a select on the left half; the total and a small pay button on the right */
  .ct-foot{flex-wrap:nowrap;gap:.4rem;padding:.5rem .45rem;}
  .ct-foot > .ct-accounts,.ct-foot > .ct-chosen{display:none !important;}
  /* the select, the total and the button one height */
  select.input.ct-account-select{flex:0 0 50%;box-sizing:border-box;min-width:0;height:2.1rem;min-height:0;padding-block:0;font-size:.8125rem;}
  .ct-foot > .ct-sum{flex:1;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:auto;min-width:0;height:2.1rem;padding:0 .3rem;font-size:.8125rem;}
  .ct-foot > .ct-pay-tip .ct-pay{box-sizing:border-box;height:2.1rem;min-height:0;padding:0 .7rem;font-size:0;gap:0;}
  .ct-foot > .ct-pay-tip .ct-pay::before{content:"";width:1.15rem;height:1.15rem;background:url(/static/icons/getcash.png) center / contain no-repeat;}
  /* every page's own margin from the screen's edges: half of what a wider screen keeps (2026-11-14, the owner) */
  .app-content{--content-top:.6rem;padding:.6rem .55rem;}
  /* Клиенты: the search field takes the room, «Найти / добавить» small */
  .cu-search-form{padding:.6rem;}
  .cu-search-row{gap:.35rem;}
  /* a customer's card head: 70% the picture and the name, 30% the action buttons */
  .cu-head{gap:.5rem;padding:.6rem;}
  .cu-head-face{width:2.4rem;height:2.4rem;flex:none;}
  .cu-head-text{flex:1 1 0;min-width:0;}
  .cu-head-name{font-size:.9375rem;}
  .cu-actions{flex:0 0 30%;justify-content:flex-end;gap:.15rem;}
  .cu-actions .icon-button{width:1.85rem;height:1.85rem;}
  /* the consent's window: the QR card's picture inside its card */
  .cu-consent-art-qr .bi{font-size:4.3rem;}
  /* a form's rows (the waybill's item form, the posting window...): the label on the left, the value on the right, ONE
     line -- as on a wider screen; until 2026-11-14 a phone put each value under its label */
  .wb-row{grid-template-columns:minmax(0,46%) minmax(0,1fr) !important;gap:.5rem !important;padding:calc(.15rem + 1px) .6rem;}
  .wb-row-label{font-size:.75rem;line-height:1.2;}
  .wb-row-value{justify-content:flex-end !important;text-align:right !important;}
  .wb-row-value .input:not(.amount-field .input){text-align:right !important;}
  .wb-chips,.wb-kit-choices{justify-content:flex-end !important;}
  .wb-row .wb-chip{padding:.15rem .45rem;font-size:.6875rem;}
  .wb-row .slider-value{flex:none;white-space:nowrap;font-size:.6875rem;}
  .wb-row .slider input[type=range]{min-width:0;}
  /* the kit: its label, then its buttons across the whole row, six to a line */
  .wb-row:has(.wb-kit-choices){grid-template-columns:minmax(0,1fr) !important;gap:.3rem !important;padding-block:.4rem;}
  .wb-row .wb-kit-choices{display:grid !important;grid-template-columns:repeat(6,minmax(0,1fr));gap:.25rem;width:100%;}
  .wb-row .wb-kit-choice{width:auto;min-width:0;padding:.3rem .1rem;font-size:.5625rem;}
  /* rows that slide (static/swipe_rows.js): the row's content moves, its actions wait under it at an edge */
  [data-swipe]{position:relative;overflow:hidden;touch-action:pan-y;}
  [data-swipe] > :not(.swipe-left):not(.swipe-right){transform:translateX(var(--swipe, 0));transition:transform .2s;}
  [data-swipe].swiping > :not(.swipe-left):not(.swipe-right){transition:none;}
  [data-swipe] > :is(.swipe-left,.swipe-right){position:absolute !important;top:0;bottom:0;display:flex !important;align-items:stretch;
                                                 flex-direction:row !important;grid-row:auto !important;grid-column:auto !important;gap:0;margin:0;opacity:0;pointer-events:none;transition:opacity .12s;}
  [data-swipe] > .swipe-left{right:0;left:auto;}
  [data-swipe] > .swipe-right{left:0;right:auto;}
  [data-swipe]:is(.swiped-left,.swiping-left) > .swipe-left,[data-swipe]:is(.swiped-right,.swiping-right) > .swipe-right{opacity:1;pointer-events:auto;}
  :is(.swipe-left,.swipe-right) :is(button,.icon-button){display:grid;place-items:center;width:3.2rem;height:100%;border:0;border-radius:0;box-shadow:none;color:#fff;}
  [data-swipe] > :is(.swipe-left,.swipe-right) form{display:flex;height:100%;margin:0;}
  .swipe-act-remove{background:var(--destructive);}
  .swipe-act-repeat{background:#2563eb;}
  .swipe-act-edit{background:#64748b;}
  /* a waybill draft's line: a small picture, the name over its facts, the quantity and the price of one at the right;
     the batch price and the RRP left out (the line's form has them), the buttons under the row (it slides) */
  .wb-lines-area .wb-line{grid-template-columns:1.9rem minmax(0,1fr) auto !important;gap:.4rem;padding:.4rem .3rem;}
  .wb-lines-area .wb-line-picture{width:1.9rem;height:1.9rem;}
  .wb-lines-area .wb-line-numbers{grid-column:3 !important;grid-row:1 !important;display:flex !important;flex-wrap:nowrap !important;gap:.45rem !important;align-items:center;}
  .wb-lines-area .wb-line-batch,.wb-lines-area .wb-line-rrp{display:none !important;}
  .wb-lines-area .wb-line-number{font-size:.75rem;}
  .wb-lines-area .wb-line-value{min-width:0;}
  .wb-lines-area .wb-line-title{font-size:.8125rem;}
  /* the draft's toolbar (author / arrival / supplier / currency): smaller text and pictures */
  .waybill-segments .waybill-tool{height:2.3rem;gap:.3rem;padding:0 .4rem;font-size:.6875rem !important;}
  .waybill-toolbar:has(> .waybill-segments){flex-wrap:nowrap;gap:.3rem;}
  .waybill-toolbar > .waybill-segments{flex:1;min-width:0;}
  .waybill-segments .waybill-tool-icon:is(.supplier-avatar,.member-avatar){width:1.3rem !important;height:1.3rem !important;font-size:.625rem;}
  /* В доставке / Принято на склад, «Кратко»: one line in the screen's width -- a narrow number, small logos and days,
     smaller thumbnails (as many as fit, the rest fading), the total, Принять as its picture alone */
  .wd-row{--wh-h:1.6rem;--wh-img:1.15rem;--wh-pad:.15rem;--wd-unit:1.9rem;--wd-thumb-gap:.25rem;gap:.3rem;
          grid-template-columns:2.9rem 1.3rem 1.3rem 1.6rem minmax(0,1fr) auto 1.9rem;
          height:2.6rem;padding:.35rem .45rem;}
  .wd-row-stock{grid-template-columns:2.9rem 1.3rem 1.6rem minmax(0,1fr) auto;}
  .wd-row .wh-b-num{font-size:.6875rem;}
  .wd-row .wh-b-num .wh-txt{padding:0;}
  .wd-row .wh-b-num:has(.wh-i) .wh-i{display:none;}          /* a transfer's picture: its number is enough here */
  .wd-row .wh-b-num:has(.wh-i){grid-template-columns:minmax(0,1fr);}
  .wd-row-logo{width:1.3rem;height:1.3rem;}
  .wd-row-logo .bi{font-size:.85rem;}
  .wd-row-days{width:1.6rem;height:1.6rem;}
  .wd-row-days strong{font-size:.6875rem;}
  .wd-row-days small{margin-top:0;font-size:.4375rem;}
  .wd-row-thumbs-cut{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 1.2rem),transparent 100%);
                     mask-image:linear-gradient(to right,#000 calc(100% - 1.2rem),transparent 100%);}
  .wd-row .item-thumb-qty{right:0;bottom:0;min-width:.8rem;height:.8rem;font-size:.5rem;}
  .wd-row-total{font-size:.75rem;}
  .wd-row-stock .wd-row-total{gap:.25rem;}
  .wd-row-stock .wd-paid-with{width:auto;gap:.15rem;}
  .wd-row .wd-account .logo{width:1rem;height:1rem;}
  .wd-row .wd-accounts-plus{font-size:.625rem;}
  .wd-row-accept{width:1.9rem;grid-template-columns:minmax(0,1fr) !important;justify-items:center;padding:0;}
  .wd-row-accept .wh-txt{display:none;}
  .wd-row-accept .wh-i{width:1.35rem;height:1.35rem;padding:1px;}
  .wd-row .wd-moved-all{gap:.25rem;font-size:.6875rem;}
  .wd-row .wd-moved-all img{width:1rem;height:1rem;}
  /* «Подробно»: the same card, smaller -- the header's badges, the lines, the foot */
  .wd-card .wh{--wh-h:1.75rem;--wh-img:1.3rem;--wh-gap:.25rem;--wh-pad:.2rem;padding:.4rem .45rem;
               display:flex;gap:var(--wh-gap);}   /* the badges left (the others are hidden) share the whole width */
  .wd-card .wh > .wh-b,.wd-card .wh > .wh-pair,.wd-card .wh > .wh-form > .wh-b{flex:1 1 0;}
  .wd-card .wh .wh-b{justify-content:center;grid-template-columns:auto auto;}
  .wd-card .wh .wh-b:not(:has(.wh-i)){grid-template-columns:auto;}
  .wd-card .wh-b{font-size:.6875rem;}
  .wd-card .wh-b-num{font-size:.75rem;}
  /* its lines, the cart's way: one line each, 70 / 30 -- the picture, the name over its facts (both fading at the end)
     | the quantity and the price of one; the line's sum is the total's (the waybill's own page keeps it in the tooltip) */
  .wd-line{grid-template-columns:1.9rem minmax(0,1fr) 30%;gap:.45rem;padding:.35rem .5rem;}
  .wd-line:has(.wd-line-balances){grid-template-columns:1.9rem minmax(0,1fr) auto 30%;}
  .wd-line .item-tag{width:1.9rem;}
  .wd-line .item-tag-picture{height:1.9rem;}
  .wd-line .item-tag-number{min-height:.75rem;font-size:.5rem;line-height:.75rem;}
  .wd-line .wb-line-main{min-width:0;}
  .wd-line .wb-line-name{display:block;overflow:hidden;white-space:nowrap;
                         -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .wd-line .wb-line-title{font-size:.75rem;}
  .wd-line .wb-line-facts{flex-wrap:nowrap !important;gap:.2rem;overflow:hidden;
                          -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .wd-line .wb-line-facts .wb-badge{flex:none;font-size:.5625rem;line-height:.9rem;padding:0 .3rem;}
  .wd-line .wd-line-balances{max-width:5rem;grid-column:auto;justify-content:flex-end;}   /* in the line, not under it (the 640px rule) */
  .wd-line-numbers{grid-column:auto !important;display:flex !important;justify-content:flex-end;align-items:center;gap:.4rem !important;
                   width:auto !important;font-size:.6875rem !important;white-space:nowrap;}
  .wd-line-numbers .wd-line-number:nth-child(2){order:-1;color:var(--muted-foreground);}   /* the quantity first */
  .wd-line-numbers .wd-line-sum{display:none;}
  .wd-card-foot{gap:.5rem;padding:.4rem .5rem;font-size:.6875rem;}
  .wd-card-foot .wd-comment-icon,.wd-card-foot .wd-tracker{width:1.1rem;height:1.1rem;}
  .wd-card-foot .wd-total{gap:.25rem;}
  .wd-card-foot .wd-account .logo{width:1.1rem;height:1.1rem;}
  /* tabs of a list (Консигнации, В резерве, На обеспечении, В другой филиал): the screen's width in equal parts,
     one line each, smaller words and pictures */
  .view-switch:has(> .cn-tab),.hd-tabs{display:grid !important;grid-auto-columns:minmax(0,1fr) !important;width:100%;}
  :is(.cn-tab,.hd-tabs .view-switch-item){min-width:0;height:2rem !important;padding:0 .35rem !important;gap:.25rem !important;
     font-size:.6875rem !important;line-height:1 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  :is(.cn-tab,.hd-tabs .view-switch-item) img{flex:none;width:.85rem !important;height:.85rem !important;}
  /* the account tiles of a form that pays from one account: a plain select instead (static/account_tiles.js) */
  .account-tiles-proxied > .ct-accounts,.account-tiles-proxied > .ct-chosen{display:none !important;}
  .account-tiles-proxied{display:flex;min-width:0;}
  select.input.account-tiles-select{flex:1;box-sizing:border-box;min-width:0;width:100%;height:2.1rem;min-height:0;padding-block:0;font-size:.8125rem;}
  /* Консигнации, the cart's way: one line each, 70 / 30 -- the picture, the name over its facts (both fading at the end)
     | the quantity (only for a stack), the price of one, the bag; a tap on the row ticks it (no box), give back and
     split slide out from under it to the left; the days and the debt are left out (the debt is the total of what is
     ticked) */
  .cn-supplier .cn-row{grid-template-columns:1.75rem minmax(0,1fr) 6% 17% 7% !important;
                       grid-template-areas:"tag main qty price bag";gap:.35rem;padding:.35rem .45rem;font-size:.6875rem;}
  .cn-row > .cn-check,.cn-row > .cn-days,.cn-row > .cn-debt,.cn-row .cn-status > .cn-split{display:none !important;}
  .cn-row > .cn-item{grid-area:tag;grid-column:tag !important;grid-row:1 !important;}
  .cn-row .item-tag{width:1.75rem;}
  .cn-row .item-tag-picture{height:1.75rem;}
  .cn-row .item-tag-number{min-height:.7rem;font-size:.5rem;line-height:.7rem;}
  .cn-row > .wb-line-main{grid-area:main;grid-column:main !important;grid-row:1 !important;min-width:0;}
  .cn-row .wb-line-name{display:block;overflow:hidden;white-space:nowrap;
                        -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .cn-row .wb-line-title{font-size:.75rem;}
  .cn-row .wb-line-facts{flex-wrap:nowrap !important;gap:.2rem;overflow:hidden;
                         -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .cn-row .wb-line-facts .wb-badge{flex:none;font-size:.5625rem;line-height:.9rem;padding:0 .3rem;}
  .cn-row > .cn-qty{grid-area:qty;grid-column:qty !important;grid-row:1 !important;justify-self:center !important;color:var(--muted-foreground);}
  .cn-row > .cn-qty-one{visibility:hidden;}
  .cn-row > :is(.cn-unit,.cn-each){grid-area:price;grid-column:price !important;grid-row:1 !important;justify-self:end !important;}
  .cn-row .cn-price{padding:0;font-size:.6875rem;}
  .cn-row .cn-price-field{font-size:.8125rem;text-align:right;}
  .cn-supplier .cn-row > .cn-status{display:inline-flex !important;grid-area:bag;grid-column:bag !important;grid-row:1 !important;justify-self:center;}
  .cn-row .cn-bag{font-size:.9rem;}
  .cn-row .cn-status-icon{width:.9rem;height:.9rem;}
  .cn-row .cn-mark{font-size:.5625rem;}
  .cn-row > .cn-action{grid-column:auto !important;}
  .swipe-act-split{background:#2563eb;}
  .cn-action .icon-button:not(.swipe-act-split){background:#d97706;}
  .cn-action .icon-button:disabled{background:#cbd5e1;}
  .cn-action .icon-button img{width:1.2rem;height:1.2rem;filter:brightness(0) invert(1);}
  .cn-action .icon-button:disabled img{opacity:.7;}
  .cn-action > .tip{display:flex;height:100%;}
  .cn-waybill{padding:.45rem .45rem .1rem;font-size:.625rem;}
  /* the payment: the account as a select, the sum, Оплатить as its picture -- the cart's footer */
  .cn-pay{flex-wrap:nowrap;gap:.4rem;padding:.5rem .45rem;}
  .cn-pay-label{display:none;}
  .cn-pay-account{flex:0 0 50%;min-width:0;display:flex;}
  .cn-pay-account > .account-tiles{flex:1;}
  .cn-pay-total{flex:1;justify-content:center;min-width:0;}
  .cn-pay-total strong{font-size:.8125rem;}
  .cn-pay [data-pay]{box-sizing:border-box;height:2.1rem;min-height:0;padding:0 .7rem;font-size:0;gap:0;}
  .cn-pay [data-pay]::before{content:"";width:1.15rem;height:1.15rem;background:url(/static/icons/getcash.png) center / contain no-repeat;}
  /* a repair's intake: every row one line again -- icon, label (at most a third, a long one wraps in its column), the value
     at the right, the mark -- the item form's way */
  .rp-field{grid-template-columns:1.25rem minmax(0,max-content) minmax(0,1fr) .7rem !important;gap:.45rem;min-height:2.4rem;padding:.3rem .55rem;}
  .rp-field .rp-label{grid-column:2;max-width:33vw;font-size:.6875rem;line-height:1.2;}
  .rp-field .rp-value{grid-column:3 !important;grid-row:1 !important;}
  .rp-field .field-mark{grid-column:4 !important;grid-row:1 !important;width:.7rem;font-size:.6rem;}
  .rp-icon{width:1.25rem;height:1.25rem;}
  .rp-intake .rp-value > .input,.rp-intake .rp-value > .rp-text,.rp-intake .amount-field .input{font-size:.8125rem;}
  .rp-intake .rp-text{line-height:1.25rem;min-height:1.25rem;}
  .rp-basis .account-select{min-width:0;}
  .rp-intake .rp-basis .account-select-button{font-size:.8125rem;}
  .rp-intake .cp-chip,.rp-intake .rp-model-picked{height:1.6rem;max-width:100%;font-size:.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .rp-intake .ct-customer-results,.rp-model-results{position:absolute;left:auto;right:0;width:calc(100vw - 2rem);}
  .rp-intake-foot{padding:.5rem .55rem;}
  /* Таблица ремонтов: the columns folded to their heads, one open at a time, its head coloured (templates/repairs.html);
     «Архив» always there, last */
  .rp-board{gap:.4rem;}
  .rp-column{gap:.4rem;}
  .rp-column:not(.rp-open) > .rp-card{display:none;}
  .rp-column-head{cursor:pointer;padding:.45rem .6rem;font-size:.8125rem;user-select:none;-webkit-tap-highlight-color:transparent;}
  .rp-column-head::after{content:"";flex:none;width:.45rem;height:.45rem;margin:0 .15rem 0 .2rem;border-right:2px solid currentColor;
                         border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-.15rem);opacity:.55;transition:transform .15s;}
  .rp-open > .rp-column-head{border-color:transparent;background:rgba(40,150,40,.5);color:#14381a;}
  .rp-open > .rp-column-head::after{transform:rotate(-135deg) translate(-.1rem,-.05rem);opacity:.9;}
  .rp-open > .rp-column-head .rp-column-count{background:rgba(255,255,255,.8);color:#1e6b28;}
  /* Таблица выплат: a payout one line -- number, the engineer's face (the surname in its tip), the days, the sum at the
     right; Изменить slides from the left, Выплатить from the right; the words on the pills in their tips */
  #rp-payouts{gap:.6rem;}
  .rp-mode .rp-chip{padding:.35rem .6rem;gap:.4rem;font-size:.75rem;}
  .rp-mode .rp-chip img{width:1.1rem;height:1.1rem;}
  .rp-payouts-head{padding:.4rem .55rem;font-size:.6875rem;}
  .rp-payout{flex-wrap:nowrap;gap:.3rem;padding:.4rem .55rem;}
  .rp-payout .rp-pill{flex:none;padding:.1rem .35rem;font-size:.6875rem;gap:.25rem;}
  .rp-payout .rp-person > span{display:none;}
  .rp-payout .rp-person{padding:.1rem .2rem;}
  .rp-payout .rp-pill.rp-po-sum{order:5;font-weight:600;}
  .rp-payout .rp-pill:is(.rp-po-issued,.rp-po-date){margin-right:auto;}   /* what follows stands at the right */
  .rp-payout .rp-po-status{order:6;}
  .rp-payout > .rp-payout-actions:not(.swipe-left):not(.swipe-right){margin-left:auto;}
  .rp-payout .btn-small{height:1.7rem;padding:0 .5rem;font-size:.6875rem;}
  .swipe-act-pay{background:#16a34a;}
  .swipe-act-pay img{width:1.3rem;height:1.3rem;}
  /* В резерве / На обеспечении, the cart's way: the head one line (the face, a short date, the days), the lot one line
     70 / 30 -- the picture, the name over its facts | the quantity (a stack only) and the price of one; on a reserve
     the release slides out to the left, "в корзину" stays on the line; the timer and the comment one line */
  .hd-page{gap:.5rem;}
  .hd-head{gap:.45rem;padding:.35rem .55rem;font-size:.6875rem;white-space:nowrap;}
  .hd-who > span{display:none;}
  .hd-who img{width:1.1rem;height:1.1rem;}
  .hd-age{margin-left:auto;font-weight:600;}
  .hd-line{grid-template-columns:1.75rem minmax(0,1fr) 7% 20% !important;grid-template-areas:"tag main qty price";gap:.35rem;padding:.35rem .55rem;font-size:.6875rem;}
  .hd-line > .hd-tag{grid-area:tag;}
  .hd-line .item-tag{width:1.75rem;}
  .hd-line .item-tag-picture{height:1.75rem;}
  .hd-line .item-tag-number{min-height:.7rem;font-size:.5rem;line-height:.7rem;}
  .hd-line > .wb-line-main{grid-area:main;min-width:0;}
  .hd-line .wb-line-name{display:block;overflow:hidden;white-space:nowrap;
                         -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .hd-line .wb-line-title{font-size:.75rem;}
  .hd-line .wb-line-facts{flex-wrap:nowrap !important;gap:.2rem;overflow:hidden;
                          -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .hd-line .wb-line-facts .wb-badge{flex:none;font-size:.5625rem;line-height:.9rem;padding:0 .3rem;}
  .hd-line > .hd-qty{display:block !important;grid-area:qty;color:var(--muted-foreground);}
  .hd-line > .hd-qty.hd-qty-one{visibility:hidden;}
  .hd-line > .hd-num:not(.hd-qty):not(.hd-total){display:block !important;grid-area:price;text-align:right;}
  .hd-line > .hd-total{display:none !important;}
  .hd-line{grid-template-columns:1.75rem minmax(0,1fr) 7% 20% auto !important;grid-template-areas:"tag main qty price act";}
  .hd-line > .hd-act:not(.swipe-left){grid-area:act;}   /* the page's own action (в корзину, вернуть) at the line's end */
  .hd-line > .hd-act:not(.swipe-left) img{width:1.1rem;height:1.1rem;}
  .hd-line > .hd-act.swipe-left .icon-button{width:3.2rem;height:100%;border-radius:0;color:#fff;}
  .hd-line > .hd-act.swipe-left .icon-button{background:var(--destructive);}
  .hd-line > .hd-act.swipe-left .bi{font-size:1.2rem;}
  .hd-comment-row{gap:.45rem;padding:.3rem .55rem .4rem;font-size:.6875rem;}
  .hd-expiry{padding:.1rem .4rem;font-size:.625rem;gap:.25rem;}
  .hd-comment{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  /* an item's property buttons: on one line with the label -- smaller, a processor by its code (item.html), a long
     value cut short */
  .it-rows:has(.it-chips){grid-template-columns:2.3rem minmax(0,.7fr) minmax(0,1.6fr);}   /* the buttons get the room */
  .it-rows:has(.it-chips) > .it-row > .it-label{font-size:.75rem;line-height:1.2;}
  .it-rows:has(.it-chips) > .it-row > .it-icon{padding-left:.5rem;}
  .it-chips{flex-wrap:nowrap !important;gap:.25rem;min-width:0;max-width:100%;overflow:hidden;justify-content:flex-end;}
  .it-chips .wb-chip{flex:0 1 auto;min-width:2.2rem;max-width:8rem;height:1.6rem;padding:0 .4rem;font-size:.6875rem;
                     overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .it-chips .wb-chip > span{overflow:hidden;text-overflow:ellipsis;}
  .it-select{max-width:100%;text-overflow:ellipsis;}
  /* Исходящие доставки: the head one line (the number, the face, a short date, the days); a line 70 / 30 -- the
     picture, the name on one line cut short, the facts on the second | the quantity (a stack only) and the price of
     one; the foot one line -- the courier over the tracking number at the left, cancel and close as small icons at
     the right */
  .od-head .dr-face{width:1.1rem;height:1.1rem;}
  .od-line{grid-template-columns:minmax(0,1fr) 7% 23% !important;gap:.35rem;padding:.35rem .55rem;font-size:.6875rem;}
  .od-line > .od-qty{display:block !important;order:1;color:var(--muted-foreground);text-align:center;}
  .od-line > .od-qty-one{visibility:hidden;}
  .od-line > .od-unit{display:block !important;order:2;text-align:right;}
  .od-line > .hd-total{display:none !important;}
  .od-what{gap:.35rem;min-width:0;}
  .od-what .item-tag{width:1.75rem;flex:none;}
  .od-what .item-tag-picture{height:1.75rem;}
  .od-what .item-tag-number{min-height:.7rem;font-size:.5rem;line-height:.7rem;}
  .od-what .sh-caption{min-width:0;display:flex;flex-direction:column;}
  .od-what .sh-name{display:block;overflow:hidden;white-space:nowrap;font-size:.75rem;
                    -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .od-what .sh-facts{display:flex;flex-wrap:nowrap !important;gap:.2rem;overflow:hidden;
                     -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .od-what .sh-facts .wb-badge{flex:none;font-size:.5625rem;line-height:.9rem;padding:0 .3rem;}
  .od-foot{flex-wrap:nowrap;gap:.5rem;padding:.4rem .55rem;font-size:.6875rem;}
  .od-shipping{flex:1;min-width:0;gap:.2rem;}
  .od-courier-logo{width:1.2rem;height:1.2rem;}
  .od-tracking .wd-tracker{width:1.2rem;height:1.2rem;}
  .od-actions{flex:none;gap:.35rem;}
  .od-actions .btn{width:2.2rem;height:2.2rem;min-height:0;padding:0;font-size:0;gap:0;justify-content:center;}
  .od-actions .btn .bi{font-size:1rem;}
  .od-actions [data-cancel-delivery] .bi{color:var(--destructive);}
  .od-actions [data-close-delivery] .bi{color:var(--success);}
  /* a model's properties: four to a row, the name on up to two lines */
  .md-properties{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.25rem;padding:.4rem .45rem;}
  .md-property{width:auto;min-width:0;padding:.35rem .2rem .3rem;gap:.15rem;font-size:.5625rem;line-height:1.15;}
  .md-property .bi{font-size:.95rem;}
  .md-property-name{white-space:normal;text-align:center;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;}
  /* the day report's «Кратко» lines: one line, tighter -- a smaller printer, face and number, the date small on two
     lines (the day over the time), smaller thumbnails (two at least), the sum and its account smaller */
  .dr-group-line{flex-wrap:nowrap !important;gap:.25rem !important;}
  .dr-group-line > .icon-button{flex:none;width:1.3rem;height:1.3rem;min-width:0;padding:0;}
  .dr-group-line > .icon-button .bi{font-size:.85rem;}
  .dr-face.dr-group-face,.dr-line-pic{width:1.35rem;height:1.35rem;}
  .dr-face.dr-group-face > img,.dr-line-pic > img{width:1rem;height:1rem;}
  .dr-group-line > .dr-pill.dr-group-no{width:auto;min-width:0;height:1.35rem;padding:0 .25rem;font-size:.625rem;}
  .dr-group-when{width:2.35rem;min-width:0;font-size:.5625rem;line-height:1.1;white-space:normal;}
  .dr-group-thumbs{--thumb:1.45rem;gap:.15rem;}
  .dr-group-pay{flex:none;gap:.2rem;}
  .dr-group-sum{font-size:.6875rem;}
  .dr-group-accounts .logo{width:.95rem;height:.95rem;}
  .dr-group-accounts{gap:.1rem;}
  /* the day report's «Подробно» goods lines, the cart's way: the picture, the name and its facts on two lines each
     fading at the end | the quantity (a stack only) and the line's sum, on the same line, never wrapping */
  .dr-sale-line{display:grid !important;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;min-height:0;padding:.35rem .55rem;}
  .dr-sale-line > .dr-line-what{flex-basis:auto;gap:.35rem;min-width:0;}
  .dr-line-what .item-tag{width:1.75rem;flex:none;}
  .dr-line-what .item-tag-picture{height:1.75rem;}
  .dr-line-what .item-tag-number{min-height:.7rem;font-size:.5rem;line-height:.7rem;}
  .dr-line-what .sh-caption{min-width:0;display:flex;flex-direction:column;}
  .dr-line-what .sh-name{display:block;overflow:hidden;white-space:nowrap !important;font-size:.75rem;
                         -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .dr-line-what .sh-facts{display:flex;flex-wrap:nowrap !important;gap:.2rem;overflow:hidden;
                          -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .dr-line-what .sh-facts .wb-badge{flex:none;font-size:.5625rem;line-height:.9rem;padding:0 .3rem;}
  .dr-sale-line > .dr-line-values{display:flex;align-items:center;gap:.4rem;margin-left:0;font-size:.75rem;white-space:nowrap;}
  .dr-line-values > :first-child{display:none;}
  .dr-line-values > .dr-qty{color:var(--muted-foreground);font-weight:400;}
  .dr-line-values > .dr-qty::before{content:"×";}
  .dr-line-values > .dr-qty-one{display:none;}
  /* a receipt's head in «Подробно»: its number and date as words (the pictures go) -- the pills as wide as their words */
  .dr-sale-head{gap:.3rem;padding:.35rem .55rem;}
  .dr-sale-head > .dr-pill:has(> .dr-pi):not(.dr-pill-value):not(.dr-morph) > .dr-pt{display:block;}
  .dr-sale-head > .dr-pill:has(> .dr-pt) > .dr-pi{display:none;}
  .dr-sale-head > .dr-pill,.dr-sale-head > .dr-who{flex:0 1 auto !important;width:auto !important;max-width:none;font-size:.6875rem;}
  .dr-sale-head > .dr-pill .dr-pt{padding:0 .3rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  /* the printer goes up into the head's free right end -- no line of its own */
  .dr-sale-body{position:relative;}
  .dr-printer{position:absolute;right:.4rem;top:-2.15rem;border:0;}
  .dr-printer:empty{display:none;}
  .dr-printer .icon-button{width:1.6rem;height:1.6rem;}
  .dr-sale-head{padding-right:2.4rem;}
  /* the day report's «Подробно», every card: one record, one line -- the face, the date small on two lines, the kind's
     pictures small, what it concerns (a comment, the goods) taking the rest and fading out, the money at the right,
     as wide as its figure (the service centre below adds its own) */
  .dr-card .dr-row{flex-wrap:nowrap !important;gap:.25rem !important;padding:.35rem .55rem !important;}
  .dr-card .dr-row > *{min-width:0;}
  .dr-card .dr-row > .dr-who{flex:none;width:1.4rem !important;height:1.4rem;padding:0 !important;justify-content:center;}
  .dr-card .dr-row > .dr-who .dr-face{width:1.05rem;height:1.05rem;}
  .dr-card .dr-row > .dr-when{flex:none;width:2.35rem;font-size:.5625rem !important;line-height:1.1;white-space:normal;}
  .dr-card .dr-row > .dr-pill:not(.dr-pill-value){flex:none;height:1.4rem;padding:0 .2rem !important;}
  .dr-card .dr-row > .dr-pill:not(.dr-pill-value) > .dr-pi img{width:.95rem;height:.95rem;}
  .dr-card .dr-row > .dr-caption{flex:1 1 auto !important;order:0 !important;display:flex;align-items:center;gap:.25rem;
      overflow:hidden;white-space:nowrap;font-size:.6875rem;
      -webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent);}
  .dr-card .dr-row > .dr-caption *{font-size:inherit;}
  .dr-card .dr-row > .dr-caption img{max-height:1.1rem;}
  .dr-card .dr-row > .dr-value{flex:none;display:flex;align-items:center;gap:.15rem;margin-left:0;}
  .dr-card .dr-row :is(.dr-money-slot,.dr-pill-value){flex:none;width:auto !important;min-width:0 !important;max-width:none;}
  .dr-card .dr-row .dr-pill-value{height:1.4rem;padding:0 .3rem !important;font-size:.6875rem !important;gap:.2rem;}
  .dr-card .dr-row .dr-pill-value .logo,.dr-card .dr-row .dr-pill-value .dr-pi img{width:.95rem;height:.95rem;}
  .dr-card .dr-row .dr-money-slot:empty{display:none;}
  .dr-card .dr-row .dr-pill-sum{width:auto !important;min-width:0 !important;height:1.4rem;padding:0 .3rem !important;font-size:.6875rem;}
  .dr-card .dr-row .dr-pill-two{height:auto;flex-direction:column;line-height:1.1;font-size:.5625rem;}
  .dr-card .dr-row .dr-transfer-note{flex:1 1 auto;}
  .dr-card .dr-row .dr-transfer .dr-pill{flex:none;width:auto !important;height:1.4rem;padding:0 .15rem !important;}
  .dr-card .dr-row .dr-transfer .dr-pill > .dr-pt{display:none !important;}
  .dr-card .dr-row .dr-transfer .logo{width:.95rem;height:.95rem;}
  .dr-card .dr-row .dr-arrow{width:.7rem;}
  .dr-card .dr-row .dr-model{gap:.2rem;}
  .dr-card .dr-row .dr-model img{width:1.1rem;height:1.1rem;}
  .dr-card .dr-row .dr-model-id{padding:0 .2rem;font-size:.5625rem;line-height:.95rem;}
  /* the day report's «Подробно», the service centre: one repair, one line -- the face, the date small on two lines,
     the repair's number, the last action (its picture and word, cut short), "+N" and the money at the right */
  .dr-card-repairs .dr-row{flex-wrap:nowrap !important;gap:.25rem !important;padding:.35rem .55rem !important;}
  .dr-card-repairs .dr-row > *{min-width:0;}
  .dr-card-repairs .dr-row .dr-who{flex:none;width:1.4rem !important;height:1.4rem;padding:0 !important;justify-content:center;}
  .dr-card-repairs .dr-row .dr-who .dr-face{width:1.05rem;height:1.05rem;}
  .dr-card-repairs .dr-row .dr-when{flex:none;width:2.35rem;font-size:.5625rem !important;line-height:1.1;white-space:normal;}
  .dr-card-repairs .dr-row > .dr-pill-blue{flex:none;height:1.4rem;padding:0 .3rem !important;font-size:.625rem;}
  .dr-card-repairs .dr-row > .dr-pill-blue > .dr-pi{display:none;}
  .dr-card-repairs .dr-row > .dr-pill-blue > .dr-pt{display:block !important;padding:0;}
  .dr-card-repairs .dr-row .dr-caption{flex:1 1 auto !important;order:0 !important;display:flex;align-items:center;gap:.2rem;overflow:hidden;}
  .dr-card-repairs .dr-row .dr-caption .dr-pill{flex:0 1 auto;min-width:0;height:1.4rem;padding:0 .25rem !important;font-size:.625rem;}
  .dr-card-repairs .dr-row .dr-caption .dr-pill > .dr-pi img{width:.85rem;height:.85rem;}
  .dr-card-repairs .dr-row .dr-caption .dr-pill > .dr-pt{display:block !important;padding:0 .15rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .dr-card-repairs .dr-row .dr-caption .dr-pill-square{flex:none;}
  .dr-card-repairs .dr-row .dr-caption .dr-who-inline{width:1.4rem !important;}
  .dr-card-repairs .dr-row .dr-caption :is(.dr-comment,.dr-part){display:none;}
  .dr-card-repairs .dr-row .dr-value{flex:none;display:flex;align-items:center;gap:.15rem;margin-left:0;}
  .dr-card-repairs .dr-row .dr-more{height:1.4rem;padding:0 .2rem !important;font-size:.625rem;}
  .dr-card-repairs .dr-row .dr-more > .dr-pi{display:none;}
  .dr-card-repairs .dr-row .dr-more > .dr-pt{display:block !important;}
  .dr-card-repairs .dr-row .dr-money-slot:empty{display:none;}
  .dr-card-repairs .dr-row .dr-pill-value{height:1.4rem;padding:0 .3rem !important;font-size:.6875rem !important;gap:.2rem;}
  .dr-card-repairs .dr-row .dr-pill-value .logo{width:.95rem;height:.95rem;}
  .dr-card-repairs .dr-row :is(.dr-money-slot,.dr-pill-value){flex:none;width:auto !important;min-width:0 !important;max-width:none;}
  /* the sign-in / sign-up pages: the card at the top, under the language switcher -- centred, the keyboard that comes up
     with a field left an empty screen above it */
  .auth-shell{align-items:flex-start;padding:4.25rem .75rem 1.5rem;}
  .auth-card{padding:1.5rem 1.25rem;}
  /* the landing page: the header the logo, the language and the two buttons -- smaller --; the name a line under it */
  .landing-header{gap:.4rem;padding:.6rem .75rem;}
  .landing-header-actions{gap:.35rem;}
  .landing-header-actions .btn{height:2.1rem;min-height:0;padding:0 .7rem;font-size:.8125rem;}
  .landing-brand-mobile{padding:1.25rem 1rem 0;text-align:center;font-size:1.5rem;font-weight:700;letter-spacing:-.01em;}
  .hero{padding-top:1.25rem;}
  .hero-actions{flex-direction:column;align-items:stretch;}   /* the two calls one under the other, the screen's width */
  .dr-group-line > .dr-group-cancel{display:none !important;}   /* the phone: the swipe instead */
  .dr-line-cancel .icon-button{background:var(--destructive);}   /* «Кратко»: a row's cancellation under its swipe */
  .dr-line-cancel .bi{font-size:1.2rem;}
  .ap-tiles{grid-template-columns:repeat(3,minmax(0,1fr));}   /* an account picker's tiles: three to a row */
  /* a window is a sheet from the bottom, the screen's whole width */
  dialog.dialog[open]{width:100% !important;max-width:100% !important;max-height:94dvh !important;margin:auto 0 0 !important;
    border-radius:var(--radius) var(--radius) 0 0;--dialog-pad:1rem;padding-left:1rem;padding-right:1rem;}
}
/* the countdown before a switchover between the servers (maintenance_notice.js): a "!" sticker and the minutes left,
   beside the envelope, the header counters' size */
.header-restart{display:inline-flex;align-items:center;gap:.3rem;height:2.25rem;padding:0 .5rem;border-radius:var(--radius);
  color:var(--foreground);font-variant-numeric:tabular-nums;font-weight:600;font-size:.9rem;cursor:default;}
.header-restart[hidden]{display:none;}
.header-restart:is(:hover,:focus-visible,:has(:focus-visible)){background:var(--accent);}
.header-restart svg{width:1.4rem;height:1.4rem;flex:none;}
.restart-dialog{max-width:26rem;}
.restart-dialog p{line-height:1.5;}
/* the form bots' trap (bot_trap.py): a field kept off-screen, never shown to a person */
.bot-trap{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}
/* the day report: an expense and its cancellation in different periods, each marked (day_report.REVERSED_IN_PERIOD) */
.dr-mark{display:inline-block;margin-right:.4rem;padding:0 .4rem;border-radius:999px;font-size:.75rem;line-height:1.4rem;white-space:nowrap;}
.dr-mark-reversal{background:color-mix(in srgb,var(--success,#16a34a) 14%,transparent);color:var(--success,#15803d);}
.dr-mark-reversed{background:color-mix(in srgb,var(--destructive,#dc2626) 12%,transparent);color:var(--destructive,#b91c1c);}
/* the customer's passport block (customer.html, passports.py) */
.cu-passport-scans{display:flex;flex-wrap:wrap;gap:.6rem;padding:.8rem 1rem;border-bottom:1px solid var(--border)}
.cu-passport-scan{position:relative;display:inline-flex}
.cu-passport-scan a{display:flex;width:5.5rem;height:4rem;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--border);border-radius:.5rem;background:var(--card);color:var(--muted-foreground);font-size:1.5rem}
.cu-passport-scan img{width:100%;height:100%;object-fit:cover}
.cu-passport-remove{position:absolute;top:-.4rem;right:-.4rem;width:1.3rem;height:1.3rem;padding:0;border:1px solid var(--border);border-radius:50%;background:var(--card);color:var(--muted-foreground);font-size:.65rem;cursor:pointer}
.cu-passport-remove:is(:hover,:focus-visible,:has(:focus-visible)){color:#dc2626}
.cu-passport-add{display:inline-flex;width:5.5rem;height:4rem;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;border:1px dashed var(--border);border-radius:.5rem;color:var(--primary);font-size:.7rem;text-align:center;cursor:pointer}
.cu-passport-add i{font-size:1.2rem}
.cu-passport-add:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--primary)}
.cu-passport-note{margin:0;padding:.5rem 1rem;color:var(--muted-foreground);font-size:.8rem;border-bottom:1px solid var(--border)}
.rp-client-input.cu-recognized{background:color-mix(in srgb,#f59e0b 18%,transparent);border-radius:.3rem}
/* a used item's purchase contracts (item.html, purchase_contracts.py) */
.it-contracts{padding:.4rem 0}
.it-contract-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .8rem;padding:.6rem 1rem;border-bottom:1px solid var(--border)}
.it-contract-icon{font-size:1.3rem;color:var(--muted-foreground)}.it-contract-signed{color:#16a34a}
.it-contract-main{flex:1 1 14rem;min-width:0}.it-contract-main small{display:block;color:var(--muted-foreground)}
.it-contract-actions{display:flex;flex-wrap:wrap;gap:.4rem}
.it-contract-none{margin:0;padding:.8rem 1rem;color:var(--muted-foreground)}
.it-contract-new{padding:.7rem 1rem}
.it-contract-dialog{width:min(34rem,calc(100vw - 2rem))}
.it-contract-hint{color:var(--muted-foreground);font-size:.85rem}
.it-contract-amount{display:flex;align-items:center;gap:.6rem;margin-top:1rem}.it-contract-amount .input{max-width:10rem;text-align:right}
.it-contract-ways{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.it-contract-way{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:1.2rem .8rem;border:1px solid var(--border);border-radius:.8rem;background:var(--card);color:var(--foreground);text-align:center;text-decoration:none;font:inherit;cursor:pointer}
.it-contract-way i{font-size:2rem;color:var(--primary)}.it-contract-way small{color:var(--muted-foreground)}
.it-contract-way:is(:hover,:focus-visible,:has(:focus-visible)){border-color:var(--primary)}
.it-contract-qr{display:flex;justify-content:center}.it-contract-qr svg{width:14rem;height:14rem}
.contract-item{margin:.8rem 0;padding:.6rem .8rem;border:1px solid var(--border);border-radius:.6rem;font-size:.9rem}
.contract-item>div{padding:.2rem 0}.contract-item span{display:inline-block;min-width:7.5rem;color:var(--muted-foreground)}
/* inside the contract's window the picker's panel is a list under the field: a <dialog> scrolls, and a panel floating
   over it was cut off -- the seller's surname typed, nothing seemed to happen (2026-11-23) */
.it-contract-customer .cp-panel{position:static;width:auto;max-width:none;margin-top:.4rem;box-shadow:none}
.cu-passport-given{color:#16a34a}
.cu-passport-dialog{width:min(36rem,calc(100% - 2rem))}
.cu-passport-dialog .cu-passport-scans{border:0;padding:.4rem 0 .8rem}
.cu-passport-dialog .cu-passport-note{border:0;padding:0 0 .6rem}
.cu-passport-fields{border-top:1px solid var(--border)}
.it-contract-passport{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.8rem;padding:.6rem .8rem;border:1px solid color-mix(in srgb,#f59e0b 50%,var(--border));border-radius:.6rem;background:color-mix(in srgb,#f59e0b 8%,transparent);font-size:.85rem}
.it-contract-passport[hidden]{display:none}
.it-contract-passport-done{border-color:color-mix(in srgb,#16a34a 50%,var(--border));background:color-mix(in srgb,#16a34a 8%,transparent)}

/* A model's page: the archived mark and «Статистика» (model.html, 2026-11-23) */
.md-archived{display:inline-block;vertical-align:middle;margin-left:.5rem;padding:.1rem .5rem;border-radius:999px;font-size:.75rem;font-weight:600;background:var(--muted);color:var(--muted-foreground);}
.md-archived-removed{background:color-mix(in srgb,#dc3545 12%,transparent);color:#b02a37;}
.md-stats-body{padding:0 1.1rem 1rem;}
.md-stats-condition{margin:1rem 0 .4rem;font-size:.875rem;font-weight:600;}
.md-stats-table{width:100%;border-collapse:collapse;font-size:.875rem;}
.md-stats-table th,.md-stats-table td{padding:.4rem .5rem;border-bottom:1px solid var(--border);text-align:right;white-space:nowrap;}
.md-stats-table thead th{font-weight:600;color:var(--muted-foreground);font-size:.8125rem;}
.md-stats-table tbody th{text-align:left;font-weight:500;}
.md-stats-table tbody th i{margin-right:.45rem;color:var(--muted-foreground);}
.md-stats-now{display:flex;flex-wrap:wrap;gap:.4rem 1.5rem;margin:.6rem 0 0;font-size:.875rem;color:var(--muted-foreground);}
.md-stats-now i{margin-right:.35rem;}
.md-chart-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin:1.25rem 0 .25rem;}
.md-chart-title{font-weight:600;font-size:.875rem;}
.md-chart-switch{grid-auto-columns:minmax(5.5rem,auto);}
@media (max-width:600px){.md-stats-table th,.md-stats-table td{padding:.35rem .3rem;white-space:normal;}}
/* the absorption window's rows (2026-11-24): the item's tag (picture + number under it), the name in full, its properties */
.it-absorb-row{align-items:center;gap:.75rem;}
.it-absorb-text{display:flex;flex-direction:column;gap:.15rem;min-width:0;flex:1;text-align:left;}
.it-absorb-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.25;}
.it-absorb-facts{color:var(--muted-foreground);font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* the absorption window (2026-11-24): wider, the search's three filters above its search box, nothing until asked */
#absorb-dialog.it-absorb-dialog{width:min(44rem,calc(100vw - 2rem));max-width:none;}
.it-absorb-filters{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:.6rem;}
.it-absorb-empty{margin:.25rem 0 .75rem;text-align:center;}
.it-absorb-left{flex:none;width:4rem;text-align:right;color:var(--muted-foreground);white-space:nowrap;}
.it-absorb-row .it-absorb-cost{flex:none;width:7.5rem;text-align:right;margin-left:.5rem;padding-left:0;}

/* an absorbable item's notes (2026-11-24): one line each, cut, the whole in the tooltip */
.it-absorb-note{display:flex;align-items:center;gap:.3rem;color:var(--muted-foreground);font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.it-absorb-note img{width:14px;height:14px;flex:none;}
