:root {
  --bg: #f4f5f8;
  --bg-glow: rgba(47, 69, 255, 0.07);
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --surface-3: #e4e7ef;
  --line: rgba(17, 24, 48, 0.08);
  --line-strong: rgba(17, 24, 48, 0.16);
  --fg: #0d1120;
  --fg-2: #2b3245;
  --muted: #646d82;
  --faint: #9aa2b4;
  --accent: #2f45ff;
  --accent-2: #5468ff;
  --accent-soft: rgba(47, 69, 255, 0.09);
  --accent-ink: #ffffff;
  --urgent: #e0393f;
  --urgent-soft: rgba(224, 57, 63, 0.1);
  --order: #c97a06;
  --order-soft: rgba(232, 150, 20, 0.13);
  --healthy: #14915a;
  --healthy-soft: rgba(20, 145, 90, 0.1);
  --over: #7356f0;
  --over-soft: rgba(115, 86, 240, 0.11);
  --neutral: #6b7488;
  --neutral-soft: rgba(107, 116, 136, 0.12);
  --shadow-1: 0 1px 2px rgba(13, 17, 32, 0.04), 0 1px 1px rgba(13, 17, 32, 0.03);
  --shadow-2: 0 12px 32px -12px rgba(13, 17, 32, 0.18), 0 2px 6px rgba(13, 17, 32, 0.05);
  --shadow-3: 0 30px 80px -20px rgba(13, 17, 32, 0.35);
  --glass: rgba(244, 245, 248, 0.72);

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --rail: 232px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c11;
    --bg-glow: rgba(110, 123, 255, 0.11);
    --surface: #11141b;
    --surface-2: #171b24;
    --surface-3: #1f2430;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.14);
    --fg: #eceff6;
    --fg-2: #c9cfdc;
    --muted: #8c94a8;
    --faint: #5d6579;
    --accent: #7584ff;
    --accent-2: #93a0ff;
    --accent-soft: rgba(117, 132, 255, 0.14);
    --accent-ink: #0a0c11;
    --urgent: #ff6b70;
    --urgent-soft: rgba(255, 107, 112, 0.13);
    --order: #f2b13c;
    --order-soft: rgba(242, 177, 60, 0.13);
    --healthy: #3ccf8e;
    --healthy-soft: rgba(60, 207, 142, 0.12);
    --over: #a48dff;
    --over-soft: rgba(164, 141, 255, 0.14);
    --neutral: #8c94a8;
    --neutral-soft: rgba(140, 148, 168, 0.14);
    --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    --shadow-2: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
    --shadow-3: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
    --glass: rgba(10, 12, 17, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c11;
  --bg-glow: rgba(110, 123, 255, 0.11);
  --surface: #11141b;
  --surface-2: #171b24;
  --surface-3: #1f2430;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --fg: #eceff6;
  --fg-2: #c9cfdc;
  --muted: #8c94a8;
  --faint: #5d6579;
  --accent: #7584ff;
  --accent-2: #93a0ff;
  --accent-soft: rgba(117, 132, 255, 0.14);
  --accent-ink: #0a0c11;
  --urgent: #ff6b70;
  --urgent-soft: rgba(255, 107, 112, 0.13);
  --order: #f2b13c;
  --order-soft: rgba(242, 177, 60, 0.13);
  --healthy: #3ccf8e;
  --healthy-soft: rgba(60, 207, 142, 0.12);
  --over: #a48dff;
  --over-soft: rgba(164, 141, 255, 0.14);
  --neutral: #8c94a8;
  --neutral-soft: rgba(140, 148, 168, 0.14);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --shadow-2: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
  --glass: rgba(10, 12, 17, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto auto;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(closest-side, var(--bg-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, td.n, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100%; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 650; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--r-s);
  color: var(--muted); text-decoration: none; font-weight: 500;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.nav a.active { color: var(--fg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.nav a .count {
  margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px;
  background: var(--surface-3); color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.nav a .count.hot { background: var(--urgent-soft); color: var(--urgent); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.snapshot-card {
  padding: 12px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
  font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px;
}
.snapshot-card b { color: var(--fg); font-weight: 600; }
.theme-toggle { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 99px; align-self: flex-start; }
.theme-toggle button { border: 0; background: transparent; padding: 4px 10px; border-radius: 99px; font-size: 12px; color: var(--muted); }
.theme-toggle button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }

.main { min-width: 0; padding-inline: clamp(16px, 3vw, 40px); padding-block: 0 80px; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-inline: calc(-1 * clamp(16px, 3vw, 40px));
  padding: 14px clamp(16px, 3vw, 40px);
  background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 620; letter-spacing: -0.025em; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 0;
  background: var(--surface); color: var(--fg); font-weight: 550; font-size: 13px;
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line-strong);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { box-shadow: var(--shadow-2), 0 0 0 1px var(--line-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px var(--accent), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); transform: none; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--urgent); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.input, select.input {
  height: 36px; padding: 0 12px; border-radius: 10px; border: 0; min-width: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.15s;
}
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.search { position: relative; flex: 1 1 220px; max-width: 360px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search .input { width: 100%; padding-left: 34px; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 70ch; }
.panel { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); min-width: 0; }
.panel-pad { padding: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.hero { padding-top: 34px; display: grid; gap: 22px; }
.hero-top { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.hero h2 {
  margin: 8px 0 0; font-family: var(--font-display); font-weight: 560;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance;
}
.hero h2 .dim { color: var(--faint); }
.hero-lede { margin: 10px 0 0; color: var(--muted); max-width: 62ch; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.kpi { background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .k-val { font-family: var(--font-display); font-size: 30px; font-weight: 560; letter-spacing: -0.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }

.ribbon { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.ribbon span { display: block; height: 100%; transition: flex-grow 0.8s var(--ease); min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.legend button { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--fg-2); font-size: 13px; }
.legend button b { font-variant-numeric: tabular-nums; }
.legend button:hover { color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; letter-spacing: 0.005em;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-urgent { color: var(--urgent); background: var(--urgent-soft); }
.s-order { color: var(--order); background: var(--order-soft); }
.s-healthy { color: var(--healthy); background: var(--healthy-soft); }
.s-over { color: var(--over); background: var(--over-soft); }
.s-keep, .s-nodemand { color: var(--neutral); background: var(--neutral-soft); }
.c-urgent { background: var(--urgent); } .c-order { background: var(--order); } .c-healthy { background: var(--healthy); }
.c-over { background: var(--over); } .c-keep { background: var(--neutral); } .c-nodemand { background: var(--faint); }

.flags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.flag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--fg-2); white-space: nowrap;
}
.flag.crit { background: var(--urgent-soft); color: var(--urgent); }
.flag.warn { background: var(--order-soft); color: var(--order); }
.flag.info { background: var(--accent-soft); color: var(--accent); }
.flag.ok { background: var(--healthy-soft); color: var(--healthy); }

.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.rank li:first-child { border-top: 0; }
.rank li:hover .r-name { color: var(--accent); }
.rank .r-i { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rank .r-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.15s; }
.rank .r-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .r-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rank .r-bar { height: 3px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.rank .r-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.rank.freq .r-bar i { background: var(--healthy); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-m); background: var(--accent-soft); color: var(--fg-2); font-size: 13px; }
.callout svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.callout.warn { background: var(--order-soft); }
.callout.warn svg { color: var(--order); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 0;
  background: var(--surface); color: var(--fg-2); font-size: 12.5px; font-weight: 550;
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: all 0.18s var(--ease);
}
.chip b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--fg-2); }
.chip.on { background: var(--fg); color: var(--bg); box-shadow: none; }
.chip.on b { color: var(--bg); opacity: 0.7; }
.table-wrap { overflow-x: auto; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1120px; }
.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--surface);
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
  padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
.grid th.n, .grid td.n { text-align: right; }
.grid th[data-sort] { cursor: pointer; }
.grid th[data-sort]:hover { color: var(--fg); }
.grid th .arr { opacity: 0.35; margin-left: 3px; }
.grid th.sorted { color: var(--fg); }
.grid th.sorted .arr { opacity: 1; color: var(--accent); }
.grid td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.grid tbody tr { transition: background 0.15s; cursor: pointer; }
.grid tbody tr:hover { background: var(--surface-2); }
.grid tbody tr.sel { background: var(--accent-soft); }
.grid tbody tr:last-child td { border-bottom: 0; }
.item-cell { min-width: 260px; max-width: 380px; }
.item-cell .t { font-weight: 550; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-cell .s { display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qty-edit { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.qty-edit button { width: 24px; height: 26px; border: 0; background: transparent; border-radius: 7px; color: var(--muted); font-size: 15px; line-height: 1; }
.qty-edit button:hover { background: var(--surface); color: var(--fg); }
.qty-edit input { width: 62px; height: 26px; border: 0; background: transparent; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.qty-edit input:focus { outline: none; background: var(--surface); border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--accent); }
.qty-edit.edited { background: var(--accent-soft); }
.qty-edit.edited input { color: var(--accent); }
.more-row { display: flex; justify-content: center; padding: 16px; }

.gauge { width: 132px; }
.gauge-track { position: relative; height: 8px; border-radius: 99px; overflow: hidden; display: flex; background: var(--surface-2); }
.gauge-track i { display: block; height: 100%; opacity: 0.22; }
.gauge-pin { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: var(--fg); box-shadow: 0 0 0 2px var(--surface); transition: left 0.5s var(--ease); }
.gauge-ghost { position: absolute; top: -2px; width: 2px; height: 12px; border-radius: 2px; background: var(--accent); opacity: 0.85; }
.gauge-wrap { position: relative; padding-top: 3px; }
.gauge-lbl { display: flex; justify-content: space-between; font-size: 11.5px; margin-top: 5px; color: var(--muted); }
.gauge-lbl b { color: var(--fg); font-weight: 600; }
.spark { display: block; }
.trend { font-size: 11px; font-weight: 600; }
.trend.up { color: var(--healthy); } .trend.down { color: var(--urgent); }

.scrim { position: fixed; inset: 0; background: rgba(8, 10, 16, 0.38); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); z-index: 40; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 41;
  background: var(--bg); box-shadow: var(--shadow-3); border-left: 1px solid var(--line);
  transform: translateX(104%); transition: transform 0.45s var(--ease);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open { transform: none; }
.drawer-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: 21px; font-weight: 580; letter-spacing: -0.025em; line-height: 1.2; text-wrap: balance; }
.drawer-body { overflow-y: auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 22px; flex: 1; }
.drawer-body > * { flex-shrink: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.stat-row > div { background: var(--surface); padding: 12px; }
.stat-row .lbl { font-size: 10px; }
.stat-row .v { font-family: var(--font-display); font-size: 19px; font-weight: 580; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) auto; font-size: 13px; background: var(--surface); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.calc > div { padding: 9px 14px; border-top: 1px solid var(--line); }
.calc > div:nth-child(-n + 2) { border-top: 0; }
.calc .op { color: var(--muted); }
.calc .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc .total { background: var(--accent-soft); font-weight: 650; color: var(--fg); }
.over-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chart-box { background: var(--surface); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); padding: 14px 14px 8px; }
textarea.input { height: 72px; padding: 10px 12px; resize: vertical; width: 100%; }

.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rcard { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; transition: transform 0.2s var(--ease), box-shadow 0.2s; min-width: 0; }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
.rcard .t { font-weight: 600; line-height: 1.3; }
.rcard ul { margin: 0; padding-left: 18px; color: var(--fg-2); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.rcard .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.rcard.done { opacity: 0.55; }
.group-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.group-title h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.group-title p { margin: 0; font-size: 13px; color: var(--muted); }

.basket { display: flex; flex-direction: column; gap: 16px; }
.basket-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.basket-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.basket-head .tot { margin-left: auto; text-align: right; }
.basket-head .tot b { font-family: var(--font-display); font-size: 22px; font-weight: 580; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.mini-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .n { text-align: right; }
.mini-table tbody tr { cursor: pointer; }
.mini-table tbody tr:hover { background: var(--surface-2); }

.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rule { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.rule h4 { margin: 0; font-size: 14px; font-weight: 650; }
.rule p { margin: 0; color: var(--muted); font-size: 12.5px; }
.slider-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 12px; align-items: center; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--surface-3); outline-offset: 6px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1.5px var(--accent), 0 2px 6px rgba(0,0,0,0.2); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); cursor: pointer; }
.unit-input { position: relative; }
.unit-input .input { width: 100%; padding-right: 54px; text-align: right; font-variant-numeric: tabular-nums; }
.unit-input span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--faint); pointer-events: none; }
.seg { display: flex; padding: 3px; background: var(--surface-2); border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: transparent; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; color: var(--muted); font-weight: 550; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background 0.2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.25s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.band-preview { display: flex; height: 26px; border-radius: 8px; overflow: hidden; font-size: 10.5px; font-weight: 650; }
.band-preview div { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease); }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .scrim { opacity: 1; pointer-events: none; position: absolute; z-index: 0; }
.modal.open .scrim { pointer-events: auto; }
.modal-card { position: relative; z-index: 1; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg); border-radius: 22px; box-shadow: var(--shadow-3), 0 0 0 1px var(--line); transform: translateY(12px) scale(0.98); transition: transform 0.35s var(--ease); }
.modal.open .modal-card { transform: none; }
.modal-head { padding: 22px 24px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.modal-body { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.drop {
  position: relative; border-radius: var(--r-l); padding: 34px 20px; text-align: center;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--accent-soft) 10px 11px), var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow 0.2s, transform 0.2s var(--ease);
}
.drop.over { box-shadow: inset 0 0 0 2px var(--accent); transform: scale(1.01); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .big { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.file-card { background: var(--surface); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 80; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 550; font-size: 13px; transition: all 0.35s var(--ease); pointer-events: none; box-shadow: var(--shadow-2); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-m); background: var(--accent-soft); font-size: 13px; color: var(--fg-2); margin-top: 18px; }
.banner b { color: var(--fg); }
.banner .btn { margin-left: auto; }
.banner.warn { background: var(--order-soft); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.view { animation: rise 0.5s var(--ease) both; }
@keyframes rise { from { opacity: 0.001; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30; flex-direction: row;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); border-right: 0; border-top: 1px solid var(--line);
    background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .brand, .rail-foot { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-between; overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 6px 2px; flex: 1 0 56px; text-align: center; }
  .nav a.active { box-shadow: none; background: transparent; color: var(--accent); }
  .nav a .count { position: absolute; top: 0; right: 50%; margin-right: -22px; font-size: 9.5px; padding: 0 5px; }
  .main { padding-bottom: 110px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .over-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .kpi .k-val { font-size: 24px; }
  .kpi { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.scope { position: relative; }
.scope-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px 0 14px; border: 0; border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-strong); transition: box-shadow 0.2s, transform 0.15s var(--ease);
  max-width: 320px;
}
.scope-btn:hover { box-shadow: var(--shadow-2), 0 0 0 1px var(--line-strong); }
.scope-btn.set { box-shadow: 0 0 0 1.5px var(--accent), 0 6px 18px -8px var(--accent); }
.scope-k { font-size: 10.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.scope-v { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.scope-btn.set .scope-v { color: var(--accent); }
.scope-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); z-index: 50;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-3), 0 0 0 1px var(--line);
  padding: 8px 0; animation: pop 0.22s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.scope-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 8px 16px; }
.scope-list { max-height: 340px; overflow-y: auto; padding: 0 6px; }
.scope-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.scope-row:hover { background: var(--surface-2); }
.scope-row input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.scope-name { display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.scope-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.scope-name em { font-style: normal; color: var(--urgent); }
.scope-only { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 7px; opacity: 0; transition: opacity 0.15s; }
.scope-row:hover .scope-only, .scope-only:focus-visible { opacity: 1; }
.scope-only:hover { background: var(--accent-soft); }
.scope-foot { font-size: 12px; padding: 8px 16px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
@media (max-width: 860px) {
  .scope { order: 5; flex: 1 1 100%; }
  .scope-btn { width: 100%; max-width: none; }
  .scope-btn svg { margin-left: auto; }
  .scope-pop { left: 0; right: auto; }
  .scope-only { opacity: 1; }
}

.sbar { position: relative; margin-top: 18px; padding: 16px 52px 16px 20px; display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2fr) minmax(200px, 1fr); gap: 20px; align-items: end; box-shadow: var(--shadow-1), 0 0 0 1.5px var(--accent-soft), 0 0 0 1px var(--line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }
.sbar.multi { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); }
.sbar-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sbar-name { border: 0; background: transparent; padding: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; width: 100%; min-width: 0; border-radius: 6px; }
.sbar-name::placeholder { color: var(--faint); }
.sbar-name:hover { background: var(--surface-2); }
.sbar-name:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 1.5px var(--accent); }
.sbar-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sbar-fields:has(.sbar-ship) { grid-template-columns: minmax(150px, 1.6fr) repeat(3, minmax(0, 1fr)); }
.sbar-fields .unit-input .input { padding-right: 34px; }
.sbar-min { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sbar-min-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.minbar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.minbar i { display: block; height: 100%; border-radius: 99px; background: var(--order); transition: width 0.6s var(--ease); }
.minbar i.done { background: var(--healthy); }
.sbar-x { position: absolute; top: 10px; right: 10px; width: 30px; padding: 0; }
.savegroup { display: flex; gap: 6px; }
.savegroup .input { flex: 1; min-width: 0; height: 30px; font-size: 12.5px; }
.gchip { display: inline-flex; align-items: center; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; }
.gchip button { border: 0; background: transparent; padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.gchip button b { color: var(--muted); font-weight: 600; margin-left: 2px; }
.gchip .gx { padding: 5px 9px 5px 2px; color: var(--muted); font-size: 14px; line-height: 1; }
.gchip .gx:hover { color: var(--urgent); }
.gchip.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.gchip.on button { color: var(--accent); }
.scope-groups { padding: 2px 16px 10px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
@media (max-width: 1100px) { .sbar, .sbar.multi { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .sbar-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sku-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.sku-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sku-grid.four:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sku-grid .span-2 { grid-column: span 1; }
.sku-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.sku-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.month-grid .input { text-align: right; padding: 0 10px; font-variant-numeric: tabular-nums; }
.month-grid label { font-size: 10px; }
.sku-preview { background: var(--surface); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; }
.sku-preview .gauge { width: 100%; margin-top: 12px; }
.sku-prev-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-variant-numeric: tabular-nums; }
.sku-prev-row .lbl { font-size: 10px; }
.sku-prev-row b { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.sku-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: sticky; bottom: -24px; background: var(--bg); padding: 12px 0 4px; }
@media (max-width: 640px) {
  .sku-grid, .sku-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

[data-tip] { cursor: help; }
th[data-tip] { cursor: pointer; }
.tip { position: fixed; z-index: 90; max-width: 280px; padding: 9px 12px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 12.5px; line-height: 1.45; font-weight: 500; text-transform: none; letter-spacing: 0; box-shadow: var(--shadow-2); pointer-events: none; opacity: 0; transform: translateY(-3px); transition: opacity 0.15s, transform 0.15s var(--ease); }
.tip.show { opacity: 1; transform: none; }

.selcol { width: 36px; padding-right: 0 !important; }
.selcol input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; vertical-align: middle; }
.grid tbody tr.picked { background: var(--accent-soft); }
.lead-set { font-weight: 650; }
.lead-def { color: var(--muted); }
.bulk {
  position: fixed; left: calc(var(--rail) + 16px); right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 35;
  display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-3), 0 0 0 1.5px var(--accent); animation: pop 0.25s var(--ease) both;
}
.bulk-n { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bulk-n b { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.bulk-grp { display: flex; align-items: center; gap: 6px; }
.bulk-grp .lbl { margin-right: 2px; }
.bulk-grp .unit-input { width: 84px; }
.bulk-grp .unit-input .input { height: 30px; padding-right: 30px; font-size: 13px; }
.bulk-grp .btn.sm { min-width: 30px; }
.main:has(.bulk) { padding-bottom: 180px; }
@media (max-width: 860px) { .bulk { left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); gap: 8px 14px; } }

.grid th.missing { color: var(--order); }
.miss-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f2b13c; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(242, 177, 60, 0.25); animation: missPulse 2.4s ease-in-out infinite; }
@keyframes missPulse { 50% { box-shadow: 0 0 0 5px rgba(242, 177, 60, 0.08); } }
.tip { display: flex; flex-direction: column; gap: 8px; }
.tip-warn { background: #fff4d6; color: #5a3d00; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.tip-warn b { color: #8a5a00; }
body:has(.bulk) .toast { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 860px) { body:has(.bulk) .toast { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); } }

:root { --spike-bg: #fff3cc; --spike-line: #f2c445; --spike-ink: #6a4a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --spike-bg: rgba(245, 196, 66, 0.15); --spike-line: rgba(245, 196, 66, 0.55); --spike-ink: #f6d47e; } }
:root[data-theme="dark"] { --spike-bg: rgba(245, 196, 66, 0.15); --spike-line: rgba(245, 196, 66, 0.55); --spike-ink: #f6d47e; }
.qty-spike { display: inline-flex; flex-direction: column; align-items: stretch; gap: 4px; }
.qty-edit.spike { background: var(--spike-bg); box-shadow: inset 0 0 0 1.5px var(--spike-line); }
.qty-edit.spike input { color: var(--spike-ink); }
.qty-edit.spike button { color: var(--spike-ink); }
.spike-acts { display: flex; gap: 4px; justify-content: flex-end; }
.spike-acts button { border: 0; background: transparent; font: 600 11px/1 var(--font-ui); color: var(--spike-ink); padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.spike-acts button:first-child { background: var(--spike-bg); }
.spike-acts button:hover { background: var(--spike-line); color: #3d2a00; }
.spike-q { background: var(--spike-bg); color: var(--spike-ink); box-shadow: inset 0 0 0 1.5px var(--spike-line); padding: 3px 8px; border-radius: 7px; }
.spike-box { border-radius: var(--r-m); padding: 14px 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.spike-box.open { background: var(--spike-bg); box-shadow: inset 0 0 0 1.5px var(--spike-line); }
.spike-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.spike-head svg { width: 18px; height: 18px; color: var(--order); flex: none; }
.spike-head .flag { margin-left: auto; }
.spike-box p { margin: 0; font-size: 13px; color: var(--fg-2); }
.spike-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spike-opt { text-align: left; border: 0; border-radius: 10px; padding: 10px 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 2px; color: var(--fg); transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.spike-opt b { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.spike-opt span:last-child { font-size: 12px; color: var(--muted); }
.spike-opt:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1); }
.spike-opt.on { box-shadow: 0 0 0 2px var(--accent); }

.pv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pv-kpis > div { background: var(--surface); border-radius: var(--r-m); padding: 12px 14px; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-kpis b { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pv-kpis .up, .pv-table .up { color: var(--order); font-size: 12px; font-weight: 600; }
.pv-kpis .down, .pv-table .down { color: var(--healthy); font-size: 12px; font-weight: 600; }
.pv-moves { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-table { max-height: 44vh; overflow: auto; border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); background: var(--surface); }
.pv-table .mini-table { min-width: 0; }
.pv-table .mini-table tbody tr { cursor: default; }
.pv-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pv-table tr.done { opacity: 0.55; }
.chg { font-size: 12.5px; white-space: nowrap; }
.pv-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .pv-kpis { grid-template-columns: 1fr; } .pv-foot .btn { flex: 1 1 auto; } }

.toast-undo { margin-left: 14px; border: 0; background: transparent; color: inherit; font: 700 13px var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.toast.show { pointer-events: auto; }

.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); flex-wrap: wrap; }
.rule-card.off { opacity: 0.55; }
.rc-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-t { font-size: 14px; }
.rc-s { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.rc-eff { color: var(--accent); font-weight: 600; }
.rc-acts { display: flex; gap: 6px; align-items: center; }
.rule-add { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: var(--r-m); border: 1.5px dashed var(--line-strong); background: transparent; color: var(--muted); font: 600 13px var(--font-ui); cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.rule-add svg { width: 16px; height: 16px; }
.rule-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.rule-add[disabled] { opacity: 0.5; pointer-events: none; }
.rf-sec { display: flex; flex-direction: column; gap: 8px; }
.rf-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; }
.rf-chip { position: relative; cursor: pointer; }
.rf-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rf-chip span { display: inline-block; padding: 6px 11px; border-radius: 99px; background: var(--surface-2); font-size: 12.5px; color: var(--fg-2); transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.rf-chip input:checked + span { background: var(--accent); color: var(--accent-ink); }
.rf-chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 4px var(--accent); }
.rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rf-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .rf-grid, .rf-grid.three { grid-template-columns: 1fr; } }
.rf-count { font-size: 13px; color: var(--muted); }
.rf-count b { color: var(--fg); }
.hist { display: flex; flex-direction: column; border-radius: var(--r-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.hist-row:last-child { border-bottom: 0; }
.hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.hist-dot.ai { background: var(--accent); }
.hist-l { flex: 1 1 240px; min-width: 0; }
.hist-t { font-size: 12px; }
.pv-table .flags { flex-direction: row; flex-wrap: wrap; }

.qty-th-in { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.unit-input.mini { width: 76px; }
.unit-input.mini .input { height: 26px; padding: 0 30px 0 8px; font: 650 12.5px var(--font-ui); text-transform: none; letter-spacing: 0; color: var(--accent); background: var(--accent-soft); border-color: transparent; text-align: right; }
.unit-input.mini span { font-size: 10.5px; text-transform: none; letter-spacing: 0; right: 7px; }

.flag.soft { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 550; }
.callout.soft { background: var(--surface-2); }
.callout.soft svg { color: var(--muted); }

.conf { display: inline-flex; align-items: flex-end; gap: 2px; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: help; }
.conf i { width: 4px; border-radius: 2px; background: var(--surface-3); }
.conf i:nth-child(1) { height: 7px; } .conf i:nth-child(2) { height: 10px; } .conf i:nth-child(3) { height: 13px; }
.conf span { margin-left: 6px; }
.conf-high i { background: var(--healthy); } .conf-high span { color: var(--healthy); }
.conf-mid i:nth-child(-n+2) { background: var(--order); } .conf-mid span { color: var(--order); }
.conf-low i:nth-child(1) { background: var(--urgent); } .conf-low span { color: var(--urgent); }
.conf-box { border-radius: var(--r-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 12px 14px; }
.conf-head { display: flex; align-items: center; gap: 10px; }
.conf-head b { margin-left: auto; font-family: var(--font-display); font-size: 18px; }
.conf-head b span { font-size: 12px; font-weight: 500; }
.conf-box ul { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--fg-2); display: flex; flex-direction: column; gap: 3px; }

.season-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.season { position: relative; border-radius: var(--r-l); padding: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.season::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--line-strong); }
.season.s-now::before { background: var(--order); }
.season.s-soon::before { background: var(--accent); }
.season.s-late { opacity: 0.6; }
.season-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.season-pill { font-size: 11px; font-weight: 650; letter-spacing: 0.02em; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.s-now .season-pill { background: var(--order-soft); color: var(--order); }
.s-soon .season-pill { background: var(--accent-soft); color: var(--accent); }
.season h4 { margin: 4px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.season-sub { font-size: 13px; color: var(--fg-2); }
.season-sup { font-size: 11.5px; color: var(--muted); margin-top: 4px; cursor: help; }
.season-sup b { color: var(--urgent); font-weight: 600; }
.season-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.season.s-air::before { background: var(--over); }
.s-air .season-pill { background: var(--over-soft); color: var(--over); }
.season-pill .ic { margin-right: 3px; }
.season-why { font-size: 12px; color: var(--muted); padding: 6px 8px; border-radius: 8px; background: var(--over-soft); }
.season-why b { color: var(--over); font-weight: 650; }

.hist-box { border-radius: var(--r-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 14px; }
.hist-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hist-kpis b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hist-kpis .up { color: var(--healthy); font-size: 12px; font-weight: 600; }
.hist-kpis .down { color: var(--urgent); font-size: 12px; font-weight: 600; }
.hm-row { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.hm { display: inline-block; height: 18px; border-radius: 4px; background: var(--surface-2); position: relative; }
.hm-row .hm { cursor: help; }
.hm-sold { background: var(--healthy); }
.hm-out { background: var(--order); }
.hm-quiet { background: repeating-linear-gradient(45deg, var(--surface-3) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hm-none { background: var(--surface-2); }
.hm-rec::after { content: ""; position: absolute; left: 50%; top: -5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.hm-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.hm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hm-legend .hm { width: 10px; height: 10px; border-radius: 3px; }
.hm-off { background: var(--over-soft); box-shadow: inset 0 0 0 1px var(--over); }
.brand-name { font-weight: 500; } .brand-name b { font-weight: 750; color: var(--accent); letter-spacing: -0.01em; }

.s-bringback { color: var(--accent); background: var(--accent-soft); }
.s-nolead { color: var(--accent); background: var(--accent-soft); } .c-nolead { background: var(--accent); }
.times-need { margin-bottom: 14px; } .times-need p { margin: 6px 0 10px; font-size: 13px; } .times-need .unit-input { max-width: 120px; } .times-need .mini-table { min-width: 460px; }
.s-runout, .s-oneoff { color: var(--neutral); background: var(--neutral-soft); }
.c-bringback { background: var(--accent); } .c-runout { background: var(--surface-3); } .c-oneoff { background: var(--faint); }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.act-card { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--line-strong); min-width: 0; }
.act-card h4 { margin: 0; font-family: var(--font-display); font-size: 16px; letter-spacing: -0.01em; line-height: 1.25; }
.act-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.act-card .btn { align-self: flex-start; }
.act-card.t-urgent { border-top-color: var(--urgent); }
.act-card.t-warn { border-top-color: var(--order); }
.act-card.t-info { border-top-color: var(--accent); }
.act-card.t-soft { border-top-color: var(--faint); }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.perf-box { background: var(--surface-2); border-radius: var(--r-m); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.perf-box .stat-row { background: transparent; padding: 0; }
.perf-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--fg-2); }
@media (max-width: 640px) { .row-acts { flex-wrap: wrap; } .act-grid { grid-template-columns: minmax(0, 1fr); } }

.site { display: none; }
body.site-on .app, body.site-on .drawer, body.site-on .scrim { display: none; }
body.site-on .site { display: block; position: relative; z-index: 1; }
.rail-acct { display: flex; gap: 4px; flex-wrap: wrap; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.site-brand .brand-mark { width: 34px; height: 34px; }
.site-brand .brand-name { font-size: 19px; }
.site-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 56px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; gap: 22px; margin-left: 12px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 550; }
.site-nav a:hover { color: var(--fg); }
.site-head-cta { margin-left: auto; display: flex; gap: 8px; }
.l-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(40px, 8vw, 104px) clamp(16px, 4vw, 56px) clamp(40px, 6vw, 80px); max-width: 1320px; margin: 0 auto; }
.l-hero h1 { font-family: var(--font-display); font-size: clamp(38px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -0.035em; margin: 14px 0 18px; font-weight: 700; }
.l-hero h1 span { color: var(--muted); }
.l-lede { font-size: clamp(16px, 1.4vw, 18.5px); color: var(--fg-2); max-width: 560px; margin: 0; line-height: 1.55; }
.l-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.l-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.l-note svg { width: 16px; height: 16px; flex: none; }
.l-mock { position: relative; background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(20, 30, 90, 0.35); padding: 16px; display: flex; flex-direction: column; gap: 14px; transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.mk-bar { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mk-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.mk-bar span { margin-left: 8px; font-weight: 600; }
.mk-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-kpis div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-kpis span { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mk-kpis b { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.mk-rows { display: flex; flex-direction: column; }
.mk-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 70px 48px 40px; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 12.5px; }
.mk-row .pill { justify-self: start; }
.mk-item { min-width: 0; display: flex; flex-direction: column; }
.mk-item b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-item span { color: var(--muted); font-size: 11px; }
.mk-cover { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.mk-cover i { display: block; height: 100%; border-radius: 6px; }
.mk-n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.mk-q { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.mk-toast { position: absolute; left: -18px; bottom: -18px; display: flex; gap: 8px; align-items: center; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 12.5px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.4); }
.mk-toast svg { width: 16px; height: 16px; color: var(--order); }
.l-sec { max-width: 1220px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 56px); }
.l-sec-head { max-width: 680px; margin-bottom: 32px; }
.l-sec h2, .l-band h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 10px; }
.l-sec-head p, .l-split p { color: var(--muted); font-size: 16px; margin: 0; }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feat { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); padding: 22px; }
.feat-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feat-ic svg { width: 20px; height: 20px; }
.feat h3, .steps h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em; margin: 14px 0 6px; }
.feat p, .steps p { margin: 0; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.steps li { padding: 22px; border-radius: var(--r-l); background: var(--surface-2); }
.steps li > span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.l-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.l-split > div { padding: 26px; border-radius: var(--r-l); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.l-band { margin: 20px clamp(16px, 4vw, 56px) 0; padding: clamp(36px, 6vw, 64px) 24px; border-radius: 24px; text-align: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.l-band p { margin: 0 0 22px; opacity: 0.85; font-size: 16px; }
.l-band .btn.primary { background: #fff; color: var(--accent); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35); }
.site-foot { display: flex; justify-content: space-between; gap: 16px; padding: 28px clamp(16px, 4vw, 56px) 40px; color: var(--muted); font-size: 13px; }
.site-foot a { color: var(--muted); }

.lg-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); min-height: 100vh; min-height: 100dvh; }
.lg-side { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 36px; padding: 36px clamp(24px, 4vw, 56px); color: #fff; background: radial-gradient(120% 80% at 10% 0%, var(--accent-2), transparent 60%), linear-gradient(160deg, var(--accent) 0%, #1a237e 100%); }
.site-brand.light, .site-brand.light .brand-name { color: #fff; }
.lg-side-copy { margin-top: auto; }
.lg-side h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 18px; max-width: 440px; }
.lg-side ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; opacity: 0.9; }
.lg-side li::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); font-size: 11px; }
.lg-side-mock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: auto; }
.lg-side-mock div { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px); }
.lg-side-mock span { display: block; font-size: 11.5px; opacity: 0.8; }
.lg-side-mock b { font-family: var(--font-display); font-size: 24px; }
.lg-main { display: grid; place-items: center; padding: 32px 16px; }
.lg-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.lg-card h1 { font-family: var(--font-display); font-size: 34px; letter-spacing: -0.03em; margin: 0; }
.lg-card > p.muted { margin: -8px 0 4px; }
.lg-card .input { height: 44px; font-size: 15px; }
.lg-row { display: flex; justify-content: space-between; align-items: baseline; }
.lg-link, .lg-foot a { color: var(--accent); text-decoration: none; font-weight: 550; font-size: 13px; }
.lg-link:hover, .lg-foot a:hover { text-decoration: underline; }
.lg-pw { position: relative; }
.lg-pw .input { width: 100%; padding-right: 64px; box-sizing: border-box; }
.lg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.lg-eye:hover { background: var(--surface-2); color: var(--fg); }
.lg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.lg-submit { width: 100%; }
.lg-err { background: color-mix(in srgb, var(--urgent) 12%, transparent); color: var(--urgent); padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 550; }
.lg-note, .lg-preview { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); color: var(--fg-2); padding: 10px 12px; border-radius: 10px; font-size: 12.5px; margin: 0; }
.lg-note svg, .lg-preview svg { width: 16px; height: 16px; flex: none; color: var(--accent); margin-top: 1px; }
.lg-forgot { font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }
.lg-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.lg-mobile-brand { display: none; }
@media (max-width: 960px) {
  .l-hero { grid-template-columns: minmax(0, 1fr); }
  .l-mock { transform: none; }
  .feat-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .l-split { grid-template-columns: minmax(0, 1fr); }
  .site-nav { display: none; }
  .lg-wrap { grid-template-columns: minmax(0, 1fr); }
  .lg-side { display: none; }
  .lg-mobile-brand { display: inline-flex; margin-bottom: 8px; }
}
@media (max-width: 520px) {
  .site-head { gap: 10px; }
  .site-head-cta .btn.ghost { display: none; }
  .mk-row { grid-template-columns: 82px minmax(0, 1fr) 40px; }
  .mk-row .mk-cover, .mk-row .mk-n { display: none; }
  .mk-toast { left: 8px; bottom: -14px; }
  .mk-kpis b { font-size: 18px; }
}
.l-hero { max-width: 1220px; }
.l-hero h1 span { display: block; }
.site-brand.light .brand-name b { color: #fff; }
.site-brand.light .brand-mark { border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.team-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.team-add .input { flex: 1 1 200px; min-width: 0; }
.team-add select.input { flex: 0 1 140px; }

.cust-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.cust-list { position: sticky; top: 76px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; overflow: hidden; }
.cust-filters { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.cust-filters .search { max-width: none; }
.cust-sel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cust-sel .input { min-width: 0; }
.cust-ul { list-style: none; margin: 0; padding: 4px; overflow-y: auto; flex: 1; }
.cust-ul li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 10px; border-radius: var(--r-s); cursor: pointer; }
.cust-ul li:hover { background: var(--surface-2); }
.cust-ul li.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.cl-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-s { grid-column: 1; display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.cl-v { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.cust-head h2 { margin: 2px 0 4px; font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; line-height: 1.1; }
.ch-top { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.ch-type { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.cust-kpis { margin-bottom: 16px; }
.period-chips { flex-wrap: wrap; }
.rank.recs li { grid-template-columns: minmax(0, 1fr) auto; }
.section-head h3 { margin: 0 0 2px; font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; }
.section-head h3 + p { margin: 0; color: var(--muted); font-size: 12.5px; }
.input-sm { padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 1100px) {
  .cust-wrap { grid-template-columns: minmax(0, 1fr); }
  .cust-list { position: static; max-height: 360px; }
}
.cust-filters .search { flex: none; }
.rank.recs .r-meta, .rank.recs .r-name { white-space: normal; }
.why-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); }
.why-list b { color: var(--fg); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.legend .lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.legend .lg b { color: var(--fg); font-weight: 600; }
.mgrid { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; }
.mg-row { display: grid; grid-template-columns: 44px repeat(12, minmax(38px, 1fr)); gap: 4px; min-width: 520px; }
.mg-head span { font-size: 11px; color: var(--faint); text-align: center; }
.mg-y { font-size: 12px; font-weight: 600; color: var(--muted); align-self: center; }
.mg-c { height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-variant-numeric: tabular-nums; cursor: default; color: var(--fg); background: var(--surface-3, var(--line)); }
.mg-sold { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mg-out { background: var(--urgent-soft); box-shadow: inset 0 0 0 1.5px var(--urgent); color: var(--urgent); }
.mg-short { background: var(--order-soft); box-shadow: inset 0 0 0 1.5px var(--order); color: var(--order); font-weight: 600; }
.mg-quiet { background: var(--over-soft); color: var(--over); }
.mg-none { background: var(--neutral-soft); color: var(--muted); }
.mg-pre, .mg-na { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.po-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.po-list { display: flex; flex-direction: column; gap: 12px; }
.po-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.po-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.po-name { font-weight: 650; font-size: 15px; height: 34px; max-width: 360px; width: 100%; }
.po-acts { display: flex; gap: 6px; }
.po-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.po-step { height: 34px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.po-step.done { background: var(--accent-soft); color: var(--accent); }
.po-step.on { background: var(--accent); color: var(--accent-ink); }
.po-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.po-lines summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; }
.po-lines table { margin-top: 8px; }
@media (max-width: 560px) { .po-fields { grid-template-columns: 1fr; } .po-step { font-size: 12px; } }
.cust-ul li:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.grid-2.section { align-items: start; }
.mob-acct { display: none; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.mob-acct .seg { flex: 0 1 auto; }
@media (max-width: 860px) { .mob-acct { display: flex; } }

.lg-step { display: grid; gap: 14px; }
.lg-step[hidden], .lg-foot[hidden] { display: none; }
.lg-code { font-size: 22px; letter-spacing: 0.4em; font-variant-numeric: tabular-nums; }
.lg-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.lg-linkbtn:hover { text-decoration: underline; }

.lg-stay{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid var(--line, rgba(128,128,128,.3));border-radius:12px}
.lg-stay-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.lg-stay-head label{font-weight:600;font-size:14px}
.lg-stay-head output{font-size:14px;font-weight:600;color:var(--accent)}
.lg-stay input[type=range]{width:100%;margin:6px 0;accent-color:var(--accent);cursor:pointer}
.lg-stay-ticks{display:flex;justify-content:space-between;font-size:11.5px;color:var(--muted, #6b7488)}

.brand.ws { padding: 0 4px; }
.ws-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-head.is-wide { flex-direction: column; align-items: flex-start; gap: 8px; }
.ws-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; object-fit: contain; }
img.ws-logo { background: #fff; border: 1px solid var(--line); padding: 3px; }
img.ws-logo.wide { width: auto; height: 34px; max-width: 100%; padding: 4px 6px; }
.ws-initials { display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.ws-text { min-width: 0; }
.ws-name { font-family: var(--font-display); font-weight: 680; font-size: 16.5px; letter-spacing: -0.02em; line-height: 1.15; color: var(--fg); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; max-width: 170px; }
.ws-by { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; color: var(--muted); letter-spacing: 0.01em; }
.ws-mark { width: 13px; height: 13px; flex: none; }
.ws-top { display: none; }
.ws-form { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ws-preview-box { border: 1px dashed var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2, transparent); }
.ws-preview-box .lbl { margin-bottom: 10px; }
.ws-preview .ws-name { max-width: 220px; }
.ws-fields { display: flex; flex-direction: column; gap: 14px; }
.ws-fields .field p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.sync-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sync-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--healthy); flex: none; }
.sync-st.pending::before { background: var(--accent); }
.sync-st.offline::before, .sync-st.signedout::before, .sync-st.toobig::before { background: var(--order); }
.rail-acct .sync-st { flex-basis: 100%; margin-bottom: 4px; }
@media (max-width: 860px) {
  .ws-form { grid-template-columns: minmax(0, 1fr); }
  .has-ws .ws-top { display: block; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 4px; }
  .ws-top .ws-head.is-wide { flex-direction: row; align-items: center; }
  .ws-top img.ws-logo.wide { height: 28px; max-width: 45vw; }
  .ws-top .ws-logo { width: 32px; height: 32px; }
  .ws-top .ws-name { max-width: 60vw; font-size: 15.5px; -webkit-line-clamp: 1; }
  .mob-acct .sync-st { flex-basis: 100%; }
}

.trash-list { display: flex; flex-direction: column; gap: 10px; }
.trash-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.trash-kind { background: var(--surface-2); color: var(--fg-2); flex: none; }
.trash-main { flex: 1 1 260px; min-width: 0; }
.trash-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-sub { font-size: 12.5px; margin-top: 2px; }
.trash-left { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.trash-left.soon { color: var(--urgent); font-weight: 600; }
.trash-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.trash-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-3); font-size: 11px; text-align: center; margin-left: 2px; }
.rail-acct a.btn svg, .mob-acct a.btn svg { width: 15px; height: 15px; }
.po-archbar { display: flex; justify-content: flex-end; margin: -4px 0 10px; }

.season-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.season-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.season-row:first-of-type { border-top: 0; }
.season-row.off .season-name, .season-row.off .season-sub { opacity: 0.55; }
.season-main { flex: 1; min-width: 0; }
.season-name { font-weight: 600; font-size: 13.5px; }
.season-row .season-sub { font-size: 12px; margin-top: 1px; }
.season-form { margin-top: 12px; background: var(--surface-2); box-shadow: none; }
.season-fields { display: flex; flex-direction: column; gap: 12px; }
.season-fields .field p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.sf-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sf-row select.input { width: auto; }
@media (max-width: 860px) { .season-cols { grid-template-columns: minmax(0, 1fr); } }

.sgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sgroup { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.sgroup-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sgroup-top .gx { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.sgroup-top .gx:hover { background: var(--surface-2); color: var(--fg); }
.sgroup-names { font-size: 12.5px; }
.sgroup-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 13px; }
.sup-selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.sup-selbar .input { flex: 1 1 200px; min-width: 0; }
.mini-table th.ck, .mini-table td.ck { width: 34px; padding-right: 0; }
.mini-table tbody tr.sel { background: var(--accent-soft); }
.sup-min { min-width: 120px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.sup-pos { font-size: 12.5px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sku-table th[data-sku-sort] { cursor: pointer; user-select: none; }
.sku-table th .arr, .sup-table th .arr { margin-left: 4px; color: var(--faint); }

.nav-more, .more-sheet { display: none; }
@media (max-width: 860px) {
  .nav { overflow: visible; position: relative; }
  .nav a.nav-x { display: none; }
  .nav a, .nav-more { flex: 1 1 0; min-width: 0; }
  .nav-more {
    display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 10.5px; padding: 6px 2px;
    color: var(--muted); background: none; border: 0; border-radius: var(--r-s); cursor: pointer;
  }
  .nav-more svg { width: 18px; height: 18px; }
  .nav-more.active { color: var(--accent); }
  .more-sheet:not([hidden]) {
    display: flex; flex-direction: column; gap: 2px; position: absolute; right: 0; bottom: calc(100% + 10px); min-width: 180px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2, 0 8px 30px rgba(0,0,0,.12));
  }
  .nav .more-sheet a, .more-sheet button { font: inherit; color: var(--muted); background: none; border: 0; border-radius: var(--r-s); cursor: pointer; display: flex; align-items: center; flex-direction: row; justify-content: flex-start; gap: 10px; font-size: 14px; padding: 10px 12px; text-align: left; }
  .more-sheet button svg { width: 18px; height: 18px; }
  .nav .more-sheet a.active { color: var(--accent); background: var(--accent-soft, var(--surface-2)); }
}

.tour .modal-head { align-items: center; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tour-steps button { font: inherit; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.tour-steps span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 12px; }
.tour-steps .on button { background: var(--accent-soft); color: var(--accent); }
.tour-steps .on span, .tour-steps .done span { background: var(--accent); color: #fff; box-shadow: none; }
.tour-text h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.tour-text p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 62ch; }
.tour-stage { position: relative; min-height: 236px; padding: 20px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow: hidden; display: grid; gap: 14px; align-content: center; }
.tour-stage svg { width: 18px; height: 18px; flex: none; }
@keyframes tIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tDrop { 0% { opacity: 0; transform: translate(-40px, -30px) rotate(-6deg); } 60% { opacity: 1; transform: translate(0, 4px) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes tPop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes tGrow { from { width: 0; } }
@keyframes tFade { to { opacity: 0; } }
.t-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--accent); border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent); animation: tDrop 0.7s var(--ease) both; }
.t-file div { display: flex; flex-direction: column; } .t-file b { color: var(--fg); font-size: 14px; } .t-file span { font-size: 12px; color: var(--muted); }
.t-cols { display: grid; gap: 6px; }
.t-col { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; padding: 7px 10px; border-radius: var(--r-s); background: var(--surface-2); animation: tIn 0.4s var(--ease) var(--d) both; }
.t-col .mono { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-arrow { color: var(--faint, var(--muted)); }
.t-ok { color: var(--healthy); display: flex; animation: tPop 0.3s var(--ease) calc(var(--d) + 0.25s) both; }
.t-rows { display: grid; gap: 6px; }
.t-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13.5px; padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); animation: tIn 0.4s var(--ease) var(--d) both; }
.t-row .pill { justify-self: start; }
.t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-qty { font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.t-ba { display: grid; gap: 6px; padding-top: 4px; animation: tIn 0.4s var(--ease) 0.9s both; }
.t-ba-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.t-ba-row b { text-align: right; color: var(--fg); font-family: var(--font-display); font-size: 16px; font-variant-numeric: tabular-nums; }
.t-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.t-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--order); animation: tGrow 0.9s var(--ease) 1s both; }
.t-ba-row.after .t-bar i { background: var(--healthy); animation-delay: 1.5s; }
.t-ba p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.t-sups, .t-files { display: grid; gap: 6px; }
.t-sup { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; font-size: 13.5px; padding: 9px 12px; border-radius: var(--r-s); background: var(--surface-2); animation: tIn 0.4s var(--ease) var(--d) both; }
.t-sup > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sup .muted { font-size: 12.5px; }
.t-chk { position: relative; display: grid; font-size: 12px; font-weight: 600; }
.t-chk > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.t-pending { color: var(--order); animation: tFade 0.25s var(--ease) calc(var(--d) + 0.6s) both; }
.t-done { color: var(--healthy); animation: tPop 0.3s var(--ease) calc(var(--d) + 0.7s) both; }
.t-done svg { width: 14px !important; height: 14px !important; }
.t-files .eyebrow { animation: tIn 0.3s var(--ease) 0.5s both; }
.t-fileline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--accent); animation: tIn 0.35s var(--ease) calc(var(--d) + 0.5s) both; }
@media (max-width: 520px) {
  .tour-stage { padding: 14px; min-height: 0; }
  .t-col { grid-template-columns: minmax(0, 1fr) auto; } .t-col .t-arrow, .t-col .mono { display: none; }
  .t-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tour-steps { gap: 4px; } .tour-steps button { font-size: 12px; padding: 4px 9px 4px 4px; gap: 6px; }
  .t-ba-row { grid-template-columns: 86px minmax(0, 1fr) 36px; }
  .t-sup { grid-template-columns: minmax(0, 1fr) auto; } .t-sup .muted { display: none; }
}

.section-head > .btn { margin-left: auto; align-self: center; }
.section-head > .btn svg { width: 15px; height: 15px; }
.modal-card.wide { width: min(1040px, 100%); }
.tl { display: grid; gap: 4px; }
.tl-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: center; gap: 14px; }
.tl-lbl { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.tl-lbl b { font-size: 14px; }
.tl-lbl span { color: var(--muted); font-size: 12px; }
.tl-row.sub .tl-lbl { padding-left: 12px; }
.tl-ev { padding: 8px 0; border-top: 1px solid var(--line); animation: tIn 0.35s var(--ease) var(--d) both; }
.tl-axis .tl-scale { position: relative; height: 18px; }
.tl-scale span { position: absolute; top: 0; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tl-scale span:not(:first-child) { transform: translateX(-50%); }
.tl-bar { position: relative; height: 14px; border-radius: 999px; background: var(--surface-2); }
.tl-row.sub .tl-bar { height: 9px; }
.tl-seg { position: absolute; top: 0; bottom: 0; transform-origin: left; animation: tlGrow 0.6s var(--ease) calc(var(--d) + 0.15s) both; }
@keyframes tlGrow { from { transform: scaleX(0); } }
.tl-seg.wait, .tl-legend i.wait { background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px); }
.tl-seg.sea, .tl-legend i.sea { background: var(--accent); }
.tl-seg.air, .tl-legend i.air { background: var(--over); }
.tl-seg.road, .tl-legend i.road { background: var(--order); }
.tl-seg.shelf, .tl-legend i.shelf { background: var(--healthy); }
.tl-bar.late .tl-seg { opacity: 0.35; }
.tl-order { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--fg); }
.tl-event, .tl-key-ev { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--urgent); border-radius: 1px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.tl-legend span { display: flex; align-items: center; gap: 6px; }
.tl-legend i { width: 18px; height: 8px; border-radius: 999px; display: inline-block; }
.tl-key-ev { position: static; display: inline-block; width: 2px; height: 12px; }
@media (max-width: 700px) {
  .tl-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tl-axis .tl-lbl { display: none; }
}

.om-mark { display: table; margin: 4px 0 0 auto; padding: 1px 7px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 11px; font-weight: 650; line-height: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
button.om-mark { cursor: pointer; }
button.om-mark:hover { background: var(--accent); color: var(--accent-ink); }
.om-mark.fixed { background: var(--surface-2); color: var(--fg-2); }
.om-note { margin-top: 10px; align-items: center; }
.om-note .btn { margin-left: 4px; }

.ship-pill { display: inline-block; padding: 2px 7px; margin-right: 4px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--fg-2); white-space: nowrap; }
.ship-pill.main { background: var(--accent-soft); color: var(--accent); }
.ship-pill.main::before { content: "★ "; }
.ship-pill.off { text-decoration: line-through; color: var(--faint); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.ship-cell { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: var(--r-s); background: transparent; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.ship-cell:hover { background: var(--surface-2); }
.ship-edit-lbl { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-left: 4px; }
.sbar-ship .btn { min-height: 34px; height: auto; padding: 4px 8px; gap: 2px; flex-wrap: wrap; justify-content: flex-start; width: 100%; }
.btn.warn-btn { color: var(--urgent); box-shadow: inset 0 0 0 1px var(--urgent); }
.ship-ed .ship-row { display: grid; grid-template-columns: 34px minmax(130px, 1.2fr) minmax(100px, 0.9fr) minmax(170px, 1.4fr) minmax(100px, 1fr) minmax(100px, 1fr) 40px 30px; gap: 10px; align-items: end; padding: 12px; margin-bottom: 8px; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ship-ed .ship-row.main { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ship-ed .ship-row.off { opacity: 0.55; }
.ship-ed .ship-row .field { margin: 0; min-width: 0; }
.ship-ed .ship-row .field label { font-size: 11px; }
.ship-ed .ship-row .switch, .ship-ed .ship-row .gx { margin-bottom: 7px; }
.ship-pref { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--faint); font-size: 17px; cursor: pointer; }
.ship-pref[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.ship-pref:disabled { cursor: not-allowed; opacity: 0.5; }
.ship-time-in { display: flex; gap: 6px; }
.ship-time-in .unit-input { flex: 1; min-width: 0; }
.ship-time-in .unit-input .input { padding-right: 10px; }
.ship-time-in select { width: 92px; flex: none; }
.ship-ed .unit-input .input { padding-right: 24px; }
.ship-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mini-table.ship-fr { min-width: 0; margin-bottom: 4px; font-size: 12.5px; }
.mini-table.ship-fr th, .mini-table.ship-fr td { padding-left: 8px; padding-right: 8px; }
@media (max-width: 860px) {
  .ship-ed .ship-row { grid-template-columns: 34px 1fr 1fr; }
  .ship-ed .ship-row .ship-time { grid-column: span 2; }
}
.ship-ed .gx { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ship-ed .gx:hover { color: var(--urgent); }

.share-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; max-width: min(720px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--order); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-3); font-size: 13.5px; }
.share-bar span { flex: 1 1 260px; }
.sync-st.conflict::before, .sync-st.newer::before { background: var(--order); }

.grid .qty-col { position: sticky; right: 0; background: var(--surface); box-shadow: -10px 0 10px -10px rgba(0, 0, 0, 0.22); }
.grid th.qty-col { z-index: 3; }
.grid tbody tr:hover td.qty-col { background: var(--surface-2); }
.grid tbody tr.sel td.qty-col { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }

.mg-outx { background: var(--urgent); color: #fff; font-weight: 600; }
.mg-partx { background: var(--order-soft); box-shadow: inset 0 0 0 1.5px var(--order); color: var(--order); font-weight: 600; }
.mg-instock { background: var(--over-soft); box-shadow: inset 0 0 0 1.5px var(--over); color: var(--over); }
.s-newdesign { color: var(--order); background: var(--neutral-soft); }
.c-newdesign { background: var(--order); }

.range-pick { flex: 0 0 auto; gap: 6px; padding-right: 8px; cursor: pointer; margin-left: auto; }
.range-pick select { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; padding: 0 2px; cursor: pointer; }
.range-pick.set select { color: var(--accent); }
.range-pick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.view { animation: none; }
@media (prefers-reduced-motion: no-preference) {

  .mx-in > * { animation: mx-rise .25s var(--ease) both; animation-delay: calc(var(--b, 0) * 30ms); }
  .mx-in .kpi, .mx-in .act-card, .mx-in .season, .mx-in .mx-row { animation: mx-rise .22s var(--ease) both; animation-delay: calc(60ms + var(--d, 0) * 12ms); }
  .mx-in .gauge-track i { transform-origin: left; animation: mx-grow .25s var(--ease) both .08s; }
  .mx-in .spark path.mx-line { stroke-dasharray: 1; animation: mx-draw .25s var(--ease) both .08s; }
  .mx-in .spark path.mx-fill { animation: mx-fade .2s ease both .15s; }

  .mx-rows .mx-row { animation: mx-rise .18s var(--ease) both; animation-delay: calc(var(--d, 0) * 8ms); }

  .drawer { transition: transform .25s var(--ease); }
  .modal.open .modal-card { transition: transform .25s var(--ease); }

  .mx-flash { animation: mx-flash .25s ease-out; border-radius: 6px; }

  .mx-ghost { pointer-events: none; z-index: 30; animation: mx-out .24s var(--ease) both; }
  .mx-back { animation: mx-in-side .24s var(--ease) both; }

  .nav { position: relative; }
  .nav .mx-glide { position: absolute; left: 0; right: 0; top: 0; height: 0; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
    transition: transform .22s var(--ease), height .22s var(--ease); pointer-events: none; z-index: 0; }
  .nav.mx-glides a { position: relative; z-index: 1; }
  .nav.mx-glides a.active { background: transparent; box-shadow: none; }
}
@keyframes mx-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes mx-out { to { opacity: 0; transform: translateX(32px); } }
@keyframes mx-in-side { from { opacity: 0; transform: translateX(32px); } }
@keyframes mx-grow { from { transform: scaleX(0); } }
@keyframes mx-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mx-fade { from { opacity: 0; } }
@keyframes mx-flash { from { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); } }
@media (max-width: 860px) { .nav .mx-glide { display: none; } .nav.mx-glides a.active { background: revert-layer; } }

.health { display: grid; gap: 12px; padding: 16px 18px; margin: 14px 0; border-radius: var(--r-l); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.health-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.health-lbl { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.health-bar { display: flex; gap: 4px; height: 12px; }
.health-bar button { transform-origin: center; flex-basis: 0; min-width: 10px; border: 0; padding: 0; border-radius: 999px; background: var(--c); cursor: pointer;
  transition: opacity .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.health-bar button:hover { transform: scaleY(1.5); }
.health-bar button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.health.picked .health-bar button:not(.on) { opacity: .28; }
.health-bar button.on { transform: scaleY(1.5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.health-key { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 -8px; }
.health-key button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 5px 8px; border-radius: 999px; font: inherit; font-size: 13px; color: var(--fg-2); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease); }
.health-key button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); transition: transform .2s var(--ease); }
.health-key button b { font-variant-numeric: tabular-nums; color: var(--fg); }
.health-key button:hover { background: var(--surface-2); }
.health-key button:hover::before, .health-key button.on::before { transform: scale(1.35); }
.health-key button.on { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--fg); }
.health.picked .health-key button:not(.on) { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .mx-in .health-bar button { transform-origin: left; animation: mx-grow .25s var(--ease) both; animation-delay: calc(60ms + var(--d, 0) * 25ms); }
}
@media (prefers-reduced-motion: reduce) { .health-bar button, .health-key button, .health-key button::before { transition: none; } }

@media (prefers-reduced-motion: no-preference) {
  .scrim { transition-duration: .2s; }
  .ribbon span, .gauge-pin, .minbar i { transition-duration: .25s; }
}

.row-x { width: 1%; padding-left: 0 !important; }
.row-x .btn { opacity: .45; transition: opacity .15s var(--ease); }
tr:hover .row-x .btn, .row-x .btn:focus-visible { opacity: 1; }
@media (hover: none) { .row-x .btn { opacity: .8; } }
