/* ЛогиХаб – веб-приложение. Дизайн-токены из UX/UI-макета (logihub-design/mockup/styles.css) */
:root {
  --navy: #0b1b3f; --navy-2: #13295c; --navy-3: #1c3770;
  --orange: #ff8a3d; --orange-2: #ffb347; --blue: #2f5bea; --blue-2: #e8eefe;
  --green: #1f9d62; --green-2: #e6f6ee; --red: #e5484d; --red-2: #fdecec; --amber: #b7791f; --amber-2: #fff4df;
  --bg: #f3f5fa; --card: #fff; --line: #e4e8f1; --line-2: #eef1f7;
  --ink: #0f172a; --ink-2: #475069; --ink-3: #8a93a8;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -14px rgba(15, 23, 42, .18);
  --side: 248px; --top: 64px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { overflow-x: hidden; }
body { margin: 0; font: 400 14.5px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
code { font: 13px var(--mono); background: var(--line-2); padding: 1px 6px; border-radius: 5px; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.pad { padding: 18px 20px 0; }
.link { color: var(--blue); font-weight: 500; }
.link:hover { text-decoration: underline; }
.t-ok { color: var(--green); } .t-bad { color: var(--red); } .t-warn { color: var(--amber); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ic { flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------------------------------------------------------------- оболочка */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.side { background: var(--navy); color: #cfd8ee; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #fff; padding: 4px 8px 18px; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand--dark { color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #b6c2df; font-weight: 500; transition: background .15s, color .15s; }
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__item.is-active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.nav__item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__item { font-size: 14px; }
.nav__count { background: var(--orange); color: #fff; font-size: 11.5px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.nav__sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 12px 8px; }
.me { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 10px; margin-top: 14px; }
.me div { flex: 1; min-width: 0; }
.me b { display: block; color: #fff; font-size: 13.5px; }
.me small { display: block; color: #93a0c0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .icon-btn { color: #93a0c0; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar--ini { display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), #6b8cff); color: #fff; font-weight: 600; font-size: 13px; }

.main { overflow-y: auto; min-width: 0; display: flex; flex-direction: column; }
.main > * { flex: none; }   /* шапка не сжимается, когда содержимое длиннее экрана */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: var(--top); padding: 0 28px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand--top { display: none; }
.crumbs { flex: 1; color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--ink); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 38px; width: 300px; color: var(--ink-3); }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; color: var(--ink); font-size: 13.5px; }
.search--wide { width: 380px; background: #fff; }
.icon-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); flex: none; }
.side .icon-btn { border: 0; background: none; }
.icon-btn:hover { color: var(--ink); border-color: #cdd4e3; }
.dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.bell { position: relative; }
.me-btn { display: none; border-radius: 50%; }
.profile { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile b { display: block; font-size: 17px; } .profile span { display: block; color: var(--ink-2); font-weight: 550; } .profile small { color: var(--ink-3); }
.menu { list-style: none; margin: 0; padding: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 18px; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 550; border-bottom: 1px solid var(--line-2); }
.menu li:last-child a, .menu li:last-child button { border-bottom: 0; }
.menu span { flex: 1; } .menu svg:first-child { color: var(--blue); } .menu svg:last-child { color: var(--ink-3); }
.btn--lg { height: 50px; font-size: 15px; margin-top: 16px; }
.bell__menu { position: absolute; right: 0; top: 46px; width: 360px; max-height: 440px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(15, 23, 42, .35); z-index: 40; }
.bell__menu header { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.bell__menu header a { color: var(--blue); font-weight: 500; }
.note { display: grid; gap: 2px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.note:hover { background: var(--bg); }
.note small { color: var(--ink-3); font-size: 12px; }
.note.is-new { box-shadow: inset 3px 0 0 var(--orange); }

.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }
.tabs { display: none; }

/* ---------------------------------------------------------------- заголовки страниц */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; }
.page-head h1 small { font-size: 15px; color: var(--ink-3); font-weight: 500; margin-left: 8px; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; margin-bottom: 6px; }
.back:hover { color: var(--ink); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions--sm .btn { padding: 6px 10px; font-size: 12.5px; }

/* ---------------------------------------------------------------- кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: transform .1s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(47, 91, 234, .7); }
.btn--primary:hover { background: #2349c9; }
.btn--accent { background: linear-gradient(135deg, var(--orange-2), var(--orange)); color: #fff; box-shadow: 0 6px 18px -8px rgba(255, 122, 47, .8); }
.btn--accent:hover { filter: brightness(1.04); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: #c8d0e0; }
.btn--danger { background: var(--red-2); color: var(--red); border-color: #f6c9ca; }
.btn--danger:hover { background: #fbdcdc; }
.btn--block { width: 100%; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }

.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; }
.field > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, .input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 91, 234, .14); }
.field input:disabled { background: var(--bg); color: var(--ink-2); }
.input { display: flex; align-items: center; gap: 8px; color: var(--ink-3); padding: 0 12px; }
.input input { border: 0; padding: 9px 0; box-shadow: none !important; flex: 1; min-width: 0; width: auto; }
.field input, .field select { min-width: 0; }
.field--span2 { grid-column: span 2; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.chips, .radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; width: 1px !important; height: 1px; left: 0; top: 0; }
.chip-radio span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: #fff; font-weight: 500; font-size: 13px; }
.chip-radio input:checked + span { border-color: var(--blue); background: var(--blue-2); color: var(--blue); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--blue); }
.chip-radio--bad input:checked + span { border-color: var(--red); background: var(--red-2); color: var(--red); }
.check { display: flex; gap: 10px; align-items: center; }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.err { color: var(--red); font-size: 13px; }

/* ---------------------------------------------------------------- карточки и сетки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 0; }
.card h2 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 650; margin-bottom: 14px; }
.card h2 .muted { font-weight: 500; font-size: 13px; }
.card--flush { padding: 0; overflow: hidden; }
.card--dark { background: var(--navy); color: #e3e9f8; border-color: var(--navy); }
.card--dark h2 { color: #fff; }
.card--soft { background: #f7f9fe; box-shadow: none; }
.card--warn { border-color: #f4d7a8; background: #fffaf0; }
.card--bad { border-color: #f6c9ca; background: #fffafa; }
.card-img { width: 100%; border-radius: var(--r); display: block; object-fit: cover; aspect-ratio: 16/9; box-shadow: var(--shadow); }
.stack { display: grid; gap: 18px; align-content: start; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.cols--wide { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
.cols--map { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); }
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card > .actions { margin-top: 16px; }
.mini.pad { padding: 10px 20px 16px; }
.content > .card, .content > .kpis, .content > .banner, .content > .lanes, .content > .grid-cards { margin-bottom: 18px; }
.sticky { position: sticky; top: calc(var(--top) + 16px); }
.card--dark .btn--block { margin-top: 16px; }
.price { display: block; font-size: 38px; font-weight: 800; letter-spacing: -.02em; color: var(--orange-2); margin: 2px 0 12px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis--inline { margin: 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kpi b { display: block; font-size: 28px; font-weight: 750; margin: 4px 0 2px; letter-spacing: -.02em; }
.kpi small { color: var(--ink-3); font-size: 12.5px; }
.kpi--warn b { color: var(--orange); } .kpi--bad b { color: var(--red); }
.kpi--skel { height: 104px; background: linear-gradient(90deg, #fff, var(--line-2), #fff); background-size: 200% 100%; animation: skel 1.2s infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange-2), var(--orange)); border-radius: 3px; }
.bar--lg { height: 10px; border-radius: 5px; }

/* ---------------------------------------------------------------- бейджи */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--info { background: var(--blue-2); color: var(--blue); }
.badge--warn { background: var(--amber-2); color: var(--amber); }
.badge--ok { background: var(--green-2); color: var(--green); }
.badge--bad { background: var(--red-2); color: var(--red); }
.badge--done { background: #e9ecf3; color: var(--navy-2); }
.badge--muted { background: #f0f1f4; color: var(--ink-3); }
.bpmn-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--navy); color: #fff; font: 600 11px var(--mono); letter-spacing: .02em; }
.pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .16); }
.pill--ok { background: var(--green-2); color: var(--green); } .pill--warn { background: var(--amber-2); color: var(--amber); }

/* ---------------------------------------------------------------- баннеры и заметки */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; flex-wrap: wrap; }
.banner > span:first-of-type { flex: 1; min-width: 240px; }
.banner--warn { background: var(--amber-2); color: #7a4d09; border: 1px solid #f4d7a8; }
.banner--bad { background: var(--red-2); color: #8f1d20; border: 1px solid #f6c9ca; }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 13px; margin: 12px 0; }
.note-box--warn { background: var(--amber-2); color: #7a4d09; }
.note-box--bad { background: var(--red-2); color: #8f1d20; }
.quote { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--red); background: #fff; border-radius: 0 8px 8px 0; }
.photos { display: flex; gap: 8px; margin: 10px 0; }
.photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------------------------------------------------------------- таблицы и списки */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfe; white-space: nowrap; }
.table td .mono, .table td.mono { white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr[data-href] { cursor: pointer; }
.table tbody tr:hover { background: #f8faff; }
.table tr.is-sel { background: var(--blue-2); box-shadow: inset 3px 0 0 var(--blue); }
.table tr.is-ok td { background: #fbfefc; } .table tr.is-bad td { background: #fff6f6; }
.table td small { display: block; font-size: 12px; }
.card .table th:first-child, .card .table td:first-child { padding-left: 4px; }
.card--flush .table th:first-child, .card--flush .table td:first-child { padding-left: 20px; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); }
.tick--ok { background: var(--green); border-color: var(--green); color: #fff; }
.tick--bad { background: var(--red); border-color: var(--red); color: #fff; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv--dark dt { color: #8f9cc0; } .kv--dark dd { color: #fff; text-align: right; }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.tasks li:last-child { border-bottom: 0; }
.tasks li > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 240px; }
.tasks li small { flex-basis: 100%; color: var(--ink-3); }
.mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.mini li:last-child { border: 0; }
.mini li small, .mini li span:last-child { color: var(--ink-3); font-size: 12.5px; }
.mini a { font-weight: 550; }
.list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 7px; }
.checklist li { display: flex; gap: 9px; align-items: center; font-size: 13.5px; }
.checklist li svg { padding: 3px; border-radius: 5px; width: 20px; height: 20px; }
.checklist .is-ok svg { background: var(--green); color: #fff; }
.checklist .is-warn svg { background: var(--amber-2); color: var(--amber); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checks li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.checks li span { flex: 1; }
.checks li small { color: var(--ink-3); }
.checks .is-ok svg { color: var(--green); } .checks .is-bad { color: var(--red); }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.docs a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; transition: border-color .15s; }
.docs a:hover { border-color: var(--blue); }
.docs a > svg:first-child { color: var(--blue); background: var(--blue-2); border-radius: 8px; padding: 7px; width: 34px; height: 34px; }
.docs span { flex: 1; } .docs b { display: block; font-size: 13.5px; } .docs small { color: var(--ink-3); font-size: 12px; }
.docs .is-off { opacity: .5; pointer-events: none; }
.doc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; background: var(--blue-2); color: var(--blue); font-size: 12.5px; font-weight: 600; margin: 2px 4px 2px 0; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes a { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line-2); }
.notes a span { flex: 1; } .notes small { color: var(--ink-3); }
.notes .is-new a { box-shadow: inset 3px 0 0 var(--orange); padding-left: 12px; }

/* таймлайн */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl__dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px currentColor; flex: none; margin-top: 3px; background: currentColor; }
.tl--info { color: var(--blue); } .tl--warn { color: var(--amber); } .tl--ok { color: var(--green); } .tl--bad { color: var(--red); } .tl--done { color: var(--navy-2); } .tl--muted { color: var(--ink-3); }
.tl b { display: block; color: var(--ink); font-weight: 550; font-size: 13.5px; }
.tl small { color: var(--ink-3); font-size: 12px; }

/* этапы */
.steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--ink-3); }
.steps li span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.steps li b { font-weight: 550; font-size: 13.5px; } .steps li small { font: 11px var(--mono); }
.steps .is-done { color: var(--ink-2); } .steps .is-done span { background: var(--green); border-color: var(--green); color: #fff; }
.steps .is-cur { background: var(--blue-2); color: var(--blue); } .steps .is-cur span { border-color: var(--blue); box-shadow: inset 0 0 0 4px #fff; background: var(--blue); }
.steps .is-off { opacity: .5; }

/* мастер */
.wizard { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; align-items: center; }
.wizard li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 550; font-size: 13px; }
.wizard li + li::before { content: ""; width: 48px; height: 2px; background: var(--line); margin-right: 4px; }
.wizard span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; }
.wizard .is-cur, .wizard .is-done { color: var(--ink); }
.wizard .is-done span { background: var(--green); border-color: var(--green); color: #fff; }
.wizard .is-cur span { border-color: var(--blue); color: var(--blue); }

/* канбан */
.board { display: grid; grid-template-columns: repeat(6, minmax(160px, 1fr)); gap: 12px; overflow-x: auto; }
.board__col { background: var(--bg); border-radius: 12px; padding: 10px; min-height: 120px; }
.board__col h3 { display: flex; justify-content: space-between; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 2px 4px 10px; }
.board__col h3 span { background: #fff; border-radius: 6px; padding: 0 7px; color: var(--ink); }
.board__card { display: grid; gap: 1px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; font-size: 12.5px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); border-left: 3px solid var(--blue); }
.board__card:hover { border-color: #c8d0e0; }
.board__card--warn { border-left-color: var(--orange); } .board__card--bad { border-left-color: var(--red); } .board__card--ok { border-left-color: var(--green); }
.board__card b { font: 600 12.5px var(--mono); } .board__card small { color: var(--ink-3); }

/* выбор водителя / вариантов */
.pick-list { display: grid; gap: 8px; margin: 12px 0; }
.pick { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.pick:has(input:checked) { border-color: var(--blue); background: var(--blue-2); }
.pick span { flex: 1; } .pick b { display: block; } .pick small { color: var(--ink-3); }
.pick em { font-style: normal; font-size: 12px; color: var(--green); font-weight: 600; }
.pick.is-busy { opacity: .5; cursor: not-allowed; } .pick.is-busy em { color: var(--ink-3); }

/* склад */
.tasks-tabs { display: flex; gap: 0; overflow-x: auto; }
.task-tab { display: grid; gap: 3px; padding: 12px 18px; border-right: 1px solid var(--line-2); min-width: 190px; }
.task-tab small { color: var(--ink-3); font-size: 12px; }
.task-tab.is-sel { background: var(--blue-2); box-shadow: inset 0 -3px 0 var(--blue); }

/* диспетчер */
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.lg::before { content: ""; display: inline-block; width: 22px; height: 0; border-top: 3px solid; margin-right: 6px; vertical-align: middle; }
.lg--plan::before { border-color: var(--navy); } .lg--done::before { border-color: var(--orange); } .lg--replan::before { border-top-style: dashed; border-color: var(--blue); }
.rides { list-style: none; margin: 0; padding: 0; }
.rides li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; }
.rides li.is-sel { background: var(--blue-2); }
.rides a { flex: 1; } .rides small { display: block; color: var(--ink-3); font-size: 12px; }
.person { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.person div { flex: 1; } .person small { display: block; color: var(--ink-3); }

/* карта */
.map { width: 100%; height: auto; display: block; background: #dfe9f6; }
.map--compact { max-height: 340px; }
.map__sea { fill: #d7e5f5; }
.map__land { fill: #f3f1ea; stroke: #d6d2c4; stroke-width: 1.2; }
.map__river { fill: none; stroke: #9cc3ea; stroke-width: 5; stroke-linecap: round; opacity: .8; }
.map__grid path { stroke: rgba(11, 27, 63, .05); stroke-width: 1; }
.map__road { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.map__ferry { fill: none; stroke: #7aa6d6; stroke-width: 2; stroke-dasharray: 6 5; }
.map__city circle { fill: #fff; stroke: var(--navy); stroke-width: 3; }
.map__city--hub circle { fill: var(--orange); stroke: #fff; stroke-width: 3; }
.map__city text { font: 600 13px var(--font); fill: var(--navy); paint-order: stroke; stroke: #f3f1ea; stroke-width: 4px; }
.map__sea-label { font: italic 500 13px var(--font); fill: #6f93bf; }
.map__plan { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.map__done { fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.map__replan { fill: none; stroke: var(--blue); stroke-width: 3; stroke-dasharray: 7 6; }
.map__truck circle { fill: var(--navy); stroke: #fff; stroke-width: 3; }
.map__ride--bad .map__done, .map__ride--bad .map__truck circle { stroke: var(--red); }
.map__ride--bad .map__truck circle { fill: var(--red); }
.map__ride--plan .map__truck circle { fill: var(--ink-3); }
.map__ride.is-active .map__plan { opacity: .7; }
.map__tag rect { fill: var(--navy); } .map__tag text { font: 600 11.5px var(--mono); fill: #fff; }
.map__ride--bad .map__tag rect { fill: var(--red); }
.map__ride:not(.is-active) .map__tag { opacity: .85; }

/* водитель */
.driver { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 720px; }
.driver__actions .btn { min-width: 0; white-space: normal; line-height: 1.2; }
.route-list { list-style: none; margin: 0; padding: 0; }
.route-list li { position: relative; padding: 0 0 16px 30px; }
.route-list li::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.route-list li:last-child::before { display: none; }
.route-list li span { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); background: #fff; }
.route-list .is-done span { background: var(--orange); border-color: var(--orange); }
.route-list .is-done::before { background: var(--orange); }
.route-list .is-cur span { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-2); }
.route-list b { display: block; font-weight: 550; } .route-list small { color: var(--ink-3); }
.driver__actions { display: grid; gap: 10px; position: sticky; bottom: 12px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 -10px 30px -18px rgba(15, 23, 42, .35); }
.driver__actions:empty { display: none; }
.driver__actions .btn { height: 52px; font-size: 15px; border-radius: 13px; }

/* процесс BPMN */
.lanes { display: grid; gap: 10px; }
.lane { display: grid; grid-template-columns: 150px 1fr; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lane h3 { background: var(--navy); color: #fff; font-size: 13px; padding: 14px; display: flex; align-items: center; }
.lane.is-mine h3 { background: var(--orange); }
.lane__row { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.bp { position: relative; flex: none; width: 150px; border: 1.5px solid var(--navy); border-radius: 10px; padding: 8px 10px; font-size: 12px; background: #fff; }
.bp span { font: 600 11px var(--mono); color: var(--ink-3); } .bp b { display: block; font-weight: 550; line-height: 1.3; }
.bp--gateway { border-style: dashed; background: var(--amber-2); }
.bp--event { border-radius: 24px; background: #f4f6fb; }
.bp.is-cur { background: var(--blue); color: #fff; border-color: var(--blue); } .bp.is-cur span { color: #dbe4ff; }
.bp em { position: absolute; top: -8px; right: -6px; background: var(--orange); color: #fff; font: 600 11px var(--font); border-radius: 9px; padding: 1px 7px; }
.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { display: grid; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--blue); }
.tile svg { color: var(--orange); } .tile small { color: var(--ink-3); }

/* графики */
.chart { width: 100%; height: auto; display: block; }
.chart__grid line { stroke: var(--line-2); } .chart__grid text, .chart__x { font: 11px var(--font); fill: var(--ink-3); }
.chart__line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__pt { opacity: 0; transition: opacity .15s; } .chart:hover .chart__pt { opacity: 1; }
.chart__target line { stroke: var(--red); stroke-dasharray: 5 4; stroke-width: 1.5; } .chart__target text { font: 600 11px var(--font); fill: var(--red); }
.chart__bar:hover { opacity: .8; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.chart-legend span::before { content: ""; display: inline-block; width: 12px; height: 4px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: middle; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 130px 1fr 92px; align-items: center; gap: 10px; font-size: 13px; }
.hbars i { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.hbars b { display: block; height: 100%; border-radius: 5px; }
.hbars em { font-style: normal; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.donut ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 12.5px; flex: 1; min-width: 150px; }
.donut li { display: flex; align-items: center; gap: 8px; } .donut li b { margin-left: auto; }
.donut li i { width: 10px; height: 10px; border-radius: 3px; }
.donut__v { font: 800 17px var(--font); fill: var(--ink); } .donut__l { font: 12px var(--font); fill: var(--ink-3); }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 550; color: var(--ink-2); font-size: 13px; }
.seg button.is-on { background: var(--navy); color: #fff; }

/* пусто */
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 30px 10px; color: var(--ink-2); }
.empty img { border-radius: 12px; opacity: .9; } .empty p { margin: 8px 0 0; font-weight: 600; } .empty small { color: var(--ink-3); }

/* ---------------------------------------------------------------- модальное окно и тосты */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(11, 27, 63, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal__box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(11, 27, 63, .5); animation: pop .18s ease-out; }
.modal__box--wide { width: min(720px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 8px; }
.modal__head h3 { font-size: 18px; }
.modal__body { padding: 8px 22px 6px; }
.modal__body p { margin: 0 0 12px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; }
.stars input { position: absolute; opacity: 0; }
.stars label { cursor: pointer; color: var(--line); }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--orange); }
.stars label svg { fill: currentColor; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(11, 27, 63, .6); max-width: 380px; font-size: 13.5px; animation: pop .2s; transition: opacity .3s, transform .3s; }
.toast--ok svg { color: #6ee7a8; } .toast--bad { background: #7f1d1d; } .toast--bad svg { color: #fecaca; }
.toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------------------------------------------------------------- вход */
.app--login { display: block; height: auto; min-height: 100vh; }
.login { display: grid; grid-template-columns: minmax(380px, 1fr) 1.15fr; min-height: 100vh; background: #fff; align-items: start; }
.login__form { padding: 36px 56px; display: flex; flex-direction: column; }
.login__in { width: min(420px, 100%); margin: auto 0 auto 40px; padding: 20px 0; }
.login h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.login form { margin-top: 26px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 20px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.roles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 12px; }
.role { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.role:hover { border-color: var(--blue); background: #f8faff; }
.role > span:not(.avatar) { flex: 1; min-width: 0; } .role b { display: block; font-size: 13.5px; } .role small { color: var(--ink-3); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login__hero { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #071029; color: #fff; isolation: isolate; }
.login__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; filter: saturate(.75); transform: scale(1.06); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.14) translate(-2%, -1%); } }
.login__hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background:
  radial-gradient(60% 50% at 70% 30%, rgba(47, 91, 234, .35), transparent 70%),
  linear-gradient(180deg, rgba(7, 16, 41, .55) 0%, rgba(7, 16, 41, .2) 35%, rgba(7, 16, 41, .92) 100%); }
.login__map { position: absolute; z-index: 2; inset: 21% 2% 19% 4%; display: grid; place-items: center;
  -webkit-mask-image: radial-gradient(75% 70% at 55% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(75% 70% at 55% 50%, #000 55%, transparent 100%); }
.login__map .map { width: 100%; height: 100%; background: none; }
.login__top { position: absolute; z-index: 3; left: 48px; right: 48px; top: 44px; max-width: 580px; animation: rise .8s .1s both; }
.login__top h2 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 10px; }
.login__top p { color: #b9c4e4; font-size: 15px; margin: 0; }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font: 600 12px var(--mono); backdrop-filter: blur(6px); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.login__cards { position: absolute; z-index: 3; left: 48px; right: 48px; bottom: 74px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.glass { padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); animation: rise .8s both; }
.glass:nth-child(2) { animation-delay: .15s; } .glass:nth-child(3) { animation-delay: .3s; }
.glass span { font: 600 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: #a9b6dc; }
.glass b { display: block; font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0 2px; color: #fff; }
.glass:first-child b { color: var(--orange-2); }
.glass small { color: #a9b6dc; font-size: 12.5px; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
.ticker { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 46px; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(7, 16, 41, .6); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker__track { display: flex; gap: 40px; width: max-content; height: 100%; align-items: center; animation: tick 70s linear infinite; padding-left: 40px; }
.ticker span { display: inline-flex; align-items: center; gap: 9px; font: 500 13px var(--mono); color: #cdd6f2; white-space: nowrap; }
.ticker__dot { width: 8px; height: 8px; border-radius: 50%; background: #60a5fa; }
.ticker__dot--ok { background: #34d399; } .ticker__dot--warn { background: var(--orange-2); } .ticker__dot--bad { background: #f87171; } .ticker__dot--done { background: #a5b4fc; }
@keyframes tick { to { transform: translateX(-50%); } }
.map--dark .map__sea { fill: none; }
.map--dark .map__land { fill: rgba(255, 255, 255, .055); stroke: rgba(160, 185, 255, .35); }
.map--dark .map__river { stroke: rgba(120, 170, 255, .35); }
.map--dark .map__grid path { stroke: rgba(160, 185, 255, .07); }
.map--dark .map__road { stroke: rgba(255, 255, 255, .14); stroke-width: 3; }
.map--dark .map__ferry { stroke: rgba(150, 190, 255, .5); }
.map--dark .map__plan { stroke: rgba(160, 185, 255, .55); opacity: .6; stroke-dasharray: 2 6; }
.map--dark .map__done { stroke: var(--orange); filter: drop-shadow(0 0 6px rgba(255, 138, 61, .8)); }
.map--dark .map__truck circle { fill: var(--orange); stroke: #fff; }
.map--dark .map__city circle { fill: #0b1b3f; stroke: #c7d2fe; }
.map--dark .map__city--hub circle { fill: var(--orange); stroke: #fff; filter: drop-shadow(0 0 10px rgba(255, 138, 61, .9)); }
.map--dark .map__city text { fill: #e0e7ff; stroke: rgba(7, 16, 41, .9); }
.map--dark .map__sea-label { fill: rgba(165, 180, 252, .55); }
.map--dark .map__tag rect { fill: rgba(255, 255, 255, .14); } .map--dark .map__tag text { fill: #fff; }
.login__in { animation: rise .7s both; }

/* ---------------------------------------------------------------- появление экрана (при переходе, не при каждом действии) */
.enter .page-head, .enter .kpi, .enter .card, .enter .banner, .enter .lane, .enter .tile, .enter .paper, .enter .driver > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.enter .kpi:nth-child(2) { animation-delay: .06s; } .enter .kpi:nth-child(3) { animation-delay: .12s; } .enter .kpi:nth-child(4) { animation-delay: .18s; }
.enter .cols > :nth-child(2), .enter .stack > :nth-child(2) { animation-delay: .12s; }
.enter .stack > :nth-child(3) { animation-delay: .2s; } .enter .stack > :nth-child(4) { animation-delay: .26s; }
.enter .lane:nth-child(2) { animation-delay: .05s; } .enter .lane:nth-child(3) { animation-delay: .1s; } .enter .lane:nth-child(4) { animation-delay: .15s; } .enter .lane:nth-child(5) { animation-delay: .2s; } .enter .lane:nth-child(6) { animation-delay: .25s; }
.enter .board__card { animation: rise .5s both; }
.chart__line:not(.chart__line--dash) { stroke-dasharray: 1; stroke-dashoffset: 0; }
.draw .chart__line { animation: line 1.6s cubic-bezier(.3, .6, .2, 1) both; }
.draw .chart__line--dash { animation: fade 1.2s .5s both; }
.draw .chart__bar { transform-box: fill-box; transform-origin: 50% 100%; animation: bar .9s cubic-bezier(.2, .7, .2, 1) both; }
.draw .hbars b { animation: hbar 1s cubic-bezier(.2, .7, .2, 1) both; transform-origin: 0 50%; }
.draw .donut circle { animation: fade 1s both; }
@keyframes line { from { stroke-dashoffset: 1; } }
@keyframes bar { from { transform: scaleY(0); } }
@keyframes hbar { from { transform: scaleX(0); } }
.enter .bar i { animation: hbar 1s .2s cubic-bezier(.2, .7, .2, 1) both; transform-origin: 0 50%; }
.map__truck circle { animation: pulse 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.kpi { transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 16px 32px -18px rgba(15, 23, 42, .3); }

/* ---------------------------------------------------------------- документы */
.paper { background: #fff; max-width: 820px; margin: 0 auto; padding: 44px 52px; border-radius: 6px; box-shadow: 0 2px 4px rgba(15, 23, 42, .06), 0 20px 50px -24px rgba(15, 23, 42, .3); font-size: 13.5px; }
.paper__head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--navy); margin-bottom: 20px; }
.paper__brand { display: flex; gap: 12px; align-items: center; } .paper__brand small { display: block; color: var(--ink-3); }
.paper__logo { width: 42px; height: 42px; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 800; display: grid; place-items: center; }
.paper__no { text-align: right; } .paper__no b { display: block; font-size: 18px; } .paper__no small { color: var(--ink-3); }
.paper__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.paper__parties > div { display: grid; gap: 2px; } .paper__parties small { color: var(--ink-3); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.paper__table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.paper__table th, .paper__table td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; }
.paper__table td:not(:first-child), .paper__table th:not(:first-child) { white-space: nowrap; }
.paper__table th { font-size: 11px; text-transform: uppercase; color: var(--ink-3); letter-spacing: .04em; }
.paper__table td:last-child, .paper__table th:last-child { text-align: right; }
.paper__table tfoot td { border: 0; font-size: 15px; padding-top: 14px; }
.paper__stamp { display: inline-block; border: 2px solid var(--green); color: var(--green); font-weight: 700; padding: 6px 14px; border-radius: 8px; transform: rotate(-3deg); }
.paper__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
.paper__sign span { color: var(--ink-3); font-size: 12.5px; } .paper__sign i { display: block; border-bottom: 1px solid var(--ink); height: 30px; }
.paper__foot { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; }
.paper blockquote { margin: 10px 0; padding: 10px 14px; background: var(--bg); border-left: 3px solid var(--orange); }

/* ---------------------------------------------------------------- адаптив */
@media (max-width: 1200px) {
  .login__cards { grid-template-columns: 1fr 1fr; } .login__cards .glass:nth-child(3) { display: none; }
  .login__top h2 { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols--3, .grid-cards { grid-template-columns: 1fr 1fr; }
  .cols--2 { grid-template-columns: 1fr; }
  .search { width: 220px; }
}
@media (max-width: 960px) {
  :root { --top: 56px; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side { display: none; }
  .brand--top { display: flex; padding: 0; }
  .top { padding: 0 14px; gap: 8px; }
  .search { display: none; }
  .crumbs { font-size: 15px; } .crumbs__pre { display: none; }
  .content { padding: 18px 14px 96px; }
  .cols, .cols--wide, .cols--map, .cols--3, .cols--2, .grid-cards { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabs__item { position: relative; flex: 1; display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; font-weight: 550; }
  .tabs__item.is-active { color: var(--orange); }
  .tabs__item b { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .tabs__item b:empty { min-width: 8px; height: 8px; padding: 0; }
  .driver__actions { bottom: 76px; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .driver__actions .btn { height: 44px; font-size: 13.5px; }
  .driver__actions .btn--primary, .driver__actions .btn--accent { grid-column: 1 / -1; height: 50px; font-size: 15px; }
  .brand--top span { display: none; }
  .me-btn { display: block; }
  .top .demo-btn { display: none; }
  .brand--top .logo { width: 30px; height: 30px; }
  .page-head h1 { font-size: 22px; }
  .page-head .actions { width: 100%; }
  .kv { grid-template-columns: 120px 1fr; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } .field--span2 { grid-column: auto; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__form, .login__in, .roles > * { min-width: 0; }
  .login { display: flex; flex-direction: column; align-items: stretch; }
  .login__hero { display: block; position: relative; height: 330px; order: -1; }
  .login__top { left: 18px; right: 18px; top: 18px; } .login__top h2 { font-size: 19px; margin: 10px 0 0; } .login__top p { display: none; }
  .login__map { inset: 18% -40% 6% -40%; }
  .login__cards { display: none; } .ticker { height: 38px; } .ticker span { font-size: 12px; }
  .login__form .brand { display: none; }
  .login__form { padding: 24px 18px; }
  .login__in { margin: 10px 0; }
  .wizard li + li::before { width: 16px; }
  .lane { grid-template-columns: 1fr; } .lane h3 { padding: 10px 14px; }
  .paper { padding: 24px 18px; } .paper__parties, .paper__sign { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(6, 200px); }
  .bell__menu { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; }
  #toasts { left: 12px; right: 12px; bottom: 84px; }
  .hbars li { grid-template-columns: 100px 1fr 80px; }
}
@media print {
  body { background: #fff; }
  .side, .top, .tabs, .noprint, #toasts { display: none !important; }
  .app { display: block; height: auto; } .main { overflow: visible; } .content { padding: 0; }
  .paper { box-shadow: none; padding: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- поток процесса (обзор менеджера) */
.flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--navy); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow); overflow: hidden; }
.flow__step { position: relative; display: grid; gap: 2px; padding: 14px 16px 12px 24px; color: #fff; isolation: isolate;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); background: var(--navy-2); margin-right: -10px; }
.flow__step:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 10px 0 0 10px; padding-left: 16px; }
.flow__step:last-child { margin-right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); border-radius: 0 10px 10px 0; background: #173a2c; }
.flow__fill { position: absolute; z-index: -1; left: 0; bottom: 0; width: 100%; height: var(--h); background: linear-gradient(180deg, rgba(255, 138, 61, .0), rgba(255, 138, 61, .32)); }
.flow__step.is-bad .flow__fill { background: linear-gradient(180deg, rgba(229, 72, 77, 0), rgba(229, 72, 77, .38)); }
.flow__step:last-child .flow__fill { background: linear-gradient(180deg, rgba(52, 211, 153, 0), rgba(52, 211, 153, .3)); }
.flow__ic { color: var(--orange-2); } .flow__step:last-child .flow__ic { color: #34d399; } .flow__step.is-bad .flow__ic { color: #f87171; }
.flow__step b { font-size: 30px; font-weight: 800; line-height: 1.05; }
.flow__t { font-weight: 650; font-size: 13.5px; }
.flow__step small { color: #a9b6dc; font-size: 12px; white-space: nowrap; }
.flow__step em { font: normal 600 10.5px var(--mono); color: #7f8fbd; }
.enter .flow__step { animation: rise .5s calc(var(--i) * 70ms) both; }
.enter .flow__fill { animation: bar 1s calc(.3s + var(--i) * 70ms) cubic-bezier(.2, .7, .2, 1) both; transform-origin: 50% 100%; }
@media (max-width: 1200px) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 8px; } .flow__step, .flow__step:first-child, .flow__step:last-child { clip-path: none; border-radius: 10px; margin: 0 4px; } }
@media (max-width: 960px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow__step b { font-size: 24px; } }

/* ---------------------------------------------------------------- живой рейс (live.js): панель «Рейс сейчас», полоса маршрута */
.ship { --ship-ink: #dfe6f7; --ship-dim: #8ea0c8; --ship-line: rgba(255, 255, 255, .1);
  position: relative; margin-bottom: 18px; padding: 22px 26px 20px; border-radius: 18px; color: var(--ship-ink); overflow: hidden;
  background: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 100% 32px, linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 32px 100%, var(--navy); }
.ship dl, .ship dd { margin: 0; }
.ship__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ship__code { font: 600 16px var(--mono); color: #fff; }
.ship__code:hover { text-decoration: underline; }
.ship__cargo { color: #a9b6dc; margin-left: 12px; }
.ship__live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.ship__live i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: ping 1.8s infinite; }
.ship__live small { color: var(--ship-dim); font-weight: 400; font-variant-numeric: tabular-nums; margin-left: 4px; }
.ship__note { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; color: #ffc2c4; font-size: 13.5px; }
.ship__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ship-line); }
.ship__stats > div { padding: 0 20px; min-width: 0; }
.ship__stats > div:first-child { padding-left: 0; }
.ship__stats > div + div { border-left: 1px solid var(--ship-line); }
.ship__stats dt { font-size: 12.5px; color: var(--ship-dim); margin-bottom: 6px; }
.ship__big { font-size: 26px; line-height: 1.15; font-weight: 600; color: #fff; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ship__temp { display: flex; align-items: flex-end; gap: 12px; }
.ship__sub { font-size: 12.5px; color: var(--ship-dim); margin-top: 4px !important; }
.ship__driver dd { display: flex; align-items: center; gap: 10px; }
.ship__driver b { display: block; color: #fff; font-weight: 600; }
.ship__driver small { display: block; color: #a9b6dc; font-size: 12.5px; margin-bottom: 3px; }
.plate { font: 500 11.5px var(--mono); border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: #34d399; stroke-width: 2; stroke-linejoin: round; }
.spark circle { fill: #34d399; }
.spark__band { fill: rgba(52, 211, 153, .1); }
.ship--late .rail__done { background: linear-gradient(90deg, #ff9a9d, var(--red)); }
.ship--late .rail__truck { background: var(--red); box-shadow: 0 0 0 6px rgba(229, 72, 77, .2); }
.ship--late .ship__live i { background: #fbbf24; animation: none; }

.rail { --p: 0%; margin: 24px 0 4px; }
.rail__ends { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; color: #fff; font-size: 15px; }
.rail__track { position: relative; height: 6px; margin: 16px 6px 30px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.rail__track::before, .rail__track::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); }
.rail__track::before { left: 0; background: var(--orange); }
.rail__track::after { left: 100%; background: var(--navy); border: 2px solid #fff; }
.rail__done { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 3px; background: linear-gradient(90deg, var(--orange-2), var(--orange)); transition: width 1s linear; }
.rail__stop { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--navy); border: 2px solid rgba(255, 255, 255, .5); z-index: 1; }
.rail__stop.is-passed { background: var(--orange); border-color: var(--orange); }
.rail__stop.is-low em { top: 30px; }
.rail__stop.is-low::before { content: ""; position: absolute; left: 50%; top: 9px; width: 1px; height: 20px; background: rgba(255, 255, 255, .25); }
.rail:has(.is-low) .rail__track { margin-bottom: 46px !important; }
.rail__stop em { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12px; color: #a9b6dc; white-space: nowrap; }
.rail__truck { position: absolute; top: 50%; left: var(--p); z-index: 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--orange); box-shadow: 0 0 0 6px rgba(255, 138, 61, .2); transform: translate(-50%, -50%); transition: left 1s linear; }
.rail__scale { position: relative; display: flex; justify-content: space-between; font-size: 12px; color: var(--ship-dim, #8ea0c8); font-variant-numeric: tabular-nums; }
.rail__km { position: absolute; left: clamp(48px, var(--p), calc(100% - 96px)); transform: translateX(-50%); color: #fff; font-weight: 600; white-space: nowrap; }
.rail:not(.rail--live) .rail__done { animation: draw .7s cubic-bezier(.3, .7, .2, 1) both; }
.rail:not(.rail--live) .rail__track { margin-bottom: 14px; }
.rail:not(.rail--live):has(.rail__stop) .rail__track { margin-bottom: 30px; }
@keyframes draw { from { width: 0; } }

/* расчёт заявки: маршрут в тёмной карточке */
.calc-route { margin: 4px 0 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.calc-route .rail { margin-top: 10px; }
.calc-route .rail__ends { font-size: 13.5px; }
.calc-route__eta { margin: 2px 0 0; font-size: 12.5px; color: #a9b6dc; }

/* жизненный цикл заказа: компактная полоса в таблицах и шаги в карточке заказа */
.st { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.life { display: inline-flex; gap: 3px; vertical-align: middle; }
.life i { width: 11px; height: 4px; border-radius: 2px; background: var(--line); }
.life .is-done { background: #9db4f5; }
.life .is-cur { background: var(--blue); }
.life .is-cur.is-bad { background: var(--red); }
.life--done i, .life--done .is-done { background: var(--green); }
.life--off i { width: 89px; background: repeating-linear-gradient(90deg, var(--line) 0 11px, transparent 11px 14px); }
.life-steps { list-style: none; display: flex; margin: 0 0 18px; padding: 0; overflow-x: auto; }
.life-steps li { position: relative; flex: 1 0 84px; padding-top: 20px; font-size: 13px; color: var(--ink-3); }
.life-steps li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line); }
.life-steps li:last-child::before { right: auto; width: 0; }
.life-steps span { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--line); z-index: 1; }
.life-steps .is-done { color: var(--ink-2); }
.life-steps .is-done::before, .life-steps .is-done span { background: var(--green); border-color: var(--green); }
.life-steps .is-cur { color: var(--ink); font-weight: 600; }
.life-steps .is-cur span { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px var(--blue-2); }
.life-steps .is-cur.is-bad span { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-2); }

/* срок оплаты в «Нужно ваше действие» */
.due { flex-basis: 100%; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.due__bar { width: 120px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.due__bar i { display: block; height: 100%; background: var(--amber); border-radius: 3px; }
.due b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--amber); }
.due--hot .due__bar i { background: var(--red); } .due--hot b { color: var(--red); }

@media (max-width: 960px) {
  .ship { padding: 16px 16px 14px; border-radius: 16px; }
  .ship__cargo { display: block; margin: 2px 0 0; font-size: 13px; }
  .ship__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .ship__stats > div, .ship__stats > div:first-child { padding: 0 12px 0 0; }
  .ship__stats > div + div { border-left: 0; }
  .ship__driver { grid-column: 1 / -1; }
  .ship__big { font-size: 21px; }
  .ship__temp { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rail__ends { font-size: 13.5px; }
  .life-steps li { flex-basis: 70px; font-size: 12px; }
}
