: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;
}

* { 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-row input { width: min(420px, 100%); }
.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);
}
.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: 320px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f5f5f7;
}
.list-pane.wide { width: min(780px, 66%); }
.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, 1fr) minmax(128px, 30%) 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-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: min(360px, 38%);
  min-width: 280px;
  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-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-com.has-text,
.price-grid .js-row-ms { color: #007aff; }
.price-grid .icon-btn.is-off { opacity: 0.35; pointer-events: none; }
.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-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: 900px) {
  .list-pane, .list-pane.wide { width: 100%; 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; }
}
