@import url(fonts/fonts.css);

/* Офис, куда свозят посылки и раскладывают по полкам. Яркий цвет один — жёлтая
   складская бирка с номером места; всё остальное спокойное. */
:root {
  --paper: #eef2ef;
  --surface: #ffffff;
  --sunk: #f5f7f5;
  --ink: #172320;
  --ink-2: #5a6863;
  --ink-3: #8a9792;
  --line: #d9e0dc;
  --line-2: #e8ece9;
  --pine: #1d5c4a;
  --pine-dark: #144536;
  --pine-soft: #e2eee8;
  --tape: #ffd447;
  --tape-edge: #e5b820;
  --tape-ink: #2e2500;
  --danger: #b42318;
  --danger-soft: #fdecea;

  --st-new: #3653a3;     --st-new-bg: #e7ecfa;
  --st-picked: #9a5a06;  --st-picked-bg: #fcefd8;
  --st-stored: #1d5c4a;  --st-stored-bg: #dff0e8;
  --st-done: #5a6863;    --st-done-bg: #e9edeb;
  --st-cancelled: #b42318; --st-cancelled-bg: #fdecea;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --nav-w: 248px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --shadow-pop: 0 18px 50px -12px rgba(16, 40, 33, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--pine); }
svg.i { width: 22px; height: 22px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 3px solid #8cc8b2; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- поля и кнопки ---------- */

input, select, textarea, button { font: inherit; color: inherit; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 5px; }
.input, .field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s;
}
.field textarea { min-height: 76px; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #bfcac5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px var(--pine-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--sunk); color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer;
  text-decoration: none; color: var(--ink); white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { background: var(--sunk); border-color: #c5cfca; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn svg.i { width: 19px; height: 19px; }
.btn-main { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn-main:hover { background: var(--pine-dark); border-color: var(--pine-dark); }
.btn-tape { background: var(--tape); border-color: var(--tape-edge); color: var(--tape-ink); }
.btn-tape:hover { background: #ffcb1f; border-color: var(--tape-edge); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--pine); padding-left: 10px; padding-right: 10px; }
.btn-ghost:hover { background: var(--pine-soft); border-color: transparent; }
.btn-danger { color: var(--danger); border-color: #f1c7c2; }
.btn-danger:hover { background: var(--danger-soft); border-color: #e9aaa3; }
.btn-lg { min-height: 56px; font-size: 17px; padding: 14px 22px; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }

/* Переключатель вкладок внутри экрана */
.seg { display: inline-flex; background: #e1e7e3; border-radius: 14px; padding: 4px; gap: 4px; max-width: 100%; overflow-x: auto; }
.seg button {
  border: 0; background: transparent; border-radius: 10px; padding: 9px 16px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; white-space: nowrap; min-height: 40px;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 40, 33, .14); }
.seg .n { font-family: var(--display); font-size: 12px; font-weight: 600; margin-left: 6px; color: var(--ink-3); }
.seg button.on .n { color: var(--pine); }

/* ---------- бирки ---------- */

/* Номер заказа: буквы маркетплейса на его цвете + номер */
.ctag {
  display: inline-flex; align-items: stretch; border-radius: 7px; overflow: hidden; vertical-align: middle;
  font: 600 14px/1 var(--display); letter-spacing: .01em; border: 1.5px solid var(--mp, #6b7280); background: var(--surface);
}
.ctag b { background: var(--mp, #6b7280); color: #fff; padding: 5px 6px 5px 7px; font-weight: 700; }
.ctag span { padding: 5px 8px 5px 7px; color: var(--ink); }
.ctag.xl { font-size: 30px; border-width: 2.5px; border-radius: 12px; }
.ctag.xl b { padding: 10px 12px 10px 14px; }
.ctag.xl span { padding: 10px 16px 10px 12px; }
.ctag.lg { font-size: 19px; border-width: 2px; border-radius: 9px; }
.ctag.lg b, .ctag.lg span { padding: 7px 10px; }

/* Место на складе — жёлтая бирка с дыркой, как на стеллаже */
.cell {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 64px;
  padding: 6px 12px 6px 22px; background: var(--tape); color: var(--tape-ink); border-radius: 6px;
  font: 700 20px/1.1 var(--display); letter-spacing: .02em; box-shadow: inset 0 -2px 0 var(--tape-edge);
}
.cell::before {
  content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25);
}
.cell.xl { font-size: 40px; padding: 10px 22px 10px 38px; min-width: 120px; border-radius: 10px; box-shadow: inset 0 -4px 0 var(--tape-edge); }
.cell.xl::before { left: 13px; width: 12px; height: 12px; margin-top: -6px; }
.cell.sm { font-size: 14px; min-width: 0; padding: 3px 8px 3px 16px; }
.cell.sm::before { left: 6px; width: 5px; height: 5px; margin-top: -2.5px; }
.cell.empty { background: var(--sunk); color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line); }

.st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { color: var(--st-new); background: var(--st-new-bg); }
.st-picked { color: var(--st-picked); background: var(--st-picked-bg); }
.st-stored { color: var(--st-stored); background: var(--st-stored-bg); }
.st-done { color: var(--st-done); background: var(--st-done-bg); }
.st-cancelled { color: var(--st-cancelled); background: var(--st-cancelled-bg); }

.money { font: 600 17px/1.1 var(--display); white-space: nowrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.pickup-code { display: inline-block; font: 700 20px/1 var(--display); letter-spacing: .06em; background: var(--st-new-bg); color: var(--st-new); padding: 7px 12px; border-radius: 9px; }

/* ---------- каркас ---------- */

.shell { min-height: 100vh; }
.nav {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w); background: #133a30; color: #cfe0d9;
  display: flex; flex-direction: column; padding: 18px 14px; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; color: #fff; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--tape); color: var(--tape-ink); display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark svg.i { width: 22px; height: 22px; stroke-width: 2; }
.brand-name { font: 700 17px/1.1 var(--display); letter-spacing: .01em; }
.brand-sub { font-size: 12px; color: #8fb3a6; margin-top: 3px; }

.tabs { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.tab {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: #cfe0d9; text-decoration: none; font-weight: 500; position: relative;
}
.tab:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.tab.on { background: #fff; color: var(--ink); font-weight: 600; }
.tab.on svg.i { color: var(--pine); }
.tab .n {
  margin-left: auto; min-width: 26px; padding: 2px 7px; border-radius: 99px; text-align: center;
  font: 600 12px/1.4 var(--display); background: rgba(255, 255, 255, .12); color: #fff;
}
.tab.on .n { background: var(--tape); color: var(--tape-ink); }

.nav-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; margin-top: 10px; }
.who { display: flex; align-items: center; gap: 10px; padding: 0 8px 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #2a5a4c; color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.who-name { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.2; }
.who-role { font-size: 13px; color: #8fb3a6; }
.nav-actions { display: flex; gap: 4px; }
.nav-actions button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: rgba(255, 255, 255, .06); color: #cfe0d9; border-radius: 10px; padding: 9px; cursor: pointer; font-size: 14px; }
.nav-actions button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-actions svg.i { width: 17px; height: 17px; }

.mtop, .bottom { display: none; }

main { margin-left: var(--nav-w); padding: 32px 36px 48px; max-width: calc(1240px + var(--nav-w)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--ink-2); margin-top: 6px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sticky { position: sticky; top: 24px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- списки (вместо таблиц: на телефоне перестраиваются) ---------- */

.list { display: flex; flex-direction: column; }
.item {
  display: grid; align-items: center; gap: 6px 16px; padding: 14px 4px; border-bottom: 1px solid var(--line-2);
  text-decoration: none; color: inherit;
}
.item:last-child { border-bottom: 0; }
button.item, a.item, .item.click { cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font: inherit; }
.item.click:hover, button.item:hover { background: var(--sunk); border-radius: 10px; }
.item.dim { opacity: .62; }
.item .who-line { font-weight: 600; }
.item .sub { font-size: 14px; color: var(--ink-2); }
.orders-list .item { grid-template-columns: 150px minmax(0, 1.2fr) minmax(0, 1fr) 130px 110px; }
.clients-list .item { grid-template-columns: minmax(0, 1.4fr) 190px 90px 110px 120px; }

.empty { text-align: center; padding: 42px 16px; color: var(--ink-2); }
.empty svg.i { width: 40px; height: 40px; color: var(--ink-3); stroke-width: 1.4; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- приём ---------- */

.step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 14px; padding-bottom: 8px; }
.step + .step { border-top: 1px solid var(--line-2); padding-top: 20px; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); display: grid; place-items: center; font: 600 14px var(--display); }
.step h3 { margin: 5px 0 14px; }
.hint-box { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-md); background: var(--sunk); font-size: 14px; color: var(--ink-2); margin: -4px 0 14px; }
.hint-box.ok { background: var(--pine-soft); color: var(--pine-dark); }
.hint-box svg.i { width: 19px; height: 19px; margin-top: 1px; }

.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mp-opt {
  display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 10px 12px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; text-align: left;
}
.mp-opt i { width: 12px; height: 12px; border-radius: 4px; background: var(--mp); flex: 0 0 auto; }
.mp-opt:hover { border-color: var(--mp); }
.mp-opt.on { background: var(--mp); border-color: var(--mp); color: #fff; }
.mp-opt.on i { background: #fff; }
.mp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--mp); margin-right: 6px; }

.submit-bar { display: flex; align-items: center; gap: 16px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line-2); }

.created { text-align: center; padding: 30px 22px; }
.created-ico { width: 54px; height: 54px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); display: grid; place-items: center; margin: 0 auto 14px; }
.created .ctag { margin: 14px 0 10px; }
.created .actions { display: grid; gap: 8px; margin-top: 20px; }
.pop { animation: pop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.side-note h3 { margin-bottom: 10px; }
.side-note ol { margin: 0; padding-left: 20px; color: var(--ink-2); }
.side-note li + li { margin-top: 6px; }

/* ---------- водители ---------- */

.stop { padding: 0; overflow: hidden; }
.stop-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; background: var(--sunk); border-bottom: 1px solid var(--line-2); }
.stop-pin { width: 40px; height: 40px; border-radius: 12px; background: var(--pine); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.stop-addr { font-weight: 700; font-size: 17px; line-height: 1.3; }
.stop-body { padding: 4px 20px; }
.parcel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.parcel:last-child { border-bottom: 0; }
.parcel .code-col { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.parcel .code-col small { font-size: 12px; color: var(--ink-3); }
.stop-foot { padding: 14px 20px 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- склад ---------- */

.scan { display: flex; gap: 10px; }
.scan .input { font: 600 20px var(--display); letter-spacing: .02em; min-height: 58px; text-transform: uppercase; }
.scan .input::placeholder { font: 400 16px var(--font); text-transform: none; letter-spacing: 0; }
.shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shelf { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--surface); }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.shelf-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 14px; cursor: pointer; }
.shelf-row:hover .grow { color: var(--pine); }
.shelf-row .old { color: var(--danger); font-weight: 600; }
.cell-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cell-pick button { border: 0; padding: 0; background: none; cursor: pointer; }

/* ---------- выдача ---------- */

.search-hero { position: relative; margin-bottom: 18px; }
.search-hero svg.i { position: absolute; left: 20px; top: 50%; margin-top: -13px; width: 26px; height: 26px; color: var(--ink-3); }
.search-hero input {
  width: 100%; min-height: 70px; padding: 14px 20px 14px 60px; border-radius: 18px; border: 2px solid var(--line);
  background: var(--surface); font-size: 20px; font-weight: 500;
}
.search-hero input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 5px var(--pine-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-2); font-size: 14px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 14px; }

.client-card { padding: 0; overflow: hidden; }
.client-top { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.client-top .avatar { width: 46px; height: 46px; background: var(--pine-soft); color: var(--pine); font-size: 18px; }
.client-name { font-size: 20px; font-weight: 700; }
.note { display: flex; gap: 8px; align-items: center; margin: 0 22px; padding: 10px 14px; border-radius: 10px; background: #fff6d6; color: #6b5200; font-size: 14px; font-weight: 500; }
.note svg.i { width: 18px; height: 18px; }
.issue-list { padding: 6px 22px; }
.issue-row { display: grid; grid-template-columns: 34px auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.issue-row:last-child { border-bottom: 0; }
.issue-row.wait { cursor: default; grid-template-columns: 34px minmax(0, 1fr) auto; }
.issue-row.wait > * { opacity: .7; }
.tick { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; background: var(--surface); }
.issue-row.on .tick { background: var(--pine); border-color: var(--pine); color: #fff; }
.tick svg.i { width: 18px; height: 18px; stroke-width: 3; }
.pay { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 18px 22px; background: var(--sunk); border-top: 1px solid var(--line-2); }
.pay .total-label { font-size: 14px; color: var(--ink-2); }
.pay .total { font: 700 30px/1 var(--display); }
.issued { display: flex; align-items: center; gap: 12px; padding: 18px 22px; background: var(--pine-soft); color: var(--pine-dark); font-weight: 600; }

/* ---------- обзор ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.stat .v { font: 700 26px/1.1 var(--display); margin-top: 6px; }
.stat .k { color: var(--ink-2); font-size: 14px; }
.stat.lead { background: var(--pine); border-color: var(--pine); color: #fff; }
.stat.lead .k { color: #bfe0d3; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.flow-step { border-radius: var(--r-md); padding: 16px; background: var(--sunk); }
.flow-step .v { font: 700 28px/1 var(--display); }
.flow-step .k { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.flow-arrow { color: var(--ink-3); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.kv:last-child { border-bottom: 0; }
.bar { height: 6px; border-radius: 3px; background: var(--line-2); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--mp, var(--pine)); border-radius: 3px; }

/* ---------- настройки ---------- */

.role-card .list .item { grid-template-columns: 36px minmax(0, 1fr) auto; }
.role-card .avatar { width: 36px; height: 36px; background: var(--pine-soft); color: var(--pine); font-size: 15px; }
.role-desc { color: var(--ink-2); font-size: 14px; margin: -8px 0 10px; }
.mp-list .item { grid-template-columns: minmax(0, 1fr) 80px 110px auto; }
.radio-cards { display: grid; gap: 8px; margin-bottom: 14px; }
.radio-cards label { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; }
.radio-cards label:has(input:checked) { border-color: var(--pine); background: var(--pine-soft); }
.radio-cards input { margin-top: 4px; accent-color: var(--pine); width: 18px; height: 18px; }
.radio-cards b { display: block; }
.radio-cards span { font-size: 14px; color: var(--ink-2); }
.check-line { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; cursor: pointer; }
.check-line input { width: 20px; height: 20px; accent-color: var(--pine); }

/* ---------- окно ---------- */

.modal { position: fixed; inset: 0; background: rgba(13, 32, 27, .5); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; z-index: 40; animation: fade .15s; }
.modal-box { position: relative; background: var(--surface); border-radius: 22px; width: 100%; max-width: 680px; padding: 28px; box-shadow: var(--shadow-pop); animation: rise .2s cubic-bezier(.2, .8, .3, 1); }
.modal-box.narrow { max-width: 460px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--sunk); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.modal-close:hover { background: var(--line-2); color: var(--ink); }
.modal-title { margin: 0 48px 18px 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }

.timeline { position: relative; margin: 6px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 26px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--pine); }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { color: var(--ink-3); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px;
  background: #133a30; color: #fff; padding: 14px 20px; border-radius: 14px; box-shadow: var(--shadow-pop);
  max-width: calc(100vw - 32px); font-weight: 500; animation: rise .2s;
}
.toast svg.i { color: var(--tape); }
.toast.bad { background: var(--danger); }
.toast.bad svg.i { color: #fff; }

/* ---------- вход ---------- */

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; }
.login-side { background: #133a30; color: #cfe0d9; padding: 48px 44px; display: flex; flex-direction: column; }
.login-side .brand { padding: 0 0 0; }
.login-side h1 { color: #fff; font: 700 34px/1.15 var(--display); margin: auto 0 16px; letter-spacing: -.01em; }
.login-side p { color: #9dbdb1; max-width: 32ch; }
.login-tag { margin-top: 40px; display: flex; gap: 10px; align-items: center; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 520px; }
.login-box h2 { font-size: 24px; margin-bottom: 6px; }
.login-box > p { color: var(--ink-2); margin-bottom: 22px; }
.roles-pick { display: grid; gap: 12px; }
.role-tile {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px; text-align: left;
  padding: 18px 20px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.role-tile:hover { border-color: var(--pine); }
.role-tile:active { transform: scale(.99); }
.role-ico { width: 52px; height: 52px; border-radius: 15px; background: var(--pine-soft); color: var(--pine); display: grid; place-items: center; }
.role-ico svg.i { width: 26px; height: 26px; }
.role-tile b { display: block; font-size: 18px; }
.role-tile span { color: var(--ink-2); font-size: 14px; }
.role-tile .go { color: var(--ink-3); }
.back { margin-bottom: 14px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.people button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.people button.on { border-color: var(--pine); background: var(--pine); color: #fff; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: -4px 0 10px; }

/* ---------- планшет: узкая полоса значков ---------- */

@media (max-width: 1180px) {
  :root { --nav-w: 92px; }
  .nav { padding: 14px 8px; align-items: stretch; }
  .brand { justify-content: center; padding: 4px 0 16px; }
  .brand-text { display: none; }
  .tab { flex-direction: column; gap: 4px; padding: 10px 4px; font-size: 12px; text-align: center; }
  .tab .n { position: absolute; top: 4px; right: 8px; margin: 0; min-width: 20px; padding: 0 5px; font-size: 11px; }
  .who { justify-content: center; padding: 0 0 10px; }
  .who > div:last-child { display: none; }
  .nav-actions { flex-direction: column; }
  .nav-actions span { display: none; }
  main { padding: 26px 26px 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: 1fr; }
  .orders-list .item { grid-template-columns: 140px minmax(0, 1fr) 120px 100px; }
  .orders-list .item .c-addr { display: none; }
}
@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 28px 24px; }
  .login-side h1 { margin: 26px 0 8px; font-size: 26px; }
  .login-tag { display: none; }
}

/* ---------- телефон: нижняя панель ---------- */

@media (max-width: 700px) {
  body { font-size: 16px; }
  .hide-m { display: none; }
  h1 { font-size: 24px; }
  .nav { display: none; }
  .mtop {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10;
    background: #133a30; color: #fff; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  }
  .mtop .brand { padding: 0; }
  .mtop .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .mtop .brand-mark svg.i { width: 18px; height: 18px; }
  .mtop .brand-name { font-size: 15px; }
  .mtop .brand-text { display: block; }
  .mtop .who-mini { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #cfe0d9; border: 0; background: rgba(255, 255, 255, .08); border-radius: 99px; padding: 5px 12px 5px 5px; cursor: pointer; }
  .mtop .avatar { width: 28px; height: 28px; font-size: 13px; }
  .bottom {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface);
    border-top: 1px solid var(--line); padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  }
  .bottom a, .bottom button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px;
    color: var(--ink-2); text-decoration: none; font-size: 11.5px; font-weight: 600; position: relative; border: 0; background: none; cursor: pointer;
  }
  .bottom .on { color: var(--pine); background: var(--pine-soft); }
  .bottom .n { position: absolute; top: 1px; left: 50%; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--tape); color: var(--tape-ink); font: 600 10.5px/16px var(--display); }
  main { margin-left: 0; padding: 18px 16px 104px; }
  .solo main { padding-bottom: 32px; }
  .page-head { margin-bottom: 16px; }
  .page-head p { font-size: 15px; }
  .panel { padding: 16px; border-radius: 16px; }
  .cols-2 { grid-template-columns: 1fr; gap: 0; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 20px; }
  .step { grid-template-columns: 1fr; }
  .step-n { display: none; }
  .step h3 { margin-top: 0; }
  .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submit-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .submit-bar .btn { width: 100%; }
  .scan .input { font-size: 17px; }
  .search-hero input { min-height: 60px; font-size: 17px; padding-left: 52px; }
  .search-hero svg.i { left: 16px; }

  .orders-list .item { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .orders-list .item .c-client { grid-column: 1 / -1; order: 3; }
  .orders-list .item .c-st { order: 2; justify-self: end; }
  .orders-list .item .c-sum { display: none; }
  .clients-list .item { grid-template-columns: minmax(0, 1fr) auto; }
  .clients-list .item .c-phone { grid-column: 1; order: 2; }
  .clients-list .item .c-hide { display: none; }

  .parcel { grid-template-columns: minmax(0, 1fr) auto; }
  .parcel .c-client { grid-column: 1 / -1; order: 3; }
  .parcel .c-act { grid-column: 1 / -1; order: 4; }
  .parcel .c-act .btn { width: 100%; }
  .stop-head, .stop-body, .stop-foot { padding-left: 16px; padding-right: 16px; }
  .stop-foot .btn { flex: 1; }

  .client-top, .issue-list, .pay, .issued { padding-left: 16px; padding-right: 16px; }
  .note { margin: 0 16px; }
  .issue-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .issue-row .c-code { grid-column: 2 / -1; order: 4; }
  .pay { flex-direction: column; align-items: stretch; }
  .pay .seg { width: 100%; }
  .pay .seg button { flex: 1; }
  .pay .btn { width: 100%; }
  .cell.xl { font-size: 32px; }
  .ctag.xl { font-size: 24px; }

  .flow { grid-template-columns: 1fr; }
  .flow-arrow { display: none; }
  .mp-list .item { grid-template-columns: minmax(0, 1fr) auto; }
  .mp-list .item .c-hide { display: none; }

  .modal { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: 22px 22px 0 0; padding: 22px 16px max(22px, env(safe-area-inset-bottom)); max-height: 94vh; overflow-y: auto; animation-name: sheet; }
  @keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
  .toast { bottom: 92px; }

  .login-main { padding: 24px 16px 40px; align-items: flex-start; }
  .role-tile { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 16px; gap: 14px; }
  .role-ico { width: 46px; height: 46px; }
}

@media print {
  .nav, .mtop, .bottom, .no-print { display: none !important; }
  main { margin: 0; padding: 0; }
  body { background: #fff; }
}

/* правки после просмотра скриншотов */
.role-tile { color: var(--ink); }
a[href^="tel:"] { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--ink-3); }
@media (max-width: 700px) {
  .client-top { gap: 12px; }
  .client-top [data-client] { order: 3; width: 100%; justify-content: flex-start; padding-left: 0; margin-top: -6px; }
  .issue-row .cell.xl { font-size: 26px; min-width: 96px; padding: 8px 16px 8px 30px; }
  .issue-row .cell.xl::before { left: 11px; width: 9px; height: 9px; margin-top: -4.5px; }
}
.cols > *, .cols-2 > *, .cols-3 > *, .stats > * { margin-top: 0 !important; }
.cols-3.even { align-items: stretch; }
.mp-list .item { grid-template-columns: minmax(0, 1fr) 150px 110px 24px; }
.mp-list .item .money { text-align: right; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.filters .input { width: auto; }
.filters .f-q { flex: 1; min-width: 220px; }
.parcel .c-act .btn { min-width: 120px; }
@media (max-width: 700px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .f-q, .filters .f-mp { grid-column: 1 / -1; width: 100%; }
  .filters .input { width: 100%; min-width: 0; }
  .parcel .c-act .btn { min-height: 50px; font-size: 16px; }
}
.role-tile b { color: var(--ink); }
.login-side .brand { justify-content: flex-start; }
.login-side .brand-text { display: block; }
