/* EFOR · Опт и экспорт — «центр управления отгрузками». Холодный серый, контейнерный оранжевый, стальной синий. */
:root {
  --bg: #e9edf1; --bg2: #dfe5eb; --surface: #ffffff; --surface2: #f5f7f9; --ink: #0d141c; --ink2: #3c4855; --muted: #6b7785;
  --line: rgba(13, 20, 28, .08); --line2: rgba(13, 20, 28, .14);
  --orange: #ff5a1f; --orange-ink: #c2410c; --orange-soft: #fff0e8; --steel: #2d5f8f; --steel-soft: #e6eef6;
  --green: #12805c; --green-soft: #e3f4ec; --amber: #b7791f; --amber-soft: #fbf1dc; --red: #c8322a; --red-soft: #fbe7e5;
  --graphite: #10161d; --graphite2: #18212b; --on-graphite: #e9eef3; --on-graphite-muted: #8896a5;
  --shadow: 0 1px 2px rgba(13, 20, 28, .04), 0 12px 32px -12px rgba(13, 20, 28, .14);
  --r: 22px; --r-s: 14px; --ease: cubic-bezier(.32, .72, 0, 1);
  --display: 'Unbounded', 'Onest', system-ui, sans-serif; --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e13; --bg2: #0f151b; --surface: #131a22; --surface2: #18212b; --ink: #e8edf2; --ink2: #b8c3ce; --muted: #8492a1;
    --line: rgba(232, 237, 242, .07); --line2: rgba(232, 237, 242, .13); --orange-soft: rgba(255, 90, 31, .14); --steel: #6ea3d6; --steel-soft: rgba(110, 163, 214, .14);
    --green: #3ccf95; --green-soft: rgba(60, 207, 149, .12); --amber: #e8b04f; --amber-soft: rgba(232, 176, 79, .13); --red: #ff6b61; --red-soft: rgba(255, 107, 97, .13);
    --orange-ink: #ff8a5c; --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -18px rgba(0, 0, 0, .7); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
body::before { /* тонкая сетка — как на плане погрузки */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(24px, 3.2vw, 38px); }
h2 { font-size: 17px; letter-spacing: -.01em; }
.mono, .num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ── командная панель ── */
.bar { position: sticky; top: 14px; z-index: 30; margin: 14px auto 0; width: min(1320px, calc(100% - 28px)); display: flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; padding-right: 8px; flex: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--graphite); display: grid; place-items: center; color: var(--orange); }
.brand b { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .02em; display: block; line-height: 1.1; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink2); transition: background .35s var(--ease), color .35s var(--ease); white-space: nowrap; }
.nav a:hover { background: var(--surface2); color: var(--ink); }
.nav a.on { background: var(--graphite); color: #fff; }
.nav a .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--surface); }
.bar-end { display: flex; align-items: center; gap: 4px; flex: none; }
.chip-btn { border: 0; background: var(--surface2); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; transition: transform .3s var(--ease), background .3s; }
.chip-btn:hover { background: var(--bg2); }
.chip-btn:active { transform: scale(.97); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 0; cursor: pointer; }
.menu { position: absolute; right: 8px; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; }
.menu button, .menu a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--surface2); }
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ── страница ── */
main { position: relative; z-index: 1; width: min(1320px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--orange); border-radius: 2px; }
.crumb { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.crumb:hover { color: var(--ink); }
.demo { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 14px; background: var(--amber-soft); color: var(--amber); font-size: 13px; margin-bottom: 18px; border: 1px dashed color-mix(in srgb, var(--amber) 40%, transparent); }

/* карточки: внешняя оправа + ядро */
.shell { padding: 5px; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 45%, transparent); border: 1px solid var(--line); }
.card { background: var(--surface); border-radius: calc(var(--r) - 5px); padding: 20px; box-shadow: var(--shadow); position: relative; }
.card.flat { box-shadow: none; border: 1px solid var(--line); border-radius: var(--r); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 980px) { .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); } }

/* кнопки */
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 14px;
  background: var(--surface2); color: var(--ink); transition: transform .35s var(--ease), background .3s, box-shadow .3s; white-space: nowrap; }
.btn:hover { background: var(--bg2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--orange); color: #fff; padding: 6px 6px 6px 18px; box-shadow: 0 8px 22px -10px var(--orange); }
.btn.primary:hover { background: #f04d12; }
.btn.primary .ico { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; transition: transform .4s var(--ease); }
.btn.primary:hover .ico { transform: translate(2px, -1px) scale(1.06); }
.btn.dark { background: var(--graphite); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* формы */
label.f { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.in, select.in, textarea.in { width: 100%; border: 1px solid var(--line2); background: var(--surface2); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink); transition: border-color .25s, box-shadow .25s, background .25s; min-width: 0; }
.in:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); background: var(--surface); }
textarea.in { resize: vertical; min-height: 80px; }
.in.sm { padding: 6px 9px; font-size: 13px; border-radius: 9px; }
.in.num { text-align: right; }
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.form .wide { grid-column: 1 / -1; }
.search { position: relative; }
.search .in { padding-left: 38px; border-radius: 999px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* фильтры-чипы */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .3s var(--ease); }
.chips button.on { background: var(--graphite); color: #fff; border-color: transparent; }
.chips button small { opacity: .6; margin-left: 4px; }

/* таблицы */
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr.link:hover { background: var(--surface2); }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line2); border-bottom: 0; }
.tbl .sub { display: block; font-size: 12px; color: var(--muted); }
.tbl tr.group td { background: var(--surface2); font-weight: 700; font-size: 13px; }

/* статусы */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface2); color: var(--ink2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.orange { background: var(--orange-soft); color: var(--orange-ink); }
.pill.steel { background: var(--steel-soft); color: var(--steel); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--surface2); color: var(--muted); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { background: var(--surface); border-radius: 18px; padding: 16px 18px; border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi b { display: block; font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi.alert b { color: var(--red); }
.kpi.accent { background: var(--graphite); color: var(--on-graphite); border-color: transparent; }
.kpi.accent span { color: var(--on-graphite-muted); }
.kpi.accent b { color: #fff; }

/* ── маршрут (графитовая панель) ── */
.route { background: radial-gradient(120% 140% at 0% 0%, #1d2a37 0%, var(--graphite) 55%); color: var(--on-graphite); border-radius: 28px; padding: 26px 26px 18px; position: relative; overflow: hidden; }
.route::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; }
.route-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: relative; z-index: 1; flex-wrap: wrap; }
.route-h h2 { color: #fff; font-size: 20px; }
.route-h p { margin: 4px 0 0; color: var(--on-graphite-muted); font-size: 13px; }
.route-svg { width: 100%; height: auto; display: block; position: relative; z-index: 1; margin-top: 6px; overflow: visible; }
.route-path { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2; }
.route-flow { fill: none; stroke: var(--orange); stroke-width: 2; stroke-dasharray: 2 12; stroke-linecap: round; animation: flow 1.6s linear infinite; opacity: .9; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.route-stop circle { fill: var(--graphite); stroke: rgba(255,255,255,.35); stroke-width: 1.5; }
.route-stop text { fill: var(--on-graphite-muted); font: 600 10px var(--font); letter-spacing: .14em; text-transform: uppercase; }
.route-end text.city { fill: #fff; font: 600 15px var(--display); letter-spacing: -.01em; text-transform: none; }
.route-end text.cty { fill: var(--on-graphite-muted); font: 500 11px var(--font); letter-spacing: .08em; text-transform: uppercase; }
.route-end circle { fill: var(--orange); }
.route-end .halo { fill: var(--orange); opacity: .25; transform-origin: center; transform-box: fill-box; animation: halo 2.4s var(--ease) infinite; }
@keyframes halo { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(2.6); opacity: 0; } }
.truck-pin { cursor: pointer; }
.truck-pin .pin { fill: #fff; transition: transform .5s var(--ease); transform-box: fill-box; transform-origin: center; }
.truck-pin:hover .pin { transform: scale(1.08); }
.truck-pin text { font: 700 11px var(--font); fill: var(--graphite); }
.truck-pin .stem { stroke: rgba(255,255,255,.5); stroke-width: 1; }
.truck-pin .dotp { fill: var(--orange); }
.truck-pin.ru .pin { fill: var(--orange); }
.truck-pin.ru text { fill: #fff; }
.route-legend { display: flex; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; margin-top: 4px; font-size: 12px; color: var(--on-graphite-muted); }
.route-legend b { color: #fff; font-family: var(--display); font-weight: 600; margin-right: 4px; }
.route-mobile { display: none; position: relative; z-index: 1; margin-top: 14px; }
@media (max-width: 720px) {
  .route { padding: 20px 16px 16px; border-radius: 22px; }
  .route-svg { display: none; }
  .route-mobile { display: grid; gap: 8px; }
}
.rm-row { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.rm-row a { color: #fff; font-weight: 700; }
.rm-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); position: relative; }
.rm-track i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--orange); }

/* шкала прогресса (заказано / погружено / принято) */
.prog { display: grid; gap: 5px; min-width: 150px; }
.prog-bar { height: 8px; border-radius: 8px; background: var(--surface2); position: relative; overflow: hidden; }
.prog-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; transition: width 1s var(--ease); }
.prog-bar i.o { background: color-mix(in srgb, var(--steel) 30%, transparent); }
.prog-bar i.l { background: var(--steel); }
.prog-bar i.r { background: var(--green); }
.prog-legend { display: flex; gap: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.prog-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.prog-legend .o::before { background: color-mix(in srgb, var(--steel) 30%, transparent); }
.prog-legend .l::before { background: var(--steel); }
.prog-legend .r::before { background: var(--green); }

/* заполнение фуры */
.cap { display: grid; gap: 6px; }
.cap-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.cap-bar { height: 10px; border-radius: 10px; background: var(--surface2); overflow: hidden; position: relative; }
.cap-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--steel), color-mix(in srgb, var(--steel) 70%, var(--orange))); border-radius: 10px; transition: width 1s var(--ease); }
.cap-bar.over i { background: var(--red); }
.cap-big .cap-bar { height: 16px; }

/* ── доски (канбан) ── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.col { background: color-mix(in srgb, var(--surface) 50%, transparent); border: 1px solid var(--line); border-radius: 20px; padding: 10px; min-height: 220px; scroll-snap-align: start; transition: background .3s, border-color .3s; }
.col.drop { background: var(--orange-soft); border-color: var(--orange); }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; }
.col-h b { font-size: 13px; font-weight: 700; }
.col-h span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; cursor: grab; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile.dragging { opacity: .4; }
.tile .t1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tile .t1 b { font-family: var(--display); font-size: 13px; font-weight: 600; }
.tile .t2 { font-weight: 600; font-size: 14px; margin: 4px 0 2px; }
.tile .t3 { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tile.late { border-color: color-mix(in srgb, var(--red) 45%, transparent); box-shadow: inset 3px 0 0 var(--red); }

/* этапы фуры */
.stages { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; position: relative; margin: 6px 0 4px; }
.stage { position: relative; text-align: center; padding-top: 30px; font-size: 12px; color: var(--muted); border: 0; background: none; cursor: pointer; }
.stage::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 3px; background: var(--surface2); }
.stage:first-child::before { left: 50%; }
.stage:last-child::before { right: 50%; }
.stage.done::before, .stage.cur::before { background: var(--orange); }
.stage.cur::before { right: 50%; }
.stage:last-child.cur::before { right: 50%; }
.stage i { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 19px; height: 19px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line2); transition: transform .4s var(--ease); }
.stage.done i { background: var(--orange); border-color: var(--orange); }
.stage.cur i { background: var(--surface); border: 5px solid var(--orange); box-shadow: 0 0 0 6px var(--orange-soft); }
.stage:hover i { transform: translateX(-50%) scale(1.15); }
.stage b { display: block; color: var(--ink); font-weight: 600; font-size: 12px; }
.stage.cur b { color: var(--orange-ink); }
.stage small { display: block; font-size: 11px; }
.stage[disabled] { cursor: default; }
@media (max-width: 720px) { .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; } }

/* вкладки */
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 16px; overflow-x: auto; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink2); white-space: nowrap; transition: all .35s var(--ease); }
.tabs button.on { background: var(--graphite); color: #fff; }

/* лента */
.feed { display: grid; gap: 2px; }
.feed-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.feed-row:last-child { border-bottom: 0; }
.feed-row::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--steel); align-self: center; }
.feed-row.ru::before { background: var(--orange); }
.feed-row.truck::before { background: var(--graphite); box-shadow: 0 0 0 2px var(--line2); }
.feed-row.pay::before { background: var(--green); }
.feed-row time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.att { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; transition: background .25s; }
.att:hover { background: var(--surface2); }
.att .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface2); }
.att.red .ic { background: var(--red-soft); color: var(--red); }
.att.orange .ic { background: var(--orange-soft); color: var(--orange-ink); }
.att.steel .ic { background: var(--steel-soft); color: var(--steel); }
.att.green .ic { background: var(--green-soft); color: var(--green); }
.att b { font-size: 14px; display: block; }
.att span { font-size: 12px; color: var(--muted); }

/* график */
.viz { position: relative; }
.viz svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz .ax { font: 500 11px var(--font); fill: var(--muted); }
.viz .grid-l { stroke: var(--line); }
.viz .bar-r { fill: var(--steel); transition: opacity .2s; }
.viz .bar-r.cur { fill: var(--orange); }
.viz .hit { fill: transparent; cursor: default; }
.viz .val { font: 700 12px var(--font); fill: var(--ink); }
.tip { position: absolute; pointer-events: none; background: var(--graphite); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 10px; transform: translate(-50%, -110%); white-space: nowrap; opacity: 0; transition: opacity .2s; z-index: 5; }
.tip.show { opacity: 1; }
.spark { width: 90px; height: 26px; display: block; }
.spark path { fill: none; stroke: var(--steel); stroke-width: 1.5; }
.spark circle { fill: var(--orange); }

/* выезжающая панель и модальное окно */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 19, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s var(--ease); }
.overlay.show { opacity: 1; }
.drawer { position: fixed; z-index: 51; top: 10px; right: 10px; bottom: 10px; width: min(760px, calc(100% - 20px)); background: var(--surface); border-radius: 24px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4);
  transform: translateX(105%); transition: transform .6s var(--ease); display: flex; flex-direction: column; overflow: hidden; }
.drawer.show { transform: none; }
.drawer.narrow { width: min(480px, calc(100% - 20px)); }
.drawer-h { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer-b { padding: 18px 22px; overflow-y: auto; flex: 1; }
.drawer-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface2); }
.x { border: 0; background: var(--surface2); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }

/* вход */
.login-wrap { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; position: relative; z-index: 1; }
.login-art { background: radial-gradient(120% 120% at 0% 100%, #22303f 0%, var(--graphite) 60%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { font-size: clamp(30px, 4vw, 52px); max-width: 12ch; color: #fff; }
.login-art p { color: var(--on-graphite-muted); max-width: 40ch; }
.login-art svg { position: absolute; inset: auto -10% 18% -10%; width: 120%; opacity: .9; }
.login-form { display: grid; place-items: center; padding: 32px 18px; }
.login-form form { width: min(380px, 100%); display: grid; gap: 14px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { min-height: 260px; padding: 28px; } .login-art svg { bottom: 4%; } }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--graphite); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .45s var(--ease); z-index: 80; box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--red); }

/* появление */
.rv { opacity: 0; transform: translateY(18px); filter: blur(4px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); }
.rv.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; filter: none; } .route-flow, .route-end .halo { animation: none; } * { transition-duration: .01ms !important; } }

.empty { text-align: center; padding: 38px 16px; color: var(--muted); font-size: 14px; }
.empty svg { color: var(--line2); margin-bottom: 8px; }
.line-sel { display: grid; gap: 4px; }
.qt { font-size: 11px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.qt button { border: 1px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 2px 8px; font-size: 11px; cursor: pointer; }
.qt button.best { border-color: var(--green); color: var(--green); font-weight: 700; }
.qt button.on { background: var(--graphite); color: #fff; border-color: transparent; }
.diff-neg { color: var(--red); font-weight: 700; }
.diff-pos { color: var(--amber); font-weight: 700; }
.ok-mark { color: var(--green); font-weight: 700; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }
.sticky-f { position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line2); box-shadow: var(--shadow); }

@media (max-width: 720px) {
  .bar { top: 8px; margin-top: 8px; width: calc(100% - 16px); flex-wrap: wrap; border-radius: 22px; padding: 8px; }
  .brand small { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .bar-end { margin-left: auto; }
  main { width: calc(100% - 32px); padding-top: 22px; }
  .card { padding: 16px; }
  .tbl-wrap { margin: 0 -16px; padding: 0 16px; }
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 88dvh; transform: translateY(105%); }
  .drawer.narrow { width: auto; }
  .hide-m { display: none; }
}
