﻿:root {
  color-scheme: light;
  --bg0: #f3f5f8;
  --bg1: #eef1f6;
  --bg2: #ffffff;
  --body-grad-from: #f7f8fb;
  --body-grad-to: #eef1f6;
  --glass: #ffffff;
  --glass-border: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --rail-bg: #ffffff;
  --input-bg: #ffffff;
  --dock-bg: rgba(255, 255, 255, 0.97);
  --ink: #1e293b;
  --muted: #64748b;
  --code-bg: #f1f5f9;
  --code-ink: #334155;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #eff6ff;
  --accent-soft-border: #bfdbfe;
  --accent-soft-ink: #1e40af;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --ok-border: #bbf7d0;
  --ok-ink: #166534;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-ink: #92400e;
  --idle-bg: #fffbeb;
  --idle-border: #fde68a;
  --idle-ink: #92400e;
  --empty-bg: #f8fafc;
  --empty-border: #e2e8f0;
  --empty-ink: #64748b;
  --chip-bg: #f8fafc;
  --chip-accent-bg: #eff6ff;
  --chip-accent-border: #bfdbfe;
  --chip-accent-ink: #1e40af;
  --row-selected: #dbeafe;
  --row-done-bg: #dcfce7;
  --row-done-ink: #166534;
  --row-cat-bg: #f1f5f9;
  --row-total-bg: #f1f5f9;
  --focus-border: rgba(37, 99, 235, 0.7);
  --focus-ring: rgba(37, 99, 235, 0.2);
  --hover-bg: #f1f5f9;
  --exit-hover-bg: #fef2f2;
  --btn-secondary-bg: #f1f5f9;
  --btn-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  --dock-shadow: 0 -6px 20px rgba(15, 23, 42, 0.1);
  --card-hover-border: #bfdbfe;
  --card-hover-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
  --now-border: #93c5fd;
  --now-bg-from: #eff6ff;
  --now-bg-to: #ffffff;
  --now-ring: rgba(147, 197, 253, 0.25);
  --now-shadow: rgba(37, 99, 235, 0.12);
  --now-wb-border: #8b5cf6;
  --now-wb-from: #ede9fe;
  --now-wb-to: #ffffff;
  --now-wb-ring: rgba(139, 92, 246, 0.28);
  --now-wb-shadow: rgba(91, 33, 182, 0.18);
  --now-ozon-border: #0ea5e9;
  --now-ozon-from: #e0f2fe;
  --now-ozon-to: #ffffff;
  --now-ozon-ring: rgba(14, 165, 233, 0.28);
  --now-ozon-shadow: rgba(2, 132, 199, 0.16);
  --pack-border: #ef4444;
  --pack-from: #fef2f2;
  --pack-to: #ffffff;
  --pack-ring: rgba(239, 68, 68, 0.18);
  --pack-shadow: rgba(185, 28, 28, 0.12);
  --pack-kicker: #b91c1c;
  --pack-thumb-border: #fecaca;
  --overdue-bg: #fffbeb;
  --overdue-border: #fdba74;
  --admin-danger-bg: #fff7f7;
  --day-badge-bg: #f1f5f9;
  --day-badge-border: #cbd5e1;
  --day-badge-ink: #334155;
  --glow: none;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --card: var(--glass);
  --text: var(--ink);
  --zone-bg: rgba(15, 23, 42, 0.02);
  --stat-bg: rgba(15, 23, 42, 0.03);
  --theme-btn-on-bg: var(--accent-soft);
  --theme-btn-on-ink: var(--accent);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--body-grad-from) 0%, var(--body-grad-to) 100%);
  min-height: 100vh;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  color: var(--code-ink);
}

.muted { color: var(--muted); }
.tiny { font-size: 0.82rem; }

.ui-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  color: var(--muted);
  width: fit-content;
}
.ui-chip.accent {
  color: var(--chip-accent-ink);
  background: var(--chip-accent-bg);
  border-color: var(--chip-accent-border);
}
.ui-chip.warn {
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-color: var(--warn-border);
}
.ui-chip.idle {
  color: var(--idle-ink);
  background: var(--idle-bg);
  border-color: var(--idle-border);
}
.ui-chip.done, .ui-chip.ok {
  color: var(--ok-ink);
  background: var(--ok-bg);
  border-color: var(--ok-border);
}
.ui-chip.active {
  color: var(--accent-soft-ink);
  background: var(--accent-soft);
  border-color: var(--accent-soft-border);
}
.ui-chip.empty {
  color: var(--empty-ink);
  background: var(--empty-bg);
  border-color: var(--empty-border);
}

.ui-zone {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--zone-bg);
}
.ui-zone-h {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.ui-stat {
  min-width: 4.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: var(--stat-bg);
  border: 1px solid var(--line);
  text-align: center;
}
.ui-stat.accent {
  background: var(--chip-accent-bg);
  border-color: var(--chip-accent-border);
}
.ui-stat.ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}
.ui-stat-n {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ui-stat-l {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ws-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 1rem;
  align-items: center;
}
.ws-title { margin: 0; font-size: 1.45rem; }
.ws-sub { margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.ws-stats { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ws-now {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-top: 0.65rem;
  padding: 0.75rem 1.15rem;
  border-radius: 14px;
  border: 3px solid var(--now-border);
  background: linear-gradient(180deg, var(--now-bg-from) 0%, var(--now-bg-to) 100%);
  max-width: 100%;
  box-shadow: 0 0 0 4px var(--now-ring), 0 10px 28px var(--now-shadow);
}
.ws-now-wb {
  border-color: var(--now-wb-border);
  background: linear-gradient(180deg, var(--now-wb-from) 0%, var(--now-wb-to) 100%);
  box-shadow: 0 0 0 4px var(--now-wb-ring), 0 12px 32px var(--now-wb-shadow);
}
.ws-now-ozon {
  border-color: var(--now-ozon-border);
  background: linear-gradient(180deg, var(--now-ozon-from) 0%, var(--now-ozon-to) 100%);
  box-shadow: 0 0 0 4px var(--now-ozon-ring), 0 12px 32px var(--now-ozon-shadow);
}
.ws-now-k {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.ws-now-v {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.station-mode .ws-now-v { font-size: 1.9rem; }
.station-mode .ws-now { padding: 0.9rem 1.3rem; }
.ui-stat-hint {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.1rem;
}
.lp-pick-stat {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 0.15rem;
  padding: 0.5rem 0.95rem !important;
  border-radius: 12px !important;
  line-height: 1.2;
}
.lp-pick-name {
  font-size: 1rem;
  font-weight: 700;
}
.lp-pick-meta {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.9;
}
.ws-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
@media (max-width: 980px) {
  .ws-hero { grid-template-columns: 1fr; }
  .ws-hero-actions { justify-content: flex-start; }
}

.shot-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.shot-emoji {
  font-size: 1.8rem;
  opacity: 0.9;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.ws-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
/* Панель действий не уезжает при прокрутке очереди */
.ws-bulk-dock {
  position: sticky;
  bottom: 0.4rem;
  z-index: 40;
  margin: 0.75rem 0 0.25rem;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: var(--dock-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--dock-shadow);
  backdrop-filter: blur(10px);
}
.ws-bulk-dock .ws-bulk-count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}
.ws-root.station-mode .ws-bulk-dock {
  padding: 0.85rem 1rem;
}
.ws-root.station-mode .ws-bulk-dock .btn {
  font-size: 1.05rem;
  padding: 0.55rem 1rem;
}
.chk-col { width: 2rem; text-align: center; }
.ws-actions { white-space: nowrap; }
.unknown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.unknown-table select.lp-select { margin: 0; }
.queue-panel { position: relative; overflow: hidden; }
.queue-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.85;
}

.empty-state {
  text-align: center;
  padding: 2.2rem 1.5rem !important;
  position: relative;
  overflow: hidden;
}
.empty-state h2 {
  margin: 0.35rem 0 0.4rem;
  letter-spacing: -0.02em;
}
.empty-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}

.scan-hint { align-self: center; }

.panel {
  position: relative;
}
.panel::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* —— Shell —— */
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.app-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 0.85rem 1rem;
  background: var(--rail-bg);
  border-right: 1px solid var(--line);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0.45rem 0.85rem;
}

.rail-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
  color: #fff;
}

.rail-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.rail-section {
  margin: 0.75rem 0.45rem 0.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.rail-link:hover {
  color: var(--ink);
  background: var(--hover-bg);
}

.rail-link.on {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-soft-border);
}

.rail-ico {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.rail-who {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 0.45rem;
}

.rail-exit {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.rail-exit:hover { background: var(--exit-hover-bg); color: var(--danger); border-color: var(--danger-border); }

.rail-theme {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
}
.rail-theme-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  padding: 0.4rem 0.2rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.15;
}
.rail-theme-btn:hover {
  color: var(--ink);
  border-color: var(--accent-soft-border);
}
.rail-theme-btn.on {
  background: var(--theme-btn-on-bg);
  color: var(--theme-btn-on-ink);
  border-color: var(--accent-soft-border);
  box-shadow: inset 0 0 0 1px var(--accent-soft-border);
}

/* Менеджер: явный город загрузки */
.mgr-city-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.85rem;
  margin: 0 0 0.65rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--accent-soft-border);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 100%);
}
.mgr-city-banner.kursk {
  border-color: var(--ok-border);
  background: linear-gradient(180deg, var(--ok-bg) 0%, var(--surface) 100%);
}
.mgr-city-banner-k {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mgr-city-banner-v {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mgr-city-banner.kursk .mgr-city-banner-v { color: var(--ok-ink); }
.lp-pick.city-gel.on {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.lp-pick.city-kursk.on {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.app-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.app-topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem 0.35rem;
}

.topbar-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-main {
  flex: 1;
  padding: 0.5rem 1.35rem 2rem;
  max-width: 1480px;
  width: 100%;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-rail {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--glass-border);
  }
  .rail-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .rail-foot { flex-direction: row; align-items: center; border: 0; padding: 0; }
  .rail-exit { width: auto; }
}

/* —— Auth —— */
.auth-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-main { width: min(440px, 100%); }

.login-wrap {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.login-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.login-form input,
.upload-form select,
.upload-form input[type=file],
.scan-form input,
.lp-select,
.assign-form select,
.ar-add-form input,
.ar-add-form select,
.article-rule-top input,
.article-rule-top select {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--ink);
  font-family: inherit;
}

.login-form input:focus,
.scan-form input:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.login-form button,
.upload-form button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.hint {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.hint ul { padding-left: 1.1rem; }

.field-error { color: var(--danger); font-weight: 500; font-size: 0.9rem; }

/* —— Surfaces —— */
.panel,
.login-wrap.glass,
.stage-block,
.lp-window,
.mgr-shell .mgr-rail,
.ar-panel,
.admin-rule-card,
.article-rule-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel,
.stage-block {
  padding: 1.25rem 1.35rem;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.stage-h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.alert {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 123, 114, 0.25);
  border-radius: 12px;
}

.ok {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid rgba(61, 214, 140, 0.25);
  border-radius: 12px;
}

.inline { display: inline; margin: 0; }

/* —— Hub shot cards —— */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.shot-card,
.hub-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 180px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}

.shot-card:hover,
.hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}

.shot-visual {
  height: 112px;
  background:
    linear-gradient(135deg, rgba(79, 124, 255, 0.55), rgba(139, 92, 246, 0.35)),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 50%);
}

.shot-visual-mgr {
  background:
    linear-gradient(135deg, #355dff, #7c3aed 70%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.3), transparent 45%);
}

.shot-visual-adm {
  background:
    linear-gradient(135deg, #f59e0b, #db2777 75%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.25), transparent 40%);
}

.shot-visual-home {
  background:
    linear-gradient(145deg, #22d3ee, #2563eb 65%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.28), transparent 45%);
}

.shot-visual-north {
  background:
    linear-gradient(145deg, #a78bfa, #4f46e5 70%),
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.28), transparent 45%);
}

.shot-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem 1rem;
  flex: 1;
}

.shot-body strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.shot-by {
  font-size: 0.82rem;
  color: var(--muted);
}

.shot-meta {
  margin-top: auto;
  padding-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.shot-tag {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.hub-note { margin-top: 1.25rem; }

.hub-progress {
  margin-top: 0.55rem;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.hub-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  min-width: 0;
  transition: width 0.35s ease;
}

.glass-lite {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.feed-h {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.55rem;
}
.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 220px;
  overflow: auto;
}
.feed-list li {
  display: grid;
  grid-template-columns: 3.2rem 5.5rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.86rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
}
.feed-list li:hover { background: rgba(255, 255, 255, 0.04); }
.feed-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-type {
  font-weight: 600;
  color: #c7d9ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.feed-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-actor { font-size: 0.78rem; }

.ws-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
}
.ws-search label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
  flex: 1 1 220px;
}
.ws-search input[type=search] {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
}

/* Station / density / flash */
html.density-compact {
  font-size: 14px;
}
html.density-compact .shot-card { min-height: 180px; }

.station-mode .stage-h1,
.station-mode .btn-station {
  font-size: 1.15em;
}
.station-mode .scan-form input {
  font-size: 1.45rem;
  padding: 0.9rem 1rem;
}
.station-mode .btn-station {
  padding: 0.85rem 1.35rem !important;
  font-size: 1.15rem !important;
  min-height: 3rem;
}
.station-mode table.data {
  font-size: 1.05rem;
}
.station-mode .row-thumb {
  width: 56px;
  height: 56px;
}

@keyframes bm-flash-ok {
  0% { box-shadow: inset 0 0 0 0 rgba(61, 214, 140, 0); }
  35% { box-shadow: inset 0 0 0 4px rgba(61, 214, 140, 0.55); }
  100% { box-shadow: inset 0 0 0 0 rgba(61, 214, 140, 0); }
}
@keyframes bm-flash-err {
  0% { box-shadow: inset 0 0 0 0 rgba(255, 123, 114, 0); }
  35% { box-shadow: inset 0 0 0 4px rgba(255, 123, 114, 0.6); }
  100% { box-shadow: inset 0 0 0 0 rgba(255, 123, 114, 0); }
}
body.flash-ok { animation: bm-flash-ok 0.7s ease; }
body.flash-err { animation: bm-flash-err 0.7s ease; }

.shot-card {
  animation: shot-in 0.35s ease both;
}
@keyframes shot-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.hub-grid .shot-card:nth-child(2) { animation-delay: 0.04s; }
.hub-grid .shot-card:nth-child(3) { animation-delay: 0.08s; }
.hub-grid .shot-card:nth-child(4) { animation-delay: 0.12s; }
.hub-grid .shot-card:nth-child(5) { animation-delay: 0.16s; }
.hub-grid .shot-card:nth-child(6) { animation-delay: 0.2s; }

@media (max-width: 700px) {
  .feed-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .feed-type, .feed-actor { display: none; }
}

/* —— Buttons —— */
a.btn,
.btn,
.print-toolbar button {
  display: inline-block;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--btn-shadow);
}

.btn:hover { filter: brightness(1.08); }
.btn-sm { padding: 0.35rem 0.65rem !important; font-size: 0.85rem !important; }
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-secondary:hover { filter: brightness(1.04); border-color: var(--accent-soft-border); }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Ghost: не наследует белый accent-ink от .btn (иначе в светлой теме текст не виден). */
a.btn.btn-ghost,
.btn.btn-ghost,
.btn-ghost {
  background: var(--surface, #fff) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  font-weight: 600;
}
a.btn.btn-ghost:hover,
.btn.btn-ghost:hover,
.btn-ghost:hover {
  filter: none;
  border-color: var(--accent-soft-border, var(--accent)) !important;
  background: var(--zone-bg, rgba(0, 0, 0, 0.03)) !important;
}

/* —— Tables —— */
.table-wrap {
  overflow: auto;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  color: var(--ink);
}

table.data th,
table.data td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

table.data th {
  background: var(--surface-2);
  position: sticky;
  top: 0;
  color: var(--muted);
  font-weight: 600;
}

table.data.compact { max-width: 100%; font-size: 0.88rem; }

tr.row-missing-sticker td { background: rgba(245, 158, 11, 0.12); }

tr.row-done td {
  background: var(--row-done-bg) !important;
  color: var(--row-done-ink);
}
tr.row-done td a,
tr.row-done td code {
  color: var(--row-done-ink);
}
tr.row-selected:not(.row-done) td {
  background: var(--row-selected);
}
tr.ws-data-row {
  cursor: pointer;
  user-select: none;
}
tr.ws-data-row.row-done {
  cursor: default;
}
tr.board-total-row td {
  background: var(--row-total-bg);
  border-top: 2px solid var(--line-strong);
  font-variant-numeric: tabular-nums;
}

tr.ws-cat-row td {
  background: var(--row-cat-bg);
  font-size: 0.92rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-top: 1px solid var(--line-strong);
}

.row-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.thumb-cell { width: 52px; }

/* —— Workshop —— */
.workshop-top .mgr-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.mgr-header h1 { letter-spacing: -0.02em; }

.scan-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.scan-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  flex: 1 1 280px;
}

.scan-form input { font-size: 1.15rem; }

/* Сборка: карточка найденной позиции */
.pack-lookup-card {
  margin-top: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 3px solid var(--pack-border);
  background: linear-gradient(180deg, var(--pack-from) 0%, var(--pack-to) 100%);
  box-shadow: 0 0 0 4px var(--pack-ring), 0 12px 28px var(--pack-shadow);
}
.pack-lookup-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pack-kicker);
  margin-bottom: 0.45rem;
}
.pack-lookup-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
}
.pack-lookup-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--pack-thumb-border);
  background: var(--surface);
}
.pack-lookup-art {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}
.pack-lookup-name {
  margin-top: 0.2rem;
  font-size: 1.05rem;
  color: var(--muted);
}
.pack-lookup-meta {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.pack-lookup-code {
  margin: 0.45rem 0;
}
.pack-lookup-code code {
  font-size: 1.05rem;
  padding: 0.2rem 0.45rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid #fecaca;
}
.row-lookup-hit {
  outline: 3px solid #ef4444;
  outline-offset: -2px;
  background: var(--danger-bg) !important;
}
.pack-scan-lookup {
  border-color: var(--danger-border);
  background: linear-gradient(180deg, var(--danger-bg) 0%, var(--surface-2) 100%);
}

/* Упаковка: скан — главное действие на экране */
.pack-scan-zone {
  padding-top: 0.35rem;
}
.pack-scan-hero {
  margin-top: 0;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(180deg, var(--now-bg-from) 0%, var(--surface-2) 100%);
  border: 2px solid var(--now-border);
  box-shadow: 0 8px 24px var(--now-shadow);
}
.pack-scan-hero input {
  font-size: 1.35rem;
  padding: 0.85rem 1rem;
  min-height: 3rem;
}
.pack-scan-hero .btn-station {
  min-height: 3rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
}
.pack-search-row {
  margin-top: 0.75rem;
  opacity: 0.92;
}
.station-mode .pack-scan-hero input {
  font-size: 1.55rem;
  padding: 1rem 1.1rem;
}
.ws-toolbar-compact .ui-zone-h {
  font-size: 0.78rem;
}

.lp-market-picks,
.ws-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.lp-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

/* Невыбранные — серые; выбранные — цвет маркета / режима */
.lp-pick.wb.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35), 0 8px 22px rgba(91, 33, 182, 0.35);
  transform: translateY(-1px);
}
.lp-pick.ozon.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 8px 22px rgba(29, 78, 216, 0.35);
  transform: translateY(-1px);
}
.lp-pick.mode-pack.on,
.lp-pick.mode-asm.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4), 0 8px 20px rgba(185, 28, 28, 0.35);
  transform: translateY(-1px);
}
.lp-pick.mode-done.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.35), 0 6px 16px rgba(71, 85, 105, 0.25);
  transform: translateY(-1px);
}
/* Общий .on без цвета (менеджер и т.п.) */
.lp-pick.on:not(.wb):not(.ozon):not(.mode-pack):not(.mode-asm):not(.mode-done) {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3), 0 8px 20px rgba(79, 70, 229, 0.28);
  transform: translateY(-1px);
}

details > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

details > summary::-webkit-details-marker { display: none; }

/* —— Manager LP window —— */
.lp-window {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.lp-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.lp-toolbar-title {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.lp-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.lp-market-inline {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 0.3rem;
  min-width: 7rem;
}
.lp-market-inline .lp-pick {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}
.lp-load-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lp-upload-form { margin: 0; }

/* Индикатор длительной загрузки маркета (как BusyOverlay в Windows) */
.lp-busy {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  padding: 1.25rem;
}
.lp-busy[hidden] { display: none !important; }
body.lp-busy-on { overflow: hidden; cursor: wait; }
.lp-busy-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 1.35rem 1.5rem 1.15rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  text-align: center;
}
.lp-busy-title {
  font-family: "IBM Plex Sans", var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.35rem;
}
.lp-busy-detail {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.35;
}
.lp-busy-detail[hidden] { display: none; }
.lp-busy-track {
  height: 12px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}
.lp-busy-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1d4ed8, #0ea5e9, #14b8a6);
  animation: lp-busy-slide 1.15s ease-in-out infinite;
}
@keyframes lp-busy-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}
.lp-busy-hint {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}
.lp-load-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.lp-load-btn.wb { background: #6d28d9; }
.lp-load-btn.ozon { background: #1d4ed8; }
.lp-load-btn.auto { background: #0f766e; }
.lp-flash { margin: 0.75rem 1.15rem 0; }

.lp-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  min-height: 62vh;
}

.lp-side {
  border-right: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface-2);
}

.lp-side-block {
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lp-assign-box { border-color: #bfdbfe; background: var(--accent-soft); }
.lp-side-h {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 700;
}
.lp-hint { margin: 0 0 0.5rem; line-height: 1.35; }

.mgr-del-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.35rem 0 0.4rem;
}
.mgr-del-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.25rem 0;
}
.mgr-del-item {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
  color: var(--code-ink);
}
.mgr-del-item:hover { background: var(--surface-3); }
.mgr-del-item input { margin-top: 0.15rem; flex-shrink: 0; }
.mgr-del-item span { word-break: break-word; }

.lp-market-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }

.lp-select {
  width: 100%;
  margin-top: 0.35rem;
}

.lp-side-btn {
  width: 100%;
  margin-top: 0.45rem;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}
.lp-side-btn.work { background: var(--accent); }
.lp-side-btn.assign { background: #15803d; }
.lp-side-btn.print { background: #4338ca; }
.lp-side-btn.danger { background: #dc2626; color: #fff; }
.lp-side-btn.muted-btn { background: #64748b; }
.lp-side-btn.undo {
  background: #f59e0b;
  color: #1c1917;
  font-size: 0.78rem;
  white-space: normal;
  line-height: 1.25;
  text-align: left;
}

.lp-main { padding: 1.1rem 1.25rem 1.5rem; min-width: 0; background: var(--surface); }
.lp-main-head { margin-bottom: 0.85rem; }
.lp-main-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.lp-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.75rem;
}

.lp-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  overflow: hidden;
  position: relative;
}
.lp-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.35rem 0.8rem 0.85rem 0.8rem;
  cursor: pointer;
  min-height: 7.2rem;
}
.lp-tile.has {
  background: #dbeafe;
  border-color: #93c5fd;
}
.lp-tile.has:hover {
  border-color: #60a5fa;
  background: #bfdbfe;
}
.lp-tile.empty {
  opacity: 0.5;
  background: var(--surface-2);
}
.lp-tile.empty .lp-tile-body { cursor: default; }
.lp-tile.assigned {
  border-color: #22c55e;
  border-width: 2px;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
}
.lp-tile.has.assigned {
  background: #dbeafe;
}
.lp-tile:has(input:checked) {
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.35);
  background: #bfdbfe;
}
.lp-tile-check { position: absolute; top: 0.5rem; left: 0.5rem; width: 1rem; height: 1rem; }
.lp-tile-open {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  border: 0;
  background: var(--surface-3);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}
.lp-tile-open:hover { background: #dbeafe; color: #1e40af; }
.lp-tile-name {
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.25;
  padding-right: 1.4rem;
}
.lp-tile-code { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }
.lp-tile-qty {
  margin-top: auto;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
  padding-top: 0.35rem;
}
.lp-tile-qty-u { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.lp-tile-dept { font-size: 0.75rem; color: var(--muted); }
.lp-tile.assigned .lp-tile-dept { color: #15803d; font-weight: 650; }

.lp-ctx {
  position: fixed;
  z-index: 40;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 0.25rem;
}
.lp-ctx button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink);
  font-family: inherit;
}
.lp-ctx button:hover { background: var(--accent-soft); }

.hist-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin: 1rem 0;
}
.hist-search-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
  min-width: 220px;
}
.hist-input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
}
.day-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 600;
}
.day-badge code {
  font-weight: 700;
  font-size: 0.8rem;
}
.ws-day { margin: 0.45rem 0 0; }
.hist-hits { display: flex; flex-direction: column; gap: 0.85rem; }
.hist-hit { padding: 1rem 1.1rem; }
.hist-hit-break { border-color: #fca5a5; background: #fff7f7; }
.hist-hit-h { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.hist-name { margin: 0.25rem 0; font-weight: 600; }
.hist-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0.65rem 0 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.hist-meta > div { min-width: 0; }
.hist-meta dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-weight: 600;
}
.hist-meta dd {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  word-break: break-word;
}
.hist-meta code { font-size: 0.82rem; }
.hist-breaks {
  margin: 0.65rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.hist-breaks-h { font-weight: 700; font-size: 0.85rem; color: #991b1b; margin-bottom: 0.35rem; }
.hist-breaks ul { margin: 0; padding-left: 1.1rem; }
.hist-breaks li { margin: 0.2rem 0; }
.hist-ok-banner {
  margin: 0.65rem 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-weight: 600;
  font-size: 0.9rem;
}
.hist-chain-h {
  font-weight: 700;
  margin: 0.75rem 0 0.45rem;
  font-size: 0.9rem;
}
.hist-chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.hist-chain-step {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hist-chain-step.ok { border-color: #86efac; background: #f0fdf4; }
.hist-chain-step.warn { border-color: #fcd34d; background: #fffbeb; }
.hist-chain-step.break,
.hist-chain-step.is-break {
  border-color: #fca5a5;
  background: #fef2f2;
}
.hist-chain-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.hist-chain-meta { margin-top: 0.25rem; }
.hist-detail { margin-top: 0.85rem; }
.hist-detail summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.hist-feed { margin: 0.5rem 0 0; }
.ui-chip.break {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

@media (max-width: 1000px) {
  .lp-body { grid-template-columns: 1fr; }
  .lp-side { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* —— Manager shell legacy —— */
.mgr-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}
.mgr-rail {
  position: sticky;
  top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
}
.mgr-work { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; }

.day-actions,
.actions-row,
.parts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
}

.check-inline {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.market-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.market-tab {
  padding: 0.55rem 1rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.market-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.part-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  min-width: 7rem;
}
.part-chip.active {
  border-color: rgba(79, 124, 255, 0.55);
  background: rgba(79, 124, 255, 0.12);
}
.part-chip.closed { opacity: 0.7; }

.upload-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  max-width: 420px;
}
.upload-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.warn-box { margin-top: 0.75rem; color: var(--muted); }
.warn-box ul { margin: 0.4rem 0 0; }

.cat-grid { margin-top: 1rem; }
.cat-grid h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.cat-tile.empty { opacity: 0.45; }
.cat-tile.empty input { pointer-events: none; }

.admin-block { margin: 1.25rem 0; }
.admin-block h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.admin-rules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.65rem;
}
.admin-rule-card { padding: 0.75rem; }
.admin-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.admin-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.ar-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}
.ar-panel { padding: 0.85rem 1rem; }
.ar-panel h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.ar-add { background: rgba(79, 124, 255, 0.08); border-color: rgba(79, 124, 255, 0.25); }
.ar-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.ar-add-form label {
  display: grid;
  gap: 0.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.ar-table-wrap {
  max-height: 55vh;
  overflow: auto;
  margin-top: 0.5rem;
}
@media (max-width: 900px) {
  .ar-grid { grid-template-columns: 1fr; }
  .mgr-shell { grid-template-columns: 1fr; }
}

.article-rules { display: flex; flex-direction: column; gap: 0.75rem; }
.article-rule-card { padding: 0.75rem; }
.article-rule-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.65rem;
}
.article-rule-top label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
@media (max-width: 900px) {
  .article-rule-top { grid-template-columns: 1fr; }
}

.cat-contents-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.75rem 0;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cat-contents-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 55vh;
  overflow: auto;
}
.cat-contents-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 0.9rem;
}
.cat-contents-row:hover { background: rgba(79, 124, 255, 0.1); }

.assign-form select { margin-left: 0.35rem; }

.lp-sticker-digits {
  display: inline-block;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.lp-shared-tare {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.ozon-qty-hi {
  background: #ffe040 !important;
  color: #1a1a1a !important;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

/* —— Executive dashboard —— */
.exec-dash { display: flex; flex-direction: column; gap: 1rem; }
.exec-head { align-items: flex-end; }
.period-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  box-shadow: var(--shadow);
}
.period-tab {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.period-tab.on {
  background: var(--accent);
  color: #fff;
}
.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: -0.25rem 0 0.25rem;
}
.view-tab {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
}
.view-tab:hover {
  color: var(--text);
  background: var(--surface-3);
}
.view-tab.on {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.dash-card-h .tiny {
  font-weight: 500;
  margin-left: 0.5rem;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.kpi.warn { border-color: #fde68a; background: #fffbeb; }
.kpi.ok { border-color: #bbf7d0; background: #f0fdf4; }
.kpi-l { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.kpi-n { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 0.2rem; }
.kpi-s { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.85rem;
}
.dash-grid-wide { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) {
  .dash-grid, .dash-grid-wide { grid-template-columns: 1fr; }
}
.dash-card-h {
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.bar-list { display: flex; flex-direction: column; gap: 0.75rem; }
.bar-list-lg { gap: 1rem; }
.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.bar-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.bar-track-lg { height: 14px; }
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  min-width: 2px;
}
.bar-fill.market { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.bar-fill.cat { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.bar-fill.size { background: linear-gradient(90deg, #c2410c, #fb923c); }
.bar-nums { margin-top: 0.3rem; }
.chart-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.leg::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: -1px;
}
.leg-qty::before { background: #60a5fa; }
.leg-done::before { background: #34d399; }
.spark {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 96px;
  padding-top: 0.5rem;
  overflow-x: auto;
}
.spark-lg {
  gap: 0.55rem;
  min-height: 220px;
  padding: 0.75rem 0.25rem 0.25rem;
}
.spark-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 28px;
}
.spark-lg .spark-col {
  min-width: 52px;
  flex: 1 1 52px;
  max-width: 88px;
}
.spark-vals {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  min-height: 2.2em;
}
.sv-qty { font-size: 0.72rem; font-weight: 700; color: var(--link); }
.sv-done { font-size: 0.68rem; font-weight: 600; color: #047857; }
.spark-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
}
.spark-bar {
  width: 16px;
  border-radius: 6px 6px 2px 2px;
  background: #93c5fd;
}
.spark-bar.qty {
  width: 18px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.spark-bar.done {
  width: 18px;
  background: linear-gradient(180deg, #6ee7b7, #059669);
}
.spark-date { font-size: 0.72rem; font-weight: 600; color: var(--text); }
.spark-sub { font-size: 0.62rem; }
.spark-col span { font-size: 0.65rem; color: var(--muted); }
.windows-drawer summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: baseline;
  list-style: none;
}
.windows-drawer summary::-webkit-details-marker { display: none; }
.hub-grid-compact {
  margin-top: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.hub-grid-compact .shot-card { min-height: 140px; }

/* —— Print / stickers (light for paper) —— */
.print-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.print-doc h1 { margin: 0 0 0.35rem; font-size: 1.45rem; }
.print-meta { color: var(--muted); margin: 0 0 1.25rem; }
.print-cat { margin: 1.25rem 0 0.5rem; font-size: 1.15rem; }

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  page-break-inside: auto;
}
.print-table th,
.print-table td {
  border: 1px solid #c9d2de;
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}
.print-table thead th { background: #e6ebf5; color: #1a2330; }
.print-table .col-photo { width: 72px; text-align: center; }
.print-table .col-photo img { width: 64px; height: 64px; object-fit: contain; }
.print-table .col-num { width: 36px; text-align: center; }
.print-table .col-art { width: 120px; }
.print-table .col-qty { width: 56px; text-align: center; }
.print-table .col-sticker { width: 110px; font-size: 0.85rem; word-break: break-all; line-height: 1.25; }
.photo-empty { color: #99a3b0; }

.sticker-print-batch { display: block; }
.sticker-label {
  width: 58mm;
  height: 40mm;
  box-sizing: border-box;
  border: 1px dashed #cbd5e1;
  margin: 0 0 8px;
  page-break-after: always;
  break-after: page;
  overflow: hidden;
  background: #fff;
  color: #111;
}
.sticker-label.last { page-break-after: auto; break-after: auto; }
.sticker-label-inner {
  padding: 2.5mm 3mm;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.sticker-mp { font-size: 8pt; color: #64748b; margin-bottom: 1mm; }
.sticker-code { font-size: 11pt; line-height: 1.2; word-break: break-all; color: #111; }
.sticker-code .lp-sticker-digits { font-size: 16pt; }
.sticker-label-line { font-size: 9pt; margin-top: 1mm; color: #111; }
.sticker-art { margin-top: 1.5mm; font-size: 9pt; font-weight: 600; color: #111; }
.sticker-name { font-size: 7.5pt; color: #334155; max-height: 2.4em; overflow: hidden; }
.sticker-qty { margin-top: 1mm; font-size: 10pt; align-self: flex-start; padding: 0 4px; color: #111; }
.sticker-label-img { display: flex; align-items: center; justify-content: center; padding: 0; }
.sticker-png { width: 58mm; height: 40mm; object-fit: contain; display: block; }

@media print {
  .app-rail,
  .app-topbar,
  .no-print,
  .top {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .app-shell { display: block; }
  .app-main {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .panel,
  .table-wrap,
  .lp-main,
  .print-sheet,
  table.data,
  table.data th,
  table.data td {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border-color: #cbd5e1 !important;
  }

  .print-table tr { page-break-inside: avoid; }
  .print-cat { page-break-after: avoid; }
  .sticker-label {
    border: 0;
    margin: 0;
    width: 58mm;
    height: 40mm;
    background: #fff !important;
    color: #111 !important;
  }
}

.overdue-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--danger-border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--danger-bg) 0%, var(--surface) 100%);
  color: var(--danger);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.12);
}
.overdue-banner:hover {
  filter: brightness(1.03);
  border-color: var(--danger);
}
.overdue-banner-ico {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--danger);
  color: #fff;
  font-size: 1rem;
}
.overdue-banner-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.overdue-banner-text strong { color: var(--danger); }
.overdue-banner-split {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: 0.25rem;
}
.overdue-banner-split span {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.overdue-panel {
  border-color: var(--overdue-border);
  background: var(--overdue-bg);
}
.overdue-panel.is-open {
  display: block !important;
}
.overdue-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.overdue-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.overdue-mp-block {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}
.overdue-mp-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.overdue-row td { vertical-align: middle; }
.day-badge-id {
  background: var(--day-badge-bg);
  border-color: var(--day-badge-border);
  color: var(--day-badge-ink);
}
.admin-danger {
  border: 1px solid var(--danger-border);
  background: var(--admin-danger-bg);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.purge-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-top: 0.75rem;
}
.purge-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  min-width: 200px;
}

/* —— Светлый кабинет (board) —— */
.board {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: start;
  font-family: "IBM Plex Sans", var(--font);
  min-height: 70vh;
}
@media (max-width: 960px) {
  .board { grid-template-columns: 1fr; }
}
.board-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 0.9rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 0.75rem;
}
.board-user {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}
.board-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0d9488, #2563eb);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.board-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.board-nav-a {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  font-size: 0.88rem;
}
.board-nav-a.on,
.board-nav-a:hover {
  background: #f0fdfa;
  color: #0f766e;
}
.board-filters {
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.board-filt-h {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.board-filt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.board-chip {
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-2);
}
.board-chip.on {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.board-overdue-link {
  display: block;
  margin-top: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}
.board-side-btn {
  display: block;
  text-align: center;
  padding: 0.5rem;
  border-radius: 10px;
  background: #2563eb;
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}
.board-side-btn.muted-btn {
  background: #e2e8f0;
  color: #334155 !important;
}
.board-main { min-width: 0; }
.board-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.85rem;
}
.board-h1 {
  margin: 0.15rem 0 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink);
}
.board-row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 1100px) {
  .board-row3 { grid-template-columns: 1fr; }
}
.board-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
a.board-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.12);
}
.board-card-h {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.board-card-foot {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0d9488;
}
.board-empty { text-align: center; padding: 2.5rem 1rem; }
.board-gauge {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.gauge-svg { width: 140px; height: auto; flex-shrink: 0; }
.gauge-pct {
  font-size: 22px;
  font-weight: 700;
  fill: #0f172a;
  font-family: "Source Serif 4", Georgia, serif;
}
.board-gauge-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.board-leg {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}
.leg-p::before, .leg-f::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: -1px;
}
.leg-p::before { background: #3b82f6; }
.leg-f::before { background: #0d9488; }
.b-chart { width: 100%; height: auto; display: block; }
.b-plan { fill: #3b82f6; }
.b-fact { fill: #0d9488; }
.b-track { fill: #e2e8f0; }
.b-tick { fill: #64748b; font-size: 9px; font-family: "IBM Plex Sans", sans-serif; }
.b-lab { fill: #334155; font-size: 9px; font-family: "IBM Plex Sans", sans-serif; }
.b-line { stroke: #0d9488; stroke-width: 2.5; }
.b-dot { fill: #f59e0b; stroke: #fff; stroke-width: 1.5; }
/* Воронка — ровные ступени, без clip-path */
.board-funnel-card { min-height: 220px; }
.funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.15rem 0;
  width: 100%;
}
.funnel-step {
  max-width: 100%;
  margin: 0 auto;
}
.funnel-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: #fff;
  font-family: "IBM Plex Sans", var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.funnel-step.f1 .funnel-bar { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.funnel-step.f2 .funnel-bar { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.funnel-step.f3 .funnel-bar { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.funnel-step.f4 .funnel-bar { background: linear-gradient(135deg, #047857, #10b981); }
.funnel-label {
  font-family: "IBM Plex Sans", var(--font);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.funnel-n {
  font-family: "IBM Plex Sans", var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  min-width: 2.2rem;
  text-align: center;
}
.funnel-bridge {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.funnel-bridge span {
  font-family: "IBM Plex Sans", var(--font);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 0.45rem;
  line-height: 1.4;
}
.timeline-svg .tl-line.qty { stroke: #0d9488; stroke-width: 2.5; }
.timeline-svg .tl-line.done { stroke: #3b82f6; stroke-width: 2; stroke-dasharray: 4 3; }
.timeline-svg .tl-dot.qty { fill: #0d9488; stroke: #fff; stroke-width: 2; }
.timeline-svg .tl-dot.done { fill: #3b82f6; stroke: #fff; stroke-width: 1.5; }
.timeline-svg .tl-date {
  fill: #64748b;
  font-size: 10px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
}
.timeline-svg .tl-val {
  fill: #0f172a;
  font-size: 10px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
}
.timeline-svg a.tl-hit { cursor: pointer; }
.timeline-svg a.tl-hit:hover .tl-dot.qty { fill: #f59e0b; r: 6; }
.day-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.day-review-title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
}
.board-kpi-lite {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
}
.board-kpi-lite .desk-kpi-card {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.board-kpi-lite .desk-kpi-card.accent {
  background: #0f172a;
  border-color: var(--ink);
  color: #f8fafc;
}
.board-kpi-lite .desk-kpi-l {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.board-kpi-lite .desk-kpi-card.accent .desk-kpi-l { color: #94a3b8; }
.board-kpi-lite .desk-kpi-n {
  font-family: "IBM Plex Sans", var(--font);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.board-kpi-lite .desk-kpi-s { font-size: 0.75rem; color: var(--muted); }
.board-site-block { margin-bottom: 0.85rem; }
.board-site-h {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}
.board-site-pill {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.board-site-pill.home {
  background: var(--accent-soft);
  color: var(--link);
  border: 1px solid #bfdbfe;
}
.board-site-pill.north {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.board-dept-card.north-card {
  border-color: var(--ok-border);
  background: linear-gradient(180deg, var(--ok-bg) 0%, var(--surface) 40%);
}
.board-prog.north-prog i {
  background: linear-gradient(90deg, #059669, #0d9488);
}
.board-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.board-dept-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.board-dept-card:hover { border-color: #93c5fd; }
.board-dept-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.9rem;
}
.board-pct {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0d9488;
}
.board-prog {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  margin: 0.45rem 0;
  overflow: hidden;
}
.board-prog i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #0d9488);
  border-radius: 99px;
}
.board-dept-site {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.board-alert {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: var(--warn-bg);
  border: 1px solid var(--overdue-border);
  color: var(--warn-ink);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

/* Каталог «Все окна» */
.windows-hub { max-width: 1100px; }
.windows-block { margin-top: 1.25rem; }
.windows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.55rem;
}
.window-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.window-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}
.window-card-mgr {
  border-color: var(--now-wb-border);
  background: linear-gradient(180deg, var(--now-wb-from) 0%, var(--surface) 55%);
}
.window-card-north {
  border-color: var(--ok-border);
  background: linear-gradient(180deg, var(--ok-bg) 0%, var(--surface) 55%);
}
.window-card-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.window-card-title {
  font-size: 1.05rem;
  font-family: "IBM Plex Sans", var(--font);
}
.window-card-role,
.window-card-stats {
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.35;
}
.window-card-go {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--link);
}

/* Выбор категории для печати этикеток (как Windows) */
.sticker-cat-pick { max-width: 920px; }
.sticker-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}
.sticker-cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sticker-cat-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}
.sticker-cat-all {
  border-color: var(--now-border);
  background: linear-gradient(180deg, var(--now-bg-from) 0%, var(--now-bg-to) 60%);
}
.sticker-cat-card .window-card-go {
  margin-top: 0.4rem;
}

/* —— Themes: medium (серо-синяя) + dark (тёмно-синий акцент) —— */
html[data-theme="medium"] {
  color-scheme: light;
  --bg0: #d7dde8;
  --bg1: #cfd6e3;
  --bg2: #e8edf5;
  --body-grad-from: #dce2ec;
  --body-grad-to: #c5cddc;
  --glass: #e8edf5;
  --glass-border: #b8c2d4;
  --surface: #eef2f8;
  --surface-2: #dfe5f0;
  --surface-3: #d4dce9;
  --rail-bg: #e4eaf4;
  --input-bg: #f4f7fb;
  --dock-bg: rgba(238, 242, 248, 0.96);
  --ink: #1a2336;
  --muted: #5b6b82;
  --code-bg: #d8e0ec;
  --code-ink: #2a3548;
  --link: #1e4fb0;
  --link-hover: #163d8a;
  --accent: #1e4a9a;
  --accent-2: #163a7a;
  --accent-ink: #ffffff;
  --accent-soft: #d5e2f7;
  --accent-soft-border: #9bb6e0;
  --accent-soft-ink: #163a7a;
  --line: #b8c2d4;
  --line-strong: #9aa8bc;
  --danger: #b91c1c;
  --danger-bg: #fce8e8;
  --danger-border: #f0b4b4;
  --ok: #166534;
  --ok-bg: #dcefe3;
  --ok-border: #9fd4b0;
  --ok-ink: #14532d;
  --warn: #92400e;
  --warn-bg: #f5ead2;
  --warn-border: #e2c57a;
  --warn-ink: #78350f;
  --idle-bg: #f5ead2;
  --idle-border: #e2c57a;
  --idle-ink: #78350f;
  --empty-bg: #dfe5f0;
  --empty-border: #b8c2d4;
  --empty-ink: #5b6b82;
  --chip-bg: #dfe5f0;
  --chip-accent-bg: #d5e2f7;
  --chip-accent-border: #9bb6e0;
  --chip-accent-ink: #163a7a;
  --row-selected: #c9daf5;
  --row-done-bg: #c8e6d2;
  --row-done-ink: #14532d;
  --row-cat-bg: #d4dce9;
  --row-total-bg: #d4dce9;
  --focus-border: rgba(30, 74, 154, 0.75);
  --focus-ring: rgba(30, 74, 154, 0.22);
  --hover-bg: #d4dce9;
  --exit-hover-bg: #fce8e8;
  --btn-secondary-bg: #d4dce9;
  --btn-shadow: 0 8px 20px rgba(22, 58, 122, 0.22);
  --dock-shadow: 0 -6px 20px rgba(15, 23, 42, 0.12);
  --card-hover-border: #9bb6e0;
  --card-hover-shadow: 0 10px 28px rgba(22, 58, 122, 0.14);
  --now-border: #6f94d0;
  --now-bg-from: #d5e2f7;
  --now-bg-to: #eef2f8;
  --now-ring: rgba(111, 148, 208, 0.3);
  --now-shadow: rgba(22, 58, 122, 0.12);
  --now-wb-border: #7c6bb5;
  --now-wb-from: #e0daf2;
  --now-wb-to: #eef2f8;
  --now-wb-ring: rgba(124, 107, 181, 0.28);
  --now-wb-shadow: rgba(76, 50, 140, 0.14);
  --now-ozon-border: #3b8fbe;
  --now-ozon-from: #d2e8f4;
  --now-ozon-to: #eef2f8;
  --now-ozon-ring: rgba(59, 143, 190, 0.28);
  --now-ozon-shadow: rgba(14, 90, 130, 0.14);
  --pack-border: #dc2626;
  --pack-from: #fce8e8;
  --pack-to: #eef2f8;
  --pack-ring: rgba(220, 38, 38, 0.18);
  --pack-shadow: rgba(153, 27, 27, 0.12);
  --pack-kicker: #b91c1c;
  --pack-thumb-border: #f0b4b4;
  --overdue-bg: #f5ead2;
  --overdue-border: #e0a86a;
  --admin-danger-bg: #fceeee;
  --day-badge-bg: #dfe5f0;
  --day-badge-border: #9aa8bc;
  --day-badge-ink: #2a3548;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 22px rgba(15, 23, 42, 0.08);
  --zone-bg: rgba(15, 23, 42, 0.04);
  --stat-bg: rgba(15, 23, 42, 0.045);
  --theme-btn-on-bg: var(--accent-soft);
  --theme-btn-on-ink: var(--accent);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg0: #0c1024;
  --bg1: #12183a;
  --bg2: #1a2150;
  --body-grad-from: #0e1330;
  --body-grad-to: #0a0e22;
  --glass: #161d45;
  --glass-border: #2a3870;
  --surface: #171e48;
  --surface-2: #1c2556;
  --surface-3: #222c62;
  --rail-bg: #12193c;
  --input-bg: #1a224c;
  --dock-bg: rgba(18, 25, 60, 0.94);
  --ink: #e8eefc;
  --muted: #9eb0d4;
  --code-bg: #222c62;
  --code-ink: #d5dff5;
  --link: #7eb6ff;
  --link-hover: #a8ceff;
  --accent: #1e3a8a;
  --accent-2: #152e6e;
  --accent-ink: #eaf2ff;
  --accent-soft: rgba(37, 99, 235, 0.22);
  --accent-soft-border: rgba(96, 165, 250, 0.45);
  --accent-soft-ink: #bfdbfe;
  --line: #2f3d72;
  --line-strong: #3d4f8a;
  --danger: #f87171;
  --danger-bg: rgba(185, 28, 28, 0.28);
  --danger-border: rgba(248, 113, 113, 0.45);
  --ok: #4ade80;
  --ok-bg: rgba(22, 101, 52, 0.35);
  --ok-border: rgba(74, 222, 128, 0.35);
  --ok-ink: #bbf7d0;
  --warn: #fbbf24;
  --warn-bg: rgba(146, 64, 14, 0.35);
  --warn-border: rgba(251, 191, 36, 0.4);
  --warn-ink: #fde68a;
  --idle-bg: rgba(146, 64, 14, 0.32);
  --idle-border: rgba(251, 191, 36, 0.38);
  --idle-ink: #fde68a;
  --empty-bg: #1c2556;
  --empty-border: #2f3d72;
  --empty-ink: #9eb0d4;
  --chip-bg: #1c2556;
  --chip-accent-bg: rgba(37, 99, 235, 0.25);
  --chip-accent-border: rgba(96, 165, 250, 0.4);
  --chip-accent-ink: #bfdbfe;
  --row-selected: rgba(37, 99, 235, 0.32);
  --row-done-bg: rgba(22, 101, 52, 0.38);
  --row-done-ink: #bbf7d0;
  --row-cat-bg: #1c2556;
  --row-total-bg: #222c62;
  --focus-border: rgba(96, 165, 250, 0.75);
  --focus-ring: rgba(37, 99, 235, 0.35);
  --hover-bg: rgba(148, 163, 255, 0.1);
  --exit-hover-bg: rgba(185, 28, 28, 0.28);
  --btn-secondary-bg: #222c62;
  --btn-shadow: 0 8px 22px rgba(15, 23, 80, 0.45);
  --dock-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  --card-hover-border: rgba(96, 165, 250, 0.55);
  --card-hover-shadow: 0 12px 32px rgba(15, 23, 80, 0.45);
  --now-border: #3b82f6;
  --now-bg-from: #1a2f6e;
  --now-bg-to: #171e48;
  --now-ring: rgba(59, 130, 246, 0.28);
  --now-shadow: rgba(15, 23, 80, 0.4);
  --now-wb-border: #8b5cf6;
  --now-wb-from: #2a1f66;
  --now-wb-to: #171e48;
  --now-wb-ring: rgba(139, 92, 246, 0.3);
  --now-wb-shadow: rgba(50, 20, 100, 0.35);
  --now-ozon-border: #0ea5e9;
  --now-ozon-from: #0f3a5c;
  --now-ozon-to: #171e48;
  --now-ozon-ring: rgba(14, 165, 233, 0.3);
  --now-ozon-shadow: rgba(8, 60, 100, 0.35);
  --pack-border: #f87171;
  --pack-from: #4a1a28;
  --pack-to: #171e48;
  --pack-ring: rgba(248, 113, 113, 0.22);
  --pack-shadow: rgba(80, 10, 20, 0.35);
  --pack-kicker: #fca5a5;
  --pack-thumb-border: rgba(248, 113, 113, 0.45);
  --overdue-bg: rgba(146, 64, 14, 0.28);
  --overdue-border: rgba(251, 191, 36, 0.45);
  --admin-danger-bg: rgba(185, 28, 28, 0.22);
  --day-badge-bg: #1c2556;
  --day-badge-border: #3d4f8a;
  --day-badge-ink: #d5dff5;
  --glow: 0 0 24px rgba(37, 99, 235, 0.25);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
  --zone-bg: rgba(255, 255, 255, 0.03);
  --stat-bg: rgba(255, 255, 255, 0.04);
  --theme-btn-on-bg: rgba(37, 99, 235, 0.28);
  --theme-btn-on-ink: #bfdbfe;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="medium"] .btn-secondary {
  color: var(--ink);
}
html[data-theme="dark"] .shot-visual-mgr {
  background:
    linear-gradient(135deg, #1e3a8a, #312e81 70%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.12), transparent 45%);
}
html[data-theme="dark"] .hist-hit-break,
html[data-theme="dark"] .hist-chain-step.warn,
html[data-theme="dark"] .kpi.warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-ink);
}
html[data-theme="dark"] .hist-chain-step.ok,
html[data-theme="dark"] .kpi.ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}
html[data-theme="dark"] .alert,
html[data-theme="medium"] .alert {
  border-color: var(--danger-border);
}
html[data-theme="dark"] .ok,
html[data-theme="medium"] .ok {
  border-color: var(--ok-border);
}

/* Остаточные светлые заливки статусов → токены на тёмной/средней */
html[data-theme="dark"] .hist-hit-break,
html[data-theme="medium"] .hist-hit-break {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}
html[data-theme="dark"] .window-card.is-done,
html[data-theme="medium"] .window-card.is-done,
html[data-theme="dark"] .hub-card-done,
html[data-theme="medium"] .hub-card-done {
  background: linear-gradient(180deg, var(--ok-bg) 0%, var(--surface) 55%);
}
html[data-theme="dark"] .window-card.is-warn,
html[data-theme="medium"] .window-card.is-warn {
  background: var(--warn-bg);
}

html.density-compact .rail-theme-btn {
  padding: 0.32rem 0.15rem;
  font-size: 0.64rem;
}
html.density-compact[data-theme="dark"] {
  --muted: #a8b8d8;
}
