/* Общие элементы: страница, кнопки, поля, таблицы, карточки, окна, уведомления.
   Часть общего каскада: порядок подключения — ui.Stylesheets. */
*,*::before,*::after{box-sizing:border-box}
/* hidden means hidden. A display rule on a class — .btn, .chip, .seg —
   used to win over the attribute, and a button told to go away stayed:
   "Start Sourcing" on every step of a deal long past sourcing. */
[hidden]{display:none!important}
body{margin:0;background:var(--plane);color:var(--ink);
  font:400 15px/1.5 var(--sans);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit}
:focus-visible{outline:2.5px solid var(--focus);outline-offset:2px;border-radius:5px}
/* A box already draws its own focus, and the ring above drew a second one
   around it — at a different radius, so the corners did not nest. One
   ring: the border takes the colour and a halo sits outside it, following
   the shape the box already has. */
.fld input:focus-visible,.fld select:focus-visible,.fld textarea:focus-visible,
.wbox:focus-visible{outline:none}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
h1,h2{margin:0;font-weight:600;letter-spacing:-.015em}
h1{font-size:23px} h2{font-size:17px}
p{margin:0 0 10px}
a{color:var(--accent);text-decoration:none;font-weight:500}
a:hover{text-decoration:underline}
.num{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500}
.muted{color:var(--ink-3)} .small{font-size:13px} .b{font-weight:600}

.top{position:sticky;top:0;z-index:30;background:var(--panel);border-bottom:1px solid var(--line)}
.top-in{max-width:var(--page);margin:0 auto;padding:11px 20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
/* Navigation and actions are real links here.
   The prototype used <button> because it was a single page; in the
   application these move between pages, so middle-click, browser history
   and "open in a new tab" have to work. The selectors below cover both
   forms — nothing about the appearance changes. */
.logo{font-weight:600;font-size:16px;letter-spacing:-.02em;margin-right:6px;
  color:var(--ink);text-decoration:none}
.logo:hover{text-decoration:none}
/* The organisation's own logo and name in place of the product's. The
   picture is a letterhead logo, so it is fitted to the bar's height and
   never stretched; a long name is cut rather than pushing the menu over. */
.logo{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:260px}
.logo img{height:28px;width:auto;max-width:120px;object-fit:contain;flex:none}
.logo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav{display:flex;gap:4px;flex-wrap:wrap}
.nav button,.nav a{height:38px;padding:0 15px;border-radius:var(--r);cursor:pointer;border:0;
  font-weight:500;font-size:15px;line-height:1;font-family:inherit;color:var(--ink-2);background:transparent;display:inline-flex;align-items:center;gap:7px;
  text-decoration:none;white-space:nowrap}
.nav button:hover,.nav a:hover{background:var(--soft);color:var(--ink);text-decoration:none}
.nav button[aria-current="true"],.nav a[aria-current="true"]{background:var(--wash);color:var(--accent-2)}
.pill{min-width:21px;height:21px;padding:0 6px;border-radius:11px;display:inline-flex;
  align-items:center;justify-content:center;font:600 12px/1 var(--mono);background:var(--accent);color:#fff}
.find{position:relative;min-width:180px;max-width:230px;margin-left:auto}
.find input{width:100%;height:38px;padding:0 12px 0 36px;font:500 14px/1 var(--mono);
  color:var(--ink);background:var(--sunk);border:1.5px solid transparent;border-radius:var(--r)}
.find input:focus{border-color:var(--focus);background:var(--panel)}
.find input::placeholder{font-family:"IBM Plex Sans",sans-serif;font-weight:400;color:var(--ink-3)}
.find svg{position:absolute;left:12px;top:11px;color:var(--ink-3)}
.ghost{width:38px;height:38px;border-radius:var(--r);cursor:pointer;background:transparent;
  border:0;color:var(--ink-2);font-size:16px}
.ghost:hover{background:var(--soft)}

.wrap{max-width:var(--page);margin:0 auto;padding:20px 20px 70px}
.screen{display:none} .screen.on{display:block}

.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:20px}
.card+.card{margin-top:14px}
.ct{font-size:17px;font-weight:600;letter-spacing:-.015em;margin:0 0 3px}
.cs{color:var(--ink-2);font-size:14px;margin:0 0 16px}

.btn{height:44px;padding:0 20px;border-radius:var(--r);cursor:pointer;font-weight:500;font-size:15px;line-height:1;font-family:var(--sans);
  display:inline-flex;align-items:center;gap:8px;background:var(--panel);color:var(--ink);
  border:1.5px solid var(--line-2)}
.btn:hover{background:var(--soft);text-decoration:none}
/* A button that can do nothing right now looks it, wherever it is. */
.btn:disabled{opacity:.5;cursor:default;pointer-events:none}
a.btn{text-decoration:none}
.btn-go{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-go:hover{background:var(--accent-2);text-decoration:none}
.btn-ok{background:var(--ok);border-color:var(--ok);color:#fff}
.btn-s{height:36px;padding:0 14px;font-size:14px;border-radius:var(--r-s)}
.btn-q{border-color:transparent;background:transparent;color:var(--accent)}
.btn-q:hover{background:var(--wash);text-decoration:none}
/* The secondary action beside a primary one: outlined, same height. */
.btn-line{border-color:var(--accent);color:var(--accent)}
.btn-line:hover{background:var(--wash)}
/* A mark at the end of a row: the bin, the pencil. Quiet until hovered;
   a removal turns red under the pointer, not before. */
.icon-btn{display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border:0;background:transparent;color:var(--ink-3);
  border-radius:7px;cursor:pointer;vertical-align:middle}
.icon-btn:hover{background:var(--soft);color:var(--ink)}
.icon-btn.rm:hover{background:var(--crit-wash);color:var(--crit)}
.icon-btn+.icon-btn{margin-left:2px}

/* ── command buttons ───────────────────────────────
   A .btn is a decision — save this, send this document, add this part —
   and it is sized like one. Reply, Reply All and Forward are not
   decisions: they are the commands a person runs forty times a morning,
   and forty 44-pixel buttons is a toolbar that has eaten the letter. So
   they are small, flat and labelled beside their icon, which is the shape
   every mail client has settled on and the one Outlook taught. */
.btn-cmd{height:28px;padding:0 7px;display:inline-flex;align-items:center;gap:5px;
  border:1px solid transparent;border-radius:var(--r-s);background:transparent;
  color:var(--ink);font-weight:400;font-size:13px;line-height:1;font-family:inherit;cursor:pointer;white-space:nowrap}
.btn-cmd:hover{background:var(--sunk);border-color:var(--line);text-decoration:none}
.btn-cmd:disabled{opacity:.55;cursor:default;background:transparent;border-color:transparent}
.btn-cmd .i{width:15px;height:15px;flex-shrink:0;fill:none;stroke:currentColor;
  stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.btn-cmd-go{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:500}
.btn-cmd-go:hover{background:var(--accent-2);border-color:var(--accent-2);color:#fff}
.btn-cmd-go .i{opacity:1}
.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.bar{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:18px}
kbd{font:500 12px/1 var(--mono);padding:4px 6px;border-radius:5px;background:var(--sunk);
  border:1px solid var(--line);color:var(--ink-2)}

.cc{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 6px;border-radius:20px;
  font-size:13px;font-weight:500;background:var(--sunk);white-space:nowrap}
.cc i{padding:2px 6px;border-radius:20px;font:600 12px/1.35 var(--mono)}
.cc-1 i{background:var(--c1);color:var(--c1t)} .cc-2 i{background:var(--c2);color:var(--c2t)}
.cc-3 i{background:var(--c3);color:var(--c3t)} .cc-4 i{background:var(--c4);color:var(--c4t)}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:20px;
  font-size:13px;font-weight:500;background:var(--sunk);color:var(--ink-2);white-space:nowrap}
.chip[hidden]{display:none}
.chip-ok{background:var(--ok-wash);color:var(--ok)}
.chip-w{background:var(--warn-wash);color:var(--warn)}
.chip-c{background:var(--crit-wash);color:var(--crit)}
.chip-a{background:var(--wash);color:var(--accent-2)}

.money{display:flex;align-items:center;gap:12px 26px;flex-wrap:wrap;padding:18px 20px;
  background:var(--ok-wash);border-radius:var(--r)}
.money.plain{background:var(--sunk)}
.m{display:flex;flex-direction:column;gap:2px}
.m span{font-size:13px;color:var(--ink-3)} .m b{font:600 21px/1.2 var(--mono)}
.big{font:600 29px/1 var(--mono);letter-spacing:-.02em;color:var(--ok)}
/* Three answers of equal weight, each saying what follows from it. A
   button per answer rather than one primary and two afterthoughts: the
   customer said one of three things, and none of them is the default. */
.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.choice{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;
  padding:12px 14px;border:1.5px solid var(--line-2);border-left-width:5px;border-radius:var(--r);
  background:var(--sunk);cursor:pointer;font:inherit;color:var(--ink);transition:background .12s,border-color .12s}
.choice b{font-size:14.5px}
.choice span{font-size:12.5px;color:var(--ink-3);line-height:1.35}
/* Each answer wears its own colour on the edge and in its name, so the
   three read as three buttons and not as three notes: green for a yes,
   amber for a haggle, red for a no. */
.choice-yes{border-left-color:var(--ok)} .choice-yes b{color:var(--ok)}
.choice-maybe{border-left-color:var(--warn)} .choice-maybe b{color:var(--warn)}
.choice-no{border-left-color:var(--crit)} .choice-no b{color:var(--crit)}
.choice:hover{background:var(--panel);border-color:var(--ink-3)}
.choice-yes:hover{border-color:var(--ok);background:var(--ok-wash)}
.choice-maybe:hover{border-color:var(--warn);background:var(--warn-wash)}
.choice-no:hover{border-color:var(--crit);background:var(--crit-wash)}
.choice:disabled{opacity:.5;cursor:default;pointer-events:none}
@media(max-width:900px){.choices{grid-template-columns:minmax(0,1fr)}}
.arrow{color:var(--ink-3);font-size:20px}

.steps{display:flex;gap:6px;flex-wrap:wrap}
.steps button{padding:8px 15px;border-radius:20px;font-weight:500;font-size:13.5px;line-height:1.2;font-family:inherit;cursor:pointer;
  background:var(--sunk);color:var(--ink-3);border:0}
.steps button:hover{color:var(--ink)}
.steps button.was{background:var(--wash);color:var(--accent-2)}
.steps button.is{background:var(--accent);color:#fff}
.steps button.stopped{box-shadow:inset 0 0 0 1.5px var(--crit);color:var(--crit);background:var(--crit-wash)}

.scroll{overflow-x:auto;margin:0 -20px;padding:0 20px}
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;white-space:nowrap;padding:0 24px 9px 0;font-size:13px;font-weight:500;color:var(--ink-3)}
td{padding:13px 24px 13px 0;border-top:1px solid var(--line);white-space:nowrap;vertical-align:middle}
th:last-child,td:last-child{padding-right:0}
th.r,td.r{text-align:right}
td.r{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500}
tr.pick td{background:var(--wash)}
tr.pick td:first-child{border-radius:var(--r-s) 0 0 var(--r-s)}
tr.pick td:last-child{border-radius:0 var(--r-s) var(--r-s) 0}
tr.go td{cursor:pointer}
tr.go:hover td{background:var(--soft)}

.facts{display:flex;flex-wrap:wrap;gap:20px 34px}
.fk{font-size:13px;color:var(--ink-3);margin-bottom:2px}
.fv{font-size:15px}
/* A long value — a delivery address on the quotation's terms — wraps
   within a measure instead of stretching the row or being cut. */
.facts>div{min-width:0;max-width:100%}
.fv.fv-long{white-space:pre-line;overflow-wrap:anywhere;max-width:46ch;line-height:1.4}

/* реквизиты — две колонки ключ/значение */
.req{display:grid;grid-template-columns:auto 1fr;gap:11px 20px;font-size:14.5px;align-items:baseline}
.req dt{color:var(--ink-3);font-size:13.5px;white-space:nowrap}
.req dd{margin:0}
.req .copy{margin-left:8px;font-size:12px;color:var(--accent);cursor:pointer;
  background:none;border:0;padding:0;font-family:inherit;opacity:0}
.req dd:hover .copy{opacity:1}

/* The aside grows with the page rather than staying put: left fixed, the
   working column would take the whole of the extra width and the two
   would no longer sit in the proportion the screens were drawn in. */
/* `minmax(0,1fr)` rather than `1fr`, which is short for `minmax(auto,1fr)`
   — and an automatic minimum is the content's minimum, so a column
   refuses to shrink below the widest thing in it and pushes the aside
   off the side of the window instead. The tables inside already scroll;
   letting the track shrink is what lets them.

   This was true before the page was widened and showed at other window
   sizes: at 1440 the old layout ran 110 px off the screen and the new
   one 56 px, which is why it read as a new fault. */
.cols{display:grid;grid-template-columns:minmax(0,1fr) 396px;gap:14px;align-items:start}
.cols2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
@media(max-width:900px){.cols,.cols2{grid-template-columns:minmax(0,1fr)}}
/* A tablet at 1024 has 984 px of content, and a fixed 330 px aside
   leaves the working column too narrow for a table of parts. The aside
   holds figures and short lists, so it is the one that gives way. */
@media(min-width:901px) and (max-width:1080px){
  .cols{grid-template-columns:minmax(0,1fr) 280px}
  .wrap{padding-left:14px;padding-right:14px}
}

/* Prose in a table cell wraps; everything else does not.
   `td` is `nowrap` so that dates, part numbers and figures keep their
   shape — but a cell holding a sentence then widens the whole table
   until it runs out of the card, and the sentence is cut mid-word with
   nothing to say it was. Marked per cell rather than turned off wholesale,
   because the nowrap is right nearly everywhere. */
td.prose{white-space:normal}
/* A cell of buttons, allowed to fall onto a second line. Held on one line
   it decided the width of the whole table, and in a language whose words
   are longer than English the last of the three hung off the card. */
td.acts{white-space:normal}
td.acts>*{display:inline-flex;margin:2px 0 2px 6px}
td.prose .chip{white-space:normal;text-align:left}

.note{padding:14px 16px;border-radius:var(--r);background:var(--wash);color:var(--ink-2);
  font-size:14px;line-height:1.55}
.note b{color:var(--ink)}
.note-w{background:var(--warn-wash);color:var(--warn)} .note-w b{color:var(--warn)}

/* The track minimum decides how many fields sit on a line. Raised with
   the dialog rather than left alone: at the old minimum a wider dialog
   simply fits a fourth column, which makes every field narrower than it
   was — the opposite of what widening it is for. Three columns, each
   with the room the extra width bought. */
.form{display:grid;grid-template-columns:repeat(auto-fit,minmax(216px,1fr));gap:14px}
/* Three fields on a line, and their inputs on one line with each other.
   A label that wraps — "Юридическое наименование (необязательно)" does,
   where "Legal name (optional)" did not — used to push its own input a
   line lower than its neighbours', so a row of three boxes sat at three
   heights. `subgrid` lets every field share the parent's rows: label,
   control, hint, each aligned across the row rather than stacked inside
   its own cell. Reserving two lines for every label instead would put
   the gap on every dialog to fix the few that need it. */
.form>.fld{display:grid;grid-template-rows:subgrid;grid-row:span 3;
  align-content:start;gap:0}
/* A tick box and a title are one line, not label-control-hint: spanning
   three rows of the form left a box with a gap under it the height of a
   field ("Одобренный поставщик", the offices). */
.form>.fld.fld-check,.form>.fld.fld-head{display:block;grid-row:span 1}
.fld-head{margin-bottom:-8px}
.fld-title{font-size:13px;color:var(--ink-2);font-weight:500}
.fld label{display:block;font-size:13px;color:var(--ink-2);margin-bottom:5px;font-weight:500}
.fld input,.fld select,.fld textarea{width:100%;height:44px;padding:0 13px;font-weight:400;font-size:15px;line-height:1;font-family:inherit;
  color:var(--ink);background:var(--panel);border:1.5px solid var(--line-2);border-radius:var(--r-s)}
.fld textarea{height:80px;padding:11px 13px;line-height:1.5;resize:vertical;font-family:inherit}
.fld input.num{font-family:var(--mono);font-weight:500}
/* A hint in a figure field is words, not a figure: the site's font. */
input.num::placeholder,input.mono::placeholder,input[class*="pn"]::placeholder{font-family:var(--sans);font-weight:400}
.fld input:focus,.fld select:focus,.fld textarea:focus{
  border-color:var(--focus);box-shadow:0 0 0 3px rgb(42 127 212/.22)}
/* A box nobody may fill in yet. Without this, the disabled "Contact"
   looked exactly like the one above it that was waiting to be used. */
.fld select:disabled,.fld input:disabled{
  background:var(--sunk);color:var(--ink-3);border-style:dashed;cursor:not-allowed}
.hint{font-size:12.5px;color:var(--ink-3);margin-top:5px}

/* A long explanation, folded away. The question mark sits with the label
   rather than under the box, because it belongs to the name of the thing
   and not to what has been typed into it. */
.lab-row{display:flex;align-items:baseline;gap:7px;margin-bottom:5px}
.lab-row label{margin:0}
.q{appearance:none;border:1px solid var(--line-2);background:var(--panel);
  width:17px;height:17px;border-radius:50%;padding:0;cursor:pointer;
  font-weight:600;font-size:11px;line-height:1;font-family:inherit;color:var(--ink-3);display:grid;place-items:center;flex:none}
.q:hover{border-color:var(--accent);color:var(--accent)}
.q[aria-expanded="true"]{background:var(--wash);border-color:var(--accent);color:var(--accent)}
.note{margin:6px 0 0;padding:9px 11px;font-size:12.5px;line-height:1.5;
  color:var(--ink-2);background:var(--soft);
  border-left:2px solid var(--accent);border-radius:0 var(--r-s) var(--r-s) 0}
.note[hidden]{display:none}

/* An aircraft on the ground. Not a colour for decoration: this is the
   one value in the box that changes what everybody does next. */
.fld select.urgent{color:var(--crit);border-color:var(--crit);font-weight:600}

/* Column headings over the rows of parts. They existed only as
   aria-labels — a screen reader knew what the three boxes were and an
   eye did not. */
.line-head{display:grid;grid-template-columns:minmax(0,2fr) 80px minmax(0,1.4fr) 36px;
  gap:8px;margin-bottom:-4px}
.line-head span{font-size:12px;color:var(--ink-3);font-weight:500}

/* The other numbers a part answers to, under its own. */
.also{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 9px;margin-top:9px}
.also .pn{font:500 13px/1 var(--mono);background:var(--sunk);color:var(--ink-2);
  padding:5px 9px;border-radius:var(--r-s)}

/* More numbers for one part: subordinate to the number above, not equal
   to it. Ruled off on the left, a size smaller, no label of its own. */
.alts{margin-top:9px;padding-left:11px;border-left:2px solid var(--line);
  display:flex;flex-direction:column;gap:6px}
.alts[hidden]{display:none}
.alts-lab{font-size:12px;color:var(--ink-3);font-weight:500}
.alt-rows{display:flex;flex-direction:column;gap:6px}
.alt-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;gap:6px}
.alt-row input{height:38px;font-size:14px;padding:0 11px}
.alt-x{height:38px;width:30px;padding:0;cursor:pointer;
  border:1.5px solid var(--line-2);border-radius:var(--r-s);
  background:var(--panel);color:var(--ink-3);font-weight:400;font-size:16px;line-height:1;font-family:inherit;
  display:grid;place-items:center}
.alt-x:hover{border-color:var(--crit);color:var(--crit)}
.alts .hint{margin-top:1px}
.add-alt{appearance:none;background:transparent;border:0;padding:8px 0 0;
  cursor:pointer;font-weight:500;font-size:13px;line-height:1.4;font-family:inherit;color:var(--accent);align-self:flex-start}
.add-alt:hover{text-decoration:underline}

/* What may be skipped, behind one fold and named once. */
.more{appearance:none;width:100%;text-align:left;cursor:pointer;
  background:transparent;border:0;border-top:1px solid var(--line);
  padding:14px 0 0;margin-top:16px;
  font-weight:500;font-size:14px;line-height:1.4;font-family:inherit;color:var(--accent);
  display:flex;align-items:center;gap:8px}
.more .chev{transition:transform .15s}
.more[aria-expanded="true"] .chev{transform:rotate(90deg)}
/* The count on one line; the list of what is inside wraps rather than
   lose its end to an ellipsis — the point of it is to be read. */
.more{align-items:baseline}
.more .lbl{white-space:nowrap;flex:none}
.more .rest{color:var(--ink-3);font-weight:400}
.opt-zone{margin-top:16px}
.opt-zone[hidden]{display:none}
/* Softer to look at than what is required above it, without a word
   saying so on every box. */
.opt-zone input,.opt-zone select,.opt-zone textarea{background:var(--soft)}

.todo{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:11px}
.todo li{display:flex;gap:11px;align-items:flex-start;font-size:14.5px}
.todo .mk{width:20px;height:20px;border-radius:50%;flex:none;display:grid;place-items:center;
  font-size:12px;font-weight:600;margin-top:1px}
.todo .yes{background:var(--ok-wash);color:var(--ok)}
.todo .no{background:var(--crit-wash);color:var(--crit)}
.todo .wait{background:var(--sunk);color:var(--ink-3)}

.tl{list-style:none;margin:0;padding:0}
.tl li{display:flex;gap:12px;padding-bottom:16px;position:relative}
.tl li::before{content:"";width:11px;height:11px;border-radius:50%;flex:none;margin-top:5px;
  background:var(--accent);box-shadow:0 0 0 3px var(--wash)}
.tl li.w::before{background:var(--panel);box-shadow:inset 0 0 0 2px var(--line-2)}
.tl li:not(:last-child)::after{content:"";position:absolute;left:5px;top:20px;bottom:0;width:1.5px;background:var(--line)}
.tl .when{font-size:13px;color:var(--ink-3);margin-top:1px}
.tl li.w>div>span:first-child{color:var(--ink-3)}

.letter{background:var(--sunk);border-radius:var(--r);padding:16px 18px;font-size:14px}
.filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px}
.filters button{height:36px;padding:0 15px;border-radius:20px;cursor:pointer;font-weight:500;font-size:14px;line-height:1;font-family:inherit;
  color:var(--ink-2);background:var(--panel);border:1.5px solid var(--line)}
.filters button:hover{border-color:var(--line-2);color:var(--ink)}
.filters button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}
.kpi{padding:14px 16px;background:var(--sunk);border-radius:var(--r)}
.kpi b{display:block;font:600 21px/1.2 var(--mono);margin-top:3px}
/* The words in a figure — "of", "h", "USD", "%" — are words, in the
   site's face: set in the figures' monospace they spread out ("1  из  8"). */
.kpi b .u,.m b .u{font-family:var(--sans);font-weight:500;font-size:.72em;color:var(--ink-2)}
/* An empty card says so quietly, the way an empty step of a deal does. */
.empty-note{margin:0;font-size:13px;color:var(--ink-3)}

/* аватар-инициалы */
.ava{width:44px;height:44px;border-radius:var(--r);flex:none;display:grid;place-items:center;
  font-weight:600;font-size:15px;line-height:1;font-family:inherit;background:var(--wash);color:var(--accent-2)}
.ava-s{width:32px;height:32px;font-size:12.5px;border-radius:var(--r-s)}

/* контакты */
.people{display:flex;flex-direction:column;gap:14px}
.person{display:flex;gap:11px;align-items:flex-start}
/* A device calls itself whatever its browser says, which is one unbroken
   hundred-character word. A flex item will not shrink below its longest
   word unless it is allowed to, so the row grew until it pushed its own
   button off the side of the window — on the narrow aside, off the page
   entirely. */
.person>div{min-width:0}
.person .nm,.person .rl{overflow-wrap:anywhere}
.person .nm{font-weight:500}
.person .rl{font-size:13px;color:var(--ink-3)}
.person .ct2{font-size:13.5px;margin-top:3px}

/* калькулятор */
.stack{display:flex;gap:2px;height:12px;border-radius:6px;overflow:hidden}
.stack i{display:block;min-width:2px}
.legend{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.legend li{display:flex;align-items:center;gap:9px;font-size:13.5px}
.legend .sw{width:10px;height:10px;border-radius:3px;flex:none}
.legend .v{margin-left:auto;font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500}
.legend .pc{color:var(--ink-3);font-size:12.5px;width:42px;text-align:right;
  font-family:var(--mono);font-variant-numeric:tabular-nums}

/* ── вход ─────────────────────────────────────── */
body[data-auth="out"] #app{display:none}
body[data-auth="in"]  #login{display:none}
#login{min-height:100vh;display:grid;place-items:center;padding:24px}
.login-box{width:100%;max-width:400px}
.login-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:30px}
.login-logo{font-weight:600;font-size:20px;letter-spacing:-.02em;margin-bottom:4px}
.demo{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}

/* ── роли ─────────────────────────────────────── */
body[data-role="mgr"]  .boss{display:none!important}
body[data-role="boss"] .mgr{display:none!important}

/* ── пользователь в шапке ─────────────────────── */
.who{display:flex;align-items:center;gap:9px;height:38px;padding:0 10px 0 6px;border:0;
  border-radius:var(--r);background:transparent;cursor:pointer;font:inherit;color:var(--ink);
  text-decoration:none;font-weight:400}
.who:hover{background:var(--soft);text-decoration:none}
.who .nm{font-size:13.5px;font-weight:500;line-height:1.2;text-align:left}
.who .rl{font-size:11.5px;color:var(--ink-3);line-height:1.2}

/* ── графики на CSS ───────────────────────────── */
.hbars{display:flex;flex-direction:column;gap:11px}
.hbar{display:grid;grid-template-columns:150px 1fr auto;gap:12px;align-items:center;font-size:14px}
.hbar .tr{display:block;height:26px;background:var(--sunk);border-radius:5px;overflow:hidden}
.hbar .fl{display:block;height:100%;border-radius:5px;background:var(--accent)}
.hbar .vl{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500;
  min-width:56px;text-align:right}
.hbar .nmm{color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.vbars{display:flex;align-items:flex-end;gap:10px;height:170px;padding-top:22px}
.vb{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;
  gap:7px;height:100%;position:relative}
.vb .col{width:100%;max-width:52px;background:var(--accent);border-radius:5px 5px 0 0;min-height:3px}
.vb .col.dim{background:var(--line-2)}
.vb .vv{position:absolute;top:-20px;font:500 12.5px/1 var(--mono);font-variant-numeric:tabular-nums}
.vb .lb{font-size:12.5px;color:var(--ink-3)}

.mini{display:block;height:6px;background:var(--sunk);border-radius:3px;overflow:hidden;min-width:70px}
.mini i{display:block;height:100%;background:var(--accent);border-radius:3px}
.mini i.ok{background:var(--ok)} .mini i.warn{background:var(--warn)} .mini i.crit{background:var(--crit)}

/* ── контроль ─────────────────────────────────── */
.ctrl{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:13px 16px;
  background:var(--warn-wash);border-radius:var(--r);margin-bottom:14px}
.ctrl.calm{background:var(--sunk)}
.alerts{display:flex;flex-direction:column;gap:2px}
.alert{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--line)}
.alert:first-child{border-top:0}
.alert .ic{width:24px;height:24px;border-radius:7px;flex:none;display:grid;place-items:center;
  font-size:13px;font-weight:600}
.alert .tt{font-size:14.5px}
.alert .ds{font-size:13px;color:var(--ink-3);margin-top:1px}
.alert .go2{margin-left:auto;flex:none}

.seg{display:inline-flex;background:var(--sunk);border-radius:var(--r);padding:3px;gap:2px}
.seg[hidden]{display:none}
.seg button{height:32px;padding:0 14px;border:0;border-radius:var(--r-s);cursor:pointer;
  font-weight:500;font-size:13.5px;line-height:1;font-family:inherit;color:var(--ink-2);background:transparent}
.seg button:hover{color:var(--ink)}
.seg button[aria-pressed="true"]{background:var(--panel);color:var(--ink);
  box-shadow:0 1px 3px rgb(21 29 38/.10)}

.check{display:flex;align-items:center;gap:10px;font-size:14.5px;padding:7px 0;cursor:pointer}
.check input{width:18px;height:18px;accent-color:var(--accent);flex:none}

/* ── поиск детали внутри раздела ──────────────── */
#parts .find input{height:50px;padding:0 44px 0 44px;font-size:16px;
  border:1.5px solid var(--line-2);background:var(--panel)}
#parts .find input:focus{border-color:var(--focus)}
#parts .find svg{left:16px;top:17px}
.pclr{position:absolute;right:9px;top:9px;width:32px;height:32px;border:0;border-radius:50%;
  background:var(--sunk);color:var(--ink-2);cursor:pointer;font-size:17px;line-height:1}
.pclr:hover{background:var(--line-2)}
tr.hit td{background:var(--wash)}
mark{background:var(--wash);color:var(--accent-2);font-weight:600;border-radius:3px;padding:0 2px}

/* ── creation dialogs ──────────────────────────────
   Absent from the prototype, where every "+ New…" button is dead, and
   listed in the interface spec as still to be designed. Built from the
   same variables and the same form classes as the pricing panel, so
   adding a part reads like changing a price. */
.modal{width:min(816px,calc(100vw - 32px));max-height:calc(100vh - 64px);padding:0;
  border:1px solid var(--line);border-radius:var(--r);background:var(--panel);color:var(--ink);
  box-shadow:0 24px 60px rgb(21 29 38/.22)}
.modal::backdrop{background:rgb(21 29 38/.45)}
.modal form{display:flex;flex-direction:column;max-height:calc(100vh - 64px)}
.modal header{padding:20px 22px 14px;border-bottom:1px solid var(--line)}
.modal header h2{margin:0;font-size:19px;font-weight:600}
.modal header p{margin:4px 0 0;font-size:14px}
.modal-body{padding:20px 22px;overflow:auto}
.modal footer{display:flex;align-items:center;gap:10px;padding:14px 22px;
  border-top:1px solid var(--line);background:var(--soft);
  border-radius:0 0 var(--r) var(--r)}
.modal footer .keys{margin-right:auto;font-size:12.5px;color:var(--ink-3)}
.modal .fail{margin:0 0 16px;padding:11px 14px;border-radius:var(--r-s);
  background:var(--crit-wash);color:var(--crit);font-size:14px;line-height:1.5}
.fld-err{margin:5px 0 0;font-size:12.5px;color:var(--crit)}
.fld:has(.fld-err:not([hidden])) input,.fld:has(.fld-err:not([hidden])) select,
.fld:has(.fld-err:not([hidden])) textarea{border-color:var(--crit)}
.fld{position:relative}
.lookup{position:absolute;left:0;right:0;top:100%;z-index:2;margin:4px 0 0;padding:5px;
  list-style:none;max-height:232px;overflow:auto;background:var(--panel);
  border:1px solid var(--line-2);border-radius:var(--r-s);box-shadow:0 12px 28px rgb(21 29 38/.16)}
.lookup li{display:flex;gap:10px;align-items:baseline;padding:8px 10px;border-radius:var(--r-s);
  font:500 14px/1.3 var(--mono);cursor:pointer}
.lookup li span{font-weight:400;font-size:13px;line-height:1.3;font-family:inherit;font-family:"IBM Plex Sans",sans-serif;
  margin-left:auto;text-align:right}
.lookup li:hover{background:var(--wash)}
/* No outline:none here — these are keyboard-reachable options, and the
   ring is the only thing telling somebody where they are. */
.lookup li:focus-visible{background:var(--wash)}
.lookup li.muted{cursor:default;font-family:inherit;font-weight:400}

/* Success and failure have to look different: "Saved" and "Not sent"
   reading the same defeats the message. The prototype has only .note-w. */
.note-ok{background:var(--ok-wash);color:var(--ok)} .note-ok b{color:var(--ok)}
.note-warn{background:var(--warn-wash);color:var(--warn)} .note-warn b{color:var(--warn)}
.note-crit{background:var(--crit-wash);color:var(--crit)} .note-crit b{color:var(--crit)}
/* Pinned to the window, not to the page.
   It used to sit at the top of the content and be scrolled to, so every
   saved dialog and every recorded answer threw the reader back to the top
   of a long screen in order to show them one sentence. */
.flash{position:fixed;top:16px;left:50%;transform:translateX(-50%);z-index:60;
  display:flex;align-items:flex-start;gap:12px;max-width:min(560px,calc(100vw - 28px));
  margin:0;box-shadow:0 10px 30px rgb(21 29 38/.18);
  border:1px solid var(--line);animation:flash-in .16s ease-out}
:root[data-theme="dark"] .flash{box-shadow:0 10px 30px rgb(0 0 0/.45)}
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .flash{box-shadow:0 10px 30px rgb(0 0 0/.45)}}
.flash-x{flex:none;margin:-2px -4px 0 auto;width:24px;height:24px;padding:0;
  border:0;border-radius:6px;background:none;color:inherit;opacity:.65;
  font:400 19px/1 var(--mono);cursor:pointer}
.flash-x:hover{opacity:1;background:rgb(0 0 0/.06)}
@keyframes flash-in{from{opacity:0;transform:translate(-50%,-6px)}
  to{opacity:1;transform:translate(-50%,0)}}
@media(prefers-reduced-motion:reduce){.flash{animation:none}}
/* Full width on a narrow screen, so the centring transform goes with it. */
@media(max-width:640px){.flash{left:14px;right:14px;transform:none;max-width:none;
  animation:none}}

/* Where the deal actually stands, when the reader is looking elsewhere.
   A ring rather than a fill: the filled pill means "this is what you are
   looking at", and two pills filled the same way would say nothing. */
.steps button[data-now]{box-shadow:inset 0 0 0 1.5px var(--accent);color:var(--accent-2)}

/* A row per part on the new-enquiry dialog. Four columns on a desktop,
   stacked below it — a part number squeezed into a quarter of a phone
   screen is unreadable, and the number is the whole point of the row. */
.lines{display:flex;flex-direction:column;gap:10px}
.line-row{display:grid;grid-template-columns:minmax(0,2fr) 80px minmax(0,1.4fr) 36px;
  gap:8px;align-items:start}
.line-row .fld{margin:0}
.line-row .btn{height:44px;padding:0;width:36px;display:grid;place-items:center;font-size:18px}
/* A card's secondary actions: in a row on a wide screen, behind "⋮" on a
   phone, where "Merge into…", "Delete" and "← All" took three lines. */
.head-acts .opts{display:contents}
.head-acts .kebab{display:none;font-size:20px;line-height:1;width:40px;height:40px}
/* A narrow directory keeps the name and the two figures it is opened for;
   the rest is on the card. Scrolling a table sideways on a phone showed
   the name, the country and the contact, and none of the numbers. */
@media(max-width:640px){
  .head-acts{position:relative;flex-wrap:nowrap;width:100%}
  .head-acts .kebab{display:inline-flex;margin-left:auto}
  .head-acts .opts{display:none}
  .head-acts.open .opts{display:flex;flex-direction:column;align-items:stretch;
    position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:210px;padding:6px;
    background:var(--panel);border:1px solid var(--line);border-radius:var(--r);
    box-shadow:0 8px 24px rgba(0,0,0,.12)}
  .head-acts.open .opts .btn{justify-content:flex-start;width:100%}
  table.dir th:not(.keep),table.dir td:not(.keep){display:none}
  /* The figure stays whole (Intl joins its groups with a no-break space);
     the currency may drop under it. */
  table.dir th,table.dir td{white-space:normal;padding-right:10px}
  table.dir th:last-child,table.dir td:last-child{padding-right:0}
}
@media(max-width:640px){
  .line-row{grid-template-columns:1fr 1fr;align-items:end}
  .line-row .fld:first-child{grid-column:1/-1}
}

/* The paging control. Deliberately plain and at the foot of the card:
   it is a way out of a long list, not a thing to look at. */
.pager{display:flex;align-items:center;gap:10px;margin-top:14px;font-size:13.5px}
.pager .muted{margin-right:auto}
.pager button[disabled]{opacity:.45;cursor:default}
/* Filters in the table head: one control under each heading it narrows,
   drawn quieter than a form field so the head still reads as a head. */
.th-filters th{padding:4px 12px 10px 0;font-weight:400}
.th-filters input,.th-filters select{width:100%;height:32px;padding:0 8px;font-weight:400;font-size:13px;line-height:1;font-family:inherit;
  color:var(--ink);background:var(--sunk);border:1px solid transparent;border-radius:7px;min-width:0}
.th-filters input:focus,.th-filters select:focus{outline:0;border-color:var(--accent);background:var(--panel)}
/* The consignment note, on a deal in transit: a mark until it is ticked. */
.waybill{display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:3px 9px;border-radius:20px;
  font-size:12px;font-weight:500;border:1px solid transparent;cursor:pointer;background:var(--warn-wash);color:var(--warn)}
.waybill:hover{border-color:var(--warn)}
.waybill.done{background:var(--ok-wash);color:var(--ok)}

