/* Оформление: два цвета бренда (основной и акцентный) задаются в админке → «Настройки»;
   common.js applyTheme() вычисляет из них все оттенки. Здесь — значения по умолчанию. */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #14202f;
  --muted: #4d5a6b;
  --line: #dfe4ec;
  --field: #cbd3df;
  --primary: #12233b;
  --primary-ink: #12233b;
  --primary-dark: #0a1626;
  --primary-soft: #eef1f6;
  --on-primary: #ffffff;
  --on-primary-muted: #c9d3e1;
  --accent: #ffc533;
  --accent-dark: #d19c0c;
  --on-accent: #14202f;
  --warn: #9a5a00;
  --warn-soft: #fff3d6;
  --danger: #b3261e;
  --danger-soft: #f9e3e1;
  --info: #24589a;
  --info-soft: #e3edf9;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(20, 60, 35, .08);
  --tabbar: 68px;
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.45 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.12rem; }
p { margin: 0 0 .8em; }
a { color: var(--primary-ink); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong-accent { color: var(--primary-ink); font-weight: 800; }
.error { color: var(--danger); font-size: .9rem; margin: 10px 0 0; min-height: 0; }
.error:empty { display: none; }

/* шапка приложения магазина */
.appbar {
  background: var(--primary); color: var(--on-primary); padding: 14px 16px 20px; position: relative; overflow: hidden;
}
.appbar .lace { position: absolute; right: -44px; top: -46px; width: 160px; height: 160px; opacity: .2; pointer-events: none; }
.brandrow { display: flex; align-items: center; gap: 10px; position: relative; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.logo svg { width: 21px; height: 21px; color: var(--primary-dark); }
.brandname { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: .2px; }
#hero { position: relative; margin-top: 12px; max-width: 728px; }
#hero:empty { display: none; }
.hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.015em; font-size: 1.75rem; line-height: 1.08; }
.hero-sub { color: var(--on-primary-muted); margin-top: 4px; font-size: .95rem; }
.hero-note { display: flex; align-items: center; gap: 8px; background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 9px 12px; margin-top: 12px; font-weight: 800; font-size: .9rem; }
.hero-note svg { width: 20px; height: 20px; flex: none; }

/* шапка админки */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--primary); color: var(--on-primary);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
}
.topbar .title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .iconbtn { color: var(--on-primary); }
.topbar .btn.ghost { color: var(--on-primary); border-color: rgba(255,255,255,.4); }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar) + 96px); }
.wide main { max-width: 1180px; padding-bottom: calc(var(--tabbar) + 28px); }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list > .item { padding: 12px 14px; border-top: 1px solid var(--line); }
.list > .item:first-child { border-top: 0; }
.item.tap { cursor: pointer; }
.item.tap:active { background: var(--primary-soft); }
.cards { display: flex; flex-direction: column; gap: 10px; }
.pcard {
  background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; width: 100%; font: inherit; color: inherit; text-align: left;
}
button.pcard { display: block; cursor: pointer; }
button.pcard:active { background: var(--primary-soft); }
.ptile { width: 50px; height: 50px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: #3d4a41; }
.section-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 20px 4px 8px; }

/* нижние вкладки */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line); display: flex;
}
.tabbar button {
  flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: .75rem; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; cursor: pointer;
}
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--primary-ink); font-weight: 800; }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.tabbar .badge { position: absolute; top: 7px; left: calc(50% + 6px); }

/* формы */
label { display: block; font-size: .9rem; font-weight: 700; margin: 0 0 6px; }
.field + .field { margin-top: 14px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--field); border-radius: 12px; padding: 12px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-ink); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { min-height: 80px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; border-radius: 14px; padding: 12px 18px; border: 1.5px solid transparent;
  background: var(--primary); color: var(--on-primary); cursor: pointer; text-decoration: none; min-height: 48px;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.btn-cta { background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; box-shadow: 0 4px 0 var(--accent-dark); min-height: 54px; }
.btn-cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-dark); }
.btn.ghost { background: var(--card); color: var(--primary-ink); border-color: var(--primary-ink); }
.btn.soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.link { background: none; color: var(--primary-ink); min-height: 44px; }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: .875rem; border-radius: 11px; }
.iconbtn { border: 0; background: none; color: var(--ink); padding: 8px; border-radius: 10px; cursor: pointer; display: inline-flex; }
.iconbtn svg { width: 22px; height: 22px; }

.seg { display: flex; background: var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; font: inherit; font-weight: 700; padding: 9px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--field); background: var(--card); color: var(--ink); border-radius: 999px;
  padding: 8px 16px; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary-ink); }

/* прайс */
.product .name { font-weight: 800; }
.product .price { color: var(--muted); font-size: .9rem; }
.stepper { display: flex; align-items: center; background: var(--primary-soft); border-radius: 12px; overflow: hidden; flex: none; }
.stepper button { width: 42px; height: 42px; border: 0; background: none; color: var(--primary-ink); font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.stepper input { width: 52px; border: 0; border-radius: 0; background: transparent; text-align: center; padding: 8px 2px; font-weight: 800; box-shadow: none !important; }
.add { width: 46px; height: 46px; border-radius: 13px; border: 0; background: var(--primary); color: var(--on-primary); font-size: 1.6rem; font-weight: 800; cursor: pointer; flex: none; }

.cartbar {
  position: fixed; left: 14px; right: 14px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px); z-index: 25;
  max-width: 732px; margin: 0 auto;
}
.cartbar .btn { width: 100%; justify-content: space-between; box-shadow: 0 4px 0 var(--accent-dark), 0 8px 22px rgba(0,0,0,.16); }

/* регистрация: место */
.loc-card { background: var(--card); border: 2px solid var(--primary); border-radius: 18px; overflow: hidden; }
.loc-card.warn { border-color: var(--accent-dark); }
.loc-map { height: 150px; background: var(--primary-soft); z-index: 0; }
.loc-info { padding: 12px 14px; }
.loc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--primary-dark); }
.loc-card.warn .loc-title { color: var(--warn); }
.photo-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 13px;
  border: 1.5px dashed var(--primary); background: var(--card); color: var(--primary-ink); font-weight: 800; cursor: pointer; margin: 0;
}
.photo-btn svg { width: 21px; height: 21px; }
.photo-preview { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 13px; margin-top: 10px; }

/* статусы */
.pill { display: inline-block; font-size: .78rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.st-new { background: var(--info-soft); color: var(--info); }
.st-accepted, .st-assembling { background: var(--warn-soft); color: var(--warn); }
.st-on_way { background: var(--primary-soft); color: var(--primary-ink); }
.st-delivered { background: var(--primary); color: var(--on-primary); }
.st-cancelled, .st-rejected { background: var(--danger-soft); color: var(--danger); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); display: inline-block; flex: none; }

.progress { display: flex; gap: 4px; margin: 14px 0 8px; }
.progress span { flex: 1; height: 7px; border-radius: 4px; background: var(--line); }
.progress span.done { background: var(--primary); }
.steps { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); gap: 4px; }
.steps span { flex: 1; text-align: center; }
.steps span.done { color: var(--ink); font-weight: 800; }
.steps span:first-child { text-align: left; } .steps span:last-child { text-align: right; }

.eta { background: var(--accent); color: var(--on-accent); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; }
.eta span { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.eta b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.delivery { background: var(--primary-soft); color: var(--primary-ink); border-radius: 12px; padding: 12px 14px; font-weight: 800; }

/* чат */
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; background: var(--primary-soft); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--primary); color: var(--on-primary); }
.msg .meta { display: block; font-size: .72rem; opacity: .75; margin-top: 3px; }
.sys { align-self: center; font-size: .8rem; color: var(--muted); text-align: center; }
.composer { display: flex; gap: 8px; margin-top: 12px; }
.composer input { flex: 1; }

/* карта */
.map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.map.tall { height: calc(100vh - 230px); min-height: 360px; }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; }
.prospect { width: 9px; height: 9px; border-radius: 50%; background: #7d8a82; border: 1.5px solid #fff; box-shadow: 0 0 2px rgba(0,0,0,.4); }

/* окно поверх */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(10, 20, 14, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--bg); width: 100%; max-width: 760px; max-height: 94vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 0 0 calc(20px + env(safe-area-inset-bottom));
}
.sheet .sheet-head { position: sticky; top: 0; background: var(--bg); padding: 12px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); z-index: 2; }
.sheet .sheet-body { padding: 16px; }
@media (min-width: 900px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 20px; max-height: 88vh; }
}

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 84px); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: .92rem; font-weight: 700; max-width: calc(100% - 32px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: .8rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; align-items: center; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; cursor: pointer; }
.legend input { width: auto; }
.shop-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; display: block; margin-top: 12px; }

/* переключатель языка в админке */
.langswitch { display: flex; background: rgba(255,255,255,.16); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.langswitch button { border: 0; background: none; color: var(--on-primary); font: inherit; font-weight: 800; font-size: .8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer; min-width: 40px; min-height: 32px; }
.langswitch button.on { background: var(--on-primary); color: var(--primary-dark); }
.chips.quick { flex-wrap: wrap; }
.chips.quick .chip { white-space: normal; text-align: left; }
.chip small { display: block; font-weight: 500; font-size: .75rem; opacity: .75; }

/* приложение поставщика */
.brandtag { margin-left: 4px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: .72rem; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 12px 14px; font-weight: 700; margin-bottom: 12px; }
.supplier-tag { font-size: .78rem; color: var(--muted); }
.st-ready { background: #dff3e6; color: #17603a; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--field); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.net { background: var(--primary-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.sq-pin { width: 18px; height: 18px; border-radius: 5px; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; }

/* логотип компании вместо стандартной иконки */
.logo.has-img { background: #fff; overflow: hidden; padding: 2px; }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 9px; }
.topbar .logo { width: 36px; height: 36px; }
/* настройки бренда в админке */
.color-row { display: flex; gap: 12px; flex-wrap: wrap; }
.color-row .field { flex: 1 1 140px; margin: 0; }
.color-row input[type=color] { height: 48px; padding: 4px; cursor: pointer; }
.logo-preview { width: 72px; height: 72px; border-radius: 16px; border: 1px solid var(--line); background: #fff; object-fit: contain; display: block; }
.preview-bar { border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* водитель: номера остановок маршрута */
.stopnum { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: .9rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.stopnum.pick { background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.link-btn { all: unset; color: var(--primary-ink); font-weight: 800; text-decoration: underline; cursor: pointer; }
.codebox .code { font-family: var(--font-display); font-size: 2rem; letter-spacing: .15em; color: var(--primary-ink); font-variant-numeric: tabular-nums; flex: none; }
.codebox .row > span { min-width: 0; }
select.need { border-color: var(--danger); }
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc { all: unset; cursor: pointer; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.doc img { display: block; width: 100%; height: 120px; object-fit: cover; }
.doc span { display: block; padding: 6px 10px; font-size: .8rem; font-weight: 700; }
.doc.big { grid-column: 1 / -1; }
.doc.big img { height: auto; max-height: 80vh; object-fit: contain; background: #000; }
/* водитель на карте админки */
.drv-pin { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px 0 7px; border-radius: 17px; white-space: nowrap;
  background: #2563eb; color: #fff; font-weight: 800; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.drv-pin svg { width: 18px; height: 18px; flex: none; }
.drv-pin.stale { background: #8a8f8c; }
.drv-pin.mini { height: 20px; width: 20px; padding: 0; justify-content: center; border-radius: 50%; box-shadow: none; vertical-align: middle; margin-right: 4px; }
.drv-pin.mini svg { width: 12px; height: 12px; }
.duty { display: flex; align-items: center; gap: 8px; background: var(--primary-soft); color: var(--primary-ink); border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; flex: none; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.app-offer { margin-bottom: 12px; border: 2px solid var(--accent); }
.setup-row { padding: 10px 0; border-top: 1px solid var(--line); }
/* склад: сборка заказа */
.pick-progress { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.pick-progress span { display: block; height: 100%; background: var(--primary); }
.picklist .item.pick { display: flex; align-items: center; gap: 8px; padding: 0; }
.pick-main { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 12px; cursor: pointer; min-height: 56px; }
.pick-main:disabled { cursor: default; }
.pick-main:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pick-box { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--primary); display: grid; place-items: center; font-weight: 800; color: var(--danger); }
.pick-box svg { width: 20px; height: 20px; color: var(--on-primary); }
.is-picked .pick-box { background: var(--primary); }
.is-picked .pick-name { text-decoration: line-through; color: var(--muted); }
.is-missing .pick-box { border-color: var(--danger); }
.pick-name { font-weight: 700; }
.pick-qty { font-size: 1.1rem; flex: none; }
.pick-miss { flex: none; margin-right: 10px; }
/* отчёты */
.rep-dates { gap: 10px; align-items: center; margin-top: 6px; }
.rep-dates label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.rep-dates input { width: auto; padding: 8px 10px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rep-table th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rep-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rep-table tr:last-child td { border-bottom: 0; }
.rep-table td.num { text-align: right; white-space: nowrap; }
.chart-card { padding: 10px 8px 4px; }
.bar-chart { display: block; width: 100%; height: auto; overflow: visible; }
.bar-chart .grid { stroke: var(--line); stroke-width: 1; }
.bar-chart .axis-t { font-size: 10px; fill: var(--muted); font-family: inherit; }
.bar-chart .bar { cursor: pointer; }
.bar-chart .bar-fill { fill: var(--primary); transition: opacity .15s; }
.bar-chart:has(.bar.on) .bar:not(.on) .bar-fill { opacity: .45; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--card); color: var(--ink, #14202f); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: 10px; padding: 6px 10px; font-size: .8rem; white-space: nowrap; pointer-events: none; }

/* демо-копия */
.demo-note { margin-bottom: 12px; border: 2px solid var(--accent); }
.demo-roles { display: grid; gap: 12px; margin-top: 22px; }
@media (min-width: 760px) { .demo-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.demo-role { text-align: left; cursor: pointer; font: inherit; color: var(--ink, #14202f); width: 100%; }
.demo-role h3 { margin: 0 0 6px; }
.demo-role p { margin: 0; }
.demo-role:hover, .demo-role:focus-visible { outline: 3px solid var(--accent); }
/* без связи: плашка под шапкой */
#netbar { position: sticky; top: 0; z-index: 40; }
.netbar { background: var(--primary-soft); color: var(--primary-ink); padding: 10px 16px; font-weight: 800; font-size: .92rem; }
.netbar.off { background: #2b2f36; color: #fff; }
.netbar.bad { background: var(--danger-soft); color: var(--danger); display: flex; align-items: center; gap: 10px; justify-content: space-between; font-weight: 700; }
.offline-tag { color: var(--warn); font-weight: 800; }
.queued-tag { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #2b2f36; color: #fff; }
.offline-box { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); line-height: 1.45; }
.chan-tabs { margin-bottom: 8px; }
.chan-tabs .dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--danger); margin-left: 4px; vertical-align: middle; }
.chan-hint { margin-bottom: 8px; }
.card.chan-warehouse, .card.chan-driver { border-left: 4px solid var(--warn, #e8a400); }
/* «Требует внимания» на главном экране админки */
.attention { margin-top: 12px; }
.attention-h { font-weight: 800; font-size: .95rem; margin: 0 2px 6px; }
.attention-row { display: flex; flex-wrap: wrap; gap: 8px; }
.att { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; border-radius: 12px; padding: 9px 12px; cursor: pointer; font: inherit; flex: 1 1 180px; }
.att b { font-size: .95rem; }
.att span { font-size: .8rem; opacity: .8; }
.att.danger { background: #fde5e5; color: #9b1c21; }
.att.warn { background: #fff3cf; color: #6b4d00; }
.att.info { background: #e3ecfd; color: #1d3f8f; }
.attention.ok { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; background: #ddf4e8; color: #0d6b3c; border-radius: 12px; padding: 10px 12px; }
.attention.ok span { font-size: .85rem; }
.who { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.14); white-space: nowrap; margin-left: 8px; }
