:root {
  --bg: #f2f1ee;
  --panel: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.12);
  --soft: #f5f5f7;
  --green: #248a3d;
  --green-dim: #e4f5e8;
  --amber: #b86e00;
  --amber-dim: #fff3d6;
  --blue: #007aff;
  --blue-dim: #e8f1ff;
  --rose: #c23b4a;
  --rose-dim: #fdecee;
  --held: #8e8e93;
  --held-dim: #f2f2f7;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(0, 0, 0, 0.06);
  --font: "Sora", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
  --pick-slot: 82px;
  --list-w: clamp(210px, 16vw, 300px);
  --chat-w: clamp(230px, 20vw, 320px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 14px/1.4 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.err { color: var(--rose); font-size: 13px; }

.gate {
  min-height: 100%;
  height: 100%;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-card {
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.gate-kicker { letter-spacing: 0.18em; font-size: 11px; color: var(--muted); }
.gate-card h1 { font-size: 26px; letter-spacing: -0.04em; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; color: var(--muted); }
input, select, textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: rgba(0, 122, 255, 0.45); box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12); }
input.is-secret { -webkit-text-security: disc; }
textarea { resize: vertical; min-height: 72px; }

.primary, .ghost, .icon-btn, .rail-btn, .chip, .check-btn {
  border: 0;
  border-radius: 10px;
}
.primary { background: var(--ink); color: #fff; padding: 10px 14px; }
.primary:disabled { opacity: 0.4; }
.ghost { background: var(--soft); padding: 8px 12px; }
.ghost:disabled { opacity: 0.4; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
}
.icon-btn svg, .rail-btn svg { width: 20px; height: 20px; fill: currentColor; }
.go { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; border: 0; }
.go svg { width: 20px; height: 20px; fill: currentColor; }
.act {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.act-take { background: #1d1d1f; color: #fff; }
.act-hold { background: var(--soft); color: var(--ink); }
.act-done { background: #007aff; color: #fff; }
.act:disabled { opacity: 0.45; }

.shell { height: 100%; height: 100dvh; display: flex; overflow: hidden; }
.rail {
  width: 72px;
  background: #1c1c1e;
  color: #f5f5f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  gap: 18px;
}
.mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0d54a;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(244, 239, 230, 0.12);
}
.rail nav { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rail-main { flex: 1; }
.rail-foot { margin-top: auto; padding-bottom: 4px; }
.rail-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: transparent; color: #8e8e93;
  border-radius: 12px;
}
.rail-btn.is-on { background: #3a3a3c; color: #fff; }
.rail-badge,
.chip-badge,
.badge,
.row-task {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}
.rail-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  pointer-events: none;
  box-shadow: 0 0 0 2px #1c1c1e;
}

.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.top {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.top-search { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.top-search-lab { font-size: 11px; color: var(--muted); line-height: 1; }
.top-search-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-search-q {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: min(454px, 100%);
  flex: 0 1 auto;
}
.top-search-q input { flex: 1; min-width: 0; width: auto; }
.search-spin {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 122, 255, 0.18);
  border-top-color: #007aff;
  border-radius: 50%;
  visibility: hidden;
  animation: search-spin 0.7s linear infinite;
  pointer-events: none;
}
.search-spin.is-on { visibility: visible; }
@keyframes search-spin { to { transform: rotate(360deg); } }
.cbr-usd {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.top-price-flag {
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink);
}
.top-archive {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.top-archive input {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  accent-color: var(--ink);
}
.presence {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.presence-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  background: #007aff;
}
.presence-dot[data-i="1"] { background: #34c759; }
.presence-dot[data-i="2"] { background: #ff9500; }
.presence-dot[data-i="3"] { background: #af52de; }
.presence-dot[data-i="4"] { background: #ff3b30; }
.presence-dot[data-i="5"] { background: #5856d6; }
.who { font-size: 13px; font-weight: 600; }

input[type="checkbox"].pick {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 1.5px solid #d1d1d6;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
}
input[type="checkbox"].pick:checked {
  background: var(--ink);
  border-color: var(--ink);
}
input[type="checkbox"].pick:checked::after {
  content: "";
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

.page { flex: 1; min-height: 0; overflow: hidden; }
.split { display: flex; min-height: 0; overflow: hidden; }
.list-pane {
  width: var(--list-w);
  flex: 0 0 var(--list-w);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f5f5f7;
}
.list-pane.wide {
  width: min(780px, 66%);
  flex: 1 1 auto;
  max-width: min(820px, 70%);
}
.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px 8px;
  flex-wrap: wrap;
}
.task-tools {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 6px;
}
.task-who { position: relative; flex-shrink: 0; }
.task-who-btn {
  max-width: 220px;
  border: 0;
  background: rgba(120, 120, 128, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-who-btn:hover { background: rgba(120, 120, 128, 0.18); }
.task-who-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 200px;
  z-index: 16;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
}
.task-who-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.task-who-opt:hover { background: #f2f2f7; }
.task-who-opt.is-on { font-weight: 600; }
.task-who-opt input { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(120, 120, 128, 0.12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
}
.chip.is-on { background: var(--ink); color: #fff; }
.chip.is-on .chip-badge {
  box-shadow: 0 0 0 2px var(--ink);
}
mark.search-hit {
  background: transparent;
  color: #dc2626;
  font-weight: 600;
  padding: 0;
}
.rows, .task-groups, .table-wrap { flex: 1; overflow: auto; }
#ticketList.rows {
  padding: 4px 8px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: grab;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
  touch-action: none;
  user-select: none;
}
.row:hover { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.row.is-on {
  background: #fff;
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.row.is-on .row-track b { color: #1d1d1f; }
.row.is-done {
  background: #f2f2f7;
  border-color: transparent;
  box-shadow: none;
  color: #8e8e93;
}
.row.is-done .row-title { color: #8e8e93; font-weight: 500; }
.row.is-done .row-track b { color: #8e8e93; }
.row.is-done .st-done { background: #e5e5ea; color: #8e8e93; }
.row.is-done .ava { background: #e5e5ea; color: #8e8e93; }
.row.is-done.is-on {
  background: #fff;
  color: var(--ink);
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.row.is-done.is-on .row-title { color: var(--ink); font-weight: 600; }
.row.is-done.is-on .row-track b { color: #1d1d1f; }
.row.is-done-first { margin-top: 8px; }
.row.is-dragging { opacity: 0.28; }
.row.is-snap {
  transform: translateY(-1px) scale(1.015);
  border-color: rgba(31, 138, 76, 0.45);
  box-shadow:
    0 0 0 2px rgba(31, 138, 76, 0.35),
    0 8px 18px rgba(28, 24, 18, 0.12);
}
.row.is-ask {
  padding-bottom: 44px;
  border-color: rgba(27, 25, 22, 0.16);
}
.row-main {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.row-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #cfc6b8;
}
.row-dot.st-new { background: var(--rose); }
.row-dot.st-doing { background: var(--amber); }
.row-new {
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 3px;
  background: #d21f32;
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: lowercase;
}
.row-dot.st-held { background: var(--held); }
.row-dot.st-done { background: #b7b2a8; }
.row-mgr {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  max-width: 8.5em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.row-side { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.row-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 11.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-track {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  padding-left: 1px;
}
.row-track > span { white-space: nowrap; }
.row-track b { font-weight: 600; color: #5c564c; }
.tix-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tix-ico {
  width: 10px;
  height: 10px;
  fill: currentColor;
  opacity: 0.62;
  flex-shrink: 0;
}
.row-overdue { color: var(--rose); font-weight: 600; }
.row-task {
  flex-shrink: 0;
}
.row-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 12px; }
.tix-merge {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px 5px 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 24, 18, 0.14);
  z-index: 3;
}
.tix-merge span { font-size: 11px; font-weight: 600; }
.tix-merge .acts { display: flex; gap: 4px; }
.tix-merge .ghost, .tix-merge .primary { padding: 4px 8px; font-size: 11px; }
.tix-menu {
  position: fixed;
  z-index: 80;
  min-width: 228px;
  padding: 4px;
  border-radius: 10px;
  background: #fffdf8;
  border: 1px solid rgba(27, 25, 22, 0.08);
  box-shadow: 0 10px 28px rgba(28, 24, 18, 0.16);
  display: flex;
  flex-direction: column;
}
.tix-menu[hidden] { display: none; }
.tix-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.25;
}
.tix-menu button:hover { background: var(--soft); }
.tix-menu button.is-danger { color: var(--rose); }
.tix-menu button.is-danger:hover { background: var(--rose-dim); }
.tix-ghost {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  margin: 0;
  opacity: 0.94;
  transform: rotate(1.2deg);
  box-shadow: 0 12px 28px rgba(28, 24, 18, 0.18);
}
.tix-ghost.is-stuck {
  transform: none;
  transition: left 0.08s ease-out, top 0.08s ease-out, width 0.08s ease-out;
}
body.is-ticket-drag { cursor: grabbing; }
body.is-ticket-drag .row { cursor: grabbing; }
.st {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 999px; font-size: 11px;
}
#ticketList .st {
  padding: 0 4px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.st-new { background: #fdecee; color: #d21f32; }
.st-doing { background: var(--amber-dim); color: var(--amber); }
.st-held { background: var(--held-dim); color: var(--held); }
.st-done { background: var(--green-dim); color: var(--green); }
.ava {
  width: 22px; height: 22px; border-radius: 50%;
  background: #ece7de; display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
}
#ticketList .ava {
  width: 16px; height: 16px; font-size: 7.5px;
}
.badge {
  flex-shrink: 0;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }

.ticket-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}
.workspace { flex: 1; min-width: 0; min-height: 0; padding: 20px 28px 18px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.workspace.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: auto;
}
.workspace.empty p { font-size: 15px; }
.workspace.is-locked .ws-pick,
.workspace.is-locked .ws-dock {
  pointer-events: none;
  opacity: 0.5;
}
.workspace.is-locked #ticketTitle {
  pointer-events: none;
  opacity: 0.7;
}
.chat-lock { padding: 10px 14px 16px; }
.ws-head { display: flex; gap: 12px; align-items: flex-start; flex-shrink: 0; }
.ws-head .field { flex: 1; }
.ws-head textarea {
  min-height: 48px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  border-color: transparent;
  background: transparent;
  padding: 4px 2px;
  border-radius: 12px;
  box-shadow: none;
}
.ws-head textarea:focus { border-color: transparent; background: var(--soft); box-shadow: none; }
.ws-acts { display: flex; gap: 8px; flex-shrink: 0; padding-top: 4px; }
.ws-meta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; margin-bottom: 2px; }
.ws-pick { flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; }
.pick-search { position: relative; margin: 0; flex-shrink: 0; }
.pick-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pick-search-row .pick-search-box { flex: 1; min-width: 0; }
.pick-create {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(120, 120, 128, 0.1);
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pick-create:hover { background: rgba(120, 120, 128, 0.18); }
.pick-create:disabled { opacity: 0.4; cursor: default; }
.create-ms-hint { margin: 0 0 14px; line-height: 1.4; }
.pick-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: rgba(120, 120, 128, 0.1);
  border: 1px solid transparent;
  border-radius: 12px;
}
.pick-search-box:focus-within {
  background: #fff;
  border-color: rgba(0, 122, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.pick-search-ico {
  width: 14px;
  height: 14px;
  fill: var(--muted);
  flex-shrink: 0;
}
.pick-search input {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 13px;
  background: transparent;
  box-shadow: none;
}
.pick-search input:focus { box-shadow: none; }
.pick-search input[type="search"]::-webkit-search-decoration,
.pick-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12); z-index: 15; max-height: 280px; overflow: auto;
  padding: 6px;
}
.pick-search.is-after .suggest { top: auto; bottom: calc(100% + 4px); }
.suggest button, .suggest-more {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 6px;
  padding: 8px 10px;
}
.suggest button:hover, .suggest-more:hover { background: #f2f2f7; }
.suggest-more {
  color: var(--ink);
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  box-sizing: border-box;
}
.suggest .hit {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  background: transparent;
}
.hit-body { min-width: 0; flex: 1; }
.suggest .hit strong { display: inline; }
.hit-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hit-sebes { font-size: 12px; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.hit-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #e5e5ea;
  color: transparent;
}
.price-mark svg { width: 9px; height: 9px; display: block; }
.price-mark.is-on { background: #34c759; color: #fff; }
.price-mark.is-off { background: #e5e5ea; color: transparent; }
.js-row-price {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pick-rows {
  --pick-gap: 8px;
  --pick-pad: 8px;
  height: calc(var(--pick-pad) * 2 + var(--pick-slot) * 4 + var(--pick-gap) * 3);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--pick-gap);
  padding: var(--pick-pad);
  background: rgba(120, 120, 128, 0.08);
  border: 1px solid transparent;
  border-radius: 16px;
  scrollbar-width: thin;
}
.pick-rows .prod-empty {
  border: 0;
  background: transparent;
  margin: auto;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
.pick-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: var(--pick-slot);
  flex: 0 0 auto;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
.pick-row:last-child { border-bottom: 1px solid var(--line); }
.pick-row:hover { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }
.pick-row.is-off { background: #f2f2f7; }
.pick-row.is-sent,
.pick-row.is-sent:hover {
  background: #e7f6ea;
  border-color: #b7e0c2;
  box-shadow: none;
}
.pick-row.is-busy { opacity: 0.65; pointer-events: none; }
.pick-row.is-flash,
.pick-row.is-flash:hover {
  background: #ffe566;
  border-color: #f5c400;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.35);
}
.pick-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.pick-head .pick-name { flex: 1; min-width: 0; }
.pick-send-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 26px;
  padding-top: 1px;
}
.pick-send-hint {
  font-size: 11px;
  line-height: 1.25;
  color: #c93400;
  max-width: 168px;
  text-align: right;
}
.pick-send {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid #34c759;
  border-radius: 50%;
  background: #fff;
  color: #34c759;
  cursor: pointer;
}
.pick-send svg { width: 11px; height: 11px; display: block; }
.pick-send:hover { background: #e7f6ea; }
.pick-send.is-wait {
  background: #fff4e5;
  border-color: #c93400;
  color: #c93400;
}
.pick-send.is-on,
.pick-send.is-on:hover {
  background: #34c759;
  border-color: #34c759;
  color: #fff;
  cursor: default;
}
.pick-send:disabled:not(.is-on) { opacity: 0.4; cursor: default; }
.pick-name {
  width: 100%;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 26px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: transparent;
  border-color: transparent;
  padding: 2px 4px;
  box-shadow: none;
}
.pick-name:focus { background: var(--soft); box-shadow: none; }
.pick-rest {
  display: grid;
  grid-template-columns: minmax(88px, 1.4fr) 108px 64px 52px 52px auto auto;
  gap: 6px;
  align-items: center;
}
.pick-row input, .pick-row select, .pick-row textarea {
  width: 100%;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 8px;
  min-height: 28px;
  font-size: 13px;
  background: var(--soft);
  border-color: transparent;
}
.pick-row input:focus, .pick-row select:focus { background: #fff; border-color: rgba(0, 122, 255, 0.35); box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }
.pick-row input:disabled, .pick-row select:disabled { color: var(--muted); opacity: 0.65; }
.pick-row .pick-name {
  background: transparent;
  padding: 2px 4px;
  min-height: 26px;
  border-radius: 8px;
  box-shadow: none;
}
.pick-row .pick-name:focus { background: var(--soft); box-shadow: none; border-color: transparent; }
.pick-acts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}
.pick-row .pick-acts .icon-btn,
.pick-row .js-row-price {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-decoration: none;
}
.pick-row .pick-acts .icon-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.pick-row .pick-acts .icon-btn:hover {
  background: #e8e8ed;
  color: var(--ink);
}
.pick-row .pick-acts .icon-btn.is-off { opacity: 0.35; pointer-events: none; }
.pick-row .js-row-price .price-mark { width: 16px; height: 16px; }
.pick-row .js-row-files.is-on,
.pick-row .js-row-com.has-text,
.pick-row .js-row-ms { color: #007aff; }
.pick-row .js-del-prod:hover { color: var(--rose); }
.pick-fresh {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin: 0;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.1;
  cursor: pointer;
}
.pick-fresh input { width: 13px; height: 13px; min-height: 0; padding: 0; accent-color: #34c759; }
.pick-row.is-drop {
  outline: 2px solid rgba(0, 122, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}
.pick-row .icon-btn { width: 28px; height: 28px; color: var(--muted); }
.pick-row .icon-btn svg { width: 14px; height: 14px; fill: currentColor; }
.folder-mark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #c7c7cc;
}
.folder-mark svg { width: 16px; height: 16px; fill: currentColor; }
.folder-mark.is-on { color: #007aff; }
.pick-row .js-row-com.has-text { color: #007aff; }
.country-pop {
  position: fixed;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  z-index: 45;
  max-height: 240px;
  min-width: 160px;
  margin: 0;
}
.country-pop .hit.is-on,
.country-pop .hit:hover { background: #e8f1ff; }
.row-com-pop {
  position: fixed;
  z-index: 40;
  width: 260px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}
.row-com-pop textarea {
  width: 100%;
  min-height: 84px;
  resize: none;
  border: 0;
  background: transparent;
  padding: 4px;
  font-size: 13px;
}
.sheet-price { width: 28px; }
.ws-dock {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 160px;
  height: auto;
}
.ws-pane {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
.ws-pane h3 {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ws-pane textarea {
  flex: 1;
  min-height: 0;
  resize: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  box-shadow: none;
}
.ws-pane textarea:focus { box-shadow: none; }
.ws-tasks { flex: 1; min-height: 0; overflow: auto; display: grid; gap: 1px; align-content: start; }
.task-item {
  grid-template-columns: 1fr 150px 110px auto;
  padding: 6px 8px;
  border-radius: 10px;
}
.ws-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px 0 28px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.ws-toolbar select { min-width: 140px; background: var(--soft); border-color: transparent; }
.ws-toolbar .ghost { background: #fff; border: 1px solid var(--line); }
.ws-block { margin-bottom: 28px; }
.modal-card.sheet {
  width: min(1100px, 96vw);
  height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.sheet-tools input { flex: 1; }
.sheet-table { flex: 1; min-height: 0; overflow: auto; }
.sheet-table th { cursor: pointer; user-select: none; }
.ws-block h3 {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.ws-block-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ws-block-h h3 { margin: 0; }
.cards { display: grid; gap: 10px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.card-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.prod-card .prod-price { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; margin-top: 8px; }
.prod-card .muted { font-size: 12px; }
.task-item {
  display: grid;
  grid-template-columns: 1fr 150px 110px auto;
  gap: 6px;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
}
.task-item input, .task-item select { background: var(--soft); border-color: transparent; }
.remind-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 2px 6px;
}
.page .remind-add { padding: 4px 16px 2px; }
.remind-plus {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #007aff;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
}
.remind-add input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 3px 0;
  border-radius: 0;
  font-size: 13px;
}
.remind-add input:focus { outline: none; }
.remind-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  min-height: 26px;
  border-bottom: 1px solid var(--line);
}
.remind-row.is-done {
  background: #f2f2f7;
  border-radius: 6px;
  padding: 2px 6px;
  border-bottom: 0;
  opacity: 0.62;
  filter: grayscale(0.35);
}
.remind-row.is-done .remind-title { color: #8e8e93; text-decoration: line-through; }
.remind-check {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #d1d1d6;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}
.remind-row.is-done .remind-check {
  background: #c7c7cc;
  border-color: #c7c7cc;
  box-shadow: inset 0 0 0 2px #f2f2f7;
}
.remind-title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 1px 0;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.25;
}
.remind-title:focus { outline: none; }
.remind-due {
  border: 0;
  background: rgba(0, 122, 255, 0.08);
  color: #007aff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.remind-due.is-empty { color: var(--muted); }
.remind-due.is-late { color: #ff3b30; background: #ffeceb; }
.remind-cols,
.remind-row.has-tix {
  display: grid;
  grid-template-columns: 15px minmax(0, 1.2fr) minmax(108px, 22%) minmax(108px, 18%) auto;
  gap: 8px;
  align-items: center;
}
.remind-cols {
  padding: 6px 0 2px;
  min-height: 0;
  border: 0;
  font-size: 11px;
  color: var(--muted);
}
.remind-tix {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.remind-tix-name {
  max-width: 100%;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.remind-tix-date {
  font-size: 11px;
  color: var(--muted);
}
.remind-tix:hover .remind-tix-name { color: #007aff; }
.remind-tix.is-empty { color: var(--muted); font-size: 12px; }
.remind-who {
  min-width: 0;
  max-width: 100%;
  height: 28px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-overflow: ellipsis;
}
.remind-who:hover,
.remind-who:focus {
  background: rgba(120, 120, 128, 0.1);
  box-shadow: none;
}
.remind-row.is-done .remind-who { color: #8e8e93; }
.remind-row.is-done .remind-due,
.remind-row.is-done .remind-due.is-late,
.remind-row.is-done .remind-due.is-empty {
  color: #8e8e93;
  background: #e5e5ea;
}
.due-pop {
  position: fixed;
  z-index: 40;
  width: 292px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(16px);
}
.due-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 15px;
}
.due-nav button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.08);
  color: #007aff;
}
.due-dows, .due-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.due-dows span {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0 6px;
}
.due-day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
}
.due-day.is-today { font-weight: 700; }
.due-day.is-on { background: #007aff; color: #fff; }
.due-day:disabled { opacity: 0; }
.due-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #efece6;
}
.due-time input[type="time"] {
  border: 0;
  background: #f2f0eb;
  border-radius: 10px;
  padding: 6px 10px;
}
.due-acts { display: flex; justify-content: space-between; margin-top: 10px; }
.due-acts button { border: 0; background: transparent; color: #007aff; padding: 4px 0; }
.task-empty, .prod-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}

.chat-pane {
  width: var(--chat-w);
  flex: 0 0 var(--chat-w);
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #ececec;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  flex-shrink: 0;
}
.chat-pane-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
}
.chat-pane-h strong { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.chat-pane .chat {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 16px;
  align-items: flex-start;
  background-color: #ececec;
  background-image:
    linear-gradient(rgba(236, 236, 236, 0.55), rgba(236, 236, 236, 0.55)),
    url("/static/chat-wallpaper.png");
  background-size: auto, 187px;
  background-repeat: repeat;
}
.chat-pane .chat-form {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  flex-shrink: 0;
}
.chat-pane .chat-form textarea {
  flex: 1;
  min-height: 40px;
  max-height: calc(1.35em * 4 + 16px);
  height: 40px;
  width: auto;
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  background: #fff;
  padding: 8px 10px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-send {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}
.chat-send svg { width: 18px; height: 18px; fill: currentColor; }
.chat-send:hover { opacity: 0.88; }
.chat-pane .ms-off { padding: 0 16px 10px; font-size: 12px; }

.task-groups { padding: 0 14px 24px; }
.group { margin-bottom: 12px; }
.group h3 { font-size: 11px; color: var(--muted); margin: 10px 0 4px; }
.task-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cal-pane { width: 300px; padding: 22px 18px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; }
.cal-head button { width: 28px; height: 28px; border-radius: 50%; background: #f2f0eb; color: #007aff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell, .cal-dow {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  position: relative;
  font-size: 13px;
  border: 0;
  background: transparent;
}
.cal-cell { cursor: pointer; }
.cal-cell.is-on { background: #e8f1ff; color: #007aff; }
.cal-dow { color: var(--muted); aspect-ratio: auto; height: 22px; font-size: 11px; }
.cal-cell.has-late::before,
.cal-cell.has-live::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}
.cal-cell.has-late::before { background: #ff3b30; }
.cal-cell.has-live::after { background: #007aff; }
.cal-cell.has-late.has-live::before { transform: translateX(calc(-50% - 4px)); }
.cal-cell.has-late.has-live::after { transform: translateX(calc(-50% + 4px)); }
.cal-cell.is-today { background: #007aff; color: #fff; }
.cal-cell.is-today.is-on { box-shadow: 0 0 0 2px #c5dbff; }
.cal-cell.is-today.has-live::after { background: #fff; }
.cal-cell.is-today.has-late::before { background: #ffd4d1; }

.samples { display: flex; flex-direction: column; min-height: 0; }
#samplesRegistry {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.samples-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}
.samples-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.samples-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sample-avas {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.sample-avas .ava { margin-left: -6px; box-shadow: 0 0 0 2px #fff; }
.sample-avas .ava:first-child { margin-left: 0; }
.samples-filters select {
  min-width: 160px;
  padding: 7px 10px;
  background: #fff;
}
.samples-sheet {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.sample-none { padding: 24px 16px; }
.sample-grid .col-num,
.sample-grid .col-st,
.sample-grid .col-own,
.sample-grid .col-who,
.sample-grid .col-deliv,
.sample-grid .col-date,
.sample-grid .col-got {
  width: 1%;
  white-space: nowrap;
}
.sample-grid .col-num {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sample-grid tbody td.col-num { display: table-cell; }
.sample-grid .col-num .badge { margin-left: 6px; vertical-align: middle; }
.sample-grid .col-who { text-align: center; }
.sample-grid tr.is-unread { background: #fff7f7; }
.sample-grid .col-name .badge { margin-right: 6px; vertical-align: middle; }
.sample-grid .col-agent { min-width: 160px; }
.sample-grid .sample-row { cursor: pointer; }
.sample-num { color: var(--blue); font-weight: 600; text-decoration: none; }
.sample-num:hover { text-decoration: underline; }
.sample-st {
  --st: #8e8e93;
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--st) 22%, #fff);
  color: color-mix(in srgb, var(--st) 72%, #1d1d1f);
  font-size: 12px;
  line-height: 1.3;
}
.sample-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sample-card.is-loading .sample-split,
.sample-card.is-loading .sample-lines { display: none; }
.sample-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  flex: 0 0 auto;
}
.sample-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 92px;
}
.sample-tasks-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.sample-wait {
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 220px;
}
.sample-spin {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: delivery-spin 0.7s linear infinite;
}
.sample-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sample-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sample-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.sample-title h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.sample-title a { color: var(--blue); text-decoration: none; }
.sample-title a:hover { text-decoration: underline; }
.sample-err {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffeceb;
}
.sample-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13px;
}
.sample-facts #sampleState {
  min-width: 160px;
  max-width: 260px;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.sample-facts #sampleState::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.sample-state-pop {
  position: fixed;
  z-index: 40;
  min-width: 200px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}
.sample-state-opt {
  --st: #8e8e93;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: color-mix(in srgb, var(--st) 18%, #fff);
  color: color-mix(in srgb, var(--st) 72%, #1d1d1f);
  padding: 8px 10px;
  border-radius: 10px;
  margin: 2px 0;
  font-size: 13px;
  cursor: pointer;
}
.sample-state-opt.is-on {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--st) 55%, #1d1d1f);
}
.sample-facts #sampleTracking {
  width: 132px;
  padding: 6px 8px;
}
.sample-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.sample-tasks {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px 6px;
  overflow: auto;
}
.sample-tasks h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.sample-tasks .remind-add { padding: 0 0 4px; }
.sample-lines { flex: 1; min-height: 0; overflow: auto; }
.sample-grid .col-lst { width: 1%; white-space: nowrap; }
.sample-grid .col-lst select { min-width: 140px; border: 0; font-weight: 600; }
.sample-grid .js-line-st.is-new,
.sample-grid .js-line-st.is-new:focus {
  background: var(--amber-dim);
  color: var(--amber);
}
.sample-grid .js-line-st.is-doing,
.sample-grid .js-line-st.is-doing:focus {
  background: var(--blue-dim);
  color: var(--blue);
}
.sample-grid .js-line-st.is-done,
.sample-grid .js-line-st.is-done:focus {
  background: var(--green-dim);
  color: var(--green);
}
.sample-lines tr.is-line-new td { background: #fffbeb; }
.sample-lines tr.is-line-doing td { background: #f4f8ff; }
.sample-lines tr.is-line-done td { background: #f3faf4; }
.sample-lines tr.is-unread td { background: #fff7f7; }
.sample-grid .col-qty,
.sample-grid .col-av { width: 1%; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.sample-grid .qty-was {
  color: #8e8e93;
  text-decoration: line-through;
}
.sample-grid .qty-now { color: var(--rose); font-weight: 700; }
.sample-grid .col-sup { min-width: 120px; }
.sample-acts .act-take { margin-left: 8px; }

.prices { display: flex; flex-direction: column; min-height: 0; }
.price-sheet {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}
.price-grid {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.price-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 6px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.price-grid thead th.is-on { color: var(--ink); }
.price-grid thead th.is-on::after { content: " ↑"; font-weight: 700; }
.price-grid thead th.is-on.is-desc::after { content: " ↓"; }
.price-grid .col-item-h { cursor: default; width: 100%; min-width: 0; }
.price-grid .price-sort {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: center;
  color: inherit;
  cursor: pointer;
}
.price-grid .price-sort.is-on { color: var(--ink); }
.price-grid .price-sort.is-on::after { content: " ↑"; font-weight: 700; }
.price-grid .price-sort.is-on.is-desc::after { content: " ↓"; }
.price-grid thead th.price-acts-h { cursor: default; width: 1%; white-space: nowrap; }
.price-grid td {
  padding: 2px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.price-grid tbody tr:hover { background: #fff; }
.price-grid tr.is-off { background: #f2f2f7; }
.price-grid tr.is-archive { opacity: 0.62; }
.price-grid tr.is-dirty,
.price-grid tr.is-dirty:hover { background: #fff7e6; }
.price-grid input,
.price-grid select {
  width: 100%;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 6px;
  min-height: 24px;
  height: 24px;
  font-size: 12px;
  background: var(--soft);
  border: 1px solid transparent;
}
.price-grid input:focus,
.price-grid select:focus {
  background: #fff;
  border-color: rgba(0, 122, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}
.price-grid input:disabled,
.price-grid select:disabled { color: var(--muted); opacity: 0.65; }
.price-grid input::placeholder,
.price-grid textarea::placeholder {
  color: #c4c4c8;
  opacity: 1;
}
.price-grid input:placeholder-shown,
.price-grid textarea:placeholder-shown,
.price-grid .is-empty {
  color: #c4c4c8;
}
.price-grid .col-item { width: 100%; min-width: 0; }
.price-grid .col-item textarea {
  display: block;
  width: 100%;
  resize: none;
  height: 17px;
  min-height: 17px;
  max-height: 34px;
  padding: 1px 4px;
  border-radius: 6px;
  line-height: 1.25;
  font-size: 12px;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: pre-wrap;
  background: transparent;
  border: 1px solid transparent;
}
.price-grid .col-item textarea:focus {
  background: #fff;
  border-color: rgba(0, 122, 255, 0.35);
}
.price-grid .js-price-name { font-weight: 600; letter-spacing: -0.02em; }
.price-grid .js-price-desc { color: var(--muted); font-weight: 400; }
.price-grid .js-price-desc:placeholder-shown { color: #c4c4c8; }
.price-grid .col-country,
.price-grid .col-pack,
.price-grid .col-sup,
.price-grid .col-price,
.price-grid .col-flag,
.price-grid .col-cur,
.price-grid .col-date,
.price-grid .price-acts {
  width: 1%;
  white-space: nowrap;
}
.price-grid .col-country input,
.price-grid .col-pack input,
.price-grid .col-price input,
.price-grid .col-cur select {
  width: auto;
  max-width: none;
  field-sizing: content;
}
.price-grid .col-sup {
  color: var(--muted);
  font-size: 12px;
}
.price-grid .col-flag { text-align: center; }
.price-grid .col-date {
  color: #3a3a3c;
  font-variant-numeric: tabular-nums;
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--bg);
}
.price-grid .col-date.is-stale,
.price-grid .col-date.is-empty {
  color: #c4c4c8;
}
.price-grid thead th.col-date { z-index: 4; }
.price-grid tbody tr:hover td.col-date { background: #fff; }
.price-grid tr.is-off td.col-date { background: #f2f2f7; }
.price-grid tr.is-dirty td.col-date,
.price-grid tr.is-dirty:hover td.col-date { background: #fff7e6; }
.price-grid .price-num { text-align: right; font-variant-numeric: tabular-nums; }
.price-grid .price-acts-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  white-space: nowrap;
}
.price-grid .price-acts .pick-fresh {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
}
.price-grid .price-acts input[type="checkbox"] {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 0;
  padding: 0;
}
.price-grid .icon-btn { width: 24px; height: 24px; min-width: 24px; color: var(--muted); }
.price-grid .icon-btn svg { width: 13px; height: 13px; fill: currentColor; }
.price-grid .js-price-files.is-on,
.price-grid .js-row-ms { color: #007aff; }
.price-grid .icon-btn.is-off { opacity: 0.35; pointer-events: none; }
.price-grid .price-row.is-drop {
  outline: 2px solid rgba(0, 122, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}
.price-touch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}
.price-touch svg { width: 16px; height: 16px; fill: currentColor; }
.price-empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.table-wrap { padding: 0 16px; }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { font-size: 11px; color: var(--muted); font-weight: 600; }
.grid input:not([type="checkbox"]), .grid textarea { width: 100%; }
.grid tr.is-dirty { background: #fff7e6; }
.price-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel);
}
.bar-actions { display: flex; gap: 8px; }

.delivery { display: flex; flex-direction: column; min-height: 0; }
.delivery .list-tools { align-items: baseline; }
.delivery .list-tools strong { margin-right: 10px; }
.delivery-add {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(160px, 1fr) auto;
  gap: 8px;
  padding: 0 16px 12px;
}
.delivery-err { padding: 0 16px 8px; }
.delivery-chips { padding: 0 16px 10px; }
#deliveryChips .chip[data-id="to_a"].is-on { background: #efc94a; color: #5c4a12; }
#deliveryChips .chip[data-id="to_b"].is-on { background: #8fd08f; color: #1a5c28; }
#deliveryChips .chip[data-id="done"].is-on { background: #c0daf0; color: #355a7a; }
#deliveryChips .chip[data-id="cancelled"].is-on { background: #c9c4bb; color: #6d6860; }
.delivery-board {
  flex: 1;
  overflow: auto;
  padding: 4px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.delivery-empty { padding: 40px 8px; }
.delivery-strip {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 72px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.delivery-leg {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.delivery-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 14px;
}
.delivery-route {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.delivery-stop {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delivery-stop em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-right: 6px;
  opacity: 0.7;
}
.delivery-arrow { opacity: 0.45; flex: 0 0 auto; }
.delivery-meta { font-size: 12px; opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.delivery-strip.is-to_a { background: #f6de7a; color: #5c4a12; }
.delivery-strip.is-to_a .delivery-leg { background: #efc94a; }
.delivery-strip.is-to_b { background: #b8dfb8; color: #1a5c28; }
.delivery-strip.is-to_b .delivery-leg { background: #8fd08f; }
.delivery-strip.is-cancelled { background: #dedad3; color: #6d6860; }
.delivery-strip.is-cancelled .delivery-leg { background: #c9c4bb; }
.delivery-strip.is-done { background: #d5e7f6; color: #355a7a; }
.delivery-strip.is-done .delivery-leg { background: #c0daf0; }
.delivery-strip.is-error { background: #fdecee; color: #c23b4a; }
.delivery-strip.is-error .delivery-leg { background: #f8d4d8; }
.delivery-strip.is-refreshing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: delivery-sweep 1.1s infinite;
  pointer-events: none;
}
.delivery-strip .js-deliv-refresh.is-spin {
  animation: delivery-spin 0.7s linear infinite;
}
@keyframes delivery-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@keyframes delivery-spin {
  to { transform: rotate(360deg); }
}
.delivery-link {
  font-size: 12px;
  color: inherit;
  opacity: 0.75;
  text-decoration: none;
}
.delivery-strip .muted { color: inherit; opacity: 0.72; }
.delivery-strip .ghost { background: rgba(255, 255, 255, 0.42); }

.modal {
  position: fixed; inset: 0;
  background: rgba(20, 17, 13, 0.35);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 20;
}
.modal-card {
  width: min(560px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal-card.wide { width: min(720px, 100%); }
.modal-card.files-wide {
  width: min(1100px, 96vw);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.files-sheet { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.pic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pic-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.pic-head-acts { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.files-drop, .pic-drop {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.files-drop.is-drop, .pic-drop.is-drop {
  border-color: rgba(0, 122, 255, 0.5);
  background: #e8f1ff;
}
.pic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  align-content: start;
}
.pic-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}
.pic-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.pic-item.is-on { box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2); }
.pic-thumb {
  aspect-ratio: 4/3;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.pic-thumb.img-thumb { background-size: cover; background-position: center; }
.pic-thumb.doc-thumb svg { width: 72px; height: 72px; display: block; }
.pic-thumb.video-thumb { background: #1e1b4b; }
.pic-thumb.video-thumb video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25); color: #fff; z-index: 1;
}
.play-overlay svg { width: 40px; height: 40px; }
.pic-info { padding: 12px 14px; }
.pic-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pic-check {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.pic-check input { width: 14px; height: 14px; margin: 0; accent-color: #007aff; }
.pic-del {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,0.95);
  color: var(--muted);
  display: grid; place-items: center;
  opacity: 0;
}
.pic-item:hover .pic-del { opacity: 1; }
.files-drop-lab { margin: 0; text-align: center; color: var(--muted); font-size: 12px; }
.files-drop.is-busy { pointer-events: none; opacity: 0.65; }
.upload-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--soft);
}
.upload-hud {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 8px;
}
.upload-hud strong { font-size: 13px; }
.upload-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(0, 122, 255, 0.14);
  overflow: hidden;
}
.upload-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #007aff;
  transition: width 0.12s linear;
}
.upload-meta { margin: 0; font-size: 12px; color: var(--muted); }
.files-browse { color: #007aff; cursor: pointer; }
.modal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal.is-busy { cursor: progress; }
.save-progress {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  display: grid;
  gap: 10px;
}
.save-bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(0, 122, 255, 0.14);
  overflow: hidden;
  position: relative;
}
.save-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  border-radius: inherit;
  background: var(--blue);
  animation: save-slide 1s ease-in-out infinite;
}
.save-progress.is-err .save-bar { background: var(--rose-dim); }
.save-progress.is-err .save-bar::after { display: none; }
@keyframes save-slide {
  from { transform: translateX(-120%); }
  to { transform: translateX(340%); }
}
.save-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.save-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.save-steps li.is-on { color: var(--ink); font-weight: 600; }
.save-steps li.is-ok { color: var(--green); }
.save-steps li.is-err { color: var(--rose); font-weight: 600; }
.save-steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  flex-shrink: 0;
}
.save-steps li.is-on::before {
  width: 10px;
  height: 10px;
  opacity: 1;
  background: transparent;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  animation: delivery-spin 0.7s linear infinite;
}
.save-steps li.is-ok::before { opacity: 1; background: var(--green); }
.save-steps li.is-err::before { opacity: 1; background: var(--rose); }
.save-status { font-size: 13px; color: var(--ink); min-height: 1.2em; }
.save-progress.is-err .save-status { color: var(--rose); }
.chat {
  display: flex; flex-direction: column; gap: 6px;
  min-height: 0; overflow: auto;
  padding: 8px 0 16px;
  align-items: flex-start;
}
.chat-day {
  align-self: center;
  margin: 10px 0 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(251, 247, 239, 0.88);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bubble {
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 82%;
  padding: 4px 8px 3px;
  border-radius: 12px 12px 12px 4px;
  background: var(--soft);
  line-height: 1.25;
  font-size: 13.5px;
  box-shadow:
    0 1px 2px rgba(28, 24, 18, 0.1),
    0 7px 18px rgba(28, 24, 18, 0.14);
}
.bubble.me {
  align-self: flex-end;
  margin-left: 0;
  background: #ddefd8;
  border-radius: 12px 12px 4px 12px;
}
.bubble .who {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1px;
  color: var(--blue);
}
.bubble.me .who { color: var(--green); }
.bubble .body {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.bubble .txt {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble .time {
  flex: 0 0 auto;
  margin: 0;
  min-width: 2.7em;
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.users { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.users .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.user-add {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 140px auto;
  gap: 8px;
  padding: 0;
}
@media (max-width: 900px) {
  .user-add { grid-template-columns: 1fr; }
}
.user-add .primary { white-space: nowrap; }
.settings { overflow: auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.settings-head { display: flex; flex-direction: column; gap: 4px; }
.settings-head strong { font-size: 18px; letter-spacing: -0.03em; }
.settings-card.is-wide { width: min(1120px, 100%); }
.settings-card {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-kicker {
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}
.settings-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 12px;
}
.settings-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.settings-dot.on { background: var(--green); }
.settings-status strong { display: block; }
.settings-status span { font-size: 13px; color: var(--muted); }
.settings-note { font-size: 12px; }
.settings-note code { font-size: 12px; }
.settings-users-wrap { padding: 0; overflow-x: auto; }
.settings-users {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.settings-users th,
.settings-users td {
  text-align: left;
  padding: 3px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.25;
}
.settings-users th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 6px;
}
.settings-users th:nth-child(1),
.settings-users td:nth-child(1) { width: 22%; }
.settings-users th:nth-child(2),
.settings-users td:nth-child(2) { width: 32%; }
.settings-users th:nth-child(3),
.settings-users td:nth-child(3) { width: 140px; }
.settings-users th:nth-child(4),
.settings-users td:nth-child(4) { width: 140px; }
.settings-users th:nth-child(5),
.settings-users td:nth-child(5) { width: 148px; }
.settings-users input,
.settings-users select {
  width: 100%;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
  background: var(--soft);
  border: 1px solid transparent;
}
.settings-users input:focus,
.settings-users select:focus {
  background: #fff;
  border-color: rgba(0, 122, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}
.settings-users .users-fio,
.settings-users .users-login,
.settings-users .users-role {
  display: block;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-users td.users-acts {
  white-space: nowrap;
}
.settings-users td.users-acts .ghost {
  padding: 4px 8px;
  height: 28px;
  border-radius: 6px;
  font-size: 12px;
}
.settings-users td.users-acts .js-user-del {
  min-width: 28px;
  padding: 4px 8px;
}
.settings .user-add {
  grid-template-columns: 1.2fr 1.6fr 140px auto;
  align-items: center;
}
.settings .user-add input,
.settings .user-add select {
  height: 32px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 6px;
}
.settings .user-add .primary {
  height: 32px;
  padding: 4px 12px;
  border-radius: 6px;
}
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#msSettingsMsg.err { color: var(--rose); }
#msSettingsMsg.ok { color: var(--green); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 40px; }
.hits { display: grid; gap: 6px; margin-top: 8px; }
.hit {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.hit strong { display: block; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

@media (max-width: 1440px) {
  :root {
    --list-w: clamp(196px, 18vw, 240px);
    --chat-w: clamp(210px, 22vw, 260px);
  }
  .top { height: 52px; padding: 0 14px; }
  .workspace { padding: 14px 16px 12px; gap: 10px; }
  .rail { width: 64px; padding: 12px 0; gap: 12px; }
  .mark { width: 36px; height: 36px; }
  .rail-btn { width: 38px; height: 38px; }
  .cal-pane { width: 260px; padding: 16px 12px; }
}

@media (max-width: 900px) {
  .list-pane, .list-pane.wide { width: 100%; flex: none; max-width: none; border-right: 0; }
  .split { flex-direction: column; }
  .cal-pane { width: 100%; }
  .workspace { padding: 16px; }
  .delivery-add { grid-template-columns: 1fr; }
  .delivery-strip { grid-template-columns: 1fr; min-height: 0; }
  .delivery-leg { min-height: 44px; }
  .delivery-actions { justify-content: flex-start; }
  .ticket-stage { flex-direction: column; }
  .chat-pane { width: 100%; min-width: 0; flex: 1; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .task-item { grid-template-columns: 1fr; }
  .ws-dock { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .ws-acts { flex-wrap: wrap; }
  .pick-rest { grid-template-columns: 1fr 1fr; }
  .files-item { grid-template-columns: 18px 1fr auto; }
  .files-kind { display: none; }
  .samples-tools { flex-direction: column; align-items: stretch; }
  .sample-facts #sampleState { min-width: 0; width: 100%; }
  .sample-split { grid-template-columns: 1fr; }
  .sample-tasks-wrap { min-height: 160px; }
  .sample-tasks { position: absolute; }
}

.page.gateway-page {
  overflow: hidden;
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.gateway-head {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
  flex-shrink: 0;
}
.gateway-head strong { font-size: 18px; letter-spacing: -0.03em; display: block; }
.gateway-head .muted { font-size: 12px; }
.gw-period {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.gw-period-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 500;
}
.gw-period-btn.is-on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.gw-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 12px;
}
.gw-pane {
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gw-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.gw-pane-head strong { font-size: 14px; letter-spacing: -0.02em; }
.gw-pane-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.gw-filter {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}
.gw-filter.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.gw-filter[data-filter="errors"].is-on {
  background: var(--rose);
  border-color: var(--rose);
}
.gw-log-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.gw-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.gw-log th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  white-space: nowrap;
}
.gw-log td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.gw-log tbody tr:hover { background: rgba(0, 122, 255, 0.04); }
.gw-log tbody tr.is-err { background: var(--rose-dim); }
.gw-log tbody tr.is-err:hover { background: #f8e0e4; }
.gw-log tbody tr.gw-group {
  cursor: pointer;
  background: var(--soft);
  font-size: 13px;
}
.gw-log tbody tr.gw-group:hover { background: #ebeaf0; }
.gw-log tbody tr.gw-group.has-err { background: var(--rose-dim); }
.gw-log tbody tr.gw-group.has-err:hover { background: #f8e0e4; }
.gw-log tbody tr.gw-group.is-open {
  border-bottom-color: transparent;
  box-shadow: inset 3px 0 0 var(--blue);
}
.gw-log tbody tr.is-nested {
  background: var(--panel);
}
.gw-log tbody tr.is-nested td:first-child { padding-left: 18px; }
.gw-log tbody tr.is-nested .gw-call { color: var(--muted); }
.gw-app-cell {
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gw-group .gw-app-cell strong { font-weight: 650; letter-spacing: -0.02em; }
.gw-caret {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
  flex-shrink: 0;
  transition: transform 0.12s ease;
}
.gw-group.is-open .gw-caret { transform: rotate(90deg); }
.gw-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.gw-group.has-err .gw-count {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}
.gw-group-sum { display: block; color: var(--ink); }
.gw-group-last {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42vw;
}
.gw-log .gw-time {
  white-space: nowrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.gw-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6em;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  background: var(--green-dim);
  color: var(--green);
}
.gw-status-pill.is-err {
  background: var(--rose-dim);
  color: var(--rose);
}
.gw-status-pill.is-warn {
  background: var(--amber-dim);
  color: var(--amber);
}
.gw-dir {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.gw-call {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  max-width: 42vw;
}
.gw-token-cell { color: var(--muted); white-space: nowrap; }
.gw-tok {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--soft);
  color: var(--muted);
}
.gw-tok.is-app { background: var(--green-dim); color: var(--green); }
.gw-tok.is-fallback { background: var(--amber-dim); color: var(--amber); }
.gw-ms {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.gw-detail {
  color: var(--muted);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-log tr.is-err .gw-detail { color: var(--rose); white-space: normal; }

.gw-pane-queue { background: var(--soft); }
.gw-q-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.gw-q-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.gw-q-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.gw-path-card.is-good { border-color: rgba(36, 138, 61, 0.28); }
.gw-path-card.is-warn { border-color: rgba(184, 110, 0, 0.28); }
.gw-path-card.is-bad { border-color: rgba(194, 59, 74, 0.28); }
.gw-path-verdict {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.3;
}
.gw-path-verdict.is-good { color: var(--green); }
.gw-path-verdict.is-warn { color: var(--amber); }
.gw-path-verdict.is-bad { color: var(--rose); }
.gw-path-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gw-path-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.gw-path-row-top strong {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.gw-path-track {
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}
.gw-path-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--held);
  min-width: 0;
  transition: width 0.25s ease;
}
.gw-path-row.is-app .gw-path-track i { background: var(--green); }
.gw-path-row.is-fallback .gw-path-track i { background: var(--amber); }
.gw-path-row.is-client .gw-path-track i { background: var(--blue); }
.gw-path-pct {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.gw-path-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.gw-path-nums strong { color: var(--ink); }
.gw-q-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gw-q-nums div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--soft);
}
.gw-q-nums strong {
  font-size: 26px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.gw-q-nums span { font-size: 12px; color: var(--muted); }
.gw-q-card.is-busy .gw-q-nums strong { color: var(--amber); }
.gw-q-note { font-size: 12px; margin-top: 8px; }
.gw-now {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.gw-now-empty { margin: 0; font-size: 12px; }
.gw-now-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 2px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 12px;
}
.gw-now-row.is-run {
  border-color: rgba(0, 122, 255, 0.28);
  background: var(--blue-dim);
}
.gw-now-row.is-wait {
  border-color: rgba(184, 110, 0, 0.22);
  background: var(--amber-dim);
}
.gw-now-stage {
  grid-row: span 2;
  align-self: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.gw-now-row.is-run .gw-now-stage { color: var(--blue); }
.gw-now-row.is-wait .gw-now-stage { color: var(--amber); }
.gw-now-row strong {
  font-size: 13px;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-now-label {
  color: var(--muted);
  line-height: 1.3;
  word-break: break-word;
}
.gw-action {
  display: block;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-word;
}
.gw-q-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
}
.gw-q-list li {
  font-size: 11.5px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.gw-q-totals {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1.45;
}
.gw-q-totals strong { color: var(--ink); font-weight: 600; }
.gw-q-totals .is-err { color: var(--rose); }

@media (max-width: 1100px) {
  .gw-split { grid-template-columns: 1fr; }
  .gw-pane-queue { max-height: 340px; }
  .gateway-head { flex-direction: column; align-items: stretch; }
}

/* --- warehouse organizer --- */
.page.warehouse {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
.page.warehouse .wh-toolbar {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg, #f2f1ee);
  padding: 0 0 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.page.warehouse .list-tools,
.page.warehouse .wh-filters,
.page.warehouse #whOfferErr {
  flex: 0 0 auto;
}
.page.warehouse .list-tools {
  padding: 8px 16px 0;
}
.page.warehouse .wh-filters {
  padding: 0 16px 8px;
  margin: 0;
}
.page.warehouse .wh-board {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 16px 24px;
  gap: 12px;
}
html.wh-html,
.wh-body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.wh-body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg, #f2f1ee);
  touch-action: manipulation;
  position: relative;
}
.wh-shell {
  max-width: min(1480px, 100%);
  width: 100%;
  margin: 0 auto;
  padding: 0 12px;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.wh-shell .wh-toolbar {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg, #f2f1ee);
  padding: 8px 0 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.wh-shell .wh-board {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 0 40px;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}
.wh-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 8px;
}
.wh-top strong { font-size: 1.25rem; }
.wh-filters-tail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 0;
}
.wh-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}
.wh-lab-short { display: none; }
.wh-cnt { font-variant-numeric: tabular-nums; }
.wh-hit {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: #f5c518;
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
}
.wh-hit[hidden] { display: none !important; }
body.wh-searching .wh-cnt,
.wh-searching .wh-cnt,
.wh-filters.is-searching .wh-cnt {
  display: none;
}
.wh-search {
  display: block;
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}
.page.warehouse .wh-search {
  margin: 0;
  flex: 1 1 220px;
}
.wh-search input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel, #fff);
  font: inherit;
  font-size: 16px; /* iOS не зумит поле при фокусе */
}
.wh-search:has(.wh-search-clear:not([hidden])) input {
  padding-right: 78px;
}
.wh-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, #009fe3 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, #009fe3 16%, transparent);
}
.wh-search input[type="search"]::-webkit-search-decoration,
.wh-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.wh-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.wh-search-clear:hover,
.wh-search-clear:focus-visible {
  color: var(--ink);
  outline: none;
}
.wh-informer {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, #009fe3 12%, #fff);
  border: 1px solid color-mix(in srgb, #009fe3 28%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.page.warehouse .wh-informer,
.wh-shell .wh-informer {
  margin: 0;
  flex: 0 0 auto;
}
.wh-informer strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wh-informer-sep {
  font-weight: 500;
  opacity: 0.85;
}
.wh-filters [data-wh-cnt] {
  font-variant-numeric: tabular-nums;
}
.wh-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 10px;
}
.wh-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 8px;
  padding: 0 4px;
}
.wh-err { padding: 0 4px 8px; }
.wh-board { display: flex; flex-direction: column; gap: 12px; }
.wh-day { display: flex; flex-direction: column; gap: 10px; }
.wh-day-bar {
  margin: 4px 0 0;
  padding: 5px 2px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.wh-day-bar[hidden] { display: none !important; }
.wh-day-title {
  display: none;
}
.wh-card {
  background: var(--panel, #fff);
  border: 2px solid #111;
  box-shadow: 0 1px 0 #111;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.55fr) minmax(0, 1.25fr);
  gap: 10px 14px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.wh-card > * {
  min-width: 0;
  max-width: 100%;
}
.wh-card-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.wh-card-mid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  justify-content: flex-start;
  padding: 0 2px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding-left: 12px;
  padding-right: 12px;
}
.wh-card-mid .wh-comment {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.wh-card-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.wh-comment-empty {
  margin: 0;
  font-size: 12.5px;
}
.wh-card-cap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "flags meta"
    "agent agent";
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.wh-card-topline {
  --st: #8e8e93;
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 9px 5px 7px;
  border-radius: 8px;
  background: var(--st);
  color: #fff;
}
.wh-card-topline .wh-ring {
  background: transparent;
  box-shadow: none;
}
.wh-card-topline .wh-ring-slice {
  fill: rgba(255, 255, 255, 0.22);
}
.wh-card-topline .wh-ring-slice.is-on {
  fill: #fff;
}
.wh-card-topline .wh-num {
  color: #fff;
  font-size: 1rem;
}
.wh-card-topline .wh-num:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wh-card-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wh-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.wh-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: block;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.wh-ring-slice {
  fill: color-mix(in srgb, var(--line) 70%, #fff);
}
.wh-ring-slice.is-on {
  fill: #1f6b3a;
}
.wh-upd-asked {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 2px;
  color: #1f6b3a;
  font-size: 13px;
  font-weight: 650;
}
.wh-agent {
  font-size: 13px;
  display: block;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}
.wh-card-meta-row {
  grid-area: meta;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  width: auto;
  min-width: 0;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--muted);
}
.wh-ship-method,
.wh-owner {
  min-width: 0;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-card-meta-row .wh-ship-method,
.wh-card-meta-row .wh-owner {
  flex: 0 1 auto;
  max-width: 48%;
}
.wh-card-flags {
  grid-area: flags;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  align-self: center;
}
.wh-card-sub {
  grid-area: agent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.wh-card-sub .wh-agent {
  display: block;
  max-width: 100%;
}
.wh-assembled {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.wh-side-comments {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wh-side-comments .wh-comment {
  max-height: none;
  overflow: visible;
}
.wh-card-head strong { font-size: 1.05rem; line-height: 1.25; }
.wh-num {
  color: var(--blue, #009fe3);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  display: inline;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wh-num:hover { text-decoration: underline; }
.wh-card-head .muted { font-size: 12.5px; }
.wh-card-state {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  letter-spacing: 0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wh-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: 12px;
  color: var(--muted);
}
.wh-flag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--line) 90%, #111);
  color: #8e8e93;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.wh-flag.is-stickers,
.wh-flag.is-upd {
  background: color-mix(in srgb, #1f6b3a 12%, #fff);
  border-color: color-mix(in srgb, #1f6b3a 38%, transparent);
  color: #1f6b3a;
}
.wh-flag.is-off,
.wh-flag.is-miss {
  background: transparent;
  border-color: color-mix(in srgb, var(--line) 85%, #111);
  color: #a1a1a6;
  font-weight: 550;
}
.wh-comment {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow: visible;
}
.wh-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wh-line {
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--soft);
}
.wh-line.is-green { background: #e5f5ea; }
.wh-line.is-done {
  opacity: 0.38;
  background: color-mix(in srgb, var(--soft, #f5f5f7) 70%, #fff);
  color: color-mix(in srgb, var(--ink, #1d1d1f) 55%, #fff);
}
.wh-line.is-done.is-green {
  background: color-mix(in srgb, #e5f5ea 45%, #fff);
}
.wh-line.is-muted { opacity: 0.72; }
.wh-line.is-tap { cursor: pointer; }
.wh-line.is-tap:active { transform: scale(0.99); }
.wh-line-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.wh-line-name {
  min-width: 0;
  white-space: normal;
  overflow: visible;
}
.wh-line-qty { font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.wh-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.wh-reserve { color: #1f6b3a; font-weight: 600; }
.wh-done-mark { color: var(--muted); }
.wh-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff7e8;
  border: 1px solid color-mix(in srgb, #c9841a 28%, transparent);
  color: #7a4a0a;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.3;
}
.wh-samples-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wh-samples-head span { min-width: 0; }
.wh-samples-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
  border-top: 1px solid color-mix(in srgb, #c9841a 18%, transparent);
}
.wh-samples-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  font-weight: 500;
  font-size: 12px;
  color: #6a4010;
}
.wh-samples-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-samples-qty {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}
.wh-samples-link {
  flex: 0 0 auto;
  text-decoration: none;
  padding: 4px 10px !important;
  font-size: 12px !important;
  white-space: nowrap;
}
.wh-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding-top: 2px;
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
}
.wh-actions .primary,
.wh-actions .ghost,
.wh-zip {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12.5px;
  flex: 0 1 auto;
  white-space: nowrap;
}
.wh-files-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
}
.wh-files-ico { font-size: 1em; line-height: 1; }
.wh-upd-btn,
.wh-upd-asked {
  flex: 0 1 auto;
  min-width: 0;
}
.wh-ship-btn {
  flex: 0 1 auto;
  margin-left: 0;
}
.wh-line.is-asking,
.wh-actions .is-asking {
  outline: 2px solid color-mix(in srgb, #c9841a 55%, transparent);
  outline-offset: 1px;
}
.wh-ask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(18, 16, 14, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}
.wh-ask[hidden] { display: none !important; }
.wh-ask.is-near {
  display: block;
  padding: 0;
  background: rgba(18, 16, 14, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.wh-ask-card {
  width: min(400px, 100%);
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wh-ask.is-near .wh-ask-card {
  position: fixed;
  width: min(300px, calc(100vw - 24px));
  padding: 14px 14px 12px;
  border-radius: 14px;
  gap: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}
.wh-ask-q {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
}
.wh-ask.is-near .wh-ask-q {
  font-size: 14.5px;
  text-align: left;
}
.wh-ask-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wh-ask.is-near .wh-ask-acts {
  flex-direction: row;
  gap: 8px;
}
.wh-ask-acts .primary,
.wh-ask-acts .ghost {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
}
.wh-ask.is-near .wh-ask-acts .primary,
.wh-ask.is-near .wh-ask-acts .ghost {
  width: auto;
  flex: 1 1 0;
  min-height: 40px;
  font-size: 14px;
  padding: 8px 12px;
}
.wh-empty { padding: 32px 8px; text-align: center; }
.wh-modal-card {
  max-width: 460px;
  width: min(94vw, 460px);
  max-height: min(86vh, 640px);
  overflow: auto;
}
.wh-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  background: var(--panel, #fff);
  z-index: 1;
  padding-bottom: 4px;
}
.wh-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.wh-modal-actions .primary,
.wh-modal-actions .ghost {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  flex: 1 1 auto;
  justify-content: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.wh-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wh-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.wh-file-row:active,
.wh-file-row:hover {
  border-color: color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--soft) 70%, #fff);
}
.wh-file-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: #6b7280;
}
.wh-file-ico.is-pdf { background: #c23b4a; }
.wh-file-ico.is-image { background: #2f7d4a; }
.wh-file-ico.is-word { background: #2b579a; }
.wh-file-ico.is-sheet { background: #217346; }
.wh-file-ico.is-archive { background: #8b5a2b; }
.wh-file-ico.is-label { background: #7c3aed; }
.wh-file-ico.is-text { background: #475569; }
.wh-file-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wh-file-name {
  font-size: 14.5px;
  font-weight: 560;
  line-height: 1.3;
  word-break: break-word;
}
.wh-file-meta {
  font-size: 12px;
  color: var(--muted);
}
.wh-zip { display: inline-flex; align-items: center; text-decoration: none; }
.wh-zip-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.wh-pct {
  --p: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue, #009fe3) calc(var(--p) * 1%), color-mix(in srgb, var(--line) 70%, #fff) 0);
  position: relative;
  flex: 0 0 auto;
}
.wh-pct::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--panel, #fff);
}
.wh-pct span {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wh-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

@media (max-width: 860px) {
  .wh-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .wh-card-head {
    flex-wrap: wrap;
    gap: 4px 6px;
    max-width: 100%;
    min-width: 0;
  }
  .wh-card-cap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "flags meta"
      "agent agent";
    gap: 6px 8px;
    align-items: center;
  }
  .wh-card-topline {
    grid-area: top;
    gap: 6px;
    padding: 4px 8px 4px 6px;
  }
  .wh-card-flags {
    grid-area: flags;
    flex-wrap: nowrap;
    align-self: center;
  }
  .wh-card-meta-row {
    grid-area: meta;
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
  }
  .wh-card-sub {
    grid-area: agent;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    width: 100%;
    overflow: visible;
  }
  .wh-card-sub .wh-agent {
    display: block;
    width: 100%;
    max-width: 100%;
    flex: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .wh-card-state,
  .wh-flag {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }
  .wh-card-mid {
    border: none;
    padding: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-top: 8px;
    padding-bottom: 8px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .wh-card-mid.has-comment {
    border: 2px solid #c0392b;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff5f5;
  }
  .wh-shell { padding: 0 12px; }
  .wh-shell .wh-board { padding-bottom: 48px; }
  .wh-toolbar,
  .wh-filters,
  .wh-board,
  .wh-card,
  .wh-card-side,
  .wh-card-main,
  .wh-day {
    max-width: 100%;
    min-width: 0;
  }
  .wh-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  .wh-filters-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    overflow: hidden;
  }
  .wh-filters-row .chips {
    display: contents;
  }
  .wh-filters-row .chip {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: center;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .wh-lab-full { display: none; }
  .wh-lab-short { display: inline; }
  .wh-cnt { display: none; }
  .wh-hit {
    min-width: 17px;
    height: 17px;
    font-size: 10px;
    margin-left: 5px;
  }
  .wh-informer-lab { display: none; }
  .wh-informer {
    margin-left: auto;
    min-height: 30px;
    padding: 6px 8px;
    font-size: 11px;
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
  }
  .wh-search {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
  }
  .wh-search input,
  .wh-body .gate-card input[type="password"],
  .wh-body .gate-card input[type="text"],
  .page.warehouse input[type="search"],
  .page.warehouse input[type="text"],
  .page.warehouse input[type="password"] {
    height: 44px;
    min-height: 44px;
    font-size: 16px !important; /* без автозума iOS при фокусе */
    border-radius: 10px;
    max-width: 100%;
    width: 100%;
    min-width: 0;
  }
  .wh-body .gate-card input[type="checkbox"],
  .wh-body input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    min-width: 0;
    margin: 0;
    flex: 0 0 auto;
  }
  .wh-card-mid .wh-comment,
  .wh-line-name,
  .wh-samples-name,
  .wh-agent {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }
  .wh-line-main {
    max-width: 100%;
    min-width: 0;
  }
  .wh-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    max-width: 100%;
    width: 100%;
  }
  .wh-files-btn {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    font-size: 20px;
  }
  .wh-files-lab { display: none; }
  .wh-files-ico { font-size: 20px; }
  .wh-upd-btn,
  .wh-upd-asked {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    width: auto;
    justify-content: center;
    font-size: 13px;
    padding: 10px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .wh-ship-btn,
  .wh-actions .wh-ship-btn {
    flex: 1 1 0;
    grid-column: auto;
    width: auto;
    min-width: 0;
    min-height: 48px;
    font-size: 14px;
    padding: 10px 8px;
    white-space: nowrap;
  }
  .wh-actions .primary,
  .wh-actions .ghost,
  .wh-ask-acts .primary,
  .wh-ask-acts .ghost {
    min-height: 48px;
    font-size: 14px;
    padding: 10px 8px;
  }
  .wh-ask-acts .primary,
  .wh-ask-acts .ghost {
    width: 100%;
    font-size: 17px;
    min-height: 52px;
    padding: 12px 16px;
  }
  .wh-ask-q { font-size: 18px; }
  .wh-ask-card { padding: 24px 18px 18px; }
  .wh-file-row { min-height: 60px; }
  .wh-file-name { font-size: 15px; }
}


