/* Учёт №1 — современная светлая панель */
:root {
  --brand: #0f766e;
  --brand-deep: #0d9488;
  --brand-dark: #134e4a;
  --brand-soft: #f0fdfa;
  --brand-hover: #0d9488;
  --header-bg: #ffffff;
  --header-ink: #0f172a;
  --side-bg: #ffffff;
  --side-ink: #334155;
  --side-muted: #94a3b8;
  --side-active: #f0fdfa;
  --taxi-side-tabs: #ffffff;
  --taxi-workspace: #eef2f6;
  --taxi-green: #0f766e;
  --taxi-green-soft: #0d9488;
  --taxi-ink: #0f172a;
  --taxi-muted: #64748b;
  --taxi-line: #e2e8f0;
  --taxi-line-soft: #f1f5f9;
  --taxi-select: #ecfdf5;
  --taxi-blue: #0f766e;
  --taxi-tab-line: #0d9488;
  --taxi-white: #ffffff;
  --taxi-th: #f8fafc;
  --taxi-yellow: #0f766e;
  --taxi-yellow-deep: #0d9488;
  --taxi-yellow-header: #ffffff;
  --taxi-yellow-hover: #f8fafc;
  --taxi-yellow-btn: #0f766e;
  --ok: #047857;
  --danger: #dc2626;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 236px;
  --side-w-collapsed: 60px;
  --radius: 10px;
  --radius-lg: 16px;
  --shell-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --control-h: 34px;
  --focus-ring: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.taxi-body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--taxi-ink);
  background: var(--taxi-workspace);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--taxi-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ——— Login ——— */
.auth-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, #ccfbf1 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e2e8f0 0%, transparent 50%),
    #f1f5f9;
}
.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 16px 24px;
  width: 100%;
  box-sizing: border-box;
}
.auth-footer {
  /* Same width as card — wider 560px/96vw overflowed the padded wrap and looked left-shifted */
  width: min(420px, 94vw);
  max-width: 100%;
  align-self: center;
  margin-inline: auto;
  box-sizing: border-box;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  border: 1px solid var(--taxi-line-soft);
  background: #fff;
}
.auth-footer .rb-ad {
  min-width: 0;
  max-width: 100%;
}
.auth-footer .rb-ad-bar {
  max-width: 100%;
}
.auth-footer .taxi-footer-note {
  flex-shrink: 0;
}
.auth-card {
  width: min(420px, 94vw);
  max-width: 100%;
  background: var(--taxi-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.1);
}
.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px 24px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(13, 148, 136, 0.28) 0%, transparent 55%),
    linear-gradient(145deg, #0f172a 0%, #134e4a 100%);
  color: #f8fafc;
}
.auth-brand img {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: block;
}
.auth-brand-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.auth-card .brand {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.auth-brand .muted {
  color: #99f6e4;
  font-size: 13px;
  line-height: 1.4;
}
.auth-card > form,
.auth-card > #quick-login,
.auth-card > .auth-tabs,
.auth-card > .error,
.auth-card > .rb-login-ad {
  margin: 22px 24px 24px;
}
.auth-card > .auth-tabs {
  margin-top: 16px;
  margin-bottom: 0;
}
.auth-card > .error {
  margin-top: 0;
}
.auth-card label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}
.auth-card form { display: grid; gap: 16px; }
.auth-card input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.auth-card input::placeholder {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  opacity: 1;
}
.auth-card input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-deep);
  box-shadow: var(--focus-ring);
}
.auth-card button.primary {
  width: 100%;
  margin-top: 2px;
  min-height: 46px !important;
  padding: 12px 18px !important;
  font-size: 15px;
  font-weight: 650;
  border-radius: 10px !important;
}
.auth-card #quick-other,
.auth-card #twofa-back {
  margin-top: 4px;
  width: 100%;
  min-height: 40px;
  background: transparent;
  border: 0;
  color: var(--taxi-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
}
.auth-card #quick-other:hover,
.auth-card #twofa-back:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
.app select, .app textarea, .app button:not(.msk-stellazh):not(.msk-rack):not(.msk-floor-slot):not(.msk-courier-pallet):not(.msk-reserve-pallet):not(.msk-sto-shelf):not(.cells-tile):not(.ui-canon-nav-item):not(.ui-canon-pill):not(.ui-canon-subtab):not(.ui-canon-btn):not(.ui-canon-side-btn):not(.ui-canon-ico-btn),
.taxi button:not(.msk-stellazh):not(.msk-rack):not(.msk-floor-slot):not(.msk-courier-pallet):not(.msk-reserve-pallet):not(.msk-sto-shelf):not(.cells-tile):not(.ui-canon-nav-item):not(.ui-canon-pill):not(.ui-canon-subtab):not(.ui-canon-btn):not(.ui-canon-side-btn):not(.ui-canon-ico-btn), .taxi select, .taxi textarea,
.app input:not([type='checkbox']):not([type='radio']):not([type='range']),
.taxi input:not([type='checkbox']):not([type='radio']):not([type='range']) {
  border: 1px solid #d8dee8;
  border-radius: 11px;
  padding: 8px 13px;
  background: #fff;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  min-height: var(--control-h);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.taxi input:not([type='checkbox']):not([type='radio']):not([type='range']):hover,
.taxi select:hover,
.taxi textarea:hover,
.app input:not([type='checkbox']):not([type='radio']):not([type='range']):hover,
.app select:hover,
.app textarea:hover {
  border-color: #c5cedb;
  background: #fafbfc;
}
.taxi input::placeholder,
.taxi textarea::placeholder,
.app input::placeholder,
.app textarea::placeholder {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  opacity: 1;
}
.app input:not([type='checkbox']):not([type='radio']):focus,
.app select:focus,
.app textarea:focus,
.taxi input:not([type='checkbox']):not([type='radio']):focus,
.taxi select:focus,
.taxi textarea:focus {
  outline: none;
  border-color: var(--brand-deep);
  background: #fff;
  box-shadow: var(--focus-ring), 0 1px 2px rgba(13, 148, 136, 0.08);
}
/* Checkbox/radio: без «поля ввода» и с кольцом по размеру галочки */
.app input[type='checkbox'],
.app input[type='radio'],
.taxi input[type='checkbox'],
.taxi input[type='radio'] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--brand, #0f766e);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-text-fill-color: unset;
}
.app input[type='radio'],
.taxi input[type='radio'] {
  border-radius: 50%;
}
.app input[type='checkbox']:focus,
.app input[type='checkbox']:focus-visible,
.app input[type='radio']:focus,
.app input[type='radio']:focus-visible,
.taxi input[type='checkbox']:focus,
.taxi input[type='checkbox']:focus-visible,
.taxi input[type='radio']:focus,
.taxi input[type='radio']:focus-visible {
  outline: none;
  border: none;
  background: transparent;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(13, 148, 136, 0.4);
}

/* Readonly: читаемый текст, не бледно-серый системный */
.taxi input:not([type='checkbox']):not([type='radio']):read-only,
.taxi textarea:read-only,
.app input:not([type='checkbox']):not([type='radio']):read-only,
.app textarea:read-only,
.taxi input:not([type='checkbox']):not([type='radio'])[readonly],
.taxi textarea[readonly],
.app input:not([type='checkbox']):not([type='radio'])[readonly],
.app textarea[readonly] {
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b;
  background: #f1f5f9 !important;
  border-color: #cbd5e1;
  opacity: 1;
  cursor: default;
}
.taxi input:not([type='checkbox']):not([type='radio']):disabled,
.taxi select:disabled,
.taxi textarea:disabled,
.app input:not([type='checkbox']):not([type='radio']):disabled,
.app select:disabled,
.app textarea:disabled {
  color: #334155 !important;
  -webkit-text-fill-color: #334155;
  background: #e2e8f0 !important;
  opacity: 1;
}
.app input[type='checkbox']:disabled,
.app input[type='radio']:disabled,
.taxi input[type='checkbox']:disabled,
.taxi input[type='radio']:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: transparent !important;
  box-shadow: none;
}
.auth-card button.primary,
.app button.primary,
.taxi button.primary,
.taxi a.primary,
button.primary,
a.primary {
  background: var(--brand) !important;
  border: 1px solid transparent !important;
  cursor: pointer;
  font-weight: 600;
  padding: 8px 16px !important;
  min-height: var(--control-h);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.25);
  letter-spacing: -0.01em;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.auth-card button.primary {
  width: 100%;
  margin-top: 2px;
  min-height: 46px !important;
  padding: 12px 18px !important;
  font-size: 15px;
  font-weight: 650;
  border-radius: 10px !important;
}
.auth-card button.primary:hover,
.app button.primary:hover,
.taxi button.primary:hover,
.taxi a.primary:hover,
button.primary:hover,
a.primary:hover {
  background: var(--brand-hover) !important;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.28);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
}
.app button:not(.primary):not(.linkish):not(.sec):not(.tab):not(.taxi-ico):not(.taxi-burger):not(.taxi-phone-toggle):not(.taxi-side-collapse):not(.taxi-side-scrim):not(.taxi-user):not(.rb-ad-toggle):not(.close-tab):not(.section-link):not(.suggest-item):not(.col-filter-item):not(.auth-tab):not(.chats-chip):not(.chats-btn-primary):not(.chats-send):not(.chats-icon-btn):not(.chats-item):not(.chats-dir-item):not(.chat-fab):not(.chat-pop-x):not(.chat-pop-item):not(.chat-pop-back):not(.chat-pop-ico):not(.toolbar-ico):not(.titlebar-ico):not(.titlebar-action),
.taxi .form-toolbar button:not(.primary):not(.toolbar-ico):not(.find-go):not(.form-pagetab),
.taxi .toolbar button:not(.primary):not(.find-go):not(.form-pagetab),
.taxi .form-body table button:not(.primary):not(.linkish):not(.table-tool-ico) {
  background: #fff;
  border: 1px solid var(--taxi-line);
  cursor: pointer;
  padding: 7px 13px;
  border-radius: var(--radius);
  color: var(--taxi-ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
  min-height: var(--control-h);
}
.app button:not(.primary):not(.linkish):not(.chats-chip):not(.chats-btn-primary):not(.chats-send):not(.chats-icon-btn):not(.chats-item):not(.chats-dir-item):not(.toolbar-ico):not(.find-go):hover,
.taxi .form-toolbar button:not(.primary):not(.toolbar-ico):not(.find-go):hover,
.taxi .toolbar button:not(.primary):not(.find-go):hover,
.taxi .form-body table button:not(.primary):not(.linkish):not(.table-tool-ico):hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.taxi .form-toolbar button:disabled,
.taxi .toolbar button:disabled,
.taxi .form-body table button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
/* «В архив» / «Вернуть» — читаемые row-actions, не голый текст в ячейке */
.taxi .form-body table button[data-archive] {
  color: #9a3412;
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
}
.taxi .form-body table button[data-archive]:hover {
  color: #7c2d12;
  border-color: #ea580c;
  background: #fff7ed;
}
.taxi .form-body table button[data-restore] {
  color: #166534;
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}
.taxi .form-body table button[data-restore]:hover {
  color: #14532d;
  border-color: #16a34a;
  background: #f0fdf4;
}
/* «Переименовать» / «Изменить» — secondary row-action (как toolbar) */
.taxi .form-body table td.col-actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.taxi .form-body table button[data-rename],
.taxi .form-body table button.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--taxi-ink);
  border: 1px solid #94a3b8;
  border-color: #94a3b8;
  background: linear-gradient(180deg, #fff 0%, #e8eef3 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  min-height: 26px;
}
.taxi .form-body table button[data-rename]:hover,
.taxi .form-body table button.row-action:hover {
  color: var(--taxi-ink);
  border-color: #64748b;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.error { color: var(--danger); margin: 0 18px 12px; font-size: 12px; }
.muted { color: var(--taxi-muted); font-size: 13px; margin: 0; }

.rb-login-ad {
  margin: 0 18px 16px !important;
  padding-top: 12px;
  border-top: 1px solid var(--taxi-line-soft);
  display: grid;
  gap: 6px;
}
.rb-login-ad p { margin: 0; font-size: 12px; color: #555; }
.rb-login-ad .rb-ad-contacts { margin-bottom: 0; }

.auth-tabs { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--taxi-line-soft); }
.auth-tab {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  padding: 8px !important;
  cursor: pointer;
  font-weight: 600;
  color: #555;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: auto !important;
}
.auth-tab.active {
  color: var(--brand-dark);
  box-shadow: inset 0 -3px 0 var(--brand) !important;
}
/* ——— Shell ——— */
.taxi { display: flex; flex-direction: column; height: 100vh; background: var(--taxi-workspace); }

.taxi-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 18px 0 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--taxi-line);
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  /* Выше scrim drawer (55), шапка не затемняется/не блюрится */
  z-index: 70;
}
.taxi-top-stripe {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.taxi-top.is-loading .taxi-top-stripe {
  opacity: 1;
  background: rgba(15, 118, 110, 0.12);
}
.taxi-top-stripe::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 28%;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, #2dd4bf 30%, #0f766e 70%, transparent 100%);
  transform: translateX(-120%);
  opacity: 0;
}
.taxi-top.is-loading .taxi-top-stripe::after {
  opacity: 1;
  animation: taxi-stripe-run 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes taxi-stripe-run {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}
@media (prefers-reduced-motion: reduce) {
  .taxi-top.is-loading .taxi-top-stripe::after {
    animation: none;
    width: 100%;
    opacity: 0.9;
    transform: none;
  }
}
.taxi-logo { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; border-radius: 50%; }
.taxi-burger {
  width: 34px; height: 32px;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 6px !important;
  min-height: auto !important;
  box-shadow: none !important;
  border-radius: 8px !important;
}
.taxi-burger:hover { background: #f1f5f9 !important; }
.taxi-burger span { display: block; height: 2px; background: #64748b; border-radius: 1px; }
.taxi-body.side-collapsed .taxi-burger {
  background: #f1f5f9 !important;
  box-shadow: none !important;
}
.taxi-phone-toggle {
  width: 34px;
  height: 32px;
  border: 0 !important;
  background: transparent !important;
  color: #64748b;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0 !important;
  min-height: auto !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  flex-shrink: 0;
}
.taxi-phone-toggle:hover { background: #f1f5f9 !important; color: var(--brand, #0f766e); }
html.ui-phone .taxi-phone-toggle {
  background: #ecfdf5 !important;
  color: var(--brand, #0f766e);
}
.taxi-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(420px, 46vw);
  white-space: nowrap;
  overflow: hidden;
}
.taxi-product {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--header-ink);
  flex-shrink: 0;
}
.taxi-org {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  color: var(--taxi-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.taxi-org-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 220px;
  padding-left: 10px;
  border-left: 1px solid var(--taxi-line-soft, #e2e8f0);
}
.taxi-org-select {
  display: block;
  width: auto;
  min-width: 7em;
  max-width: 200px;
  margin: 0;
  padding: 0 16px 0 0 !important;
  border: 0 !important;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right center !important;
  box-shadow: none !important;
  font-family: var(--font);
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--taxi-muted) !important;
  line-height: 1.2;
  min-height: auto !important;
  height: auto !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.taxi-org-select:hover,
.taxi-org-select:focus {
  color: var(--brand-dark) !important;
  outline: none !important;
}
.taxi-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid transparent;
  padding: 0 12px;
  width: min(360px, 36vw);
  height: 36px;
  border-radius: 999px;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.taxi-search:focus-within {
  /* без подсветки рамки — только курсор в поле */
  border-color: transparent;
  background: #f1f5f9;
  box-shadow: none;
}
.taxi-search input { color: var(--taxi-ink) !important; }
.taxi-search input::placeholder { color: #94a3b8; }
.taxi-search input {
  border: 0 !important;
  outline: none;
  width: 100%;
  padding: 0 !important;
  background: transparent;
  font-size: 13px;
  min-height: auto;
  box-shadow: none !important;
}
.taxi-search input:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.taxi-search-svg { flex-shrink: 0; }
.taxi-search-svg circle,
.taxi-search-svg path { stroke: #94a3b8 !important; }
.taxi-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.header-rates {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  font-size: 12px;
  color: var(--taxi-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.header-rates .header-rate b { color: var(--taxi-ink); font-weight: 600; }
.header-rates .header-rate-sep { color: #cbd5e1; margin: 0 2px; }
@media (max-width: 1100px) {
  .header-rates { display: none; }
}
.presence-wrap { position: relative; flex-shrink: 0; }
.notif-wrap { position: relative; flex-shrink: 0; }
.taxi button.taxi-notif {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 1px solid var(--taxi-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--taxi-ink) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.taxi button.taxi-notif:hover { background: #f8fafc !important; }
.taxi button.taxi-notif.has-unread {
  border-color: #fbbf24 !important;
  background: #fffbeb !important;
}
.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  z-index: 80;
  padding: 8px;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 10px;
  font-size: 12px;
  font-weight: 700;
}
.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.is-unread { background: #fffbeb; }
.notif-item-title { font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.notif-item-body { font-size: 12px; color: var(--taxi-muted); margin: 0; line-height: 1.35; }
.notif-empty { padding: 16px 8px; font-size: 12px; color: var(--taxi-muted); }
.taxi button.taxi-presence[hidden],
.presence-wrap[hidden] {
  display: none !important;
}
.notif-wrap[hidden] {
  display: none !important;
}
.taxi button.taxi-presence {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--taxi-line) !important;
  background: #fff !important;
  color: var(--taxi-ink) !important;
  font-size: 12px;
  font-weight: 500;
  padding: 0 10px !important;
  border-radius: 10px !important;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px !important;
  box-sizing: border-box;
  box-shadow: none !important;
  line-height: 1.2;
}
.taxi button.taxi-presence:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: var(--taxi-ink) !important;
}
.presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: none;
  flex-shrink: 0;
}
.presence-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(420px, 92vw);
  background: #fff;
  color: var(--taxi-ink);
  border: 1px solid var(--taxi-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  z-index: 80;
  padding: 10px 12px;
}
.presence-panel-head {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--taxi-ink);
}
.presence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}
.presence-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 6px 0;
  border-top: 1px solid var(--taxi-line-soft);
  font-size: 12px;
}
.presence-list li b { grid-column: 1; }
.presence-list li .muted { grid-column: 1 / -1; font-size: 11px; }
.presence-meta {
  color: #0f766e !important;
  word-break: break-word;
  font-family: var(--mono, 'Roboto Mono', ui-monospace, monospace);
  font-size: 11px !important;
}
.presence-ago { grid-column: 2; grid-row: 1; color: var(--taxi-muted); font-size: 11px; }
.presence-open-full {
  margin-top: 8px;
  width: 100%;
  border: 1px solid var(--taxi-line);
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
}
.presence-table-wrap { overflow-x: auto; }
.presence-table { min-width: 720px; }
.presence-table th:nth-child(5),
.presence-table td.mono { white-space: nowrap; }
.presence-actions { white-space: nowrap; text-align: right; }
.presence-kick { font-size: 12px; }
.entity-history {
  border: 1px solid var(--taxi-line-soft);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fafbfc;
}
.entity-history-table { margin: 0; }
.taxi-ico {
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
  padding: 3px 5px !important;
  display: inline-flex;
  align-items: center;
  color: #64748b;
  min-height: auto !important;
  box-shadow: none !important;
}
.taxi-logout { font-size: 12px !important; color: #64748b !important; font-weight: 500 !important; }
.taxi-logout:hover { color: var(--taxi-ink) !important; background: #f1f5f9 !important; border-radius: 8px !important; }
.taxi-user-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.taxi button.taxi-user {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  padding: 3px 5px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: auto !important;
  box-shadow: none !important;
  line-height: 1.2;
}
.taxi button.taxi-user::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  border: 0;
  flex-shrink: 0;
}
.taxi button.taxi-user:hover {
  color: var(--taxi-ink) !important;
  -webkit-text-fill-color: var(--taxi-ink) !important;
  background: #f1f5f9 !important;
  border: 0 !important;
}
.taxi-user-avatar {
  display: none;
}
.taxi-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.taxi-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.taxi-user-caret { color: var(--taxi-muted); font-size: 10px; }
.taxi-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 80;
}
.taxi-user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--taxi-ink);
}
.taxi-user-menu button:hover { background: var(--brand-soft); color: var(--brand); }

.profile-modal-card { width: min(440px, 94vw); }
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.profile-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-grid {
  display: grid;
  gap: 10px;
}
.profile-grid label {
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  color: var(--taxi-muted);
}
.profile-grid input {
  font: inherit;
  font-size: 14px;
  color: var(--taxi-ink);
  border: 1px solid var(--taxi-line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}
.profile-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--taxi-line-soft);
}
.profile-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--taxi-ink);
}
.profile-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--taxi-muted);
  line-height: 1.4;
}

/* Footer */
.taxi-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 4px 12px;
  border-top: 1px solid var(--taxi-line-soft);
  background: #fff;
  position: relative;
  z-index: 40;
}
.taxi-footer-note {
  font-size: 11px;
  color: var(--taxi-muted);
  white-space: nowrap;
}
.rb-ad { position: relative; flex-shrink: 0; }
.rb-ad-bar {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 24px;
  border: 1px solid var(--taxi-line);
  background: #fafafa;
  color: #444;
  max-width: min(480px, 70vw);
  overflow: hidden;
  border-radius: var(--radius);
}
.rb-ad-bar:hover { border-color: #999; background: #fff; }
.rb-ad-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 6px !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
  color: inherit;
  min-height: auto !important;
  box-shadow: none !important;
}
.rb-ad-logo { display: block; height: 16px; width: auto; }
.rb-ad-sep {
  width: 1px;
  height: 12px;
  background: #ccc;
  flex-shrink: 0;
}
.rb-ad-tag {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
.rb-ad-phone {
  font-size: 11px;
  font-weight: 700;
  color: #333 !important;
  text-decoration: none !important;
  white-space: nowrap;
  padding: 0 8px 0 2px;
  border-left: 1px solid #ddd;
  line-height: 22px;
}
.rb-ad-phone:hover { color: var(--taxi-blue) !important; text-decoration: underline !important; }
.rb-ad-chev { font-size: 10px; color: #888; margin-left: 2px; display: inline-block; }
.rb-ad.open .rb-ad-chev { transform: rotate(180deg); }

.rb-ad-panel {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  width: min(360px, 92vw);
  background: #fff;
  border: 1px solid var(--taxi-line);
  box-shadow: 0 -4px 18px rgba(0,0,0,.12);
  z-index: 80;
  padding: 12px;
}
.rb-ad-panel[hidden] { display: none !important; }
.rb-ad-panel-head {
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--taxi-line-soft);
  margin-bottom: 8px;
}
.rb-ad-panel-head p {
  margin: 0;
  font-size: 12px;
  color: #555;
  line-height: 1.35;
}
.rb-ad-list {
  margin: 0 0 10px;
  padding: 0 0 0 16px;
  font-size: 12px;
  color: #333;
  display: grid;
  gap: 3px;
}
.rb-ad-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}
.rb-ad-contacts a { color: var(--taxi-blue); }
.rb-ad-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-ad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 1px solid var(--taxi-line);
  font-size: 12px;
  font-weight: 700;
  color: #333 !important;
  text-decoration: none !important;
  background: #f5f5f5;
  border-radius: var(--radius);
}
.rb-ad-btn.primary {
  background: var(--brand);
  border-color: var(--brand-dark);
  color: #fff !important;
}
.rb-ad-btn.primary:hover { background: var(--brand-hover); }
.rb-ad-btn:hover { background: #fff; }

@media (max-width: 1100px) {
  .rb-ad-tag { display: none; }
}
@media (max-width: 860px) {
  .taxi-search { width: 120px; }
  .taxi-footer-note { display: none; }
  .rb-ad-bar { max-width: 100%; }
}

.taxi-body-row { display: flex; flex: 1; min-height: 0; }

/* Left nav */
.taxi-side {
  width: var(--side-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--taxi-line);
  min-height: 0;
  overflow: hidden;
  transition: width .18s ease;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
}
.taxi-side-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 12px;
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--taxi-line-soft);
}
.taxi-side-label {
  display: none !important;
}
.taxi-side-collapse {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: pointer;
  border-radius: 8px !important;
  padding: 0 !important;
  min-height: auto !important;
  box-shadow: none !important;
  flex-shrink: 0;
}
.taxi-side-collapse:hover {
  background: #f1f5f9 !important;
  color: #475569 !important;
}
.taxi-side-collapse svg {
  transition: transform .18s ease;
}
/* Collapsed: narrow icon rail — names via .sec-rail-tip (fixed; escapes overflow) */
.taxi-body.side-collapsed .taxi-side {
  width: var(--side-w-collapsed);
  border-right-color: var(--taxi-line);
  opacity: 1;
  pointer-events: auto;
}
.taxi-body.side-collapsed .taxi-side-foot {
  justify-content: center;
  padding: 8px 4px 10px;
}
.taxi-body.side-collapsed .taxi-side-collapse svg {
  transform: rotate(180deg);
}
.taxi-body.side-collapsed .taxi-sections .sec {
  justify-content: center;
  gap: 0;
  padding: 11px 0 !important;
  margin: 2px 6px !important;
  letter-spacing: 0;
}
.taxi-body.side-collapsed .taxi-sections .sec .sec-label {
  display: none !important;
}
.taxi-body.side-collapsed .taxi-sections .sec .sec-badge {
  display: none !important;
}
.taxi-body.side-collapsed .taxi-sections .sec .sec-badge[data-kind="amo-rules"],
.taxi-body.side-collapsed .taxi-sections .sec .sec-badge[data-kind="amo-users"] {
  display: block !important;
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0 !important;
  align-self: auto;
}
.taxi-body.side-collapsed .taxi-sections .sec.active {
  box-shadow: none !important;
  background: #ecfdf5 !important;
}
.taxi-sections {
  display: flex;
  flex-direction: column;
  padding: 12px 10px 8px;
  overflow: auto;
  flex: 1;
  gap: 2px;
}
.taxi-sections .sec {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  position: relative;
  border: 0 !important;
  background: transparent !important;
  padding: 9px 12px 9px 14px !important;
  margin: 0 !important;
  cursor: pointer;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 40px !important;
  position: relative;
  text-decoration: none !important;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.taxi-sections .sec:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  text-decoration: none !important;
}
.taxi-sections .sec.active {
  background: var(--side-active) !important;
  font-weight: 600;
  color: var(--brand-dark) !important;
  box-shadow: inset 3px 0 0 var(--brand) !important;
}
.sec-svg {
  display: block;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  overflow: visible;
  color: #94a3b8;
}
.sec-label {
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.taxi-sections .sec.active .sec-svg,
.taxi-sections .sec:hover .sec-svg { color: var(--brand); }

/* Section name tip (like presence panel: white card, quick show) */
.sec-rail-tip {
  position: fixed;
  z-index: 90;
  left: 0;
  top: 0;
  transform: translateY(-50%);
  pointer-events: none;
  background: #fff;
  color: var(--taxi-ink);
  border: 1px solid var(--taxi-line);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.08s ease;
}
.sec-rail-tip.is-visible {
  opacity: 1;
  visibility: visible;
}

.taxi-tabs[hidden] {
  display: none !important;
}
.taxi-tabs {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
  min-height: 34px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 10px 0;
  background: #eef2f7;
  border-bottom: 1px solid var(--taxi-line);
  scrollbar-width: thin;
}
.taxi-tabs .tab {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  width: auto;
  max-width: 200px;
  height: 28px;
  min-height: 28px !important;
  margin: 0;
  padding: 0 8px 0 12px !important;
  text-align: left;
  border: 1px solid transparent !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0 !important;
  background: transparent !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  box-shadow: none !important;
  position: relative;
}
.taxi-tabs .tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.taxi-tabs .tab:hover {
  background: rgba(255, 255, 255, 0.65) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
.taxi-tabs .tab.active {
  background: #fff !important;
  border-color: var(--taxi-line) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 600 !important;
  z-index: 1;
  box-shadow: 0 -1px 0 #fff !important;
}
.taxi-tabs .tab-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: -2px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}
.taxi-tabs .tab-close:hover {
  background: #fee2e2;
  color: #b91c1c;
  -webkit-text-fill-color: #b91c1c;
}
.taxi-tabs .tab-add {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  min-height: 28px !important;
  margin: 0 0 0 4px;
  padding: 0 !important;
  border: 1px dashed #cbd5e1 !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0 !important;
  background: transparent !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font-size: 0 !important;
  font-weight: 600 !important;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
}
.taxi-tabs .tab-add-ico {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.taxi-tabs .tab-add:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-style: solid !important;
  border-color: var(--taxi-line) !important;
}
.taxi-tabs .tab-add:hover .tab-add-ico {
  color: #0f172a;
}

.taxi-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(13, 148, 136, 0.05), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(148, 163, 184, 0.12), transparent 50%),
    var(--taxi-workspace);
  position: relative;
  padding: 12px 14px 16px;
}
.taxi-main > #view,
.taxi-main > .section-panel {
  background: transparent;
  min-height: calc(100% - 4px);
}
.taxi-main > #view > .form-chrome,
.taxi-main > .section-panel {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shell-shadow);
  overflow: hidden;
  min-height: calc(100% - 4px);
}

/* Section function panel (как список функций раздела) */
.section-panel {
  padding: 18px 24px 36px;
  min-height: 100%;
  background: #fff;
}
.section-panel.hidden { display: none !important; }
.section-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--taxi-line-soft);
}
.section-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--taxi-ink);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-panel-title .sec-badge {
  margin-left: 0;
}
/* Help / role screens */
.help-role-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
  max-width: 860px;
  margin: 8px 0 24px;
}
.help-role-cards--solo {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 130px);
  margin: 0;
  padding: 12px 8px 28px;
  gap: 18px;
  align-content: start;
  box-sizing: border-box;
}
.help-role-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 22px 20px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: var(--radius-lg, 14px);
  background:
    linear-gradient(165deg, rgba(204, 251, 241, 0.9) 0%, #fff 42%),
    #fff;
  text-decoration: none !important;
  color: var(--taxi-ink);
  box-shadow: var(--shell-shadow, 0 8px 24px rgba(15, 23, 42, 0.05));
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
  overflow: hidden;
}
button.help-role-card {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  min-height: 0 !important;
  box-shadow: var(--shell-shadow, 0 8px 24px rgba(15, 23, 42, 0.05)) !important;
  background:
    linear-gradient(165deg, rgba(204, 251, 241, 0.9) 0%, #fff 42%),
    #fff !important;
  border: 1px solid var(--taxi-line-soft) !important;
  color: var(--taxi-ink) !important;
  -webkit-text-fill-color: var(--taxi-ink) !important;
  padding: 22px 22px 20px !important;
  border-radius: var(--radius-lg, 14px) !important;
  white-space: normal !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}
.help-role-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand));
  opacity: 0.85;
}
.help-role-card:hover {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.12);
  text-decoration: none !important;
  transform: translateY(-2px);
}
.help-role-cards--solo .help-role-card {
  min-height: clamp(150px, 24vh, 240px);
  padding: 28px 30px;
  justify-content: flex-start;
  gap: 10px;
}
.help-role-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 15px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.22);
  border: 0 !important;
  flex: 0 0 auto;
}
.help-role-cards--solo .help-role-title {
  font-size: clamp(20px, 2.2vw, 26px);
}
.help-role-cards--solo .help-role-desc {
  font-size: 14.5px;
  max-width: 34em;
}
.help-role-cards--solo .help-role-go {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13.5px;
}
.help-role-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}
.help-role-desc {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--taxi-muted);
}
.help-role-go {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 640px) {
  .help-role-cards {
    grid-template-columns: 1fr;
  }
  .help-role-cards--solo {
    min-height: 0;
  }
  .help-role-cards--solo .help-role-card {
    min-height: 120px;
    padding: 20px;
  }
}

/* Помощь · витрина UI/UX */
.ui-kit-lead {
  margin: 0 0 18px;
  font-size: 13px;
  max-width: 720px;
}
.ui-kit-sec {
  margin: 0 0 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--taxi-line-soft);
}
.ui-kit-sec:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ui-kit-h {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}
.ui-kit-sub {
  margin: 0 0 12px;
  font-size: 12px;
}
.ui-kit-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}
.ui-kit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ui-kit-demo-h1 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--taxi-ink);
  line-height: 1.25;
}
.ui-kit-demo-h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--taxi-ink);
}
.ui-kit-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-width: 960px;
}
.ui-kit-swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 10px;
  background: #fff;
}
.ui-kit-swatch-chip {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--sw);
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
}
.ui-kit-swatch-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ui-kit-swatch-meta code {
  font-size: 11px;
  word-break: break-all;
}
.ui-kit-swatch-meta .muted {
  font-size: 11px;
}
.ui-kit-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
}
.ui-kit-check input {
  margin: 0;
}
.ui-kit-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--taxi-line);
}
.ui-kit-badge.is-ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.ui-kit-badge.is-warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.ui-kit-badge.is-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.ui-kit-tokens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-width: 720px;
}
.ui-kit-tokens > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
}
.ui-kit-tokens span {
  color: var(--taxi-muted);
}
.ui-kit-tokens b {
  font-weight: 650;
  color: var(--taxi-ink);
}

/* /help/ui · канон shell (корп. банкинг UX, бренд Учёт №1) */
.ui-canon-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 980px;
}
.ui-canon-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 680px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f6f8;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  font-size: 13px;
  color: #1e293b;
}
.ui-canon-side {
  background: #fff;
  border-right: 1px solid #e8edf2;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ui-canon-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.ui-canon-brand img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.ui-canon-brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ui-canon-brand-text small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ui-canon-nav {
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px 8px 12px;
}
.ui-canon-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #334155;
  border-radius: 10px;
  padding: 9px 10px;
  margin: 0 0 2px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ui-canon-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.72;
}
.ui-canon-nav-item:hover {
  background: #f8fafc;
}
.ui-canon-nav-item.is-active {
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 650;
  box-shadow: inset 3px 0 0 #0f766e;
}
.ui-canon-nav-item.is-active svg {
  opacity: 1;
}
.ui-canon-side-foot {
  padding: 10px 8px 12px;
  border-top: 1px solid #f1f5f9;
}
.ui-canon-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.ui-canon-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e8edf2;
}
.ui-canon-search {
  flex: 1 1 auto;
  max-width: 420px;
  position: relative;
}
.ui-canon-search input {
  width: 100%;
  min-height: 36px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f4f6f8 !important;
  padding: 0 12px 0 36px !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
.ui-canon-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.ui-canon-balance {
  text-align: right;
  white-space: nowrap;
}
.ui-canon-balance strong {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.ui-canon-balance span {
  font-size: 11px;
  color: #64748b;
}
.ui-canon-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid #e8edf2;
}
.ui-canon-user-name {
  font-size: 12px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-canon-ico-btn {
  width: 32px;
  height: 32px;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #64748b !important;
  padding: 0 !important;
  min-height: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}
.ui-canon-ico-btn:hover {
  background: #f1f5f9 !important;
  color: #0f766e !important;
}
.ui-canon-page {
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px 20px 24px;
}
.ui-canon-page-title {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.ui-canon-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.ui-canon-pill {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 8px 16px !important;
  min-height: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: #e8edf2 !important;
  color: #475569 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.ui-canon-pill.is-active {
  background: #fff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
.ui-canon-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  margin: 0 0 16px;
}
.ui-canon-subtab {
  border: 0 !important;
  background: transparent !important;
  padding: 0 0 10px !important;
  min-height: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px;
}
.ui-canon-subtab.is-active {
  color: #0f766e !important;
  font-weight: 700 !important;
  border-bottom-color: #0f766e !important;
}
.ui-canon-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin: 0 0 18px;
  align-items: stretch;
}
.ui-canon-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ui-canon-card-label {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 4px;
}
.ui-canon-card-sum {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 0 0 6px;
}
.ui-canon-card-meta {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px;
}
.ui-canon-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ui-canon-btn {
  border-radius: 10px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.ui-canon-btn.is-primary {
  background: #0f766e !important;
  border: 1px solid #0f766e !important;
  color: #fff !important;
}
.ui-canon-btn.is-secondary {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
.ui-canon-btn.is-ghost {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}
.ui-canon-side-btn {
  width: 88px;
  border: 1px solid #e8edf2 !important;
  border-radius: 14px !important;
  background: #fff !important;
  padding: 12px 8px !important;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  cursor: pointer;
}
.ui-canon-side-btn svg {
  width: 22px;
  height: 22px;
  color: #0f766e;
}
.ui-canon-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  padding: 12px 14px;
  background: #eef1f4;
  border-radius: 12px;
  margin: 0 0 12px;
}
.ui-canon-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.ui-canon-filters input,
.ui-canon-filters select {
  min-height: 34px !important;
  border-radius: 8px !important;
  border: 1px solid #dbe3ee !important;
  background: #fff !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  min-width: 120px;
  box-shadow: none !important;
}
.ui-canon-filters .ui-canon-check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  padding-bottom: 6px;
}
.ui-canon-table-wrap {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  overflow: hidden;
}
.ui-canon-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ui-canon-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  padding: 10px 12px;
  border-bottom: 1px solid #e8edf2;
}
.ui-canon-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ui-canon-table tr:last-child td {
  border-bottom: 0;
}
.ui-canon-table tr:hover td {
  background: #fafbfc;
}
.ui-canon-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono, ui-monospace, monospace);
}
.ui-canon-empty {
  padding: 48px 20px;
  text-align: center;
  color: #64748b;
}
.ui-canon-empty svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  opacity: 0.35;
}
.ui-canon-spec {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.ui-canon-spec-card {
  background: #fff;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 12px;
  padding: 14px 16px;
}
.ui-canon-spec-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.ui-canon-spec-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
}
.ui-canon-pane {
  display: none;
}
.ui-canon-pane.is-active {
  display: block;
}
@media (max-width: 960px) {
  .ui-canon-shell {
    grid-template-columns: 1fr;
  }
  .ui-canon-side {
    display: none;
  }
  .ui-canon-cards {
    grid-template-columns: 1fr;
  }
}

/* Помощь · жизненный цикл Amo → документы */
.lc-lead {
  margin: 0 0 14px;
  font-size: 13px;
  max-width: 920px;
  line-height: 1.45;
}
.lc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.lc-preset {
  border: 1px solid #dbe3ee !important;
  background: #fff !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  min-height: auto !important;
  box-shadow: none !important;
  cursor: pointer;
}
.lc-preset:hover {
  border-color: #99f6e4 !important;
  background: #f0fdfa !important;
  color: var(--brand-dark) !important;
  -webkit-text-fill-color: var(--brand-dark) !important;
}
.lc-preset.is-active {
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.lc-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.lc-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.lc-filter .form-pagetabs.radio-pills.lc-pills {
  margin: 0;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  position: static;
  overflow: visible;
  width: auto;
  max-width: none;
  gap: 4px;
}
.lc-filter .form-pagetabs.radio-pills.lc-pills .form-pagetab {
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
.lc-filter .form-pagetabs.radio-pills.lc-pills .form-pagetab:hover {
  background: #f1f5f9 !important;
}
.lc-filter .form-pagetabs.radio-pills.lc-pills .form-pagetab.active {
  background: #ccfbf1 !important;
  color: var(--brand-dark);
  box-shadow: none !important;
}
.lc-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}
.lc-scenario-matrix {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.lc-scenario-matrix-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 6px;
  font-size: 14px;
}
.lc-scenario-matrix-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.lc-sc-title {
  white-space: normal;
  min-width: 220px;
  max-width: 340px;
}
.lc-sc-title-main {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}
.lc-sc-title-id {
  font-size: 11px;
  margin-top: 2px;
}
.lc-sc-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
.lc-sc-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0d9488;
  cursor: pointer;
}
.lc-scenario-table tr.is-lc-scenario-done td {
  opacity: 0.72;
}
.lc-scenario-table tr.is-lc-scenario-done .lc-sc-title-main {
  text-decoration: line-through;
  color: #64748b;
}
.lc-return-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
}
.lc-return-note strong {
  display: block;
  margin: 0 0 6px;
  color: #92400e;
  font-size: 13px;
}
.lc-return-note ol {
  margin: 0;
  padding-left: 18px;
}
.lc-return-note li {
  margin: 0 0 4px;
}
.lc-scenario-matrix-scroll {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}
.lc-scenario-table th,
.lc-scenario-table td {
  white-space: nowrap;
}
.lc-scenario-table .lc-sc-cell {
  text-align: center;
  width: 2.4em;
}
.lc-scenario-table .lc-sc-checks,
.lc-scenario-table .lc-sc-wh {
  font-size: 11px;
  white-space: nowrap;
}
.lc-scenario-table .lc-sc-wh {
  color: #0f766e;
  font-weight: 600;
}
.lc-sc-yes {
  color: #15803d;
  font-weight: 700;
}
.lc-sc-no {
  color: #cbd5e1;
}
.lc-sc-checks {
  text-align: center;
  font-weight: 600;
}
.lc-scenario-table tr.is-lc-scenario-hit td {
  background: #ecfdf5;
}
.lc-scenario-table tr.is-lc-scenario-hit td:first-child {
  box-shadow: inset 3px 0 0 #14b8a6;
}
.lc-scenario-table .lc-sc-num {
  width: 2.2em;
  min-width: 2.2em;
  text-align: center;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
}
.lc-path-hint {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  font-size: 13px;
  color: #134e4a;
}
.lc-flash {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #99f6e4;
  font-weight: 600;
  color: #134e4a;
}
.lc-mm-node .lc-mm-card {
  /* Карточка ловит клик (кисть / сценарий). text/ico — нет. */
  pointer-events: all;
}
.lc-mm-node .lc-mm-mark-bar,
.lc-mm-node text,
.lc-mm-node .lc-mm-ico {
  pointer-events: none;
}
.lc-mm-ico path {
  fill: none;
  stroke: #0f766e;
  stroke-width: 1.35;
  stroke-linejoin: round;
}
.lc-mm-ico.is-off path {
  stroke: #94a3b8;
}
.lc-mm-node.is-on .lc-mm-ico path {
  stroke: #ecfdf5;
}
.lc-mm-node.is-on .lc-mm-ico.is-off path {
  stroke: rgba(255, 255, 255, 0.75);
}
.lc-mm-node.is-click {
  pointer-events: all;
  cursor: pointer;
}
.lc-mm-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lc-mm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.lc-mm-zoombar,
.lc-mm-markbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lc-mm-zoombar > button {
  width: 32px;
  height: 30px;
  padding: 0 !important;
  min-height: auto !important;
  border-radius: 8px !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.lc-mm-zoombar > button.lc-mm-zoom-reset {
  width: auto;
  padding: 0 10px !important;
  font-size: 12px;
  font-weight: 600;
}
.lc-mm-zoom-val {
  min-width: 48px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}
.lc-mm-zoom-hint,
.lc-mm-mark-hint {
  margin-left: 4px;
  font-size: 11px;
}
.lc-mm-toolbar-sep {
  width: 1px;
  height: 18px;
  margin: 0 4px 0 6px;
  background: #cbd5e1;
  flex-shrink: 0;
}
.lc-mm-gap-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  user-select: none;
}
.lc-mm-markbar-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-right: 2px;
}
button.lc-mm-swatch {
  width: 22px;
  height: 22px;
  padding: 0 !important;
  min-height: auto !important;
  border-radius: 999px !important;
  border: 2px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: none !important;
  cursor: pointer;
  position: relative;
}
button.lc-mm-swatch.is-teal { background: #14b8a6 !important; }
button.lc-mm-swatch.is-amber { background: #f59e0b !important; }
button.lc-mm-swatch.is-rose { background: #f43f5e !important; }
button.lc-mm-swatch.is-violet { background: #8b5cf6 !important; }
button.lc-mm-swatch.is-sky { background: #0ea5e9 !important; }
button.lc-mm-swatch.is-lime { background: #84cc16 !important; }
button.lc-mm-swatch.is-off {
  background: #fff !important;
  color: #64748b !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
button.lc-mm-swatch.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0f766e !important;
}
button.lc-mm-marks-clear {
  height: 28px;
  padding: 0 10px !important;
  min-height: auto !important;
  font-size: 12px;
  border-radius: 8px !important;
}
.lc-mm-shell.is-marking .lc-mm-wrap {
  outline: 2px solid #99f6e4;
  outline-offset: 1px;
}
.lc-mm-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 10% 20%, #f0fdfa 0%, transparent 45%),
    linear-gradient(180deg, #f8fafc 0%, #fff 55%);
  max-height: none;
  height: auto;
  padding: 8px 4px 12px;
}
.lc-mm-svg {
  display: block;
}
.lc-mm-col {
  fill: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lc-mm-edge {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 1.2;
  opacity: 0.35;
}
.lc-mm-edge.is-on {
  stroke: #0f766e;
  stroke-width: 2.8;
  opacity: 1;
  marker-end: url(#lc-mm-arrow);
}
.lc-mm-edge.is-through {
  stroke-dasharray: none;
}
.lc-mm-edge.is-through-preview {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.4;
  opacity: 0.45;
  stroke-dasharray: 6 4;
  marker-end: url(#lc-mm-arrow);
}
.lc-mm-edge.is-through-preview.is-focus {
  stroke: #0369a1;
  stroke-width: 2.4;
  opacity: 1;
  stroke-dasharray: none;
  marker-end: url(#lc-mm-arrow-focus);
}
.lc-mm-shell:not(.is-focusing) .lc-mm-edge.is-through-preview {
  opacity: 0.28;
}
/* Вне режима «фокус связей» — слегка приглушить чужой путь (не «выбеливать») */
.lc-mm-shell:not(.is-focusing) .lc-mm-edge:not(.is-on) {
  opacity: 0.28;
}
.lc-mm-shell:not(.is-focusing) .lc-mm-node:not(.is-on) .lc-mm-card {
  opacity: 0.82;
}
.lc-mm-edge.is-focus {
  stroke: #0369a1;
  stroke-width: 2.8;
  opacity: 1;
  marker-end: url(#lc-mm-arrow-focus);
}
.lc-mm-shell.is-focusing .lc-mm-edge:not(.is-focus):not(.is-on) {
  opacity: 0.18;
}
.lc-mm-shell.is-focusing .lc-mm-edge.is-on:not(.is-focus) {
  opacity: 0.4;
  stroke-width: 1.6;
}
/* Лёгкий blur только у блоков схемы в canvas — не шапка формы / не toolbar */
.lc-mm-shell.is-focusing .lc-mm-wrap .lc-mm-node:not(.is-focus):not(.is-neighbor) {
  opacity: 0.55;
  filter: blur(0.7px);
}
.lc-mm-shell.is-focusing .lc-mm-wrap .lc-mm-node.is-focus,
.lc-mm-shell.is-focusing .lc-mm-wrap .lc-mm-node.is-neighbor {
  filter: none;
  opacity: 1;
}
.lc-mm-node.is-focus .lc-mm-card {
  stroke: #0369a1 !important;
  stroke-width: 2.4;
  filter: drop-shadow(0 3px 8px rgba(3, 105, 161, 0.35));
}
.lc-mm-node.is-neighbor:not(.is-on):not(.is-focus) .lc-mm-card {
  stroke: #38bdf8;
  stroke-width: 1.8;
  fill: #f0f9ff;
}
.lc-mm-node .lc-mm-card {
  fill: #fff;
  stroke: #dbe3ee;
  stroke-width: 1.4;
}
.lc-mm-node.is-hub .lc-mm-card {
  fill: #f0fdfa;
  stroke: #99f6e4;
}
.lc-mm-node.is-on .lc-mm-card {
  fill: #0f766e;
  stroke: #0f766e;
  filter: drop-shadow(0 4px 10px rgba(15, 118, 110, 0.28));
}
.lc-mm-node.is-on.is-hub .lc-mm-card {
  fill: #0d9488;
  stroke: #134e4a;
}
.lc-mm-mark-bar {
  fill: #14b8a6;
  /* Левый край повторяет скругление карточки (clip #lc-mm-card-clip) */
}
.lc-mm-node.is-mark-teal:not(.is-on) .lc-mm-card {
  fill: #ccfbf1;
  stroke: #14b8a6;
}
.lc-mm-node.is-mark-teal .lc-mm-mark-bar { fill: #0f766e; }
.lc-mm-node.is-mark-amber:not(.is-on) .lc-mm-card {
  fill: #fef3c7;
  stroke: #f59e0b;
}
.lc-mm-node.is-mark-amber .lc-mm-mark-bar { fill: #d97706; }
.lc-mm-node.is-mark-rose:not(.is-on) .lc-mm-card {
  fill: #ffe4e6;
  stroke: #f43f5e;
}
.lc-mm-node.is-mark-rose .lc-mm-mark-bar { fill: #e11d48; }
.lc-mm-node.is-mark-violet:not(.is-on) .lc-mm-card {
  fill: #ede9fe;
  stroke: #8b5cf6;
}
.lc-mm-node.is-mark-violet .lc-mm-mark-bar { fill: #7c3aed; }
.lc-mm-node.is-mark-sky:not(.is-on) .lc-mm-card {
  fill: #e0f2fe;
  stroke: #0ea5e9;
}
.lc-mm-node.is-mark-sky .lc-mm-mark-bar { fill: #0284c7; }
.lc-mm-node.is-mark-lime:not(.is-on) .lc-mm-card {
  fill: #ecfccb;
  stroke: #84cc16;
}
.lc-mm-node.is-mark-lime .lc-mm-mark-bar { fill: #65a30d; }
/* На зелёном пути — светлая полоска цвета пометки (не белая «дырка») */
.lc-mm-node.is-on.is-mark-teal .lc-mm-mark-bar { fill: #99f6e4; }
.lc-mm-node.is-on.is-mark-amber .lc-mm-mark-bar { fill: #fcd34d; }
.lc-mm-node.is-on.is-mark-rose .lc-mm-mark-bar { fill: #fda4af; }
.lc-mm-node.is-on.is-mark-violet .lc-mm-mark-bar { fill: #c4b5fd; }
.lc-mm-node.is-on.is-mark-sky .lc-mm-mark-bar { fill: #7dd3fc; }
.lc-mm-node.is-on.is-mark-lime .lc-mm-mark-bar { fill: #bef264; }
.lc-mm-label {
  fill: #0f172a;
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
}
.lc-mm-sub {
  fill: #64748b;
  font-size: 10px;
  pointer-events: none;
}
.lc-mm-ico,
.lc-mm-mark-bar {
  pointer-events: none;
}
/* Пометка видна и на активном пути сценария */
.lc-mm-node.is-on.is-mark-teal .lc-mm-card {
  stroke: #5eead4;
  stroke-width: 2.2;
}
.lc-mm-node.is-on.is-mark-amber .lc-mm-card {
  stroke: #fbbf24;
  stroke-width: 2.2;
}
.lc-mm-node.is-on.is-mark-rose .lc-mm-card {
  stroke: #fb7185;
  stroke-width: 2.2;
}
.lc-mm-node.is-on.is-mark-violet .lc-mm-card {
  stroke: #a78bfa;
  stroke-width: 2.2;
}
.lc-mm-node.is-on.is-mark-sky .lc-mm-card {
  stroke: #38bdf8;
  stroke-width: 2.2;
}
.lc-mm-node.is-on.is-mark-lime .lc-mm-card {
  stroke: #a3e635;
  stroke-width: 2.2;
}
.lc-mm-node.is-on .lc-mm-label,
.lc-mm-node.is-on .lc-mm-sub {
  fill: #fff;
}
.lc-mm-node.is-click {
  cursor: pointer;
}
.lc-mm-shell.is-marking .lc-mm-node.is-click {
  cursor: cell;
}
.lc-mm-node.is-click:hover .lc-mm-card {
  stroke: #0f766e;
}
@media (max-width: 1100px) {
  .lc-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .lc-filters {
    grid-template-columns: 1fr;
  }
}

.section-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--taxi-line);
  padding: 0 10px;
  width: min(220px, 100%);
  height: 34px;
  background: #fff;
  border-radius: 8px;
  flex-shrink: 0;
}
.section-search input {
  border: 0 !important;
  outline: none;
  width: 100%;
  padding: 0 !important;
  font-size: 13px;
  min-height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
}
.section-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 8px 48px;
  align-items: start;
  max-width: 980px;
}
.section-group { margin-bottom: 22px; }
.section-group h3,
.form-section-title,
h3.form-section-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--taxi-green);
}
.section-group button.section-link,
.section-group a.section-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0 !important;
  background: transparent !important;
  padding: 2px 4px !important;
  margin: 0 0 1px;
  cursor: pointer;
  color: var(--taxi-ink);
  font-size: 13px;
  line-height: 1.45;
  min-height: auto !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
}
.section-group button.section-link:hover,
.section-group a.section-link:hover {
  color: var(--taxi-blue);
  text-decoration: underline !important;
}
.section-group button.section-link:focus,
.section-group a.section-link:focus {
  outline: 1px dotted #888;
  outline-offset: 1px;
}
.section-group button.section-link.disabled,
.section-group span.section-link.disabled {
  color: #999;
  cursor: default;
  text-decoration: none !important;
}
.section-group a.section-link.has-alert {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: inherit;
  font-weight: inherit;
}
.section-group a.section-link.has-alert .sec-badge {
  margin-left: 4px;
}

/* Home KPI */
.shell-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  max-width: 920px;
}
.shell-kpi {
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--taxi-line-soft);
  background: #fff;
  box-shadow: var(--shell-shadow, 0 8px 24px rgba(15, 23, 42, 0.05));
}
.shell-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--taxi-muted);
  margin-bottom: 6px;
}
.shell-kpi-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--taxi-ink);
  line-height: 1.1;
}
.shell-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.shell-quick a,
.shell-quick .shell-quick-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--taxi-line);
  background: #fff;
  color: var(--taxi-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.shell-quick a:hover,
.shell-quick .shell-quick-link:hover {
  border-color: var(--brand-deep);
  color: var(--brand);
  background: var(--brand-soft);
}
.shell-quick a.primary,
.shell-quick .shell-quick-link.primary {
  background: var(--brand);
  border-color: var(--brand-dark);
  color: #fff !important;
}
.shell-quick a.primary:hover {
  background: var(--brand-hover);
  color: #fff !important;
}

/* Form chrome (карточка объекта) */
.form-chrome {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  gap: 0;
}
.form-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--taxi-line-soft);
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  min-height: 52px;
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  /* выше hint-bar — иначе тултипы «Назад» и т.п. прячутся под «След. шаг» */
  z-index: 12;
}
/* Заказ не оплачен — красная шапка на всей цепочке (Документы / Заказ / …) */
.form-titlebar.is-unpaid {
  background: linear-gradient(180deg, #fecaca 0%, #fee2e2 55%, #fff1f2 100%);
  border-bottom-color: #f87171;
}
.form-titlebar-unpaid {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #dc2626;
  padding: 5px 10px;
  border-radius: 6px;
  line-height: 1.2;
  white-space: nowrap;
}
.form-titlebar .nav-btns { display: flex; gap: 4px; align-items: center; }
.form-titlebar .nav-btns button {
  position: relative;
  width: 30px; height: 30px;
  padding: 0 !important;
  cursor: pointer;
  background: transparent !important;
  font-size: 13px;
  border: 0 !important;
  border-radius: 8px !important;
  min-height: auto !important;
  color: #64748b;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}
.form-titlebar .nav-btns button:hover:not(:disabled) {
  background: #f1f5f9 !important;
  border-color: transparent !important;
  color: #0f172a;
}
.form-titlebar .nav-btns button:disabled {
  opacity: 0.3;
  cursor: default;
}
.form-titlebar .nav-btns button#tb-fav.is-fav {
  color: #ca8a04;
  background: transparent !important;
  border-color: transparent !important;
}
.form-titlebar .nav-btns button svg {
  width: 14px;
  height: 14px;
  display: block;
}
.form-titlebar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex: 1;
  color: var(--taxi-ink);
  line-height: 1.25;
  padding: 0;
  min-width: 0;
}
.form-title-stack {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
}
.form-title-stack h1 {
  flex: 0 1 auto;
}
.form-section-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.form-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 5px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: #94a3b8;
}
.form-crumbs--bar {
  flex: 1;
  min-width: 0;
}
.form-crumbs .crumb-sep {
  color: #cbd5e1;
  font-weight: 400;
  user-select: none;
}
.form-crumbs .crumb-current {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(360px, 50vw);
}
.form-crumbs .crumb-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--taxi-ink);
  max-width: min(520px, 65vw);
}
.form-crumbs .crumb-alert-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: none;
  vertical-align: super;
  position: relative;
  top: -0.15em;
  animation: none;
  opacity: 1;
  flex-shrink: 0;
}
.form-crumbs .crumb-link.has-alert,
.form-crumbs .crumb-current.has-alert {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
.taxi .form-crumbs a.crumb-link,
.form-crumbs a.crumb-link {
  display: inline;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  max-width: min(240px, 36vw);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: baseline;
}
.taxi .form-crumbs a.crumb-link:hover,
.form-crumbs a.crumb-link:hover {
  color: #0f766e !important;
  -webkit-text-fill-color: #0f766e !important;
  text-decoration: underline !important;
  background: none !important;
}
.form-title-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.section-crumbs {
  margin: 0 0 10px;
  padding: 0 2px;
}
.section-panel-head .form-crumbs {
  margin-bottom: 8px;
}
.form-pagetab {
  position: relative;
}
.form-pagetab .pagetab-label {
  display: inline;
}
.form-pagetab .pagetab-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  min-width: 1.1em;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  vertical-align: super;
  letter-spacing: 0;
  text-transform: none;
}
.form-pagetab.active .pagetab-count {
  background: #ccfbf1;
  color: #0f766e;
}
/* Оплачен, чек 1/2 не выбит — спокойная метка без пульса */
.form-pagetab .pagetab-count.is-alert,
.form-pagetab.has-alert .pagetab-count {
  background: #ef4444;
  color: #fff;
  box-shadow: none;
  animation: none;
}
.form-pagetab.active .pagetab-count.is-alert,
.form-pagetab.active.has-alert .pagetab-count {
  background: #dc2626;
  color: #fff;
}
.form-pagetab .pagetab-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: none;
  vertical-align: super;
  position: relative;
  top: -0.15em;
  animation: none;
  opacity: 1;
  flex: 0 0 auto;
}
@keyframes pagetab-alert-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(1.08); }
}
.form-titlebar-right {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 8px;
}
.form-titlebar .titlebar-ico {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  cursor: pointer;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  min-height: auto !important;
  color: #64748b;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}
.form-titlebar .titlebar-ico:hover {
  background: #f1f5f9 !important;
  color: #0f172a;
}
.form-titlebar .titlebar-ico svg {
  width: 15px;
  height: 15px;
  display: block;
}
.form-titlebar .titlebar-action {
  position: relative;
  height: 30px;
  padding: 0 10px !important;
  margin: 0 2px 0 0 !important;
  cursor: pointer;
  border: 0 !important;
  border-radius: 8px !important;
  min-height: auto !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em;
  color: #0f766e !important;
  background: #ccfbf1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  white-space: nowrap;
}
.form-titlebar .titlebar-action:hover {
  background: #99f6e4 !important;
  color: #115e59 !important;
}
.form-titlebar .titlebar-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.form-titlebar .close-tab {
  position: relative;
  width: 30px;
  height: 30px;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
  font-size: 15px;
  padding: 0 !important;
  color: #94a3b8;
  min-height: auto !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.form-titlebar .close-tab:hover {
  color: #0f172a;
  background: #f1f5f9 !important;
  border-color: transparent !important;
}

/* Тултипы titlebar — снизу (сверху клипает overflow form-chrome / топбар) */
.form-titlebar [data-tip] {
  position: relative;
}
.form-titlebar [data-tip]:not([data-tip=""])::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  bottom: auto;
  transform: translateX(-50%) translateY(-2px);
  padding: 4px 8px;
  background: #0f172a;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}
.form-titlebar [data-tip]:not([data-tip=""])::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  bottom: auto;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #0f172a;
  border-top-color: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s;
  z-index: 50;
  pointer-events: none;
}
.form-titlebar .close-tab[data-tip]:not([data-tip=""])::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-2px);
}
.form-titlebar .close-tab[data-tip]:not([data-tip=""])::before {
  left: auto;
  right: 10px;
  transform: none;
}
.form-titlebar [data-tip]:not([data-tip=""]):hover::after,
.form-titlebar [data-tip]:not([data-tip=""]):focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}
.form-titlebar .close-tab[data-tip]:not([data-tip=""]):hover::after,
.form-titlebar .close-tab[data-tip]:not([data-tip=""]):focus-visible::after {
  transform: translateX(0) translateY(0);
}
.form-titlebar [data-tip]:not([data-tip=""]):hover::before,
.form-titlebar [data-tip]:not([data-tip=""]):focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.taxi-favs {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  min-height: 28px;
  padding: 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--taxi-line);
  z-index: 15;
}
.taxi-favs[hidden] { display: none !important; }
.taxi-favs-inner {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 3px 10px 3px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.taxi-favs-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: #d97706;
  font-size: 11px;
  line-height: 1;
}
.taxi-favs .fav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  max-width: 160px;
  text-align: left;
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0;
  line-height: 1.25;
  padding: 2px 4px 2px 8px !important;
  border-radius: 6px !important;
  cursor: pointer;
  min-height: 22px !important;
  height: 22px;
  box-shadow: none !important;
  white-space: nowrap;
}
.taxi-favs .fav:hover {
  background: #f0fdfa !important;
  border-color: #99f6e4 !important;
  color: #134e4a !important;
}
.taxi-favs .fav.is-active {
  background: #ecfdf5 !important;
  border-color: #0f766e !important;
  color: #0f766e !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 0 0 #0f766e !important;
}
.taxi-favs .fav.is-active .fav-del {
  color: #0f766e;
  opacity: 0.55;
}
.taxi-favs .fav-star {
  color: #fbbf24;
  flex-shrink: 0;
  font-size: 11px;
}
.taxi-favs .fav-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  color: inherit;
}
.taxi-favs .fav-del {
  flex-shrink: 0;
  opacity: 0.35;
  font-size: 10px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  min-height: auto;
  box-shadow: none;
  line-height: 1;
}
.taxi-favs .fav:hover .fav-del { opacity: 0.9; }
.taxi-favs .fav-del:hover { color: #ef4444 !important; opacity: 1; }

/* Горизонтальные вкладки формы (Основное / Документы…) */
.form-pagetabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0 10px;
  border-bottom: 1px solid var(--taxi-line-soft);
  background: #fff;
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  position: sticky;
  top: 0;
  z-index: 4;
}
.form-pagetab {
  border: 0 !important;
  background: transparent !important;
  padding: 10px 16px !important;
  cursor: pointer;
  font-size: 13px;
  color: #64748b;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 500;
}
.form-pagetab:hover { color: #0f172a; background: #f8fafc !important; }
.form-pagetab.is-create {
  color: var(--brand, #0f766e);
  font-weight: 600;
  border-style: dashed !important;
}
.form-pagetab.is-create .pagetab-label::before {
  content: '+';
  display: inline-block;
  margin-right: 4px;
  font-weight: 800;
  opacity: 0.85;
}
.form-pagetab.is-create:hover {
  color: var(--brand-dark, #115e59);
  background: #f0fdfa !important;
}
.form-pagetab.is-create:disabled {
  opacity: 0.45;
  cursor: default;
}
.form-pagetab.is-icon {
  padding-left: 8px !important;
  padding-right: 8px !important;
  min-width: 34px;
  justify-content: center;
}
.form-pagetab.is-icon .pagetab-label.is-sr {
  position: absolute !important;
  display: block !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.form-pagetab.is-icon .form-pagetab-ico,
.form-pagetab.is-icon > svg {
  display: block;
  width: 15px;
  height: 15px;
  opacity: 0.78;
}
.form-pagetab.is-icon:hover .form-pagetab-ico,
.form-pagetab.is-icon:hover > svg,
.form-pagetab.is-icon.active .form-pagetab-ico,
.form-pagetab.is-icon.active > svg {
  opacity: 1;
}
.form-pagetab.active {
  font-weight: 700;
  color: var(--brand-dark);
  box-shadow: inset 0 -3px 0 var(--taxi-tab-line) !important;
}

/* Секции карточки товара (закладки) */
.product-pane-title {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--taxi-green);
  font-weight: 700;
}
.product-pane .product-pane-title + .product-pane-title,
.product-pane .media-grid + .product-pane-title,
.product-pane .doc-list + .product-pane-title,
.product-pane p.muted + .product-pane-title {
  margin-top: 16px;
}

.form-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--taxi-line-soft);
  background: #fff;
  overflow: visible;
}
.form-toolbar:has(.cp-toolbar-main) {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
}
.form-toolbar .cp-toolbar-main,
.form-toolbar .cp-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  min-width: 0;
}
.form-toolbar .cp-toolbar-filters {
  padding-top: 2px;
}
.cp-star-cell {
  width: 2.25rem;
  text-align: center;
  vertical-align: middle;
}
.cp-star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
}
.cp-star-btn:hover {
  background: #fff7ed;
  color: #f59e0b;
}
.cp-star-btn.is-on {
  color: #f59e0b;
}
.prod-sku-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.prod-sku-cell .cp-star-btn {
  flex-shrink: 0;
}
.prod-sku-cell a {
  min-width: 0;
}
.cp-star-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
tr.is-main-cp td {
  background: #fffbeb;
}
.cp-star-inline {
  color: #f59e0b;
  margin-right: 2px;
}
.form-toolbar .toolbar-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--taxi-line-soft, #e5e7eb);
  border-radius: 10px;
  background: #f8fafc;
}
.form-toolbar .toolbar-filter-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--taxi-muted, #64748b);
  white-space: nowrap;
}
.form-toolbar .toolbar-filter .form-pagetabs {
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.form-grid .toolbar-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--taxi-line-soft, #e5e7eb);
  border-radius: 10px;
  background: #f8fafc;
}
.form-grid .toolbar-filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--taxi-muted, #64748b);
}
.form-grid .toolbar-filter .form-pagetabs {
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.form-toolbar .grow { flex: 1; min-width: 8px; }
.toolbar .grow { flex: 1; min-width: 8px; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--taxi-line-soft);
}
.form-actions .muted {
  font-size: 13px;
}
.form-body.has-float-actions {
  padding-bottom: 96px;
}
/* исходник в разметке — скрыт; реальный бар = #form-float-dock в body */
.form-actions.is-float {
  display: none !important;
}
.form-float-dock {
  position: fixed;
  z-index: 10040;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--taxi-line-soft, #e5e7eb);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}
/* Dock вешается на body — вне .app/.taxi, вторичным кнопкам нужны свои стили */
.form-float-dock > button:not(.primary):not(.toolbar-ico):not(.btn-quiet):not(.linkish) {
  background: #fff;
  border: 1px solid var(--taxi-line, #e2e8f0);
  cursor: pointer;
  padding: 8px 16px;
  min-height: var(--control-h, 34px);
  border-radius: var(--radius, 8px);
  color: var(--taxi-ink, #0f172a);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.form-float-dock > button:not(.primary):not(.toolbar-ico):not(.btn-quiet):not(.linkish):hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.form-float-dock > button:not(.primary):disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.form-float-dock .grow {
  flex: 1 1 24px;
  min-width: 12px;
}
.form-float-dock .muted {
  font-size: 13px;
}
.form-float-dock .toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--taxi-line-soft, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.form-float-dock .toolbar-group-label {
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-right: 1px solid var(--taxi-line-soft, #e5e7eb);
  white-space: nowrap;
}
.form-float-dock .toolbar-group > button {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
}
.form-float-dock .toolbar-group > button + button {
  border-left: 1px solid var(--taxi-line-soft, #e5e7eb);
}
.form-float-dock .toolbar-group > button:hover {
  background: #fff;
}
.form-float-dock .btn-quiet {
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.form-float-dock .btn-quiet:hover {
  color: #b45309;
  background: #fff7ed;
  border-color: #fed7aa;
}
/* ── UI library: icon toolbar ─────────────────────────────────────────
   Block:  .ui-ico-bar          — группа иконок (обычно справа в form-toolbar)
   Button: .toolbar-ico         — кнопка/ссылка 34×34, только SVG
   Mods:   .is-archive / .is-restore
   JS:     uiIcoBar / uiIcoBtn / uiIcoLink / UI_ICO  (legacy.js)
   Пример:
     <div class="form-toolbar">
       <button class="primary">Сохранить</button>
       <div class="ui-ico-bar">…uiIcoBtn / uiIcoLink…</div>
     </div>
─────────────────────────────────────────────────────────────────────── */
.form-toolbar .ui-ico-bar,
.toolbar .ui-ico-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.ui-ico-bar .ui-ico-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--taxi-muted, #64748b);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ui-ico-bar .ui-ico-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand, #0f766e);
  cursor: pointer;
}
.ui-ico-bar .ui-ico-check:hover {
  color: var(--taxi-ink, #0f172a);
}
.form-toolbar .ui-ico-bar--start,
.toolbar .ui-ico-bar--start {
  margin-left: 0;
  margin-right: auto;
}
.form-toolbar .ui-ico-bar--inline,
.toolbar .ui-ico-bar--inline {
  margin-left: 0;
  margin-right: 0;
}
.form-toolbar .toolbar-ico,
.toolbar .toolbar-ico,
.ui-ico-bar .toolbar-ico {
  width: 34px;
  height: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  margin: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  cursor: pointer;
  box-shadow: none !important;
  flex-shrink: 0;
  border: 1px solid var(--taxi-line);
  background: #fff;
  color: var(--taxi-ink);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}
.form-toolbar .toolbar-ico:hover,
.toolbar .toolbar-ico:hover,
.ui-ico-bar .toolbar-ico:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--taxi-ink);
}
a.toolbar-ico {
  color: var(--taxi-ink);
  text-decoration: none !important;
}
a.toolbar-ico:hover {
  color: var(--taxi-ink);
  text-decoration: none !important;
}
.form-toolbar .toolbar-ico svg,
.toolbar .toolbar-ico svg,
.ui-ico-bar .toolbar-ico svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}
/* Удаление строки в таблице приходной (вне form-toolbar) */
td.doc-in-rm-cell {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}
button.toolbar-ico.doc-in-rm-line {
  width: 28px;
  height: 28px;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  cursor: pointer;
  box-shadow: none !important;
  flex-shrink: 0;
  border: 1px solid var(--taxi-line);
  background: #fff;
  color: var(--taxi-ink);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
button.toolbar-ico.doc-in-rm-line:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
button.toolbar-ico.doc-in-rm-line svg {
  width: 15px;
  height: 15px;
  display: block;
  pointer-events: none;
}
.form-toolbar .toolbar-ico:disabled,
.toolbar .toolbar-ico:disabled,
.ui-ico-bar .toolbar-ico:disabled {
  opacity: 0.35;
  cursor: default;
}
.form-toolbar .toolbar-ico.is-disabled,
.toolbar .toolbar-ico.is-disabled,
.ui-ico-bar .toolbar-ico.is-disabled,
.form-toolbar .toolbar-ico[aria-disabled='true'],
.toolbar .toolbar-ico[aria-disabled='true'],
.ui-ico-bar .toolbar-ico[aria-disabled='true'] {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}
.form-toolbar .toolbar-ico.is-archive,
.toolbar .toolbar-ico.is-archive,
.ui-ico-bar .toolbar-ico.is-archive {
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
}
.form-toolbar .toolbar-ico.is-archive:hover,
.toolbar .toolbar-ico.is-archive:hover,
.ui-ico-bar .toolbar-ico.is-archive:hover {
  color: #b91c1c !important;
  border-color: #f87171 !important;
  background: #fee2e2 !important;
}
.form-toolbar .toolbar-ico.is-restore,
.toolbar .toolbar-ico.is-restore,
.ui-ico-bar .toolbar-ico.is-restore {
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  background: #f0fdf4 !important;
}
.form-toolbar .toolbar-ico.is-restore:hover,
.toolbar .toolbar-ico.is-restore:hover,
.ui-ico-bar .toolbar-ico.is-restore:hover {
  color: #166534 !important;
  border-color: #86efac !important;
  background: #dcfce7 !important;
}
.form-toolbar .toolbar-ico.is-deal,
.toolbar .toolbar-ico.is-deal,
.ui-ico-bar .toolbar-ico.is-deal,
#sd-deal.toolbar-ico {
  color: #15803d !important;
  border: 1px solid #86efac !important;
  background: #ecfdf5 !important;
}
.form-toolbar .toolbar-ico.is-deal:hover,
.toolbar .toolbar-ico.is-deal:hover,
.ui-ico-bar .toolbar-ico.is-deal:hover,
#sd-deal.toolbar-ico:hover {
  color: #166534 !important;
  border-color: #4ade80 !important;
  background: #dcfce7 !important;
}

/* —— Единый поиск UI (.find / .ui-find) — все журналы и тулбары —— */
.find,
.ui-find {
  display: flex;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  border: 1px solid var(--taxi-line);
  padding: 0 4px 0 12px;
  height: 36px;
  min-height: 36px;
  min-width: 200px;
  max-width: 420px;
  width: min(360px, 100%);
  flex: 1 1 260px;
  background: #f8fafc;
  border-radius: 999px;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
  position: relative;
}
.form-toolbar > .find,
.form-toolbar > .ui-find,
.form-toolbar .cp-toolbar-main > .find,
.form-toolbar .cp-toolbar-main > .ui-find,
.toolbar > .find,
.toolbar > .ui-find {
  margin-left: auto;
}
.find:focus-within,
.ui-find:focus-within {
  border-color: #94a3b8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}
.find input,
.ui-find input,
.find input[type='search'],
.ui-find input[type='search'],
.find input[type='text'],
.ui-find input[type='text'] {
  border: 0 !important;
  outline: none !important;
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  min-height: auto !important;
  height: 34px;
  padding: 4px 6px !important;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  -webkit-appearance: none;
  appearance: none;
}
.find input:focus,
.ui-find input:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.find input::-webkit-search-decoration,
.find input::-webkit-search-cancel-button,
.ui-find input::-webkit-search-decoration,
.ui-find input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.find > button,
.ui-find > button,
.find > button.find-go,
.ui-find > button.find-go,
.taxi .form-toolbar .find > button,
.taxi .form-toolbar .ui-find > button,
.taxi .toolbar .find > button {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 12px !important;
  min-height: auto !important;
  height: auto !important;
  margin: 0 !important;
  cursor: pointer;
  color: var(--brand, #0d9488);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 999px !important;
  flex-shrink: 0;
}
.find > button:hover,
.ui-find > button:hover,
.find > button.find-go:hover,
.taxi .form-toolbar .find > button:hover {
  background: #ecfdf5 !important;
  color: #0f766e;
}
.find > button:disabled,
.ui-find > button:disabled {
  opacity: 0.45;
  cursor: default;
}
.form-toolbar .form-pagetabs {
  border: 1px solid var(--taxi-line);
  border-radius: 999px;
  padding: 3px !important;
  background: #f1f5f9;
  gap: 2px;
  overflow: visible;
  position: static;
}
.form-toolbar .form-pagetab {
  border-radius: 999px !important;
  padding: 6px 14px !important;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.form-pagetab-ico {
  flex-shrink: 0;
  display: block;
  opacity: 0.9;
}
.form-toolbar .form-pagetab.active .form-pagetab-ico {
  opacity: 1;
}
/* Тултипы у переключателя вида / иконок тулбара и таблиц — без нативного title */
.form-pagetabs .form-pagetab[data-tip],
.form-toolbar .form-pagetab[data-tip],
.form-toolbar .toolbar-ico[data-tip],
.toolbar .toolbar-ico[data-tip],
.table-tool-ico[data-tip],
.table-tools-right .table-tool-ico[data-tip] {
  position: relative;
}
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""])::after,
.form-toolbar .form-pagetab[data-tip]:not([data-tip=""])::after,
.form-toolbar .toolbar-ico[data-tip]:not([data-tip=""])::after,
.toolbar .toolbar-ico[data-tip]:not([data-tip=""])::after,
.table-tool-ico[data-tip]:not([data-tip=""])::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  bottom: auto;
  transform: translateX(-50%) translateY(-2px);
  padding: 5px 9px;
  background: #0f172a;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  white-space: normal;
  max-width: min(280px, 70vw);
  text-align: center;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  z-index: 80;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}
/* В шапке заказа overflow-x режет низ — подсказку показываем сверху */
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""])::after {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(2px);
}
/* В form-toolbar переключатель вида — вниз (сверху клипает form-chrome / хлебные крошки) */
.form-toolbar .form-pagetabs .form-pagetab[data-tip]:not([data-tip=""])::after {
  top: calc(100% + 6px);
  bottom: auto;
  transform: translateX(-50%) translateY(-2px);
}
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""])::before,
.form-toolbar .form-pagetab[data-tip]:not([data-tip=""])::before,
.form-toolbar .toolbar-ico[data-tip]:not([data-tip=""])::before,
.toolbar .toolbar-ico[data-tip]:not([data-tip=""])::before,
.table-tool-ico[data-tip]:not([data-tip=""])::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  bottom: auto;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #0f172a;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s;
  z-index: 80;
  pointer-events: none;
}
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""])::before {
  top: auto;
  bottom: calc(100% + 0px);
  border-bottom-color: transparent;
  border-top-color: #0f172a;
}
.form-toolbar .form-pagetabs .form-pagetab[data-tip]:not([data-tip=""])::before {
  top: calc(100% + 2px);
  bottom: auto;
  border-bottom-color: #0f172a;
  border-top-color: transparent;
}
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""]):hover::after,
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""]):focus-visible::after,
.form-toolbar .form-pagetab[data-tip]:not([data-tip=""]):hover::after,
.form-toolbar .form-pagetab[data-tip]:not([data-tip=""]):focus-visible::after,
.form-toolbar .toolbar-ico[data-tip]:not([data-tip=""]):hover::after,
.form-toolbar .toolbar-ico[data-tip]:not([data-tip=""]):focus-visible::after,
.toolbar .toolbar-ico[data-tip]:not([data-tip=""]):hover::after,
.toolbar .toolbar-ico[data-tip]:not([data-tip=""]):focus-visible::after,
.table-tool-ico[data-tip]:not([data-tip=""]):hover::after,
.table-tool-ico[data-tip]:not([data-tip=""]):focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""]):hover::before,
.form-pagetabs .form-pagetab[data-tip]:not([data-tip=""]):focus-visible::before,
.form-toolbar .form-pagetab[data-tip]:not([data-tip=""]):hover::before,
.form-toolbar .form-pagetab[data-tip]:not([data-tip=""]):focus-visible::before,
.form-toolbar .toolbar-ico[data-tip]:not([data-tip=""]):hover::before,
.form-toolbar .toolbar-ico[data-tip]:not([data-tip=""]):focus-visible::before,
.toolbar .toolbar-ico[data-tip]:not([data-tip=""]):hover::before,
.toolbar .toolbar-ico[data-tip]:not([data-tip=""]):focus-visible::before,
.table-tool-ico[data-tip]:not([data-tip=""]):hover::before,
.table-tool-ico[data-tip]:not([data-tip=""]):focus-visible::before {
  opacity: 1;
  visibility: visible;
}
/* Крайние справа (Столбцы) — тултип не уезжает за край */
.table-tools-right .tbl-cols[data-tip]:not([data-tip=""])::after,
.table-tools-right .col-settings:last-child .table-tool-ico[data-tip]:not([data-tip=""])::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-2px);
}
.table-tools-right .tbl-cols[data-tip]:not([data-tip=""])::before,
.table-tools-right .col-settings:last-child .table-tool-ico[data-tip]:not([data-tip=""])::before {
  left: auto;
  right: 12px;
  transform: none;
}
.table-tools-right .tbl-cols[data-tip]:not([data-tip=""]):hover::after,
.table-tools-right .tbl-cols[data-tip]:not([data-tip=""]):focus-visible::after,
.table-tools-right .col-settings:last-child .table-tool-ico[data-tip]:not([data-tip=""]):hover::after,
.table-tools-right .col-settings:last-child .table-tool-ico[data-tip]:not([data-tip=""]):focus-visible::after {
  transform: translateX(0) translateY(0);
}
.form-toolbar .form-pagetab:hover {
  color: #0f172a;
  background: #fff !important;
}
.form-toolbar .form-pagetab.active {
  font-weight: 600;
  color: var(--brand-dark);
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
/* Тот же стиль радио-переключателя в полях формы (Роль / Кто и т.п.) */
.form-fields .form-pagetabs.radio-pills,
.form-grid .form-pagetabs.radio-pills,
.radio-pills.form-pagetabs {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--taxi-line);
  border-radius: 999px;
  padding: 3px !important;
  background: #f1f5f9;
  gap: 2px;
  overflow: visible;
  position: static;
  margin: 0;
  width: fit-content;
  max-width: 100%;
  border-bottom: 1px solid var(--taxi-line);
}
.form-fields .form-pagetabs.radio-pills .form-pagetab,
.form-grid .form-pagetabs.radio-pills .form-pagetab,
.radio-pills.form-pagetabs .form-pagetab {
  border-radius: 999px !important;
  padding: 6px 14px !important;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  min-height: auto !important;
}
.form-fields .form-pagetabs.radio-pills .form-pagetab:hover,
.form-grid .form-pagetabs.radio-pills .form-pagetab:hover,
.radio-pills.form-pagetabs .form-pagetab:hover {
  color: #0f172a;
  background: #fff !important;
}
.form-fields .form-pagetabs.radio-pills .form-pagetab.active,
.form-grid .form-pagetabs.radio-pills .form-pagetab.active,
.radio-pills.form-pagetabs .form-pagetab.active {
  font-weight: 600;
  color: var(--brand-dark);
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
.form-toolbar .inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--taxi-muted);
}
.form-toolbar .inline-label select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--taxi-line);
  padding: 0 10px;
  background: #fff;
  font-size: 13px;
  color: var(--taxi-ink);
}
.form-toolbar .inline-label .radio-pills {
  display: inline-flex;
  margin: 0;
  gap: 0;
}
.form-toolbar .inline-label .radio-pills .form-pagetab {
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.form-toolbar > button:not(.toolbar-ico),
.form-toolbar .cp-toolbar-main > button:not(.toolbar-ico),
.form-toolbar .col-settings > button {
  height: 34px;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--taxi-line) !important;
  background: #fff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--taxi-ink) !important;
  box-shadow: none !important;
  min-height: auto !important;
}
.form-toolbar > button:not(.toolbar-ico):hover,
.form-toolbar .cp-toolbar-main > button:not(.toolbar-ico):hover,
.form-toolbar .col-settings > button:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
.form-toolbar > button.primary,
.form-toolbar > a.primary,
.form-toolbar .cp-toolbar-main > button.primary,
.form-toolbar .col-settings > button.primary {
  background: var(--brand) !important;
  border-color: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.25) !important;
}
.form-toolbar > button.primary:hover,
.form-toolbar > a.primary:hover,
.form-toolbar .cp-toolbar-main > button.primary:hover,
.form-toolbar .col-settings > button.primary:hover {
  background: var(--brand-hover) !important;
  border-color: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.form-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  padding: 8px 22px;
  border-bottom: 1px solid var(--taxi-line-soft);
  background: #fafbfc;
  font-size: 13px;
  color: var(--taxi-muted);
}
.form-metrics b {
  color: var(--taxi-ink);
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0;
}
.form-metrics .metric-link { color: var(--taxi-blue); cursor: pointer; font-weight: 500; }

.form-body {
  padding: 18px 22px 40px;
  flex: 1;
  background: #fff;
  border-radius: 0;
}
.form-body.is-soft-switching {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

/* Двухколоночная форма полей как в 1С */
.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  max-width: 920px;
  margin-bottom: 14px;
}
.form-fields .field {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px;
  align-items: center;
}
.form-fields .field.span-2 { grid-column: 1 / -1; }
.form-fields .field > span {
  font-size: 12px;
  color: #555;
  text-align: right;
}
.form-fields .field input,
.form-fields .field select,
.form-fields .field textarea {
  width: 100%;
  min-width: 0;
}

/* Перемещения · форма создания */
.form-fields.wh-tr-fields {
  max-width: none;
}
.form-fields.wh-tr-fields .field.span-2 {
  align-items: start;
}
.form-fields.wh-tr-fields .field.span-2 > span {
  padding-top: 8px;
}
.wh-tr-prod-block,
.wh-tr-lines-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.wh-tr-add-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  width: 100%;
}
.wh-tr-add-row .wh-tr-qty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  color: #555;
}
.wh-tr-add-row .wh-tr-qty input {
  width: 5.5rem;
}
.wh-tr-add-row #tr-add-line {
  height: 34px;
  align-self: end;
  white-space: nowrap;
}
.wh-tr-sug {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  width: 100%;
  min-width: 0;
}
.wh-tr-sug-scroll {
  max-height: 340px;
  overflow: auto;
  margin-bottom: 0;
}
.wh-tr-sug-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}
.wh-tr-sug-col-sku {
  width: 9.5em;
}
.wh-tr-sug-col-name {
  width: auto;
}
.wh-tr-sug-col-qty {
  width: 5.5em;
}
.wh-tr-sug-col-places {
  width: 34%;
}
.wh-tr-sug-col-act {
  width: 5.5em;
}
.wh-tr-sug-table th,
.wh-tr-sug-table td {
  max-width: none !important;
  vertical-align: top;
}
.wh-tr-sug-table td.num,
.wh-tr-sug-table th.num {
  text-align: right;
  white-space: nowrap;
}
.wh-tr-sug-table td.mono {
  white-space: nowrap;
}
.wh-tr-sug-name {
  white-space: normal !important;
  word-break: break-word;
}
.wh-tr-sug-places {
  font-size: 12px;
  line-height: 1.35;
  white-space: normal !important;
  word-break: break-word;
}
.wh-tr-sug-act {
  white-space: nowrap;
  text-align: right;
}
.wh-tr-sug-table tr.is-muted {
  opacity: 0.72;
}
.wh-tr-sug-table tr.clickable:hover {
  background: var(--taxi-row-hover, #f8fafc);
}
.wh-tr-intro {
  color: var(--taxi-muted, #64748b);
}
.wh-tr-lines-scroll {
  width: 100%;
  margin: 0;
}
.wh-tr-lines-table {
  width: 100%;
  table-layout: auto;
}
.wh-tr-lines-table th.num,
.wh-tr-lines-table td.num {
  text-align: right;
}
.wh-tr-hint {
  margin: 2px 0 0;
  font-size: 12px;
}
.wh-tr-actions {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.wh-tr-cell-stock {
  margin-top: 8px;
}
@media (max-width: 720px) {
  .wh-tr-add-row {
    grid-template-columns: 1fr;
  }
  .wh-tr-add-row .wh-tr-qty input {
    width: 100%;
  }
}
.form-fields .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 13px;
}
.form-fields .checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #333;
  cursor: pointer;
}
.form-fields .checks.checks-col {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}
.form-fields .checks.checks-col label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  width: 100%;
  line-height: 1.35;
}
.form-fields .checks.checks-col input[type="radio"],
.form-fields .checks.checks-col input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
}
.form-fields .field-control {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.form-grid .field-control {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.form-grid .field-control input {
  flex: 1;
  min-width: 0;
}
.form-grid #cphone-add,
.form-grid .cphone-del,
.form-fields #ce-phone-add,
.form-fields .ce-phone-del {
  width: 34px !important;
  min-width: 34px !important;
  height: var(--control-h, 34px) !important;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  flex-shrink: 0;
}
.cphones-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.form-fields > .cphones-extra {
  grid-column: 1 / -1;
}
.cphones-extra:empty {
  display: none;
}
.form-fields .field-control input {
  flex: 1;
  min-width: 0;
}
.form-fields .field-control button {
  flex-shrink: 0;
  padding: 4px 8px !important;
  min-height: auto !important;
  font-size: 12px;
}

.panel { background: transparent; border: 0; padding: 0; margin-bottom: 18px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}
.taxi .form-body .toolbar {
  padding: 14px 16px;
  margin-bottom: 16px;
  gap: 10px 12px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: var(--shell-shadow, 0 1px 2px rgba(15, 23, 42, 0.04));
}
.taxi .form-body .toolbar > button,
.taxi .form-body .toolbar > .btn,
.taxi .form-body .toolbar > a.button,
.taxi .form-body .toolbar .toolbar-group > button {
  border-radius: 8px !important;
  padding: 0 12px !important;
  border: 1px solid var(--taxi-line) !important;
  background: #fff !important;
  height: 34px;
  min-height: 34px !important;
  font-weight: 500;
  font-size: 13px !important;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.taxi .form-body .toolbar > button:hover,
.taxi .form-body .toolbar > .btn:hover,
.taxi .form-body .toolbar .toolbar-group > button:hover {
  border-color: var(--brand-deep) !important;
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
  -webkit-text-fill-color: var(--brand) !important;
}
.taxi .form-body .toolbar > button.primary,
.taxi .form-body .toolbar > .btn.primary {
  background: var(--brand) !important;
  border-color: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 600 !important;
}
.taxi .form-body .toolbar > button.primary:hover,
.taxi .form-body .toolbar > .btn.primary:hover {
  background: var(--brand-hover) !important;
  border-color: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.toolbar-sep {
  display: inline-block;
  width: 1px;
  align-self: stretch;
  min-height: 28px;
  margin: 0 4px;
  background: var(--taxi-line);
  flex-shrink: 0;
}
.toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px dashed rgba(13, 148, 136, 0.35);
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.04);
}
.toolbar-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-dark, #0f766e);
  margin-right: 2px;
}
.deal-fold {
  margin: 12px 0;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
/* Заказ-наряд: сначала авто (компактно + сворачивается) */
.wo-auto-panel {
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid #c5e4de;
  border-radius: 10px;
  background: linear-gradient(180deg, #f2fbf9 0%, #fff 70%);
  /* visible — иначе sticky «Сохранить» не цепляется к низу блока */
  overflow: visible;
}
.wo-auto-panel.is-ready {
  border-color: #bbf7d0;
  background: #f8fafc;
}
.wo-auto-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.wo-auto-summary::-webkit-details-marker {
  display: none;
}
.wo-auto-summary-title {
  font-weight: 650;
  font-size: 13.5px;
  color: var(--taxi-ink, #0f172a);
}
.wo-auto-summary-meta {
  flex: 1 1 auto;
  min-width: 120px;
  font-size: 12px;
  line-height: 1.3;
}
.wo-auto-chevron {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.wo-auto-panel[open] .wo-auto-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.wo-auto-body {
  padding: 0 12px 12px;
}
.wo-auto-picked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 4px;
  padding: 8px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}
.wo-auto-picked.hidden,
.wo-auto-editor.hidden,
.wo-auto-actions .hidden {
  display: none !important;
}
.wo-auto-picked-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 13px;
  min-width: 0;
  flex: 1 1 200px;
}
.wo-auto-picked-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.wo-auto-editor {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.wo-auto-editor-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}
.sto-cl-panel .sto-cl-body-wrap {
  padding: 4px 2px 8px;
}
.sto-cl-phase {
  border: 1px solid #d7e5e2;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 10px;
  background: #fbfefd;
}
.sto-cl-phase-h {
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 2px;
}
.sto-cl-phase-tip {
  font-size: 11px;
  margin: 0 0 8px;
}
.sto-cl-row {
  border-top: 1px solid #e4eeec;
}
.sto-cl-row:first-of-type {
  border-top: 0;
}
.sto-cl-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.sto-cl-item.is-done {
  background: rgba(27, 138, 90, 0.07);
}
.sto-cl-item input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: #1b8a5a;
}
.sto-cl-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.sto-cl-label {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.sto-cl-hint {
  font-size: 11.5px;
  color: #5a6f6f;
  line-height: 1.4;
}
.sto-cl-opt {
  font-style: normal;
  font-weight: 600;
  color: #6b7c7c;
  font-size: 11px;
}
.sto-cl-photos {
  margin: 0 6px 10px 34px;
  padding: 8px 10px;
  border: 1px dashed #b9d0cb;
  border-radius: 10px;
  background: #f4faf8;
  min-width: 0;
  box-sizing: border-box;
}
.sto-cl-photos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  margin: 0 0 8px;
  min-width: 0;
}
.sto-cl-photos-count {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #a35b00;
  flex: 0 0 auto;
}
.sto-cl-photos-count.is-ok {
  color: #1b8a5a;
}
.sto-cl-photos-add {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #0d7377;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  border: 0;
  box-shadow: none;
  min-height: 30px;
  box-sizing: border-box;
}
.sto-cl-photos-add:hover {
  background: #0f766e;
}
.sto-cl-photos-add > span {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.sto-cl-photos-add input[type='file'] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  opacity: 0;
  cursor: pointer;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  font-size: 0;
}
.sto-cl-photos-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}
.sto-cl-photos-thumbs > .muted {
  flex: 1 1 100%;
  margin: 0;
  line-height: 1.4;
}
.sto-cl-photo-thumb {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #c5d9d5;
  background: #fff;
  flex: 0 0 auto;
}
.sto-cl-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sto-cl-photo-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(20, 30, 30, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.sto-cl-photo-del:hover {
  background: #b42318;
}
.sto-cl-panel .form-grid.sto-cl-signers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 10px 0 0;
  padding: 0;
  max-width: none;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
}
.sto-cl-panel .form-grid.sto-cl-signers > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--taxi-muted, #64748b);
}
.sto-cl-panel .form-grid.sto-cl-signers > label > select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #d4dbe6;
  background: #fff;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
}
@media (max-width: 720px) {
  .sto-cl-panel .form-grid.sto-cl-signers {
    grid-template-columns: 1fr;
  }
}
.deal-pay-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #f0fdf4;
  box-sizing: border-box;
}
.wo-garage {
  margin: 0 0 6px;
}
.wo-garage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
}
.wo-garage-label {
  font-size: 12px;
  font-weight: 650;
}
.wo-garage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.wo-garage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 118px;
  max-width: 160px;
  padding: 8px 10px;
  border: 1px solid #d1e7e2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.wo-garage-del {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.wo-garage-del:hover {
  color: #b91c1c;
  background: #fee2e2;
}
.wo-garage-card:hover {
  border-color: #5bb8a8;
}
.wo-garage-card.is-active {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.18);
  background: #f0fdfa;
}
.wo-garage-card.has-sts .wo-garage-plate::after {
  content: none;
}
.wo-garage-sts-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: #ccfbf1;
  vertical-align: middle;
}
.wo-garage-card.wo-garage-new {
  border-style: dashed;
  background: #f8fafc;
  color: #475569;
}
.wo-garage-plate {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.wo-garage-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wo-garage-sub {
  font-size: 11px;
}
.wo-garage-empty {
  font-size: 12px;
  align-self: center;
  padding: 4px 2px;
}
.sd-money-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
  margin: 0;
}
.sd-money-cell {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  min-width: 0;
}
.sd-money-cell + .sd-money-cell {
  border-left: 1px solid var(--taxi-line-soft, #e2e8f0);
}
.sd-money-k {
  font-size: 11px;
  color: var(--taxi-muted, #64748b);
  font-weight: 600;
}
.sd-money-v {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}
.sd-money-total {
  background: #f0fdfa;
}
.sd-money-total .sd-money-v {
  font-size: 15px;
  color: #0f766e;
}
.doc-prep-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.doc-prep-gate {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.doc-prep-form {
  margin: 0;
  padding: 14px 16px;
}
.doc-prep-form .doc-prep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--taxi-line-soft, #e2e8f0);
}
.doc-prep-form .doc-prep-actions .toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
  background: #f8fafc;
}
.doc-prep-form .doc-prep-actions .toolbar-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  margin-right: 2px;
}
.doc-prep-form .doc-prep-actions .toolbar-group > button {
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid var(--taxi-line, #cbd5e1);
  background: #fff;
  height: 34px;
  min-height: 34px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}
.doc-prep-form .doc-prep-actions .toolbar-group > button:hover {
  border-color: var(--brand-deep, #0f766e);
  background: var(--brand-soft, #f0fdfa);
  color: var(--brand, #0f766e);
}
.form-toolbar .ui-ico-bar > button.primary {
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.sd-pay-balance {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
}
.sd-pay-balance.is-paid {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.sd-pay-balance.is-due {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}
.sd-pay-history {
  margin: 6px 0 0;
  padding: 0 0 0 16px;
  font-size: 11px;
  color: var(--taxi-muted, #64748b);
}
.sd-pay-history li {
  margin: 2px 0;
}

/* Резерв WAIT-PAY в остатках — карточка в стиле панели оплаты */
.bal-reserve-card {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  min-width: 200px;
  max-width: 340px;
  text-align: left;
  box-sizing: border-box;
}
.bal-reserve-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 8px;
}
.bal-reserve-card-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.25;
}
.bal-reserve-card-due {
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
}
.bal-reserve-card-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #9a3412;
}
.bal-reserve-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bal-reserve-order {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #fde68a;
}
.bal-reserve-order-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
button.bal-reserve-order-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--brand-deep, #0f766e);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
button.bal-reserve-order-link:hover {
  color: var(--brand, #0d9488);
  border-bottom-color: currentColor;
}
.bal-reserve-order-id {
  font-size: 11px;
  color: #64748b;
}
.bal-reserve-order-qty {
  font-size: 11px;
  font-weight: 650;
  color: #9a3412;
}
.bal-reserve-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: #9a3412;
}
.bal-reserve-order-meta b {
  font-weight: 700;
  color: #7c2d12;
}
.bal-reserve-order-ago {
  color: #b45309;
}
.data-table td:has(> .bal-reserve-card) {
  vertical-align: top;
  padding-top: 8px;
  padding-bottom: 8px;
}

.sd-pay-panel {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
  background: #f8fafc;
}
.sd-pay-panel.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
}
.sd-pay-panel.is-due {
  border-color: #fed7aa;
  background: #fff7ed;
}
.sd-pay-panel.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.sd-pay-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.sd-pay-panel-title {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}
.sd-pay-panel-due {
  font-size: 13px;
  color: #9a3412;
}
.sd-pay-panel-note {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #9a3412;
}
.sd-pay-panel-body {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}
.sd-pay-panel-main {
  flex: 1 1 260px;
  min-width: 0;
}
.sd-pay-qr {
  flex: 0 0 auto;
  text-align: center;
}
.sd-pay-qr img {
  display: block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px;
}
.sd-pay-qr .muted {
  display: block;
  font-size: 11px;
  margin-top: 4px;
}
.sd-pay-method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.sd-pay-method-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.sd-pay-wo-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}
.sd-pay-wo-hint.is-need {
  color: #b45309;
  font-weight: 600;
}
.sd-pay-wo-hint.is-ok {
  color: #047857;
}
.sd-pay-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 6px;
}
.sd-pay-link-row input {
  flex: 1 1 200px;
  min-width: 160px;
  font-size: 12px;
}
.sd-pay-link-meta {
  font-size: 11px;
  margin: 0 0 8px;
}
.sd-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0;
}
.sd-pay-actions #sd-pay-msg {
  font-size: 12px;
}

.cash-accept-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}
.cash-accept-dialog {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  padding: 16px 18px 14px;
}
.bal-adj-dialog {
  width: min(520px, 100%);
}
.bal-adj-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
}
.bal-adj-dialog .form-grid.bal-adj-grid {
  margin-bottom: 0;
  padding: 14px 16px;
  background: #f8fafc;
}
.bal-adj-dialog .form-grid.bal-adj-grid label textarea {
  min-height: 72px;
  resize: vertical;
}
.bal-adj-dialog .form-actions.bal-adj-actions {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
  justify-content: flex-end;
}
.cash-accept-overlay.taxi .bal-adj-dialog .form-actions.bal-adj-actions button:not(.primary) {
  background: #fff;
  border: 1px solid var(--taxi-line, #d8dee8);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius, 11px);
  color: var(--taxi-ink, #0f172a);
  font-size: 13px;
  font-weight: 500;
  min-height: var(--control-h, 38px);
  box-shadow: none;
}
.cash-accept-overlay.taxi .bal-adj-dialog .form-actions.bal-adj-actions button:not(.primary):hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.bal-adj-msg {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  min-height: 1.2em;
  text-align: right;
}
.bal-adj-pick {
  max-height: 200px;
  overflow: auto;
  border: 1px solid #d8dee8;
  border-radius: 11px;
  margin-top: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.cash-accept-overlay.taxi .bal-adj-pick .bal-adj-pick-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  color: var(--taxi-ink, #0f172a);
  min-height: 0 !important;
  box-shadow: none !important;
  font-weight: 400;
}
.cash-accept-overlay.taxi .bal-adj-pick .bal-adj-pick-item:last-child {
  border-bottom: 0 !important;
}
.cash-accept-overlay.taxi .bal-adj-pick .bal-adj-pick-item:hover {
  background: #ecfdf8 !important;
  color: var(--brand-deep, #0f766e);
}

/* Коррекция остатка — колонка с иконкой (только админ, выбран склад) */
.data-table th.bal-adj-th,
.data-table td.bal-adj-cell {
  width: 52px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  overflow: visible;
}
.data-table th.bal-adj-th {
  position: relative;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--taxi-muted, #64748b);
}
.data-table th.bal-adj-th .bal-adj-th-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0 auto 2px;
  border-radius: 6px;
  background: #f0fdfa;
  color: var(--brand-deep, #0f766e);
  border: 1px solid #99f6e4;
  vertical-align: middle;
}
.data-table th.bal-adj-th .bal-adj-th-label {
  display: block;
  font-size: 10px;
  line-height: 1.1;
}
.data-table th.bal-adj-th .bal-adj-th-ico svg {
  width: 13px;
  height: 13px;
  display: block;
}
.data-table th.bal-adj-th[data-tip]:not([data-tip=""])::after {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(2px);
  white-space: nowrap;
  z-index: 120;
}
.data-table th.bal-adj-th[data-tip]:not([data-tip=""]):hover::after,
.data-table th.bal-adj-th[data-tip]:not([data-tip=""]):focus-visible::after {
  transform: translateX(-50%) translateY(0);
}
.data-table th.bal-adj-th[data-tip]:not([data-tip=""])::before {
  top: auto;
  bottom: calc(100% + 0px);
  border-bottom-color: transparent;
  border-top-color: #0f172a;
  z-index: 120;
}
.data-table td.bal-adj-cell .table-tool-ico.bal-adj-btn {
  width: 28px !important;
  height: 28px !important;
  color: var(--brand-deep, #0f766e) !important;
  border-color: #99f6e4 !important;
  background: #f0fdfa !important;
}
.data-table td.bal-adj-cell .table-tool-ico.bal-adj-btn:hover {
  background: #ccfbf1 !important;
  border-color: #5eead4 !important;
  color: #0d9488 !important;
}
.data-table td.bal-adj-cell .table-tool-ico.bal-adj-btn svg {
  width: 15px;
  height: 15px;
}
/* Тултип над строкой — не перекрывает иконку и не обрезается низом ячейки */
.data-table td.bal-adj-cell .table-tool-ico[data-tip]:not([data-tip=""])::after {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(2px);
  white-space: nowrap;
  z-index: 120;
}
.data-table td.bal-adj-cell .table-tool-ico[data-tip]:not([data-tip=""]):hover::after,
.data-table td.bal-adj-cell .table-tool-ico[data-tip]:not([data-tip=""]):focus-visible::after {
  transform: translateX(-50%) translateY(0);
}
.data-table td.bal-adj-cell .table-tool-ico[data-tip]:not([data-tip=""])::before {
  top: auto;
  bottom: calc(100% + 2px);
  border-bottom-color: transparent;
  border-top-color: #0f172a;
  z-index: 120;
}
.taxi .form-body table .table-tool-ico.bal-adj-btn {
  width: 28px !important;
  height: 28px !important;
  color: var(--brand-deep, #0f766e) !important;
  border-color: #99f6e4 !important;
  background: #f0fdfa !important;
}
.taxi .form-body table .table-tool-ico.bal-adj-btn:hover {
  background: #ccfbf1 !important;
  border-color: #5eead4 !important;
  color: #0d9488 !important;
}
.taxi .form-body table .table-tool-ico.bal-adj-btn svg {
  width: 15px;
  height: 15px;
}
.cash-accept-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.cash-accept-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.cash-accept-x {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
}
.cash-accept-who {
  margin: 0 0 10px;
  font-size: 13px;
  color: #334155;
}
.cash-accept-dues {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 13px;
  line-height: 1.45;
  color: #9a3412;
}
.cash-accept-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 6px;
}
.cash-accept-covers {
  margin: 0 0 12px;
}
.cash-accept-cover {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}
.cash-accept-cover input {
  margin-top: 3px;
}
.cash-accept-amount {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 8px;
}
.cash-accept-amount input {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 10px;
}
.cash-accept-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
}
.cash-accept-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Компактная подсказка над вкладками заказа */
.form-hintbar-slot {
  position: relative;
  z-index: 1;
  padding: 6px 10px 0;
  background: transparent;
}
.deal-hint-bar {
  display: flex;
  flex-direction: column;
  border: 1px solid #7ec8bc;
  border-radius: 10px;
  background: linear-gradient(105deg, #d9f5ef 0%, #ecfdf8 42%, #f0fdfa 100%);
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.12);
  overflow: hidden;
  margin-bottom: 6px;
}
.deal-hint-bar-row {
  display: flex;
  align-items: stretch;
  min-height: 38px;
}
/* Одна рамка у бара — кнопки внутри без своих контуров (.taxi button иначе даёт border) */
.taxi .deal-hint-bar button.deal-hint-bar-main,
.taxi .deal-hint-bar button.deal-hint-bar-expand,
.deal-hint-bar button.deal-hint-bar-main,
.deal-hint-bar button.deal-hint-bar-expand {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 0 !important;
  height: auto;
  color: inherit;
  -webkit-text-fill-color: inherit;
  font: inherit;
  cursor: pointer;
}
.taxi .deal-hint-bar button.deal-hint-bar-main,
.deal-hint-bar button.deal-hint-bar-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px !important;
  text-align: left;
}
.taxi .deal-hint-bar button.deal-hint-bar-main:hover,
.deal-hint-bar button.deal-hint-bar-main:hover {
  background: rgba(13, 148, 136, 0.1) !important;
}
.taxi .deal-hint-bar button.deal-hint-bar-expand,
.deal-hint-bar button.deal-hint-bar-expand {
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px 0 4px !important;
  color: #64748b;
  -webkit-text-fill-color: #64748b;
}
.taxi .deal-hint-bar button.deal-hint-bar-expand:hover,
.deal-hint-bar button.deal-hint-bar-expand:hover,
.taxi .deal-hint-bar button.deal-hint-bar-main:hover + button.deal-hint-bar-expand {
  background: rgba(13, 148, 136, 0.1) !important;
  color: var(--taxi-green, #0d9488);
  -webkit-text-fill-color: var(--taxi-green, #0d9488);
}
.deal-hint-bar-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--taxi-green, #0d9488);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
}
.deal-hint-bar-next {
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--taxi-ink, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-hint-bar-detail {
  flex: 1 1 120px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.deal-hint-bar-chev {
  font-size: 12px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.deal-hint-bar[data-expanded='1'] .deal-hint-bar-chev {
  transform: rotate(180deg);
}
.deal-hint-bar.has-alert {
  border-color: #f0a060;
  background: linear-gradient(105deg, #fff4e8 0%, #fff8f0 42%, #fffaf5 100%);
  box-shadow: 0 1px 2px rgba(194, 100, 30, 0.14);
}
.deal-hint-bar.has-alert .deal-hint-bar-label {
  color: #c2410c;
  background: rgba(234, 88, 12, 0.12);
}
.deal-hint-bar-miss {
  flex: 0 1 auto;
  max-width: min(46%, 360px);
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-hint-chain-title {
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0d7377;
}
.deal-hint-chain-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}
.order-chain-ensure {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 8px !important;
  height: 32px;
  min-height: 32px !important;
  font-size: 12.5px !important;
  font-weight: 650;
  line-height: 1;
  border-radius: 8px !important;
}
.order-chain-ensure svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
}
.order-chain-ensure span {
  line-height: 1;
}
.deal-hint-bar.has-alert .deal-hint-bar-panel {
  border-top-color: #f0c9a0;
  background: #fffaf5;
}
.deal-sto-pay {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: linear-gradient(105deg, #fffbeb 0%, #fff8f0 55%, #fffaf5 100%);
}
.deal-sto-pay-head {
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 4px;
  color: #92400e;
}
.deal-sto-pay-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.35;
}
.deal-sto-pay-actions {
  margin: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.deal-hint-bar-panel {
  padding: 0 12px 10px;
  border-top: 1px solid #d5ebe6;
  background: #f8fffd;
}
.deal-hint-bar-scenario {
  font-size: 11.5px;
  padding: 8px 0 4px;
  line-height: 1.35;
}
.deal-hint-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.deal-hint-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.35;
  padding: 4px 6px;
  border-radius: 8px;
}
.deal-hint-step.is-active {
  background: #fff;
  box-shadow: 0 0 0 1px #99d5cb;
  font-weight: 600;
}
.deal-hint-step.is-clickable {
  cursor: pointer;
}
.deal-hint-step.is-clickable:hover {
  background: rgba(13, 148, 136, 0.1);
}
.deal-hint-step.is-done {
  opacity: 0.72;
}
.deal-hint-step.is-skip {
  opacity: 0.55;
}
.deal-hint-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
  margin: 0 0 10px;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #99d5cb;
}
.deal-hint-quick label {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.deal-hint-quick input {
  min-width: 160px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Модалка: ЗН · авто / СТС */
.deal-hint-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.deal-hint-modal[hidden] {
  display: none !important;
}
.deal-hint-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.deal-hint-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  padding: 16px 18px 18px;
}
.deal-hint-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.deal-hint-modal-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.deal-hint-modal-x {
  border: 0;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #475569;
}
.deal-hint-modal-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
}
.deal-hint-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
body.deal-hint-modal-open {
  overflow: hidden;
}
@media (max-width: 720px) {
  .deal-hint-bar-detail {
    display: none;
  }
}
@media (max-width: 720px) {
  .deal-next-scenario {
    max-width: 100%;
    text-align: left;
  }
}
.deal-fold-sum {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--taxi-green, #0d9488);
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f8fffe 0%, #f8fafc 100%);
}
.deal-fold-sum::-webkit-details-marker { display: none; }
.deal-fold-sum::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  opacity: 0.7;
  transition: transform 0.12s ease;
  flex-shrink: 0;
}
.deal-fold[open] > .deal-fold-sum::before {
  transform: rotate(90deg);
}
.deal-fold-sum:hover {
  background: #f0fdfa;
}
.deal-fold-body {
  padding: 4px 14px 14px;
  border-top: 1px solid var(--taxi-line-soft);
}
.deal-fold-body > table {
  margin-top: 8px;
}
.deal-fold-body > .doc-list {
  margin: 0;
  padding-left: 18px;
}
.doc-tree {
  font-size: 13px;
  line-height: 1.35;
}
.doc-tree-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 5px 8px;
  border-radius: 6px;
}
.doc-tree-row.clickable {
  cursor: pointer;
}
.doc-tree-row.clickable:hover {
  background: rgba(13, 148, 136, 0.06);
}
.doc-tree-row.is-required-miss {
  background: rgba(230, 81, 0, 0.06);
}
.doc-tree-row.is-alert {
  background: rgba(230, 81, 0, 0.1);
  box-shadow: inset 3px 0 0 #e65100;
}
.doc-tree-chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 1px 6px;
  border-radius: 4px;
}
.doc-tree-chip.is-warn {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.22);
}
select.is-required-miss {
  border-color: #b45309;
  box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.25);
}
.deal-cell-miss {
  color: #b45309;
  font-weight: 700;
  font-size: 12px;
}
.td-deal-miss {
  background: rgba(180, 83, 9, 0.06);
}
.doc-tree-mark {
  width: 1.1em;
  text-align: center;
  font-weight: 700;
}
.doc-tree-mark.is-ok { color: #1b5e20; }
.doc-tree-mark.is-draft { color: #0d9488; }
.doc-tree-mark.is-miss { color: #b45309; }
.doc-tree-mark.is-warn { color: #c2410c; }
.doc-tree-mark.is-skip { color: #94a3b8; }
.doc-tree-label {
  font-weight: 600;
  min-width: 12em;
}
.doc-tree-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0 !important;
  min-height: 22px !important;
  border: 1px solid #0d9488 !important;
  border-radius: 6px !important;
  background: #ecfdf5 !important;
  color: #0f766e !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
}
.doc-tree-add:hover {
  background: #ccfbf1 !important;
  color: #115e59 !important;
}
.doc-tree-add:disabled {
  opacity: 0.55;
  cursor: default;
}
.doc-tree-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}

/* Полоска цепочки документов — сверху карточки, клик раскрывает */
.order-chain-bar {
  margin: 0 0 12px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.order-chain-bar.is-incomplete {
  border-color: #fdba74;
  background: #fff7ed;
}
.order-chain-bar.is-complete {
  border-color: #86efac;
  background: #f0fdf4;
}
.order-chain-bar-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.order-chain-bar-sum::-webkit-details-marker { display: none; }
.order-chain-bar-chev {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #64748b;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.order-chain-bar[open] > .order-chain-bar-sum .order-chain-bar-chev {
  transform: rotate(180deg);
}
.order-chain-bar-sum:hover {
  background: rgba(15, 23, 42, 0.03);
}
.order-chain-badge.is-ok {
  background: #e8f5e9 !important;
  color: #1b5e20 !important;
}
.order-chain-badge.is-miss {
  background: #fff3e0 !important;
  color: #e65100 !important;
}
.order-chain-badge.is-na {
  background: #f1f5f9 !important;
  color: #64748b !important;
}
.order-chain-bar-title {
  font-weight: 650;
  font-size: 13px;
  color: #0f172a;
}
.order-chain-bar-hint {
  font-size: 11px;
  margin-left: auto;
}
.order-chain-bar-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--taxi-line-soft);
  background: #fff;
}
.order-chain-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.doc-tree-mark.is-skip {
  color: #94a3b8;
}

/* Секции карточки заказа (без ряда вкладок) */
.deal-sections {
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.deal-section {
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px 14px;
  scroll-margin-top: 72px;
}
.deal-section.is-flash {
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.35);
}
.deal-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 750;
  color: var(--taxi-ink, #0f172a);
  letter-spacing: -0.01em;
}
.deal-section-body > table {
  margin-top: 8px;
}
.deal-section-body > .doc-list {
  margin: 8px 0 0;
}
/* min-width только для текстовых полей — иначе #warch раздувается до 140px */
.toolbar input:not([type="checkbox"]):not([type="radio"]),
.toolbar select { min-width: 140px; }
.toolbar-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--taxi-muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.toolbar-check input[type="checkbox"],
#warch {
  width: 14px;
  height: 14px;
  min-width: 14px !important;
  max-width: 14px;
  margin: 0;
  padding: 0;
  flex: 0 0 14px;
  accent-color: var(--taxi-green);
  cursor: pointer;
}
.form-body table tr.wh-arch-sep td {
  background: #f1f5f9 !important;
  color: var(--taxi-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-top: 1px solid var(--taxi-line);
}
.form-body table tr.wh-archived td {
  color: var(--taxi-muted);
}

.wh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.wh-cards-sep {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 6px 2px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-top: 1px solid var(--taxi-line-soft);
}
.wh-archived-block {
  margin-top: 20px;
}
.wh-archived-block .wh-cards-sep {
  margin-top: 0;
}
.wh-archived-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wh-archived-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--taxi-line-soft);
  font-size: 13px;
}
.wh-archived-list li:last-child {
  border-bottom: none;
}
.wh-archived-list .wh-arch-name {
  flex: 1;
  min-width: 0;
}
.wh-archived-list .linkish {
  flex-shrink: 0;
  white-space: nowrap;
}
.wh-archived-list .linkish.danger {
  color: #b91c1c;
}
.wh-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 140px;
}
.wh-card.is-archived {
  opacity: 0.78;
  background: #f8fafc;
}
.wh-card.is-sys {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 48%);
}
.wh-card.is-1c-podveska {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 48%);
}
.wh-card.is-sto-hold {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 48%);
}
.wh-card.is-sto-floor {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 48%);
}
.badge.wh-1c-badge {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
  font-weight: 700;
  white-space: nowrap;
}
.badge.wh-reserve-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 700;
  white-space: nowrap;
}
.badge.wh-sto-badge {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
  font-weight: 700;
  white-space: nowrap;
}
.wh-card-note {
  margin-top: -4px;
}
.badge.wh-sys-badge {
  background: #cffafe;
  color: #0e7490;
  border: 1px solid #22d3ee;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 0;
  vertical-align: middle;
  font-size: 11px;
  letter-spacing: 0.01em;
  display: inline-block;
}
.wh-name-mark {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}
.wh-sys-row td {
  background: #ecfeff;
}
.wh-sys-row td:first-child {
  box-shadow: inset 3px 0 0 #0891b2;
}
.wh-sys-row td.mono {
  white-space: nowrap;
}
.out-serials-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  background: #f8fafc;
}
.out-serial-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 4px;
  font-size: 13px;
  color: var(--taxi-ink);
  cursor: pointer;
  border-radius: 8px;
}
.out-serial-item:hover {
  background: #fff;
}
.out-serial-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}
.doc-lines-preview {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.doc-lines-preview li {
  padding: 4px 0;
  border-top: 1px solid var(--taxi-line-soft);
}
.doc-lines-preview li:first-child {
  border-top: none;
  padding-top: 0;
}
.cp-doc-block {
  grid-column: 1 / -1;
}
.cp-doc-details {
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.cp-doc-details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 13px;
}
.cp-doc-details > summary::-webkit-details-marker {
  display: none;
}
.cp-doc-details > summary::after {
  content: '▾';
  margin-left: auto;
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.cp-doc-details[open] > summary::after {
  transform: rotate(180deg);
}
.cp-doc-details > summary:hover {
  background: #f8fafc;
}
.cp-doc-name {
  font-weight: 600;
  color: var(--taxi-ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-doc-hint {
  font-size: 12px;
  flex-shrink: 0;
}
.cp-doc-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--taxi-line-soft);
}
.cp-doc-dl {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.cp-doc-dl > div {
  display: grid;
  gap: 2px;
}
.cp-doc-dl dt {
  margin: 0;
  font-size: 11px;
  color: var(--taxi-muted);
  font-weight: 500;
}
.cp-doc-dl dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--taxi-ink);
  word-break: break-word;
}
@media (max-width: 720px) {
  .cp-doc-dl {
    grid-template-columns: 1fr;
  }
}
.wh-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wh-card-code {
  font-size: 12px;
  color: #64748b;
}
.wh-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--taxi-ink);
}
.wh-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  padding-top: 2px;
}
.wh-card-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wh-card-metrics .muted {
  font-size: 11px;
}
.wh-card-metrics strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 13px;
  border: 1px solid var(--taxi-line);
  background: #fff;
  border-radius: 12px;
  overflow: visible;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--taxi-line-soft);
  border-right: none;
  vertical-align: middle;
}
th {
  background: #f8fafc;
  color: #64748b;
  font-family: var(--font);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--taxi-line);
}
td {
  color: var(--taxi-ink);
}
td.mono, th.mono, .mono {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8fafc !important; }
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { background: #ccfbf1; }
th.sortable.sorted { color: var(--taxi-green); }
/* Заказы: фильтр по иконке у заголовка (сортировка — клик по подписи) */
th.has-deals-filter {
  position: relative;
  white-space: nowrap;
  padding-right: 28px !important;
}
th.has-deals-filter .deals-th-label {
  display: inline;
}
button.deals-th-filter {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: auto !important;
  box-shadow: none !important;
  z-index: 2;
}
button.deals-th-filter:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
button.deals-th-filter.is-on,
th.is-col-filtered button.deals-th-filter {
  color: #0f766e !important;
  background: #ccfbf1 !important;
}
button.deals-th-filter svg {
  display: block;
}
.deals-col-filter-pop.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 10060;
  min-width: 260px;
  width: min(320px, calc(100vw - 16px));
  max-width: min(340px, calc(100vw - 16px));
  max-height: min(380px, calc(100vh - 24px));
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  border-radius: 12px;
}
.deals-col-filter-head {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  margin: 0 0 6px;
  padding: 0 2px;
  letter-spacing: 0.02em;
}
th.col-filter {
  position: relative;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.col-filter:hover { background: #ccfbf1; }
th.col-filter.filtered { color: var(--taxi-green); }
.col-filter-pop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 260px;
  max-width: 340px;
  max-height: 360px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 8px;
  text-align: left;
  font-weight: 400;
  color: var(--taxi-ink);
}
.col-filter-pop.hidden { display: none !important; }
.col-filter-pop input[type="search"] {
  width: 100%;
  margin: 0 0 6px;
  padding: 6px 8px;
  border: 1px solid var(--taxi-line);
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}
.col-filter-list {
  overflow: auto;
  max-height: 280px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 8px;
  background: #f8fafc;
}
.deals-col-filter-pop .col-filter-list {
  max-height: min(260px, 42vh);
}
.col-filter-actions {
  display: flex;
  gap: 4px;
  margin: 0 0 6px;
}
.col-filter-actions .col-filter-item {
  flex: 1;
  text-align: center !important;
  border: 1px solid var(--taxi-line) !important;
  border-radius: 6px !important;
  padding: 4px 6px !important;
  font-size: 12px !important;
}
.col-filter-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  line-height: 1.35;
}
.col-filter-check:hover { background: var(--taxi-select); }
.col-filter-check input {
  margin: 2px 0 0;
  flex: 0 0 auto;
}
.col-filter-check span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  white-space: normal;
}
.th-deal-name {
  width: var(--deal-name-w, 240px);
  min-width: var(--deal-name-w, 240px);
  max-width: var(--deal-name-w, 240px);
  vertical-align: middle;
}
.th-deal-label {
  font-weight: 500;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-deal-name {
  width: var(--deal-name-w, 240px);
  min-width: var(--deal-name-w, 240px);
  max-width: var(--deal-name-w, 240px);
  vertical-align: top;
  overflow: hidden;
}
.td-deal-created {
  vertical-align: top;
  min-width: 140px;
  white-space: normal;
}
.deal-created-who {
  font-size: 13px;
  line-height: 1.25;
  color: var(--taxi-ink);
}
.deal-created-when {
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
}
.deal-name-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--deal-name-lines, 3);
  overflow: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.35;
  max-width: 100%;
}
table.deals-table.is-dense .deal-name-clamp {
  -webkit-line-clamp: unset;
  white-space: nowrap;
  display: block;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.col-settings-width {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--taxi-line-soft);
}
.col-settings-width label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--taxi-muted);
}
.col-settings-width input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}
.col-settings-width #d-name-w-val {
  font-variant-numeric: tabular-nums;
  color: var(--taxi-ink);
  font-weight: 500;
}
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  margin: 0 0 12px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px;
  background: #fff;
}
.table-scroll > table {
  margin: 0;
}
.table-scroll > table.data-table,
table.deals-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-scroll > table.data-table th,
.table-scroll > table.data-table td {
  overflow: hidden;
  vertical-align: top;
  box-sizing: border-box;
}
.table-scroll > table.deals-table th.has-deals-filter {
  overflow: visible;
}
.table-scroll > table.data-table.is-dense th,
.table-scroll > table.data-table.is-dense td {
  max-width: 220px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.table-scroll > table.data-table.is-wrap td {
  white-space: normal;
  max-width: 280px;
}
table.deals-table th,
table.deals-table td {
  overflow: hidden;
  vertical-align: top;
  box-sizing: border-box;
}
/* колонки читаемые; таблица шире экрана → скролл .table-scroll */
table.deals-table th:not(.th-deal-name),
table.deals-table td:not(.td-deal-name) {
  max-width: 220px;
  min-width: 5.5em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
table.deals-table th.mono,
table.deals-table td.mono {
  min-width: 7em;
  white-space: nowrap;
}
table.deals-table.is-wrap .td-deal-name {
  white-space: normal;
}
table.deals-table.is-wrap .deal-name-clamp {
  -webkit-line-clamp: var(--deal-name-lines, 3);
  white-space: normal;
  display: -webkit-box;
}
table.deals-table td .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.deals-table .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 12px;
  min-height: 36px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px;
}
.table-tools .pager {
  margin: 0;
  margin-right: auto;
}
.products-cat-bar {
  justify-content: flex-start;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.products-cat-bar .pager {
  margin-right: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
}
.products-cat-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin-left: auto;
}
.products-cat-filters label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--taxi-muted);
  font-weight: 500;
}
.products-cat-filters select {
  min-width: 180px;
  max-width: 260px;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 28px 0 10px !important;
  border-radius: 10px !important;
  border: 1px solid var(--taxi-line) !important;
  background: #fff !important;
  font-size: 13px !important;
  color: var(--taxi-ink) !important;
}
.products-cat-filters button {
  height: 34px !important;
  min-height: 34px !important;
}
.table-tools-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.table-tool-ico {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  min-height: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--taxi-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #64748b !important;
  box-shadow: none !important;
  cursor: pointer;
}
.table-tool-ico:hover {
  background: #f0fdfa !important;
  color: var(--brand) !important;
  border-color: #99f6e4 !important;
}
.table-tool-ico.active {
  background: #ecfdf5 !important;
  color: var(--brand-dark) !important;
  border-color: #5eead4 !important;
}
.table-tool-ico svg { display: block; }
.taxi .form-body table .table-tool-ico.pe-app-del {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
}
.taxi .form-body table .table-tool-ico.pe-app-del:hover {
  color: #dc2626 !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}
.col-settings {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.col-settings-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  z-index: 45;
  min-width: 220px;
  max-height: 360px;
  overflow: auto;
  margin-top: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}
.col-settings-pop.hidden { display: none; }
.col-settings-hint {
  font-size: 11px;
  padding: 2px 4px 8px;
  line-height: 1.3;
}
.col-settings-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-radius: 4px;
  cursor: grab;
  font: inherit;
  color: inherit;
  border: 1px solid transparent;
}
.col-settings-item:hover { background: var(--taxi-select); }
.col-settings-item.locked {
  opacity: 0.85;
}
.col-settings-item.locked input { cursor: default; }
.col-settings-item .col-drag {
  flex: 0 0 auto;
  width: 14px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: -2px;
  line-height: 1;
  user-select: none;
}
.col-settings-item .col-settings-label {
  flex: 1;
  min-width: 0;
}
.col-settings-item.is-dragging {
  opacity: 0.45;
}
.col-settings-item.drag-over {
  border-color: var(--brand);
  background: #f0fdfa;
}
.col-settings-item:active { cursor: grabbing; }
.col-filter-item {
  display: block !important;
  width: 100%;
  text-align: left !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  color: inherit !important;
  font: inherit !important;
  cursor: pointer;
}
.col-filter-item:hover { background: var(--taxi-select) !important; }
.col-filter-item.active {
  background: #ccfbf1 !important;
  color: var(--taxi-green) !important;
  font-weight: 600 !important;
}
/* Zebra: all list/form tables (deals, products, docs, CP, presence, audit…) */
.form-body table tbody tr:nth-child(odd) td,
.form-chrome table tbody tr:nth-child(odd) td {
  background: #fff;
}
.form-body table tbody tr:nth-child(even) td,
.form-chrome table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.form-body table tbody tr:hover td,
.form-chrome table tbody tr:hover td,
tr:hover td {
  background: #f0fdfa;
}
.form-body table tbody tr.selected td,
.form-chrome table tbody tr.selected td,
tr.selected td {
  background: #ccfbf1;
}
tbody tr.clickable { cursor: pointer; }
.row-ico {
  display: none !important; /* safety net — markers removed from JS */
}

/* Превью фото при наведении в таблице «Товары» (/media/photos) */
.mp-products .mp-thumb,
.prod-list-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  background: #eee;
  display: block;
}
.prod-photo-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.prod-photo-cell .mp-thumb,
.prod-photo-cell .prod-list-thumb {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.prod-photo-n {
  vertical-align: middle;
  font-size: 12px;
}
.mp-products .mp-thumb-empty {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  font-size: 11px;
}
.mp-hover-preview {
  position: fixed;
  z-index: 10050;
  width: 220px;
  padding: 6px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.mp-hover-preview.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.mp-hover-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  background: #f1f5f9;
  border-radius: 3px;
}
.mp-hover-preview .mp-hover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 13px;
  border-radius: 3px;
}
.mp-hover-preview .mp-hover-caption {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.3;
  color: #334155;
  max-height: 2.6em;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 0;
}
.badge.draft {
  background: #fff7ed;
  color: #c2410c;
  border-color: transparent;
}
.badge.muted {
  background: #f1f5f9;
  color: #64748b;
  border-color: transparent;
}

/* Документы заказа (СТО-пакет): список без «карточек» .toolbar */
.sto-docs-hub .sto-docs-fields {
  margin: 0 0 16px;
  padding: 12px 14px 14px;
  border: 1px solid #86efac;
  border-radius: 10px;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.08);
}
.sto-docs-hub .sto-docs-list {
  margin: 0 0 14px;
  padding: 12px 14px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-fields-title {
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 13px;
}
.sto-docs-hub .sto-docs-fields-grid.form-grid {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.sto-docs-hub .sto-docs-pay {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #fffbeb;
}
.sto-docs-hub .sto-docs-invoice-group {
  margin: 8px 0;
  border: 1px solid #f0e0b8;
  border-radius: 10px;
  overflow: visible;
  background: #fffbeb;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-invoice-group .sto-docs-row {
  border-bottom: 1px solid #f0e0b8;
  background: #fffef7;
}
.sto-docs-hub .sto-docs-invoice-group .sto-docs-row:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-invoice-group .sto-docs-pay {
  border-bottom: 0;
  background: transparent;
  padding-top: 10px;
}
.sto-docs-hub .sto-docs-invoice-group .sto-docs-pay-title {
  font-weight: 600;
}
.sto-docs-hub .sto-docs-pay-title {
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 4px;
  color: var(--taxi-ink, #0f172a);
}
.sto-docs-hub .sto-docs-pay-hint {
  margin: 0 0 10px;
  font-size: 12px;
}
.sto-docs-hub .sto-docs-pay-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.sto-docs-hub .sto-docs-pay-qr {
  flex: 0 0 auto;
  padding: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.sto-docs-hub .sto-docs-pay-qr img {
  display: block;
  width: 88px;
  height: 88px;
}
.sto-docs-hub .sto-docs-pay-main {
  flex: 1 1 220px;
  min-width: 0;
}
.sto-docs-hub .sto-docs-pay-link-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 8px;
}
.sto-docs-hub .sto-docs-pay-link-row input {
  flex: 1 1 160px;
  min-width: 0;
  font-size: 12px;
}
.sto-docs-hub .sto-docs-pay-link-row #pack-pay-open {
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line, #ccc);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-pay-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sto-docs-hub .sto-docs-pay-actions #pack-pay-sms {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}
.sto-docs-hub .sto-docs-list > .sto-docs-pay:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-list > .sto-docs-invoice-group + .sto-docs-row {
  border-top: 0;
}
.sto-docs-hub .sto-docs-xfer-group {
  margin: 8px 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: visible;
  background: #f8fafc;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-xfer-group .sto-docs-row {
  border-bottom: 1px solid #cbd5e1;
  background: #fff;
}
.sto-docs-hub .sto-docs-xfer-group .sto-docs-row:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-xfer-group .sto-docs-xfer {
  border-bottom: 0;
  background: transparent;
  padding-top: 10px;
}
.sto-docs-hub .sto-docs-xfer-group .sto-docs-pay-title {
  font-weight: 600;
}
.sto-docs-hub .sto-docs-sts-group {
  margin: 8px 0;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  overflow: visible;
  background: #eff6ff;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-sts-group .sto-docs-row {
  border-bottom: 1px solid #bfdbfe;
  background: #fff;
}
.sto-docs-hub .sto-docs-sts-group .sto-docs-sts {
  border-bottom: 0;
  background: transparent;
  padding: 12px;
}
.sto-docs-hub .sto-docs-pdn-group {
  margin: 0 0 2px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: visible;
  background: #fff;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-fields > .sto-docs-pdn-group {
  margin: 12px 0 0;
}
.sto-docs-hub .sto-docs-pdn-group .sto-docs-row {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px 10px 0 0;
}
.sto-docs-hub .sto-docs-pdn-group .sto-docs-row.is-sms-sent {
  background: #ecfdf5;
  box-shadow: inset 4px 0 0 #16a34a;
  border-bottom-color: #bbf7d0;
}
.sto-docs-hub .sto-docs-pdn-group.is-sms-sent {
  border-color: #86efac;
}
.sto-docs-hub .sto-docs-pdn-files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px 12px;
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
}
.sto-docs-hub .pdn-scan-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sto-docs-hub .pdn-scan-thumb {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--taxi-line, #e2e8f0);
  background: #fff;
  text-decoration: none;
  color: inherit;
  align-items: center;
  justify-content: center;
}
.sto-docs-hub .pdn-scan-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sto-docs-hub .pdn-scan-thumb.is-pdf span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.sto-docs-hub .pdn-scan-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sto-docs-hub .pdn-upload-label {
  margin: 0;
}
.sto-docs-hub .sto-docs-client-parts {
  margin: 0 0 2px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: visible;
  background: #fff;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-client-parts .sto-docs-row {
  border-bottom: 1px solid #e2e8f0;
}
.sto-docs-hub .client-parts-list {
  margin: 4px 0 0;
  padding-left: 18px;
  width: 100%;
  font-size: 12px;
  color: #334155;
}
.sto-docs-hub .sto-docs-checklist {
  margin: 0 0 10px;
  padding: 10px 12px 12px;
  border: 1px solid #e2e8f0;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #f8fafc;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-row[data-sto-extra='sto-checklist'] {
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
}
.sto-docs-hub .sto-cl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 10px;
}
.sto-docs-hub .sto-cl-progress {
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
}
.sto-docs-hub .sto-cl-phase {
  margin: 0 0 12px;
}
.sto-docs-hub .sto-cl-phase:last-child {
  margin-bottom: 0;
}
.sto-docs-hub .sto-cl-phase-title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.sto-docs-hub .sto-cl-phase-tip {
  margin: 0 0 8px;
  font-size: 11px;
}
.sto-docs-hub .sto-cl-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.sto-docs-hub .sto-cl-item.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.sto-docs-hub .sto-cl-item.is-opt {
  opacity: 0.92;
}
.sto-docs-hub .sto-cl-item input {
  margin-top: 2px;
  flex: 0 0 auto;
}
.sto-docs-hub .sto-cl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sto-docs-hub .sto-cl-label {
  font-size: 13px;
  color: #0f172a;
  line-height: 1.35;
}
.sto-docs-hub .sto-cl-opt {
  font-style: normal;
  color: #64748b;
  font-size: 11px;
}
.sto-docs-hub .sto-cl-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}
.sto-docs-hub .sto-docs-sts-group .sto-docs-pay-title {
  font-weight: 600;
}
.sto-docs-hub .sto-docs-sts {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #eff6ff;
}
.sto-docs-hub .sto-docs-car-photos {
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #bfdbfe;
}
.sto-docs-hub .car-photo-need-list {
  margin: 6px 0 10px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 16px;
  counter-reset: car-need;
}
.sto-docs-hub .car-photo-need-list li {
  margin: 0;
  padding-left: 1.35rem;
  position: relative;
  counter-increment: car-need;
}
.sto-docs-hub .car-photo-need-list li::before {
  content: counter(car-need) ".";
  position: absolute;
  left: 0;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .sto-docs-hub .car-photo-need-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .sto-docs-hub .car-photo-need-list {
    grid-template-columns: 1fr;
  }
}
.sto-docs-hub .car-photo-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 112px;
  padding: 12px;
  border: 1.5px dashed #93c5fd;
  border-radius: 10px;
  background: #f8fbff;
  cursor: pointer;
  box-sizing: border-box;
  outline: none;
}
.sto-docs-hub .car-photo-drop:hover,
.sto-docs-hub .car-photo-drop:focus-visible {
  border-color: #3b82f6;
  background: #eff6ff;
}
.sto-docs-hub .car-photo-drop.is-dragover {
  border-color: #2563eb;
  border-style: solid;
  background: #dbeafe;
}
.sto-docs-hub .car-photo-drop-hint {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  color: #1e293b;
  align-self: center;
}
.sto-docs-hub .car-photo-drop-hint .muted {
  font-size: 12px;
}
.sto-docs-hub .car-photo-thumb {
  position: relative;
}
.sto-docs-hub .car-photo-thumb .car-photo-side {
  position: absolute;
  left: 4px;
  bottom: 4px;
  right: 4px;
  font-size: 10px;
  line-height: 1.2;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sto-docs-hub .car-photo-thumb .pdn-scan-del {
  position: absolute;
  top: 2px;
  right: 2px;
}
.sto-docs-hub .sto-docs-xfer {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #f8fafc;
}
.sto-docs-hub .sto-docs-list > .sto-docs-xfer:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-fiscal {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #f0fdf4;
}
.sto-docs-hub .sto-docs-fiscal-group {
  margin: 8px 0;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  overflow: visible;
  background: #f0fdf4;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-fiscal-group .sto-docs-row {
  border-bottom: 1px solid #bbf7d0;
  background: #fff;
}
.sto-docs-hub .sto-docs-fiscal-group .sto-docs-row:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-fiscal-group .sto-docs-fiscal {
  border-bottom: 0;
  background: transparent;
  padding-top: 10px;
}
.sto-docs-hub .sto-docs-fiscal-group .sto-docs-pay-title {
  font-weight: 600;
}
.sto-docs-hub .sto-docs-list > .sto-docs-fiscal:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-ship-group {
  margin: 14px 0 0;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  overflow: hidden;
  background: #eff6ff;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-ship {
  margin: 0;
  padding: 12px 14px;
  background: transparent;
  border: 0;
}
.sto-docs-hub .sto-docs-ship .sto-docs-fields-title {
  margin: 0 0 8px;
}
.sto-docs-hub .sto-docs-flow-group {
  margin: 14px 0 0;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  overflow: hidden;
  background: #ecfdf5;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-flow {
  margin: 0;
  padding: 12px 14px;
}
.sto-docs-hub .sto-docs-flow .sto-docs-fields-title {
  margin: 0 0 8px;
}
.sto-docs-hub .sto-docs-flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 720px) {
  .sto-docs-hub .sto-docs-flow-grid {
    grid-template-columns: 1fr;
  }
}
.sto-docs-hub .sto-docs-flow-card {
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.sto-docs-hub .sto-docs-flow-card.is-ok {
  border-color: #34d399;
  background: #f0fdf4;
}
.sto-docs-hub .sto-docs-flow-card.is-wait {
  border-color: #fcd34d;
  background: #fffbeb;
}
.sto-docs-hub .sto-docs-flow-card.is-off {
  border-color: #e2e8f0;
  background: #f8fafc;
  opacity: 0.85;
}
.sto-docs-hub .sto-docs-flow-k {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sto-docs-hub .sto-docs-flow-v {
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.3;
}
.sto-docs-hub .sto-docs-flow-m {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}
.sto-docs-hub .sto-docs-close-group {
  margin: 14px 0 0;
  border: 1px solid #fde68a;
  border-radius: 10px;
  overflow: hidden;
  background: #fffbeb;
  box-sizing: border-box;
}
.sto-docs-hub .sto-docs-close {
  margin: 0;
  padding: 12px 14px;
}
.sto-docs-hub .sto-docs-close .sto-docs-fields-title {
  margin: 0 0 8px;
}
.sto-docs-hub .sto-docs-close-ok {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #047857;
}
.sto-docs-hub .sto-docs-close-miss {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 12px;
  color: #92400e;
}
.sto-docs-hub .sto-docs-close-miss li {
  margin: 2px 0;
}
.sto-docs-hub .sto-docs-close #sto-docs-close-success:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sto-docs-hub .sto-docs-cdek-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  font-size: 12px;
  margin-top: 2px;
}
.sto-docs-hub .sto-docs-cdek-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sto-docs-hub .sto-docs-cdek-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}
.sto-docs-hub .sto-docs-cdek-thumb img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}
.sto-docs-hub .sto-docs-cdek-label .ui-ico-bar {
  margin: 0;
}
.sto-docs-hub .sto-docs-cdek-label .toolbar-ico {
  width: 34px;
  height: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  border: 1px solid var(--taxi-line, #e2e8f0);
  background: #fff;
  color: var(--taxi-ink, #0f172a);
  box-sizing: border-box;
  text-decoration: none !important;
}
.sto-docs-hub .sto-docs-cdek-label .toolbar-ico:hover {
  background: #f8fafc;
  border-color: #93c5fd;
}
.sto-docs-hub .sto-docs-cdek-label .toolbar-ico svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}
.sto-docs-hub .sto-matrix-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.sto-docs-hub .sto-matrix-chip.is-on {
  color: #0f172a;
  background: #eff6ff;
  border-color: #bfdbfe;
  font-weight: 600;
}
.sto-docs-hub .sto-docs-row.is-off .sto-docs-row-label,
.sto-docs-hub .sto-docs-row.is-off .sto-docs-row-meta {
  color: #94a3b8;
  font-weight: 500;
}
.sto-docs-hub .sto-docs-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.35fr) minmax(90px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  min-height: 48px;
  margin: 0;
  border-bottom: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #fff;
  box-sizing: border-box;
  overflow: visible;
}
.sto-docs-hub .sto-docs-row:last-child {
  border-bottom: 0;
}
.sto-docs-hub .sto-docs-row-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--taxi-ink, #0f172a);
  line-height: 1.3;
}
.sto-docs-hub .sto-docs-row-meta {
  font-size: 12px;
  color: var(--taxi-muted, #64748b);
  line-height: 1.35;
}
.sto-docs-hub .sto-docs-row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: end;
  flex-shrink: 0;
  overflow: visible;
  z-index: 4;
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico {
  width: 34px;
  height: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  margin: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  border: 1px solid var(--taxi-line, #e2e8f0);
  background: #fff;
  color: var(--taxi-ink, #0f172a);
  box-sizing: border-box;
  text-decoration: none !important;
  flex-shrink: 0;
  position: relative;
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico[data-tip]:not([data-tip=""])::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(-2px);
  padding: 5px 9px;
  background: #0f172a;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
  max-width: min(280px, 70vw);
  text-align: center;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico[data-tip]:not([data-tip=""])::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #0f172a;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s;
  z-index: 90;
  pointer-events: none;
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico[data-tip]:not([data-tip=""]):hover::after,
.sto-docs-hub .sto-docs-row-actions .toolbar-ico[data-tip]:not([data-tip=""]):focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.sto-docs-hub .sto-docs-row-actions .toolbar-ico[data-tip]:not([data-tip=""]):hover::before,
.sto-docs-hub .sto-docs-row-actions .toolbar-ico[data-tip]:not([data-tip=""]):focus-visible::before {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 560px) {
  .sto-docs-hub .sto-docs-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'label actions'
      'meta actions';
  }
  .sto-docs-hub .sto-docs-row-label { grid-area: label; }
  .sto-docs-hub .sto-docs-row-meta { grid-area: meta; }
  .sto-docs-hub .sto-docs-row-actions {
    grid-area: actions;
    align-self: center;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 14px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px;
}
/* Общий блок контур + юрлицо — сверху карточки */
.form-grid.form-org-legal {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: #fff;
  border-color: #bbf7d0;
}
.form-grid.form-org-legal.is-locked {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.form-grid.form-org-legal.is-locked input[readonly] {
  background: #f1f5f9;
  color: #334155;
}

/* Поиск в заказе: 2 оси — марка / товар·услуга */
.deal-find-toolbar .deal-find-axes {
  flex: 0 0 auto;
}
.deal-find-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.deal-find-field #deal-scan-unit,
.deal-find-field #deal-find-q {
  flex: 1 1 160px;
  min-width: 140px;
}
.deal-find-field #deal-find-suggest {
  left: 0;
  right: 48px;
  top: calc(100% + 4px);
  z-index: 30;
}
.deal-find-kind {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #ecfdf5;
  color: #0f766e;
  vertical-align: middle;
}
.suggest-item[data-kind='Услуга'] .deal-find-kind {
  background: #eff6ff;
  color: #1d4ed8;
}
/* Скан марки в заказе: поле + камера + «Привязать» */
.deal-scan-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.deal-scan-field #deal-scan-unit {
  flex: 1 1 160px;
  min-width: 140px;
}
.deal-scan-field .toolbar-ico.deal-scan-cam {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--taxi-line, #cbd5e1);
  border-radius: 10px;
  background: #fff;
  color: var(--brand, #0f766e);
}
.deal-scan-field .toolbar-ico.deal-scan-cam:hover {
  border-color: var(--brand, #0f766e);
  background: #ecfdf5;
}
.wms-cam-scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.wms-cam-scan-overlay[hidden] {
  display: none !important;
}
.wms-cam-scan-card {
  background: #fff;
  border-radius: 14px;
  width: min(420px, 96vw);
  padding: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.wms-cam-scan-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--brand, #0f766e);
}
.wms-cam-scan-reader {
  width: 100%;
  min-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}
.wms-cam-scan-hint {
  margin: 8px 0 0;
  font-size: 13px;
}
.wms-cam-scan-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
/* Новый приход — на всю ширину и высоту рабочей области */
.taxi-main > #view:has(#in-form-body),
.taxi-main > #view:has(#in-basis-step) {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: calc(100% - 4px);
  box-sizing: border-box;
}
.taxi-main > #view:has(#in-form-body) > .form-chrome,
.taxi-main > #view:has(#in-basis-step) > .form-chrome {
  flex: 1;
  min-height: 100%;
  height: 100%;
}
.form-body:has(#in-form-body),
.form-body:has(#in-basis-step) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}
#in-basis-step.in-basis-pick {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#in-basis-step.in-basis-pick,
#in-basis-step .in-basis-pick-grid {
  max-width: none;
  width: 100%;
}
#in-form-body {
  width: 100%;
  max-width: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#in-form-body .form-grid {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  align-content: start;
  grid-template-rows: auto auto 1fr;
  min-height: 0;
}
#in-form-body .form-grid > label,
#in-form-body .form-grid > .span-2,
#in-form-body .in-free-block {
  min-width: 0;
}
#in-form-body #iorder-wrap,
#in-form-body #ideal-wrap,
#in-form-body #in-free-block {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  grid-row: span 1;
}
#in-form-body .form-grid input,
#in-form-body .form-grid select,
#in-form-body .form-grid textarea {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
#in-form-body .in-basis-chosen {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}
#in-form-body .iso-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 12px;
}
#in-form-body .iso-lines-scroll {
  flex: 1;
  max-height: none;
  min-height: min(280px, 40vh);
}
.form-grid label { display: grid; gap: 5px; font-size: 12px; color: var(--taxi-muted); font-weight: 500; }
.form-grid label.pe-check,
.form-grid label.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--taxi-ink, #0f172a);
  font-weight: 500;
  min-height: 40px;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
}
.form-grid label.pe-check {
  padding-top: 0;
}
.wh-widget-flag-field {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--taxi-border, #cbd5e1);
  border-radius: 8px;
  background: var(--taxi-surface-2, #f8fafc);
}
.wh-widget-flag-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--taxi-muted, #64748b);
  text-transform: none;
}
.wh-widget-flag {
  align-self: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.wh-widget-flag-hint {
  margin: 0;
  padding: 8px 0 0;
  font-size: 12px;
}
.form-grid label.inline-label {
  min-height: 0;
  padding: 0;
  margin: 0;
  color: var(--taxi-muted);
  font-size: 12px;
}
.form-grid label.pe-check input[type="checkbox"],
.form-grid label.inline-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--taxi-teal, #0d9488);
  cursor: pointer;
}
.form-grid label[hidden],
.form-grid [hidden] {
  display: none !important;
}
.form-fields .field[hidden],
.form-fields [hidden] {
  display: none !important;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid .cp-create-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--taxi-line-soft);
}
.form-grid .cp-create-actions .primary {
  min-width: 140px;
}
.form-grid .form-grid-label {
  display: block;
  font-size: 12px;
  color: var(--taxi-muted);
  font-weight: 500;
  margin-bottom: 5px;
}
.form-grid .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  min-height: var(--control-h, 34px);
}
.form-grid .checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--taxi-ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.form-grid .checks input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}
.form-grid label > input,
.form-grid label > select,
.form-grid label > textarea,
.form-fields .field input,
.form-fields .field select,
.form-fields .field textarea {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  border-color: #d4dbe6;
  background: #fff;
  box-sizing: border-box;
}
.form-grid label > select,
.form-fields .field select {
  height: 40px;
  max-height: 40px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: auto;
}
.form-grid label > textarea,
.form-fields .field textarea {
  min-height: 88px;
  line-height: 1.45;
  resize: vertical;
}
.form-grid label > input::placeholder,
.form-fields .field input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8;
  opacity: 1;
  font-weight: 400;
}
.form-grid.full { grid-template-columns: 1fr; }
.mono { font-family: var(--mono); font-size: 12px; }
.hidden { display: none !important; }

/* ЗН: редактор авто — без вложенных «карточек» form-grid/toolbar */
.wo-auto-panel .form-grid.wo-auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
}
.wo-auto-panel .form-grid.wo-auto-grid > label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--taxi-muted, #64748b);
}
.wo-auto-panel .form-grid.wo-auto-grid > label > input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #d4dbe6;
  background: #fff;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
}
.wo-auto-panel .form-grid.wo-auto-grid .span-2 {
  grid-column: 1 / -1;
}
.wo-auto-panel .sts-photos-row.wo-auto-sts,
.wo-auto-panel .wo-auto-sts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin: 0;
}
.wo-auto-panel .sts-thumb {
  width: 72px;
  padding: 4px;
  border-radius: 6px;
}
.wo-auto-panel .sts-thumb img {
  height: 44px;
}
.wo-auto-panel .sts-thumb span {
  font-size: 10px;
}
.wo-auto-panel .sts-upload-label.wo-auto-sts-upload,
.wo-auto-panel .wo-auto-sts-upload {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--taxi-muted, #64748b);
  min-width: 0;
}
.wo-auto-panel .wo-auto-sts-upload input[type='file'] {
  max-width: min(220px, 100%);
  font-size: 12px;
}
.btn-with-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-with-ico svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
a.ghost.btn-with-ico {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line, #ccc);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.wo-auto-panel #sd-sts-ocr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px !important;
  height: 32px;
  min-height: 32px !important;
  font-size: 12.5px !important;
  align-self: flex-end;
}
.wo-auto-panel #sd-sts-ocr svg {
  width: 14px;
  height: 14px;
}
.wms-app-busy {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wms-app-busy[hidden] {
  display: none !important;
}
.wms-app-busy-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 28px;
  max-width: min(360px, 92vw);
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.wms-app-busy-spin {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--brand, #0f766e);
  border-radius: 50%;
  animation: wms-app-busy-spin 0.8s linear infinite;
}
@keyframes wms-app-busy-spin {
  to {
    transform: rotate(360deg);
  }
}
.wms-app-busy-msg {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: #0f172a;
  font-weight: 600;
}
html.wms-busy-lock,
html.wms-busy-lock body {
  overflow: hidden;
}
.wo-auto-panel #sd-sts-ocr-msg,
.wo-auto-panel #sd-vehicle-msg {
  font-size: 12px;
  align-self: center;
}
.taxi .form-body .wo-auto-panel .toolbar.wo-auto-actions {
  position: sticky;
  bottom: 10px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 6px 0 0;
  padding: 10px 12px;
  border: 1px solid #c5e4de;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.taxi .form-body .wo-auto-panel .toolbar.wo-auto-actions > .grow {
  flex: 1 1 12px;
  min-width: 8px;
}
.taxi .form-body .wo-auto-panel .toolbar.wo-auto-actions > button {
  height: 32px;
  min-height: 32px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
}
.wo-auto-panel #sd-vehicle-save {
  min-width: 112px;
  padding: 0 16px !important;
  font-size: 13px !important;
  font-weight: 650;
}

button.linkish {
  background: none !important;
  border: none !important;
  color: var(--taxi-blue);
  padding: 0 !important;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-align: left;
  box-shadow: none !important;
  min-height: auto !important;
}
button.linkish:hover {
  color: var(--brand-hover, #0f766e);
  text-decoration: none;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 13px;
  color: var(--taxi-muted);
  font-variant-numeric: tabular-nums;
}
.pager button {
  min-width: 34px;
  height: 34px;
  border-radius: 10px !important;
  border: 1px solid var(--taxi-line) !important;
  background: #fff !important;
  color: var(--taxi-ink) !important;
  cursor: pointer;
  padding: 0 !important;
  font-weight: 600;
  box-shadow: none !important;
  min-height: auto !important;
}
.pager button:hover:not(:disabled) {
  border-color: var(--brand-deep) !important;
  color: var(--brand) !important;
  background: #f0fdfa !important;
}
.pager button:disabled { opacity: 0.4; cursor: default; }
.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 12px;
  color: var(--taxi-muted);
  font-weight: 500;
}
.pager-size select {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 28px 0 10px !important;
  border-radius: 10px !important;
  border: 1px solid var(--taxi-line) !important;
  background: #fff !important;
  font-size: 13px !important;
  font-weight: 600;
  color: var(--taxi-ink) !important;
  box-shadow: none !important;
  cursor: pointer;
}

/* ——— Плавающий чат (FAB отключён — чаты через раздел /chats) ——— */
.chat-fab-root {
  display: none !important;
}
.chat-fab-root.is-legacy-layout {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.chat-fab-root > * { pointer-events: auto; }
.chat-fab {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50% !important;
  border: 0 !important;
  background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.35) !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: auto !important;
  padding: 0 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.45) !important;
}
.chat-fab.is-open {
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.5), 0 0 0 3px rgba(45, 212, 191, 0.35) !important;
}
/* Бейдж «есть уведомление» — только колокольчик в шапке, не FAB чатов */
.chat-fab-badge {
  display: none !important;
}
.sec-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}
/* Алерты Amo / сотрудники: одна точка сразу после текста, как sup */
.taxi-sections .sec .sec-badge[data-kind="amo-rules"],
.taxi-sections .sec .sec-badge[data-kind="amo-users"],
.section-group .section-link .sec-badge[data-kind="amo-rules"],
.section-group .section-link .sec-badge[data-kind="amo-users"] {
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  margin-left: 5px !important;
  margin-right: auto;
  padding: 0;
  border-radius: 50%;
  background: #ef4444;
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: none;
  animation: none;
  align-self: center;
  transform: translateY(-0.35em);
}
.taxi-sections .sec.has-alert .sec-badge[data-kind="amo-rules"],
.taxi-sections .sec.has-alert .sec-badge[data-kind="amo-users"] {
  box-shadow: none;
  animation: none;
}
.section-group a.section-link.has-alert {
  color: inherit;
  font-weight: inherit;
}
.amo-rules-alerts .amo-rules-ack-row {
  margin-top: 8px;
}
.amo-rules-alerts .amo-rules-ack-row #amo-rules-ack {
  margin: 0;
  padding: 6px 12px;
  height: auto;
  min-height: 32px;
  border: 1px solid #d4dbe6;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 500;
}
.chat-pop {
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 100px));
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-pop.hidden { display: none; }
.chat-pop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--taxi-line-soft);
  background: #f8fafc;
  flex-shrink: 0;
}
.chat-pop-head strong { font-size: 14px; }
.chat-pop-unread { display: none !important; }
.chat-pop-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.chat-pop-x {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: auto !important;
  padding: 4px 8px !important;
  cursor: pointer;
  color: #64748b !important;
  font-size: 14px;
}
.chat-pop-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
}
.chat-pop-list { display: flex; flex-direction: column; }
.chat-pop-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0 !important;
  border-bottom: 1px solid var(--taxi-line-soft) !important;
  background: #fff !important;
  padding: 10px 14px !important;
  cursor: pointer;
  min-height: auto !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.chat-pop-item:hover { background: #f0fdfa !important; }
.chat-pop-item.has-unread { background: #ecfdf5 !important; }
.chat-pop-item-top,
.chat-pop-item-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.chat-pop-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--taxi-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-pop-item-time { font-size: 11px; color: #94a3b8; flex-shrink: 0; }
.chat-pop-item-preview {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  margin-top: 2px;
}
.chat-pop-item-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.chat-pop-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.chat-pop-thread-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--taxi-line-soft);
  flex-shrink: 0;
}
.chat-pop-back {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: auto !important;
  padding: 4px 6px !important;
  cursor: pointer;
  font-size: 14px;
  color: var(--brand) !important;
}
.chat-pop-msgs {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  min-height: 0;
}
.chat-pop-msg {
  max-width: 85%;
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px 12px 12px 4px;
  padding: 8px 10px;
}
.chat-pop-msg.mine {
  align-self: flex-end;
  background: #ccfbf1;
  border-color: #99f6e4;
  border-radius: 12px 12px 4px 12px;
}
.chat-pop-msg-who { font-size: 11px; font-weight: 600; color: #0f766e; margin-bottom: 2px; }
.chat-pop-msg-body { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.chat-pop-msg-time { font-size: 10px; color: #94a3b8; margin-top: 4px; text-align: right; }
.chat-pop-msg-read {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.chat-pop-msg-read.is-unread { color: #94a3b8; }
.chat-pop-msg-read.is-read { color: #0d9488; }
.chat-pop-msg.mine .chat-pop-msg-read.is-read { color: #0f766e; }
.chats-msg-read {
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
}
.chats-msg-read.is-unread { color: #94a3b8; }
.chats-msg-read.is-read { color: #0d9488; }
.chat-pop-msg-read {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.chat-pop-msg-read.is-unread { color: #94a3b8; }
.chat-pop-msg-read.is-read { color: #0d9488; }
.chat-pop-msg.mine .chat-pop-msg-read.is-read { color: #0f766e; }
.chats-msg-read {
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
}
.chats-msg-read.is-unread { color: #94a3b8; }
.chats-msg-read.is-read { color: #0d9488; }

.chat-pop-compose {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid var(--taxi-line-soft);
  background: #fff;
  flex-shrink: 0;
}
.chat-pop-compose-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}
.chat-pop-attach {
  position: relative;
  flex-shrink: 0;
}
.chat-pop-attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  z-index: 20;
  min-width: 148px;
  padding: 4px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-pop-attach-menu.hidden {
  display: none !important;
}
.chat-pop-attach-menu > button {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #334155 !important;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
}
.chat-pop-attach-menu > button:hover:not(:disabled) {
  background: #f0fdfa !important;
  color: #0f766e !important;
}
.chat-pop-attach-menu > button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.chat-pop-attach-menu > button svg {
  flex-shrink: 0;
  color: #64748b;
}
.chat-pop-pending {
  padding: 8px 8px 4px;
  border-bottom: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #f0fdfa;
}
.chat-pop-compose .chat-pop-entity,
.chat-pop-pending .chat-pop-entity {
  flex: 1 1 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.1);
  font-size: 12px;
}
.chat-pop-entity-kind {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand, #0f766e);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-pop-entity-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #64748b;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 2px !important;
}
.chat-pop-msg-entity {
  display: block;
  margin-bottom: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.12);
  font-size: 11px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
.chat-pop-compose-row input[type='text'],
.chat-pop-compose-row #chat-pop-input {
  flex: 1;
  min-width: 0;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  margin: 0 !important;
  font-size: 13px !important;
  padding: 0 10px !important;
}
.chat-pop-compose-row > button.primary {
  width: 32px;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  flex-shrink: 0;
  font-size: 13px;
}
.chat-pop-ico {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: none !important;
}
.chat-pop-ico:hover {
  background: #f1f5f9 !important;
  color: #0f766e !important;
}
.chat-pop-ico:disabled,
.chat-pop-ico.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.chat-pop-ico svg {
  display: block;
}
.chat-pop-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}
.chat-pop-rec.hidden {
  display: none !important;
}
.chat-pop-compose-row.hidden {
  display: none !important;
}
.chat-pop-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: chat-pop-pulse 1s ease-in-out infinite;
}
@keyframes chat-pop-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.toolbar-ico.is-pulse {
  outline: 2px solid #ffbf2e;
  outline-offset: 2px;
  animation: chat-pop-pulse 1s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(255, 191, 46, 0.25);
}
.chat-pop-rec button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  width: auto !important;
  border-radius: 8px !important;
}
.chat-pop-att {
  display: block;
  margin: 4px 0;
}
.chat-pop-att-img img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  display: block;
}
.chat-pop-att-voice audio {
  width: 100%;
  max-width: 220px;
  height: 32px;
}
.chat-pop-att-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  font-size: 12px;
}
.chat-pop-msg.mine .chat-pop-att-file {
  background: rgba(15, 118, 110, 0.12);
}
.chat-pop-att-file strong {
  display: block;
  font-size: 12px;
}
.chat-pop-att-file small {
  color: #64748b;
  font-size: 10px;
}
.chat-pop-att-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-grid label,
.form-fields .field,
.suggest-anchor {
  position: relative;
}
.form-grid label > .suggest-anchor {
  display: block;
  width: 100%;
}
.form-grid label > .suggest-anchor > input {
  width: 100%;
  box-sizing: border-box;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #d4dbe6;
  background: #fff;
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  border: 1px solid var(--taxi-line);
  background: #fff;
  max-height: 220px;
  overflow: auto;
  z-index: 80;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.form-fields .field > .suggest {
  left: 126px;
  grid-column: auto;
}
.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0 !important;
  border-bottom: 1px solid var(--taxi-line-soft) !important;
  background: transparent !important;
  padding: 6px 8px !important;
  cursor: pointer;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: auto !important;
}
.suggest-item:hover { background: var(--taxi-select) !important; }
.suggest-empty { padding: 8px; }

.suggest.so-suggest {
  max-height: 320px;
  padding: 0;
}
.so-suggest-head,
.so-suggest-row {
  display: grid !important;
  grid-template-columns: 96px minmax(110px, 1.1fr) minmax(140px, 1.6fr) 110px;
  gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.so-suggest-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--taxi-muted);
  background: var(--taxi-th);
  border-bottom: 1px solid var(--taxi-line);
}
.so-suggest-row {
  padding: 8px 10px !important;
  font-size: 13px;
}
.so-suggest-row .so-col-party {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.so-suggest-row .so-col-status {
  justify-self: start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
@media (max-width: 720px) {
  .so-suggest-head,
  .so-suggest-row {
    grid-template-columns: 84px minmax(90px, 1fr) minmax(100px, 1.2fr) 96px;
    gap: 6px;
    font-size: 12px;
  }
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.media-grid a.media-item,
.media-grid div.media-item {
  display: block;
  border: 1px solid var(--taxi-line);
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.media-grid a.orient-portrait,
.media-grid div.orient-portrait { aspect-ratio: 3 / 4; }
.media-grid a.orient-landscape,
.media-grid div.orient-landscape { aspect-ratio: 4 / 3; }
.media-grid a.orient-square,
.media-grid a.orient-unknown,
.media-grid div.orient-square,
.media-grid div.orient-unknown { aspect-ratio: 1; }
.media-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-grid .media-thumb {
  display: block;
  height: calc(100% - 42px);
  overflow: hidden;
}
.media-grid div.media-item .media-thumb {
  height: auto;
  aspect-ratio: inherit;
  max-height: calc(100% - 42px);
}
.media-grid .media-check {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  padding: 2px 4px;
  line-height: 1;
  cursor: pointer;
}
.media-grid .media-check input {
  margin: 0;
  vertical-align: middle;
}
.media-grid div.media-item .pe-media-del {
  display: block;
  width: 100%;
  text-align: center;
  padding: 2px 0 4px;
  font-size: 11px;
}
.pe-media-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.media-orient {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--taxi-line);
  color: var(--taxi-muted);
}
.doc-list { margin: 10px 0 0; padding-left: 18px; }

.pe-media-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--taxi-line);
  background: var(--taxi-panel, #fafafa);
}
.pe-media-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pe-media-upload-row input[type='url'] {
  flex: 1 1 240px;
  min-width: 180px;
}
.pe-video-list .linkish,
.pe-media-del {
  border: 0;
  background: none;
  color: var(--taxi-muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 12px;
  text-decoration: underline;
}
.pe-media-del:hover { color: var(--danger, #c33); }

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--taxi-line-soft);
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--taxi-muted, #64748b);
}
.home-stats > span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  min-width: 118px;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  line-height: 1.25;
}
.home-stats b {
  font-size: 15px;
  font-weight: 700;
  margin-left: 0;
  color: var(--taxi-ink, #0f172a);
  font-variant-numeric: tabular-nums;
}
.form-body > .panel > .home-stats,
.form-body > .home-stats {
  border-bottom: 0;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.form-grid .span-2 { grid-column: 1 / -1; }
.fb-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--taxi-line);
  padding: 6px 8px;
  background: #fff;
  border-radius: var(--radius);
}
.fb-title { font-weight: 600; }
.fb-body {
  margin-top: 4px;
  white-space: pre-wrap;
  font-size: 12px;
  max-width: 640px;
}
.badge.kind-idea { background: #e8f4ff; color: #0b5cad; }
.badge.kind-bug { background: #ffe8e8; color: #a31818; }
.badge.status-new { background: #fff4e5; color: #9a5b00; }
.badge.status-planned { background: #eef0ff; color: #3a3f9a; }
.badge.status-done { background: #e6f6ea; color: #1a6b35; }
.badge.status-rejected { background: #eee; color: #666; }
.fb-status {
  min-width: 120px;
  height: 22px;
  padding: 0 4px !important;
  font-size: 12px;
}

.badge.source { background: #f0f0f0; color: #444; font-weight: 500; }
.staff-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.staff-cos { min-width: 140px; vertical-align: top; }
.staff-co-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.staff-co {
  font-size: 12px !important;
  color: var(--taxi-ink);
  white-space: nowrap;
}
.staff-co input { margin: 0; }
.staff-role,
.staff-dept {
  min-width: 140px;
  max-width: 220px;
  height: 32px;
  padding: 0 8px !important;
  font-size: 13px;
  border-radius: 8px;
}
.create-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  padding: 16px;
}
.org-asset-thumb {
  display: block;
  padding: 0;
  margin: 0;
  border: 1px solid var(--taxi-line, #ddd);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  box-shadow: none;
  min-height: 0;
}
.org-asset-thumb img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  pointer-events: none;
}
.org-asset-thumb-sign img {
  width: auto;
  max-width: 180px;
  height: 56px;
  padding: 4px 8px;
  box-sizing: border-box;
}
.org-asset-empty {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--taxi-line, #ccc);
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
  padding: 6px;
  box-sizing: border-box;
}
.org-asset-empty-sign {
  width: auto;
  min-width: 140px;
  height: 56px;
}
.org-asset-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 240;
  padding: 20px;
}
.org-asset-lightbox.hidden { display: none !important; }
.org-asset-lightbox-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  padding: 28px 28px 24px;
  max-width: min(92vw, 640px);
  max-height: 90vh;
}
.org-asset-lightbox-x {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px !important;
  min-height: 0 !important;
  box-shadow: none !important;
}
.org-asset-lightbox-stage {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 160px;
}
.org-asset-lightbox-stage img {
  display: block;
  max-width: min(80vw, 520px);
  max-height: min(72vh, 520px);
  object-fit: contain;
  background: #fff;
}
.org-asset-lightbox-card.is-car-photo {
  max-width: min(96vw, 1100px);
  padding: 36px 20px 20px;
  background: #0f172a;
}
.org-asset-lightbox-stage.is-car {
  background: #0f172a;
  min-width: min(70vw, 320px);
  min-height: min(40vh, 240px);
}
.org-asset-lightbox-stage.is-car img {
  max-width: min(92vw, 1040px);
  max-height: min(84vh, 900px);
  background: transparent;
}
.org-asset-lightbox-card.is-car-photo .org-asset-lightbox-x {
  color: #e2e8f0 !important;
}

/* Начальная страница · очередь задач по роли */
.home-inbox {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 12px;
}
.home-inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-inbox-group {
  border: 1px solid var(--taxi-line, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.home-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--taxi-line, #e2e8f0);
}
.home-inbox-head .sto-docs-pay-title {
  margin: 0;
  font-size: 13px;
}
.home-inbox-list {
  display: flex;
  flex-direction: column;
}
.home-inbox-empty {
  margin: 0;
  padding: 14px 12px;
  font-size: 13px;
}
.home-inbox-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}
.home-inbox-item:last-child {
  border-bottom: 0;
}
.home-inbox-item:hover {
  background: #f0fdfa;
}
.home-inbox-item-title {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}
.home-inbox-item-sub {
  margin-top: 2px;
  font-size: 13px;
  color: #475569;
}
.home-inbox-item-meta {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}
.create-lightbox.hidden { display: none !important; }
.create-lightbox-card {
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 14px;
  width: min(520px, 96vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
}
.create-lightbox-card.wide { width: min(720px, 96vw); }
.create-lightbox-card.wide:has(.thin-prod-picker) {
  width: min(960px, 96vw);
  max-height: min(92vh, 820px);
}
.thin-prod-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.thin-prod-picker .thin-prod-filters {
  margin-bottom: 0;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.thin-prod-picker .thin-prod-filters .span-2 {
  grid-column: 1 / -1;
}
.thin-prod-list-wrap {
  max-height: min(48vh, 440px);
  overflow: auto;
  border: 1px solid #d4dbe6;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}
.thin-prod-list {
  margin: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.thin-prod-list thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  border-bottom: 1px solid #d4dbe6;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  padding: 10px 12px;
  white-space: nowrap;
}
.thin-prod-list td {
  font-size: 13px;
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
  overflow: visible;
  max-width: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.thin-prod-list td:nth-child(3) {
  max-width: 280px;
  white-space: nowrap;
}
.thin-prod-list th.thin-prod-check,
.thin-prod-list td.thin-prod-check {
  width: 40px;
  text-align: center;
  padding-left: 10px;
  padding-right: 6px;
}
.thin-prod-list th.thin-prod-num,
.thin-prod-list td.thin-prod-num {
  width: 112px;
}
.thin-prod-list th.thin-prod-money,
.thin-prod-list td.thin-prod-money {
  width: 128px;
}
.thin-prod-list tr[data-product-id] {
  cursor: pointer;
}
.thin-prod-list tr[data-product-id]:hover {
  background: #f8fafc;
}
.thin-prod-list tr[data-product-id]:has(.thin-prod-cb:checked) {
  background: #ecfdf5;
}
.thin-prod-list .thin-prod-cb,
.thin-prod-list #thin-prod-check-all {
  width: 18px;
  height: 18px;
  accent-color: var(--taxi-green, #0d7377);
  cursor: pointer;
}
.create-lightbox-body .thin-prod-list .thin-prod-qty,
.create-lightbox-body .thin-prod-list .thin-prod-price,
.thin-prod-list .thin-prod-qty,
.thin-prod-list .thin-prod-price {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 36px !important;
  height: 36px;
  margin: 0;
  padding: 6px 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  line-height: 1.2;
  color: var(--taxi-ink, #0f172a);
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  appearance: textfield;
  -moz-appearance: textfield;
}
.create-lightbox-body .thin-prod-list .thin-prod-qty:hover,
.create-lightbox-body .thin-prod-list .thin-prod-price:hover,
.thin-prod-list .thin-prod-qty:hover,
.thin-prod-list .thin-prod-price:hover {
  border-color: #94a3b8 !important;
  background: #fff !important;
}
.create-lightbox-body .thin-prod-list .thin-prod-qty:focus,
.create-lightbox-body .thin-prod-list .thin-prod-price:focus,
.thin-prod-list .thin-prod-qty:focus,
.thin-prod-list .thin-prod-price:focus {
  outline: none;
  border-color: var(--brand-deep, #0f766e) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18) !important;
  background: #fff !important;
}
.thin-prod-list .thin-prod-qty::-webkit-outer-spin-button,
.thin-prod-list .thin-prod-qty::-webkit-inner-spin-button,
.thin-prod-list .thin-prod-price::-webkit-outer-spin-button,
.thin-prod-list .thin-prod-price::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#thin-prod-meta {
  margin: 0 !important;
  font-size: 12px;
}
.thin-add-panel {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #c5d4e0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.thin-add-panel[hidden],
.thin-add-panel.hidden {
  display: none !important;
}
.prod-create-panel .form-grid {
  margin: 0;
  max-width: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.prod-create-panel .form-grid label > input,
.prod-create-panel .form-grid label > select {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #d4dbe6;
  background: #fff;
}
.thin-add-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.thin-add-panel-head strong {
  font-size: 14px;
  color: var(--taxi-ink, #0f172a);
}
.thin-add-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.thin-add-panel .thin-prod-filters {
  margin-bottom: 0;
  max-width: none;
  padding: 0;
  background: transparent;
  border: none;
}
.thin-add-panel .thin-prod-filters label > input,
.thin-add-panel .thin-prod-filters label > select {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #d4dbe6;
  background: #fff;
}
.thin-add-panel .thin-prod-list-wrap {
  max-height: min(42vh, 380px);
}
.thin-create-panel .thin-create-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.thin-create-panel .thin-create-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.thin-create-panel .thin-create-filter {
  flex: 1 1 220px;
  min-width: 180px;
}
.thin-create-panel .thin-create-filter input,
.thin-create-panel .thin-create-meta input {
  width: 100%;
  margin-top: 6px;
}
.thin-create-panel .thin-create-party {
  flex: 0 0 auto;
  margin: 0;
  align-self: flex-end;
}
.thin-create-panel .thin-create-list-label {
  display: block;
}
.thin-create-panel .thin-create-cp-list {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 220px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
}
.thin-create-panel .thin-create-cp-list option {
  padding: 6px 8px;
  border-radius: 6px;
}
.thin-create-panel .thin-create-cp-list option:checked {
  background: rgba(13, 148, 136, 0.18);
  color: #0f172a;
}
.thin-create-panel .thin-create-meta {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .thin-create-panel .thin-create-meta {
    grid-template-columns: 1fr;
  }
}
.thin-dm-cell {
  min-width: 120px;
  max-width: 220px;
  vertical-align: top;
}
.thin-dm-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 140px;
  overflow: auto;
}
.thin-dm-code {
  display: block;
  font-size: 11px;
  line-height: 1.25;
  word-break: break-all;
  color: var(--taxi-teal, #0d9488);
  text-align: left;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.thin-dm-code:hover {
  text-decoration: underline;
}
.create-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.create-lightbox-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.create-lightbox-x {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.create-lightbox-x:hover {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background: #f1f5f9 !important;
}
.create-lightbox-body {
  padding: 14px 18px 8px;
}
.create-lightbox-body .suggest-anchor {
  display: block;
  position: relative;
}
.create-lightbox-body .suggest {
  z-index: 220;
}
.create-lightbox-body .form-grid {
  margin-bottom: 0;
  max-width: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  gap: 14px;
}
.create-lightbox-body .form-grid label {
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}
.create-lightbox-body .form-grid label > input,
.create-lightbox-body .form-grid label > select,
.create-lightbox-body .form-grid label > textarea {
  min-height: 44px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid #d4dbe6;
  background: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.create-lightbox-body .form-grid label > input:hover,
.create-lightbox-body .form-grid label > select:hover,
.create-lightbox-body .form-grid label > textarea:hover {
  border-color: #b8c4d4;
  background: #fff;
}
.create-lightbox-body .form-grid label > input:focus,
.create-lightbox-body .form-grid label > select:focus,
.create-lightbox-body .form-grid label > textarea:focus {
  background: #fff;
  border-color: var(--brand-deep);
  box-shadow: var(--focus-ring), 0 1px 2px rgba(13, 148, 136, 0.1);
}
.create-lightbox-body .form-grid > .muted {
  margin-top: -4px !important;
}
.create-lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 18px 16px;
  border-top: 1px solid var(--taxi-line-soft);
  margin-top: 0;
  padding-top: 14px;
}
/* Лайтбокс на body вне .taxi — вторичные кнопки («Отмена») иначе без стиля */
.create-lightbox-actions button:not(.primary),
#create-lb-cancel {
  background: #fff !important;
  border: 1px solid var(--taxi-line, #cbd5e1) !important;
  cursor: pointer;
  padding: 7px 14px !important;
  min-height: var(--control-h, 36px) !important;
  height: auto !important;
  border-radius: var(--radius, 8px) !important;
  color: var(--taxi-ink, #0f172a) !important;
  -webkit-text-fill-color: var(--taxi-ink, #0f172a) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.create-lightbox-actions button:not(.primary):hover,
#create-lb-cancel:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
.create-lightbox-actions button.primary,
#create-lb-submit {
  min-height: var(--control-h, 36px) !important;
}

.pcl-apps-block {
  margin: 12px 0 4px;
}
.pcl-apps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pcl-apps-head strong {
  font-size: 13px;
}
.pcl-apps-scroll {
  max-height: 220px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
}
.pcl-apps-table {
  margin: 0;
}
.pcl-apps-table th,
.pcl-apps-table td {
  padding: 6px 8px !important;
  font-size: 12px;
}
.pcl-apps-table select {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}
.pcl-wh-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 500;
}
.pcl-wh-block {
  margin-top: 10px;
}

.doc-create-gate-lead {
  margin: 12px 0 6px;
  font-size: 12.5px;
}
.doc-create-gate-lead:first-child {
  margin-top: 0;
}
.doc-create-checks {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-create-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.35;
}
.doc-create-check.is-block {
  border-color: #f1c4c4;
  background: #fff7f7;
}
.doc-create-check.is-warn {
  border-color: #f0e0b2;
  background: #fffbeb;
}
.doc-create-check.is-ok {
  border-color: #c6e6c6;
  background: #f3faf3;
}
.doc-create-check-mark {
  flex: 0 0 auto;
  font-weight: 700;
  width: 1.1em;
  text-align: center;
}
.doc-create-check-text {
  flex: 1 1 auto;
  min-width: 0;
}
.doc-create-goto {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
}

.staff-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.staff-modal.hidden { display: none !important; }
.staff-modal-card {
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 14px;
  padding: 18px 20px;
  width: min(520px, 94vw);
  max-height: 86vh;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.staff-modal-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.staff-add-card { width: min(560px, 96vw); }
.staff-add-lead { margin: 0 0 16px; font-size: 13px; line-height: 1.45; }
.staff-sec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 13px;
}
.staff-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.staff-add-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #111);
}
.staff-add-grid label input,
.staff-add-grid label select {
  font-weight: 400;
  min-height: 38px;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
}
.staff-add-wide { grid-column: 1 / -1; }
.staff-pass-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.staff-pass-row input { flex: 1; min-width: 0; }
.staff-pass-row button {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 10px !important;
  padding: 0 12px !important;
}
.staff-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--taxi-line-soft, #e5e7eb);
}
.staff-add-actions button {
  min-height: 38px;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-weight: 600;
}
.staff-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--taxi-line-soft, #e5e7eb);
  border-radius: 12px;
}
.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.staff-table th,
.staff-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--taxi-line-soft, #e5e7eb);
}
.staff-table th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted, #64748b);
  background: #f8fafc;
}
.staff-table .fb-title {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 2px;
}
.staff-sub { font-size: 13px; }
.staff-actions {
  white-space: nowrap;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.staff-actions .linkish {
  font-size: 13px;
}
.staff-advanced {
  margin-top: 16px;
  border-top: 1px solid var(--taxi-line-soft, #e5e7eb);
  padding-top: 12px;
}
.staff-advanced > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  color: var(--muted, #64748b);
  list-style: none;
}
.staff-advanced > summary::-webkit-details-marker { display: none; }
.staff-advanced[open] > summary { margin-bottom: 12px; color: var(--text, #111); }
@media (max-width: 640px) {
  .staff-add-grid { grid-template-columns: 1fr; }
}
.role-legend-item {
  font-size: 12px;
  margin: 2px 0;
  line-height: 1.35;
}
.role-preview-secs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px 10px;
  font-size: 12px;
}
.role-check.off { opacity: 0.45; }
.role-check.on { font-weight: 500; }
.dept-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dept-matrix th,
.dept-matrix td {
  border-bottom: 1px solid var(--taxi-line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.dept-matrix th { font-weight: 600; background: #f7f7f7; }
.access-matrix-wrap {
  overflow: auto;
  max-height: min(70vh, 640px);
  border: 1px solid var(--taxi-line);
  border-radius: 8px;
}
.access-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}
.access-matrix th,
.access-matrix td {
  border-bottom: 1px solid var(--taxi-line);
  border-right: 1px solid #eee;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
.access-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f3f3;
  font-weight: 600;
  font-size: 10px;
  writing-mode: horizontal-tb;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none !important;
  letter-spacing: normal;
}
.access-matrix thead th.am-col {
  vertical-align: bottom;
}
.access-matrix thead th.am-screen {
  color: var(--brand, #0f766e);
  max-width: 76px;
}
.access-matrix thead th.am-screen .am-screen-ico {
  display: block;
  margin: 0 auto 2px;
  color: var(--brand, #0f766e);
}
.access-matrix thead th.am-screen .am-col-label {
  display: block;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.15;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.access-matrix th.am-name,
.access-matrix td.am-name {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  text-transform: none !important;
  letter-spacing: normal;
  background: #fff;
  min-width: 160px;
  max-width: 220px;
  white-space: normal;
}
.access-matrix th.am-name .fb-title,
.access-matrix th.am-name .muted {
  text-transform: none !important;
  letter-spacing: normal;
}
.access-matrix thead th.am-name {
  z-index: 3;
  background: #f3f3f3;
}
.access-matrix .am-cell {
  width: 36px;
}
.access-matrix .am-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.access-matrix .am-check:disabled {
  cursor: default;
  opacity: 0.7;
}
.dept-overlay-hint {
  font-size: 11px;
  color: #666;
  line-height: 1.35;
}
.dept-chip {
  display: inline-block;
  margin: 1px 4px 1px 0;
  padding: 1px 6px;
  border: 1px solid var(--taxi-line);
  background: #fafafa;
  font-size: 11px;
}
.dept-chip.grant { border-color: #8bbb8b; background: #f0faf0; }
.dept-chip.revoke { border-color: #d0a0a0; background: #faf0f0; text-decoration: line-through; }
.dept-tri {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4px 8px;
  align-items: center;
  font-size: 12px;
  margin: 3px 0;
}
.dept-tri .dept-tri-labs {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #555;
}
.staff-modal-card.wide { width: min(640px, 94vw); }
.taxi-sections .sec[hidden] { display: none !important; }
/* До /me не мелькают чужие разделы */
html.me-nav-pending:not(.me-nav-ready):not(.me-shell-primed) .taxi-sections {
  visibility: hidden;
}
html.me-nav-pending:not(.me-nav-ready) #header-rates,
html.me-nav-pending:not(.me-nav-ready) #notif-wrap,
html.me-nav-pending:not(.me-nav-ready) #presence-wrap,
html.me-nav-pending:not(.me-nav-ready) #chat-fab-root {
  display: none !important;
}
html.me-nav-pending.me-shell-primed[data-me-wh-pick="1"] #header-rates,
html.me-nav-pending.me-shell-primed[data-me-wh-pick="1"] #notif-wrap,
html.me-nav-pending.me-shell-primed[data-me-wh-pick="1"] #presence-wrap,
html.me-nav-pending.me-shell-primed[data-me-wh-pick="1"] #chat-fab-root {
  display: none !important;
}

/* Модалка ошибки в духе 1С */
.taxi-alert {
  position: fixed;
  inset: 0;
  background: rgba(40,40,40,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.taxi-alert-card {
  background: #fff;
  border: 1px solid #999;
  width: min(420px, 92vw);
  padding: 18px 18px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px 14px;
}
.taxi-alert-ico {
  width: 48px;
  height: 40px;
  background: #e8e8e8;
  border: 1px solid #bbb;
  position: relative;
}
.taxi-alert-ico::after {
  content: "✕";
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d32f2f;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.taxi-alert-body h4 { margin: 0 0 6px; font-size: 14px; }
.taxi-alert-body p { margin: 0; font-size: 12px; color: #555; line-height: 1.4; }
.taxi-alert-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 960px) {
  .section-cols { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
  .taxi-search { width: 160px; }
  .form-fields { grid-template-columns: 1fr; }
  .form-fields .field { grid-template-columns: 100px 1fr; }
}

/* Scrim: только клик «закрыть меню». Должен быть полностью прозрачным —
   иначе .taxi button даёт белый фон на весь экран («глушняк»). */
.taxi-side-scrim,
button.taxi-side-scrim,
.taxi button.taxi-side-scrim {
  display: none !important;
  position: fixed !important;
  top: 96px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 55 !important;
  margin: 0 !important;
  border: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: transparent !important;
  opacity: 1 !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

/* Вкладки / закладки — чёткие над dim и над frost */
body.side-flyout-open .taxi-favs,
body.side-flyout-open .taxi-tabs {
  position: relative;
  z-index: 65;
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  background: #fff !important;
}

/*
  Меню открыто: форма полупрозрачная, смазывание — fixed frost-слой.
  НЕ ставить filter:blur на #view: на длинных страницах Chrome рисует белый «глушняк».
*/
body.side-flyout-open .taxi-main {
  background: #b0bac8 !important;
}
#view.is-flyout-dimmed,
#section-panel.is-flyout-dimmed,
body.side-flyout-open #view,
body.side-flyout-open #section-panel:not(.hidden) {
  opacity: 0.72 !important;
  filter: none !important;
  -webkit-filter: none !important;
  pointer-events: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  background: transparent !important;
}
#view.is-flyout-dimmed .form-chrome,
#view.is-flyout-dimmed .form-titlebar,
#view.is-flyout-dimmed .form-hintbar-slot,
#view.is-flyout-dimmed .form-pagetabs,
#view.is-flyout-dimmed .form-toolbar,
#view.is-flyout-dimmed .form-body,
#view.is-flyout-dimmed .form-metrics,
body.side-flyout-open #view .form-chrome,
body.side-flyout-open #view .form-titlebar,
body.side-flyout-open #view .form-hintbar-slot,
body.side-flyout-open #view .form-pagetabs,
body.side-flyout-open #view .form-toolbar,
body.side-flyout-open #view .form-body,
body.side-flyout-open #view .form-metrics,
body.side-flyout-open #section-panel:not(.hidden) {
  background: rgba(255, 255, 255, 0.5) !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
/* Смазанный слой только на видимую область (не на весь tall DOM) */
body.side-flyout-open::after {
  content: "";
  position: fixed;
  top: 96px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  pointer-events: none;
  background: rgba(100, 116, 139, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/*
  Телефон + iPad (≤1024 / ui-phone): сайдбар полностью скрыт (не rail).
  Бургер → drawer поверх + scrim. Курсы спрятаны, в шапке — иконки.
*/
html.ui-phone {
  background: #0f172a;
}
html.ui-phone body.taxi-body {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 0 1px #334155, 0 18px 60px rgba(0, 0, 0, 0.45);
  overflow-x: hidden;
}
html.ui-phone .taxi {
  overflow-x: hidden;
}
@media (max-width: 480px) {
  html.ui-phone body.taxi-body {
    max-width: none;
    box-shadow: none;
  }
}

/* Общие правила шапки + drawer: телефон и iPad */
@media (max-width: 1024px) {
  .taxi-body-row {
    position: relative;
  }
  .taxi-main {
    flex: 1 1 auto !important;
    min-width: 0;
    width: 100% !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  #taxi-side,
  .taxi-side,
  body.side-collapsed .taxi-side,
  #taxi-side[hidden],
  .taxi-side[hidden] {
    display: none !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 60;
    width: min(var(--side-w), 88vw) !important;
    max-width: min(var(--side-w), 88vw) !important;
    flex: none !important;
    margin: 0 !important;
    transform: none !important;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.18);
    border-right: 1px solid var(--taxi-line);
  }
  body.side-flyout-open #taxi-side,
  body.side-flyout-open .taxi-side,
  body.side-flyout-open.side-collapsed .taxi-side {
    display: flex !important;
  }
  body.side-flyout-open .taxi-side-scrim {
    display: block !important;
  }
  body.side-flyout-open .taxi-side-foot,
  body.side-collapsed.side-flyout-open .taxi-side-foot {
    justify-content: flex-end !important;
    padding: 8px 12px 12px !important;
  }
  body.side-flyout-open .taxi-sections .sec,
  body.side-collapsed.side-flyout-open .taxi-sections .sec {
    justify-content: flex-start !important;
    gap: 11px !important;
    padding: 9px 12px 9px 14px !important;
    margin: 0 !important;
  }
  body.side-flyout-open .taxi-sections .sec .sec-label,
  body.side-collapsed.side-flyout-open .taxi-sections .sec .sec-label {
    display: inline !important;
  }
  body.side-flyout-open .taxi-sections .sec .sec-badge,
  body.side-collapsed.side-flyout-open .taxi-sections .sec .sec-badge {
    display: inline-block !important;
  }
  .sec-rail-tip {
    display: none !important;
  }
  .taxi-title {
    display: none !important;
  }
  .section-cols {
    grid-template-columns: 1fr;
  }
  .header-rates {
    display: none !important;
  }
  .presence-online-label {
    display: none !important;
  }
  .taxi button.taxi-presence {
    height: 36px;
    min-height: 36px !important;
    min-width: 36px;
    padding: 0 8px !important;
    gap: 5px;
  }
  .taxi-user-name,
  .taxi-user-caret {
    display: none !important;
  }
  .taxi button.taxi-user {
    max-width: none;
    padding: 6px !important;
  }
  .taxi-logout-label {
    display: none !important;
  }
  .taxi-logout {
    width: 34px;
    height: 32px;
    padding: 0 !important;
    justify-content: center;
  }
  .taxi-logout-ico {
    display: block !important;
  }
}

html.ui-phone .taxi-body-row {
  position: relative;
}
html.ui-phone .taxi-main,
html.ui-phone body.side-collapsed .taxi-main {
  flex: 1 1 auto !important;
  min-width: 0;
  width: 100% !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}
html.ui-phone #taxi-side,
html.ui-phone .taxi-side,
html.ui-phone body.side-collapsed .taxi-side,
html.ui-phone #taxi-side[hidden],
html.ui-phone .taxi-side[hidden] {
  display: none !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  z-index: 60;
  width: min(var(--side-w), 88%) !important;
  max-width: min(var(--side-w), 88%) !important;
  flex: none !important;
  margin: 0 !important;
  transform: none !important;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.18);
  border-right: 1px solid var(--taxi-line);
}
html.ui-phone body.side-flyout-open #taxi-side,
html.ui-phone body.side-flyout-open .taxi-side,
html.ui-phone body.side-flyout-open.side-collapsed .taxi-side,
html.ui-phone body.side-flyout-open #taxi-side:not([hidden]),
html.ui-phone body.side-flyout-open .taxi-side:not([hidden]) {
  display: flex !important;
}
html.ui-phone body.side-flyout-open .taxi-side-scrim {
  display: block !important;
}
html.ui-phone body.side-flyout-open .taxi-side-foot,
html.ui-phone body.side-collapsed.side-flyout-open .taxi-side-foot {
  justify-content: flex-end !important;
  padding: 8px 12px 12px !important;
}
html.ui-phone body.side-flyout-open .taxi-sections .sec,
html.ui-phone body.side-collapsed.side-flyout-open .taxi-sections .sec {
  justify-content: flex-start !important;
  gap: 11px !important;
  padding: 9px 12px 9px 14px !important;
  margin: 0 !important;
}
html.ui-phone body.side-flyout-open .taxi-sections .sec .sec-label,
html.ui-phone body.side-collapsed.side-flyout-open .taxi-sections .sec .sec-label {
  display: inline !important;
}
html.ui-phone body.side-flyout-open .taxi-sections .sec .sec-badge,
html.ui-phone body.side-collapsed.side-flyout-open .taxi-sections .sec .sec-badge {
  display: inline-block !important;
}
html.ui-phone .sec-rail-tip {
  display: none !important;
}
html.ui-phone .taxi-title {
  display: none !important;
}
html.ui-phone .section-cols {
  grid-template-columns: 1fr;
}
html.ui-phone .header-rates {
  display: none !important;
}
html.ui-phone .presence-online-label {
  display: none !important;
}
html.ui-phone .taxi button.taxi-presence {
  height: 36px;
  min-height: 36px !important;
  min-width: 36px;
  padding: 0 8px !important;
  gap: 5px;
}
html.ui-phone .taxi-user-name,
html.ui-phone .taxi-user-caret {
  display: none !important;
}
html.ui-phone .taxi button.taxi-user {
  max-width: none;
  padding: 6px !important;
}
html.ui-phone .taxi-logout-label {
  display: none !important;
}
html.ui-phone .taxi-logout {
  width: 34px;
  height: 32px;
  padding: 0 !important;
  justify-content: center;
}
html.ui-phone .taxi-logout-ico {
  display: block !important;
}

.taxi-logout-ico {
  display: none;
}
.presence-online-label {
  display: inline;
}

/* Широкий десктоп: без overlay (кроме ui-phone) */
@media (min-width: 1025px) {
  html:not(.ui-phone) body.side-flyout-open .taxi-side-scrim {
    display: none !important;
  }
}

/* CRM Kanban — сделки по этапам воронки */
.form-chrome:has(.kanban-board) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.form-chrome:has(.kanban-board) .form-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--taxi-muted);
}
.inline-label select { min-width: 180px; }
.bal-xfer-lines {
  max-height: min(42vh, 360px);
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}
.bal-xfer-lines .bal-xfer-qty {
  width: 88px;
  min-height: 32px;
  padding: 4px 8px;
}
.bal-xfer-lines .bal-xfer-qty:disabled {
  opacity: 0.45;
  background: #f1f5f9;
}
.kanban-board {
  display: flex;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  min-height: 280px;
  padding: 4px 2px 8px;
}
.kanban-col {
  flex: 0 0 260px;
  width: 260px;
  max-width: 80vw;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid var(--taxi-line);
  border-radius: 6px;
  min-height: 0;
  max-height: 100%;
}
.kanban-col-head {
  padding: 10px 10px 8px;
  border-top: 3px solid var(--taxi-green);
  border-bottom: 1px solid var(--taxi-line-soft);
  background: var(--taxi-white);
  border-radius: 6px 6px 0 0;
}
.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--taxi-ink);
}
.kanban-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--taxi-green);
}
.kanban-col-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
}
.kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.kanban-col-body.drag-over {
  background: var(--taxi-select);
  outline: 2px dashed var(--taxi-green);
  outline-offset: -4px;
}
.kanban-empty {
  margin: 12px 4px;
  font-size: 12px;
  text-align: center;
}
.kanban-card {
  position: relative;
  background: var(--taxi-white);
  border: 1px solid var(--taxi-line);
  border-radius: 5px;
  padding: 8px 10px 10px;
  cursor: grab;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.kanban-card:hover {
  border-color: var(--taxi-green-soft);
}
.kanban-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}
.kanban-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--taxi-ink);
  line-height: 1.3;
}
.kanban-card-title:hover { color: var(--taxi-green); }
.kanban-card-id {
  font-size: 10px;
  color: var(--taxi-muted);
  flex-shrink: 0;
}
.kanban-card-amount {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--taxi-green);
}
.kanban-card-contact {
  margin-top: 4px;
  font-size: 12px;
  color: var(--taxi-muted);
  line-height: 1.3;
}
.kanban-card-actions {
  margin-top: 8px;
}
.kanban-stage-select {
  width: 100%;
  font-size: 11px !important;
  padding: 3px 6px !important;
  height: auto !important;
}
.kanban-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
}

/* ——— Panel polish (удобство / иерархия) ——— */
.taxi-ico {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #64748b !important;
}
.taxi-ico:hover {
  background: #f1f5f9 !important;
  color: var(--brand) !important;
}
.taxi-body.side-collapsed .taxi-sections .sec.active {
  background: #ecfdf5 !important;
  box-shadow: none !important;
}
.form-chrome h3 {
  letter-spacing: -0.02em;
}
.home-stats,
.form-body > .home-stats {
  gap: 12px !important;
}
@media (max-width: 900px) {
  .taxi-main {
    padding: 8px;
  }
  .taxi-main > #view > .form-chrome,
  .taxi-main > .section-panel {
    border-radius: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

/* Касса: статусы + плашки */
.kassa-health {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.kassa-health-chip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--taxi-line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}
button.kassa-health-chip {
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
button.kassa-health-chip:hover {
  border-color: var(--taxi-accent, #0d7377);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--taxi-accent, #0d7377) 18%, transparent);
}
button.kassa-health-chip:focus-visible {
  outline: 2px solid var(--taxi-accent, #0d7377);
  outline-offset: 2px;
}
button.kassa-health-chip:disabled,
button.kassa-health-chip.is-busy {
  opacity: .7;
  cursor: wait;
}
.kassa-health-hint {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--taxi-accent, #0d7377);
}
.kassa-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: #94a3b8;
}
.kassa-health-chip.ok .kassa-health-dot { background: #16a34a; }
.kassa-health-chip.bad .kassa-health-dot { background: #dc2626; }
.kassa-health-chip.warn .kassa-health-dot { background: #ca8a04; }
.kassa-health-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--taxi-ink);
  line-height: 1.2;
}
.kassa-health-detail {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
}
.kassa-reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.kassa-reg-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: none !important;
  transition: border-color 0.15s, background 0.15s;
}
.kassa-reg-card:hover {
  border-color: #99f6e4;
  background: #f8fffe;
}
.kassa-reg-card.needs-org {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}
.kassa-reg-card.active {
  border-color: var(--brand, #0d9488);
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px var(--brand, #0d9488) !important;
}
.kassa-reg-card.is-archive {
  opacity: 0.65;
}
.kassa-reg-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--taxi-ink);
}
.kassa-reg-org {
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kassa-reg-bal {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 10px;
  color: var(--taxi-ink);
}
.kassa-reg-meta {
  font-size: 11px;
  margin-top: 4px;
}

/* Data Matrix на остатках и история экземпляра */
.bal-dm-cell { max-width: 220px; vertical-align: top; }
.bal-dm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.bal-dm-code {
  appearance: none;
  border: 1px solid var(--line, #d0d5dd);
  background: #f8fafc;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  color: var(--taxi-green, #0f7b4a);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bal-dm-code:hover { background: #ecfdf5; border-color: #86efac; }
.bal-dm-more {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 2px;
  font-size: 11px;
  cursor: pointer;
  color: var(--muted, #64748b);
}
.dm-trace-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid #e2e8f0;
}
.dm-trace-timeline > li {
  position: relative;
  padding: 0 0 14px 16px;
}
.dm-trace-timeline > li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--taxi-green, #0f7b4a);
  box-shadow: 0 0 0 3px #fff;
}
.dm-trace-at { font-size: 11px; margin-bottom: 2px; }
.dm-trace-title { font-weight: 650; font-size: 14px; }
.dm-trace-links { margin-top: 4px; font-size: 12px; }

.bal-totals {
  margin: 10px 0 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
}
.bal-totals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  font-size: 13px;
}
.bal-totals-row b { font-weight: 700; }

.bal-deal-group-row td {
  background: #f1f5f9;
  border-top: 1px solid var(--line, #e2e8f0);
  border-bottom: 1px solid var(--line, #e2e8f0);
  padding: 8px 10px;
}
.bal-deal-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
}
.bal-group-deal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.bal-deal-cell .bal-deal-link + .bal-deal-link {
  margin-left: 6px;
}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}


.amo-user-pick { position: relative; min-width: 220px; }
.amo-user-pick-btn {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  min-height: 34px !important;
  padding: 6px 10px !important;
  border: 1px solid var(--taxi-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  color: inherit !important;
}
.amo-user-pick-btn:hover { background: #f8fafc !important; }
.amo-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.amo-share-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid #cfe3f8;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  color: #0f3d66 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.amo-share-cta:hover {
  border-color: #1e88e5;
  box-shadow: 0 4px 14px rgba(30, 136, 229, 0.18);
  transform: translateY(-1px);
}
.amo-bridge-top { display: flex; align-items: center; gap: 12px; }
.amo-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.amo-status-pill.is-ok {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}
.amo-status-pill.is-warn {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}
.amo-status-pill.is-muted {
  background: #f1f5f9;
  color: #64748b;
}
.amo-hook-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  cursor: pointer;
  user-select: none;
}
.amo-hook-switch.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.amo-hook-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.amo-hook-switch-ui {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.amo-hook-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}
.amo-hook-switch input:checked + .amo-hook-switch-ui {
  background: var(--taxi-green, #0d9488);
}
.amo-hook-switch input:checked + .amo-hook-switch-ui::after {
  transform: translateX(18px);
}
.amo-hook-switch-label {
  font-size: 14px;
  font-weight: 600;
}

/* Персонал: тумблер входа — зелёный вкл / серый выкл */
.staff-access-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.staff-access-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.staff-access-switch.is-locked {
  cursor: default;
  opacity: 0.9;
}
.staff-access-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.staff-access-switch-ui {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #94a3b8;
  border: 1px solid #64748b;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
}
.staff-access-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1f5f9;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.staff-access-switch.is-on .staff-access-switch-ui,
.staff-access-switch input:checked + .staff-access-switch-ui {
  background: #16a34a;
  border-color: #15803d;
}
.staff-access-switch.is-on .staff-access-switch-ui::after,
.staff-access-switch input:checked + .staff-access-switch-ui::after {
  transform: translateX(18px);
  background: #fff;
}
.staff-access-switch.is-off .staff-access-switch-ui {
  background: #94a3b8;
  border-color: #64748b;
}
.staff-access-switch-text {
  font-size: 12px;
  font-weight: 700;
  min-width: 2.6em;
  color: #64748b;
  text-transform: lowercase;
}
.staff-access-switch.is-on .staff-access-switch-text {
  color: #15803d;
}
.staff-access-switch.is-off .staff-access-switch-text {
  color: #64748b;
}
tr.is-staff-blocked td {
  opacity: 0.9;
  color: #64748b;
}
tr.is-staff-blocked .staff-access-cell {
  background: #f8fafc;
}

.amo-user-pick-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.amo-user-pick.is-open .amo-user-pick-btn {
  border-color: var(--taxi-green, #0d9488) !important;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15) !important;
}
.amo-user-suggest-float {
  position: fixed !important;
  left: 0;
  top: 0;
  right: auto !important;
  z-index: 10050 !important;
  margin: 0 !important;
  max-height: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--taxi-line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.amo-user-suggest-search {
  flex: 0 0 auto;
  padding: 8px;
  background: #fff;
  border-bottom: 1px solid var(--taxi-line-soft, #e5e7eb);
}
.amo-user-suggest-q {
  width: 100%;
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
}
.amo-user-suggest-list {
  flex: 1 1 auto;
  overflow: auto;
  max-height: none;
}
.amo-user-suggest-float .suggest-item.is-on {
  background: #ecfdf5 !important;
  font-weight: 600;
}

/* Приход: применимость партии по строке/марке */
.iso-apps-toggle {
  text-align: left;
  max-width: 160px;
  white-space: normal;
  line-height: 1.25;
}
.iso-apps-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e8f5e9;
  color: #1b5e20;
  vertical-align: middle;
}
.iso-apps-editor {
  margin: 4px 0 10px;
  padding: 12px;
  border: 1px solid var(--taxi-line-soft, #d8dde6);
  border-radius: 8px;
  background: var(--taxi-surface-2, #f7f8fb);
}
.iso-apps-editor-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  margin-bottom: 8px;
}
.iso-apps-editor label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--taxi-muted);
}
.iso-apps-editor input {
  min-height: var(--control-h, 34px);
  width: 100%;
  max-width: 560px;
}
.iso-apps-serial-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.iso-apps-serial-row code {
  font-size: 12px;
  word-break: break-all;
}
@media (max-width: 700px) {
  .iso-apps-serial-row {
    grid-template-columns: 1fr;
  }
}

/* Приход без основания — строки */
.in-free-picker.thin-add-panel {
  margin: 0;
  border: 1px solid var(--taxi-line-soft, #d8dde6);
  border-radius: 8px;
  padding: 12px;
  background: var(--taxi-surface-2, #f7f8fb);
}
.in-free-picker .thin-prod-list-wrap {
  max-height: 280px;
  overflow: auto;
}
.in-free-picker .ifree-row-add {
  white-space: nowrap;
  padding: 4px 10px;
  font-size: 12px;
}
.in-free-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 120px auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
}
.in-free-add .in-free-prod { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .in-free-add .in-free-prod { grid-column: auto; }
}
.in-free-add label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--taxi-muted);
}
.in-free-add input {
  min-height: var(--control-h);
  width: 100%;
}
.in-free-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.in-free-table th,
.in-free-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--taxi-line-soft);
  text-align: left;
  vertical-align: top;
}
.in-free-table th {
  background: var(--taxi-th);
  font-weight: 600;
  color: var(--taxi-muted);
  font-size: 11.5px;
}
.in-free-table .num { text-align: right; white-space: nowrap; }

.wh-inbound-table .wh-inbound-pl-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.wh-inbound-table .wh-inbound-cell { width: 5.5em; }
.wh-inbound-table .wh-inbound-pqty { width: 3.5em; }
.wh-inbound-table .bad-qty { color: var(--bad, #c62828); font-weight: 600; }
.wh-inbound-pl-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}
.doc-pl-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 15rem;
  max-width: 22rem;
}
.doc-pl-box.is-ro {
  gap: 2px;
  min-width: 0;
}
.doc-pl-ro {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text, #1a1a1a);
}
.form-grid.is-ro > label.is-ro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted, #888);
}
.form-grid.is-ro .form-ro-val {
  font-size: 14px;
  color: var(--text, #1a1a1a);
  line-height: 1.35;
  word-break: break-word;
}
.doc-pl-part {
  display: grid;
  grid-template-columns: 4.2em minmax(5.5rem, 1fr) 5.2rem auto;
  gap: 4px;
  align-items: center;
}
.doc-pl-part.is-single {
  grid-template-columns: minmax(6rem, 1fr) 5rem;
}
.doc-pl-part .doc-pl-qty {
  width: 100%;
  min-width: 3.6em;
  box-sizing: border-box;
  padding: 3px 6px;
  font-variant-numeric: tabular-nums;
}
.doc-pl-part .doc-pl-wh,
.doc-pl-part .doc-pl-cell {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 3px 4px;
  font-size: 12px;
}
.doc-pl-part .doc-pl-del,
.doc-pl-part .doc-pl-add {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 2px 6px;
  font-size: 13px;
}
.doc-pl-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.doc-pl-sum.ok { color: var(--taxi-green, #0d7377); font-weight: 600; }
.doc-pl-sum.bad { color: var(--bad, #c62828); font-weight: 600; }

.iso-lines-meta { margin: 0 0 8px; font-size: 13px; flex-shrink: 0; }
.iso-lines-scroll {
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid var(--taxi-line-soft);
  border-radius: 10px;
  background: #fff;
}
.iso-lines-table { margin: 0; }
.iso-lines-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.iso-lines-table .iso-marks {
  font-size: 11px;
  line-height: 1.35;
  max-width: 160px;
  word-break: break-all;
}
.iso-lines-table .iso-apps {
  font-size: 12px;
  max-width: 180px;
}

/* Новый расход — шаги: сделка → товары */
.out-create-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: min(60vh, 640px);
}
.out-step {
  border: 1px solid var(--taxi-line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 16px;
}
.out-step-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.out-step-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--taxi-green, #0d7377);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.out-step-title {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
}
.out-deal-find {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.out-deal-find input {
  flex: 1;
  min-width: 0;
}
.out-deal-picked {
  margin-top: 10px;
  font-size: 13px;
}
.out-step .iso-lines-scroll {
  max-height: min(48vh, 520px);
}
.out-step .grow { flex: 1; min-width: 0; }

/* Новый приход — выбранное основание (старт приходной) */
.in-basis-chosen {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
}
.in-basis-chosen-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.in-basis-chosen-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}
.in-basis-chosen-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--taxi-ink);
  line-height: 1.25;
}
.in-basis-chosen-doc {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--taxi-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.in-basis-change-ico {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0 !important;
  border: 1px solid var(--taxi-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--taxi-muted) !important;
  box-shadow: none !important;
  min-height: 0 !important;
  cursor: pointer;
}
.in-basis-change-ico:hover {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
  background: var(--brand-soft) !important;
}
.in-basis-change-ico svg {
  display: block;
  pointer-events: none;
}

/* Тулбар: Создать приход ▾ */
.tb-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
}
.tb-split > .primary {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.tb-split-caret {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.28) !important;
  padding: 0 10px !important;
  min-width: 34px;
  font-size: 12px;
  line-height: 1;
}
.tb-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--taxi-line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.tb-menu.hidden { display: none !important; }
.tb-menu button,
.tb-menu a {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--taxi-ink);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.tb-menu button:hover,
.tb-menu a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

/* Новый приход — выбор основания */
.in-basis-pick { margin: 0 0 8px; }
.in-basis-pick-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--taxi-ink);
}
.in-basis-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: none;
  width: 100%;
}
.in-basis-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px 18px;
  min-width: 0;
  border: 1px solid var(--taxi-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .12s;
}
.in-basis-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}
.in-basis-card:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
.in-basis-card-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--brand-dark);
  background: linear-gradient(160deg, #ccfbf1 0%, #e0f2fe 100%);
  border: 1px solid rgba(15, 118, 110, 0.14);
}
.in-basis-card[data-basis="return"] .in-basis-card-ico {
  background: linear-gradient(160deg, #ffedd5 0%, #fef3c7 100%);
  color: #9a3412;
  border-color: rgba(194, 65, 12, 0.14);
}
.in-basis-card[data-basis="none"] .in-basis-card-ico {
  background: linear-gradient(160deg, #e2e8f0 0%, #f1f5f9 100%);
  color: #334155;
  border-color: rgba(51, 65, 85, 0.12);
}
.in-basis-card-ico-scan {
  background: linear-gradient(160deg, #dbeafe 0%, #e0e7ff 100%) !important;
  color: #1e3a8a !important;
  border-color: rgba(30, 58, 138, 0.14) !important;
}
a.in-basis-card { text-decoration: none; color: inherit; }
.in-basis-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.in-basis-card-eyebrow {
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--taxi-muted);
  white-space: nowrap;
}
.in-basis-card-title {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--taxi-ink);
  line-height: 1.25;
}
@media (max-width: 640px) {
  .in-basis-pick-grid { grid-template-columns: 1fr; }
}

/* Фото СТС на заказе / заказ-наряде */
.sts-photos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin: 0 0 8px;
}
.sts-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.sts-thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 112px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  background: #f8fafc;
}
.sts-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #e2e8f0;
}
.sts-thumb span {
  font-size: 11px;
  font-weight: 600;
  color: var(--taxi-muted, #64748b);
  text-align: center;
}
.sts-upload-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--taxi-muted, #64748b);
  min-width: 0;
}
.sts-upload-label input[type='file'] {
  max-width: min(220px, 100%);
  font-size: 12px;
  line-height: 1.2;
}
.sts-upload-label.is-busy {
  opacity: 0.65;
  pointer-events: none;
}
/* Не тянуть primary на высоту превью/file input (~100px) */
.sts-photos-row > .primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  font-size: 12.5px !important;
  align-self: center;
  flex: 0 0 auto;
  width: auto !important;
  white-space: nowrap;
}

.doc-macro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.doc-macro-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border, #d8dee6);
  background: #f7f9fc;
  border-radius: 6px;
  cursor: pointer;
  color: #1a2b3c;
}
.doc-macro-chip:hover {
  border-color: #7aa2c7;
  background: #eef5fb;
}

.doc-tpl-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #d4dbe6;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
}
.doc-tpl-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}
.doc-tpl-chip:hover {
  border-color: #c5d0de;
  background: #f1f5f9;
}
.doc-tpl-chip:has(input:checked) {
  border-color: #7aa2c7;
  background: #eef5fb;
  color: #0f3a5c;
}
.doc-tpl-chip input[type='checkbox'] {
  width: 13px;
  height: 13px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand, #1a6bb5);
  flex-shrink: 0;
}
.doc-tpl-chip span {
  white-space: nowrap;
}

#dt-preview-src {
  width: 100%;
  min-height: 110px;
  padding: 10px 14px;
  border: 1px solid #d4dbe6;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-sizing: border-box;
  resize: vertical;
}
.doc-tpl-preview-warn {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid #f0c36d;
  background: #fff8e6;
  border-radius: 10px;
  font-size: 12px;
  color: #5c4a1a;
  display: grid;
  gap: 4px;
}
.doc-tpl-preview-warn code {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 4px;
  border-radius: 4px;
}
.doc-tpl-preview-warn code.doc-tpl-miss {
  background: #fde8e8;
  color: #9b1c1c;
}
.doc-tpl-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .doc-tpl-preview {
    grid-template-columns: 1fr;
  }
}
.doc-tpl-preview-col {
  border: 1px solid #d4dbe6;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  min-height: 120px;
}
.doc-tpl-preview-h {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf4;
}
.doc-tpl-preview-body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 88px;
}
.doc-tpl-mark {
  border-radius: 4px;
  padding: 0 3px;
  font-style: normal;
}
.doc-tpl-mark.is-src {
  background: #fef3c7;
  color: #92400e;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.doc-tpl-mark.is-val {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}
.doc-tpl-mark.is-unknown {
  background: #fee2e2;
  color: #991b1b;
  text-decoration: underline wavy #ef4444;
}
.doc-tpl-mark.is-empty {
  background: #e2e8f0;
  color: #64748b;
}
.doc-tpl-preview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 8px;
  font-size: 11px;
  align-items: center;
}
.doc-tpl-preview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.doc-tpl-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.doc-tpl-swatch.is-src {
  background: #fef3c7;
}
.doc-tpl-swatch.is-val {
  background: #dcfce7;
}
.doc-tpl-swatch.is-unknown {
  background: #fee2e2;
}
.doc-tpl-swatch.is-miss {
  background: #fde8e8;
  border-color: #f5c2c2;
}

/* Разработка — план работ: вкладки как в карточке + действие справа */
.dev-plan-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: -18px -22px 0;
  padding: 0 12px 0 10px;
  border-bottom: 1px solid var(--taxi-line-soft);
  background: #fff;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}
.dev-plan-head .form-pagetabs {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: 0;
  padding: 0;
  position: static;
  top: auto;
  z-index: auto;
  background: transparent;
  overflow-x: auto;
  pointer-events: auto;
}
.dev-plan-head .form-pagetab.is-stack {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 8px 16px 10px !important;
  line-height: 1.15;
  color: #64748b;
}
.dev-plan-head .form-pagetab.is-stack:hover {
  color: #0f172a;
  background: #f8fafc !important;
}
.dev-plan-head .form-pagetab.is-stack.active {
  color: var(--brand-dark);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--taxi-tab-line) !important;
}
.dev-plan-head .form-pagetab.is-stack .form-pagetab-ico {
  width: 15px;
  height: 15px;
  opacity: 0.72;
  color: inherit;
}
.dev-plan-head .form-pagetab.is-stack:hover .form-pagetab-ico,
.dev-plan-head .form-pagetab.is-stack.active .form-pagetab-ico {
  opacity: 1;
}
.dev-plan-head .form-pagetab.is-stack .pagetab-label {
  display: block;
  font-size: 13px;
}
.dev-plan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 4px 8px 0;
  position: relative;
  z-index: 7;
  pointer-events: auto;
}
.dev-plan-actions > button {
  position: relative;
  z-index: 8;
  pointer-events: auto;
  cursor: pointer;
}
.dev-add-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  position: relative;
  z-index: 5;
}
.dev-add-panel[hidden] {
  display: none !important;
}
.dev-add-panel input {
  flex: 1 1 220px;
  min-width: 160px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--taxi-line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.dev-plan-hint {
  margin: 12px 0;
  font-size: 12px;
}
@media (max-width: 720px) {
  .dev-plan-head {
    flex-wrap: wrap;
    align-items: stretch;
    padding-bottom: 8px;
  }
  .dev-plan-actions {
    width: 100%;
    padding: 4px 0 0;
    justify-content: flex-start;
  }
}

/* Карта связей (mind map) плана разработки */
.dev-map-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 48%);
  overflow: auto;
  margin: 0 0 14px;
  max-height: min(70vh, 720px);
}
.dev-map-canvas {
  position: relative;
  min-height: 280px;
}
.dev-map-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.dev-map-edge-g {
  pointer-events: auto;
  cursor: pointer;
}
.dev-map-edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
}
.dev-map-edge {
  fill: none;
  stroke: #0f766e;
  stroke-width: 1.6;
  opacity: 0.72;
  pointer-events: none;
}
.dev-map-edge-g:hover .dev-map-edge,
.dev-map-edge-g:focus .dev-map-edge {
  stroke: #b91c1c;
  stroke-width: 2.4;
  opacity: 1;
}
.dev-map-node {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.dev-map-port {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0f766e;
  z-index: 3;
  cursor: crosshair;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
  touch-action: none;
  user-select: none;
}
.dev-map-port.is-in {
  left: -7px;
}
.dev-map-port.is-out {
  right: -7px;
}
button.dev-map-node-del {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 4;
  width: 22px;
  height: 22px;
  padding: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
}
button.dev-map-node-del:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}
.dev-map-port:hover,
.dev-map-port.is-drop {
  background: #0f766e;
  transform: scale(1.2);
}
.dev-map-canvas.is-linking {
  cursor: crosshair;
}
.dev-map-canvas.is-linking .dev-map-node {
  cursor: crosshair;
}
.dev-map-node.is-link-source {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.28);
}
.dev-map-node.is-link-target {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.45);
}
.dev-map-edge.is-temp {
  stroke-dasharray: 5 4;
  opacity: 0.95;
}
.dev-map-node:hover {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}
.dev-map-node.is-planned {
  background: #fff;
  border-color: #e2e8f0;
}
.dev-map-node.is-in_progress {
  background: #f0fdfa;
  border-color: #99f6e4;
}
.dev-map-node.is-done {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.dev-map-node.is-blocked {
  background: #fff7ed;
  border-color: #fdba74;
}
.dev-map-node-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.dev-map-node-meta {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
}
.dev-map-fan {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.dev-map-editor {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffbeb;
}
.dev-map-editor-head {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  margin: 0 0 6px;
}
.dev-map-deps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dev-map-deps-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #fde68a;
  font-size: 13px;
  line-height: 1.35;
}
button.dev-dep-del {
  border: 0;
  background: transparent;
  color: #9a3412;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
}
button.dev-dep-del:hover {
  background: #ffedd5;
}
.dev-map-add label {
  font-size: 12px;
}

.dev-gantt-axis {
  margin: 0 0 8px;
  font-size: 12px;
}
.dev-cal {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: auto;
  background: #fff;
}
.dev-cal-head,
.dev-cal-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  min-width: 720px;
}
.dev-cal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}
.dev-cal-meta-h {
  padding: 8px 10px;
  border-right: 1px solid #e2e8f0;
  font-weight: 600;
}
.dev-cal-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  min-height: 34px;
}
.dev-cal-day {
  padding: 6px 0;
  text-align: center;
  border-right: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
}
.dev-cal-day.is-weekend {
  background: #f8fafc;
}
.dev-cal-day.is-tick {
  color: transparent;
}
.dev-cal-row {
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  min-height: 52px;
}
.dev-cal-row:hover {
  background: #f8fafc;
}
.dev-cal-meta {
  padding: 8px 10px;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}
.dev-cal-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}
.dev-cal-sub {
  font-size: 11px;
}
.dev-cal-constraint {
  font-size: 11px;
  color: #b45309;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.dev-cal-track {
  position: relative;
  min-height: 52px;
  background-image: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(100% / var(--dev-days, 21) - 1px),
    #f1f5f9 calc(100% / var(--dev-days, 21) - 1px),
    #f1f5f9 calc(100% / var(--dev-days, 21))
  );
}
.dev-cal-bar {
  position: absolute;
  top: 14px;
  height: 24px;
  border-radius: 6px;
  min-width: 8px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  box-sizing: border-box;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.dev-cal-bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-cal-bar.is-planned {
  background: #94a3b8;
}
.dev-cal-bar.is-in_progress {
  background: #2563eb;
}
.dev-cal-bar.is-done {
  background: #16a34a;
}
.dev-cal-bar.is-blocked {
  background: #dc2626;
}
.dev-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 10px 0 0;
  font-size: 12px;
  align-items: center;
}
.dev-cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dev-leg {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #94a3b8;
}
.dev-leg.is-in_progress {
  background: #2563eb;
}
.dev-leg.is-done {
  background: #16a34a;
}
.dev-leg.is-blocked {
  background: #dc2626;
}
.dev-plan-table .dev-f {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 12px;
}
.dev-plan-table textarea.dev-f {
  resize: vertical;
  min-height: 42px;
}
.dev-plan-table .dev-col-title {
  min-width: 160px;
  max-width: 240px;
}
.dev-plan-table .dev-del {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.dev-plan-table .dev-del:hover {
  color: #dc2626;
}
.dev-block-head {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #0f172a;
  padding: 10px 4px 6px;
}
.dev-cal-block .dev-block-head {
  grid-column: 1 / -1;
  padding: 12px 8px 6px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 2px;
}
.dev-plan-table tr.dev-block-row td {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 8px;
}
.dev-comments {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.dev-comments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 6px;
}
.dev-cmt {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.35;
}
.dev-cmt.is-reschedule {
  background: #fff7ed;
  border-color: #fed7aa;
}
.dev-cmt-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-bottom: 2px;
}
.dev-cmt-kind {
  font-weight: 700;
  color: #334155;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.dev-cmt.is-reschedule .dev-cmt-kind {
  color: #c2410c;
}
.dev-cmt-move {
  font-size: 10px;
  margin-bottom: 2px;
}
.dev-cmt-body {
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}
.dev-comments-add {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dev-cmt-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
}
.dev-cmt-send {
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.dev-cmt-send:hover {
  background: #f8fafc;
}
.dev-cmt-badge {
  display: inline-block;
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}

/* —— Ячейки · карта стеллажей —— */
.cells-map-lead {
  margin: 0 0 10px;
  font-size: 13px;
}
.cells-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cells-rack-filter,
.cells-wh-filter {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
}
.cells-rack-filter > .muted,
.cells-wh-filter > .muted {
  font-size: 12px;
}
.cells-rack-filter .form-pagetabs.radio-pills {
  margin: 0;
}
.cells-wh-filter select {
  min-width: 180px;
  max-width: 280px;
  height: 34px;
  font: inherit;
  font-size: 13px;
}
th.col-filter {
  white-space: nowrap;
}
th.col-filter .col-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 4px !important;
  min-width: 18px;
  min-height: 18px !important;
  height: 18px;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
  vertical-align: middle;
}
th.col-filter .col-filter-btn:hover,
th.col-filter .col-filter-btn.is-on {
  background: #ecfdf5 !important;
  color: #0f766e !important;
}
.cells-map-main.panel {
  padding: 14px;
  overflow: auto;
  margin-bottom: 12px;
}
.cells-dock {
  position: relative;
  margin: 0 0 18px;
  padding: 16px 18px 14px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(204, 251, 241, 0.55) 0%, #fff 38%),
    #fff;
  box-shadow: var(--shell-shadow, 0 8px 24px rgba(15, 23, 42, 0.05));
  min-height: 88px;
  overflow: hidden;
}
.cells-dock::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-deep, #0d9488), var(--brand, #0f766e));
}
.cells-dock.is-open {
  border-color: rgba(13, 148, 136, 0.35);
}
.cells-dock-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding-left: 8px;
}
.cells-dock-empty b {
  display: block;
  font-size: 14px;
  color: var(--taxi-ink, #0f172a);
}
.cells-dock-empty p {
  margin: 2px 0 0;
  font-size: 12px;
}
.cells-dock-empty-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.cells-dock-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 12px;
  padding-left: 6px;
}
.cells-dock-code {
  font-family: var(--font-display), var(--font);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f172a;
  line-height: 1;
}
.cells-dock-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.cells-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.cells-chip.is-qty {
  background: #ecfdf5;
  color: #0f766e;
}
.cells-print-ico {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  margin-left: auto;
  cursor: pointer;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  min-height: auto !important;
  color: #64748b;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  flex-shrink: 0;
}
.cells-print-ico:hover {
  background: #f1f5f9 !important;
  color: #0f172a;
}
.cells-print-ico svg {
  width: 15px;
  height: 15px;
  display: block;
}
.cells-print-ico:disabled {
  opacity: 0.55;
  cursor: wait;
}
.cells-dock-close {
  width: 32px;
  height: 32px;
  margin-left: 0;
  border: 0 !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  min-height: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.cells-dock-close:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
.cells-sku-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cells-sku-card {
  flex: 0 0 auto;
  width: min(280px, 78vw);
  scroll-snap-align: start;
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.cells-sku-qty {
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
  background: #f0fdfa;
  border-radius: 10px;
  padding: 4px 8px;
}
.cells-sku-body {
  min-width: 0;
  flex: 1;
}
.cells-sku-code {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}
.cells-sku-name {
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cells-sku-supply {
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}
.cells-dock-empty-inline {
  margin: 8px 6px;
}
.cells-list-block {
  margin-top: 4px;
}
.cells-list-block .form-section-title {
  margin-bottom: 8px;
}
.cells-rack-board {
  --cells-bays: 8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: calc(72px + var(--cells-bays) * 72px);
}
.cells-bay-head,
.cells-level-row {
  display: grid;
  grid-template-columns: 64px repeat(var(--cells-bays), minmax(64px, 1fr));
  gap: 4px;
  align-items: stretch;
}
.cells-bay-label,
.cells-level-label,
.cells-corner {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cells-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: #0f172a;
}
button.cells-tile:hover {
  border-color: #94a3b8;
}
.cells-tile.is-filled {
  background: #ecfdf5;
  border-color: #99f6e4;
}
.cells-tile.is-empty {
  background: #fff;
  color: #94a3b8;
}
.cells-tile.is-missing {
  background: repeating-linear-gradient(
    -45deg,
    #f8fafc,
    #f8fafc 4px,
    #f1f5f9 4px,
    #f1f5f9 8px
  );
  color: #cbd5e1;
  font-size: 10px;
  cursor: default;
}
.cells-tile.is-selected {
  outline: 2px solid #0f766e;
  outline-offset: 1px;
}
.cells-tile-code {
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.cells-tile-meta {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
}
.cells-floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
}

/* План склада МСК — схема в стилях taxi */
.cells-map-floor {
  overflow-x: auto;
}
.msk-floor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 0 4px;
}
.msk-schema {
  border: 1px solid var(--taxi-line, #e2e8f0);
  border-radius: 12px;
  background: var(--taxi-white, #fff);
  min-width: 640px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.msk-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  border-bottom: 1px solid var(--taxi-line, #e2e8f0);
  background: var(--taxi-th, #f8fafc);
}
.msk-top .msk-soft {
  border: 0;
  border-right: 1px solid var(--taxi-line, #e2e8f0);
  border-radius: 0;
  min-height: 32px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--taxi-muted, #64748b);
  padding: 7px 8px;
}
.msk-top .msk-soft:last-child {
  border-right: 0;
}
.msk-soft {
  background: var(--taxi-line-soft, #f1f5f9);
  color: var(--taxi-muted, #64748b);
  text-align: center;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.msk-soft.is-office { background: #f1f5f9; }
.msk-soft.is-photo { background: #f5f0ea; color: #78716c; }
.msk-soft.is-recovery {
  background: #ecfdf5;
  color: var(--taxi-green, #0f766e);
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 10px;
  position: relative;
  padding-right: 96px;
}
.msk-recovery-icons {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
}
.msk-recovery-icons i {
  display: block;
  width: 6px;
  height: 12px;
  background: #99f6e4;
  border-radius: 2px;
}
.msk-recovery-icons i.is-wide {
  width: 18px;
  height: 7px;
  margin-left: 2px;
}
.msk-entrance-tag {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--taxi-muted, #64748b);
  background: var(--taxi-white, #fff);
  border: 1px solid var(--taxi-line, #e2e8f0);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 1.3;
}
.msk-body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: 620px;
  align-items: stretch;
}
.msk-col {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.msk-col-a {
  border-right: 1px dashed var(--taxi-line, #e2e8f0);
}
.msk-zone-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--taxi-ink, #0f172a);
}
.msk-zone-title.is-a { color: #b45309; }
.msk-zone-title.is-b { color: #0369a1; }
.msk-zone-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--taxi-muted, #64748b);
}
.msk-zone-label.is-a { color: #b45309; }
.msk-zone-label.is-b { color: #0369a1; }
.msk-racks-wrap {
  display: grid;
  grid-template-columns: 1fr 22px;
  gap: 6px;
  align-items: stretch;
  flex: 0 0 auto;
}
.msk-racks-wrap.is-b {
  /* B короче A — стеллажи компактнее, место уходит в рабочие зоны */
  max-width: 100%;
}
.msk-racks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.msk-racks-a .msk-rack,
.msk-racks-a .msk-row {
  min-height: 58px;
}
.msk-racks-b .msk-rack,
.msk-racks-b .msk-row {
  min-height: 58px;
}
.msk-row {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9a3412;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: visible;
  transition: box-shadow 0.12s, border-color 0.12s, background 0.12s;
}
.msk-row-b {
  border-color: #7dd3fc;
  background: #f0f9ff;
  color: #075985;
}
.msk-row.is-selected .msk-row-track {
  border-color: var(--taxi-green, #0f766e);
  outline: 2px solid var(--taxi-green, #0f766e);
  outline-offset: 1px;
}
.msk-row.is-filled .msk-row-code {
  font-weight: 800;
}
.msk-row.is-missing .msk-row-track {
  opacity: 0.55;
}
.msk-row.is-pickup .msk-row-track {
  border-color: #fb923c;
}
.msk-row-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 3px;
  min-height: 18px;
}
.msk-row-body {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}
.msk-row-axis {
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: #b45309;
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.msk-row-b .msk-row-axis {
  color: #0369a1;
}
.msk-row-axis-high {
  flex-basis: 24px;
}
.msk-row-track {
  flex: 1 1 0;
  min-width: 0;
  border: 2px solid #fdba74;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.12s, outline 0.12s;
}
.msk-row-b .msk-row-track {
  border-color: #38bdf8;
}
.msk-row-kind {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--taxi-muted, #64748b);
  white-space: nowrap;
}
.msk-row-code {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-right: auto;
}
.msk-row-sub {
  font-size: 10px;
  font-weight: 600;
  color: #c2410c;
  white-space: nowrap;
}
.msk-row-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}
.msk-row-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.msk-row-stat-lbl {
  font-size: 9px;
  font-weight: 600;
  color: var(--taxi-muted, #64748b);
}
.msk-row-stat-val {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.msk-row-stellazhi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  background: #fff;
}
.msk-stellazh {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px !important;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  border-right: 1px solid rgba(253, 186, 116, 0.65) !important;
  box-shadow: none !important;
  background: #fff !important;
  color: #9a3412;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px 1px !important;
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.12s, box-shadow 0.12s;
}
.msk-stellazh:last-child {
  border-right: 0 !important;
}
.msk-stellazh-b {
  border-right-color: rgba(56, 189, 248, 0.75) !important;
  color: #075985;
}
.msk-stellazh:hover,
.msk-stellazh.is-filled:hover,
.msk-stellazh.is-empty:hover,
.msk-stellazh.is-missing:hover {
  opacity: 1 !important;
  background: #ecfdf5 !important;
  box-shadow: inset 0 0 0 2px var(--taxi-green-soft, #0d9488) !important;
  z-index: 2;
}
.msk-stellazh-b:hover,
.msk-stellazh-b.is-filled:hover,
.msk-stellazh-b.is-empty:hover,
.msk-stellazh-b.is-missing:hover {
  background: #e0f2fe !important;
  box-shadow: inset 0 0 0 2px #0284c7 !important;
}
.msk-stellazh.is-selected {
  background: var(--taxi-select, #ecfdf5) !important;
  box-shadow: inset 0 0 0 2px var(--taxi-green, #0f766e) !important;
  z-index: 1;
}
.msk-stellazh.is-selected:hover {
  background: #d1fae5 !important;
  box-shadow: inset 0 0 0 2px var(--taxi-green, #0f766e) !important;
  z-index: 3;
}
.msk-stellazh.is-filled {
  background: #fffbeb !important;
}
.msk-stellazh.is-filled .msk-stellazh-code {
  font-weight: 700;
}
.msk-stellazh.is-empty {
  background: #fffbeb !important;
}
.msk-stellazh.is-empty .msk-stellazh-code {
  font-weight: 700;
}
.msk-stellazh.is-missing {
  opacity: 0.5;
  background: repeating-linear-gradient(
    -45deg,
    #f8fafc,
    #f8fafc 4px,
    #eef2f7 4px,
    #eef2f7 8px
  ) !important;
}
.msk-stellazh-num {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--taxi-muted, #64748b);
  line-height: 1;
}
.msk-stellazh-code {
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.1;
}
.msk-stellazh-qty {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--taxi-muted, #64748b);
  line-height: 1;
}
.msk-racks-a .msk-rack {
  min-height: 34px;
  padding: 4px 10px;
}
.msk-racks-b .msk-rack {
  min-height: 34px;
  padding: 4px 10px;
}
.msk-dim {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 600;
  color: var(--taxi-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--taxi-line-soft, #f1f5f9);
  padding: 4px 0;
  user-select: none;
  text-align: center;
  line-height: 1.15;
}
.msk-dim.is-a { color: #b45309; }
.msk-dim.is-b { color: #0369a1; }
.msk-aisle {
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  position: relative;
}
.msk-aisle span {
  font-size: 9px;
  color: var(--taxi-muted, #64748b);
  letter-spacing: 0.1em;
  background: var(--taxi-white, #fff);
  padding: 0 6px;
  z-index: 1;
}
.msk-aisle::before {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  height: 1px;
  background: var(--taxi-line, #e2e8f0);
}
.msk-rack {
  width: 100%;
  min-height: 34px;
  border: 1px solid #fdba74;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px;
  font: inherit;
  cursor: pointer;
  transition: box-shadow 0.12s, border-color 0.12s, background 0.12s;
}
.msk-rack-b {
  border-color: #7dd3fc;
  background: #f0f9ff;
  color: #075985;
}
.msk-rack:hover {
  border-color: var(--taxi-green-soft, #0d9488);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}
.msk-rack.is-selected {
  border-color: var(--taxi-green, #0f766e);
  outline: 2px solid var(--taxi-green, #0f766e);
  outline-offset: 1px;
  background: var(--taxi-select, #ecfdf5);
}
.msk-rack.is-filled .msk-rack-code {
  font-weight: 800;
}
.msk-rack.is-missing {
  opacity: 0.45;
  border-style: dashed;
}
.msk-rack.is-pickup {
  background: #ffedd5;
  border-color: #fb923c;
  min-height: 26px;
}
.msk-rack-code {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.msk-rack-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}
.msk-rack-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--taxi-muted, #64748b);
  white-space: nowrap;
}
.msk-rack-sub {
  font-size: 10px;
  font-weight: 600;
  color: #c2410c;
  white-space: nowrap;
}
.msk-rack-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}
.msk-rack-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.msk-rack-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--taxi-muted, #64748b);
}
.msk-rack-stat-val {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.msk-rack-meta {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.65;
}
.msk-b5-row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 6px;
  align-items: stretch;
}
.msk-pallets {
  border: 1px dashed #7dd3fc;
  background: #f8fafc;
  color: #0369a1;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.msk-racks-a .msk-sto-strip-cell {
  min-height: 34px;
  padding: 2px 10px;
  border-color: #f59e0b;
  background: #fffbeb;
  color: #78350f;
  justify-content: space-between;
  gap: 12px;
}
.msk-sto-strip-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
}
.msk-sto-strip-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.msk-sto-strip-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--taxi-muted, #64748b);
  text-transform: none;
}
.msk-sto-strip-stat-val {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.msk-sto-strip-cell.is-filled {
  border-color: #059669;
  background: #ecfdf5;
  color: #065f46;
}
.msk-sto-strip-cell.is-empty {
  border-style: dashed;
}
.msk-sto-strip-cell.is-selected {
  box-shadow: 0 0 0 2px #2563eb;
}
.msk-sto-strip-code {
  font-size: 18px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.msk-soft-stack {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  margin-top: 2px;
}
.msk-soft-stack.is-work {
  /* Рабочие зоны занимают оставшуюся высоту колонки B (~как на схеме) */
  flex: 1 1 0;
  min-height: 280px;
}
.msk-col .msk-soft.is-load,
.msk-col .msk-soft.is-unload {
  border: 1px dashed #7dd3fc;
  background: #f0f9ff;
  color: #0369a1;
  border-radius: 8px;
  flex: 1 1 0;
  min-height: 64px;
  margin: 0;
  font-size: 11px;
}
.msk-col .msk-soft.is-work {
  border: 1px dashed #fdba74;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 8px;
  flex: 1 1 0;
  min-height: 120px;
  margin: 0;
  font-size: 12px;
}
.msk-work-row {
  display: flex;
  flex: 1 1 0;
  gap: 8px;
  min-height: 120px;
  align-items: stretch;
}
.msk-courier-pallet,
.msk-reserve-pallet {
  flex: 0 0 92px;
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  box-sizing: border-box;
}
.msk-work-zone-1,
.msk-work-zone-2 {
  flex: 1 1 0;
  min-width: 0;
}
.msk-courier-pallet {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 6px;
  margin: 0;
  border: 2px solid #818cf8;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  color: #312e81;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
  transition: background 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.msk-courier-pallet:hover:not(:disabled) {
  background: #e0e7ff;
  border-color: #6366f1;
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.35);
}
.msk-courier-pallet.is-selected {
  border-color: #4338ca;
  background: #c7d2fe;
  box-shadow: inset 0 0 0 2px #4338ca;
}
.msk-courier-pallet:disabled {
  opacity: 0.45;
  cursor: default;
}
.msk-courier-pallet-vert {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
  font-size: 11px;
  line-height: 1.15;
  max-height: 100%;
}
.msk-courier-pallet-cap,
.msk-reserve-pallet-cap {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msk-courier-pallet-cap {
  color: #4f46e5;
}
.msk-reserve-pallet-cap {
  color: #0f766e;
}
.msk-reserve-pallet {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 6px;
  margin: 0;
  border: 2px solid #2dd4bf;
  border-radius: 8px;
  background: linear-gradient(180deg, #ecfdf5 0%, #ccfbf1 100%);
  color: #115e59;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
  transition: background 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.msk-reserve-pallet:hover:not(:disabled) {
  background: #ccfbf1;
  border-color: #14b8a6;
  box-shadow: inset 0 0 0 2px rgba(20, 184, 166, 0.35);
}
.msk-reserve-pallet.is-selected,
.msk-reserve-pallet.is-filled.is-selected {
  border-color: #0f766e;
  background: #99f6e4;
  box-shadow: inset 0 0 0 2px #0f766e;
}
.msk-reserve-pallet.is-filled {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
}
.msk-reserve-pallet:disabled {
  opacity: 0.45;
  cursor: default;
}
.msk-reserve-pallet-vert {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
  font-size: 11px;
  line-height: 1.15;
  max-height: 100%;
}
.msk-courier-pallet.is-filled {
  background: linear-gradient(180deg, #ddd6fe 0%, #c7d2fe 100%);
}
.msk-pallet-qty {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1;
}
.msk-courier-pallet .msk-pallet-qty {
  color: #4338ca;
}
.msk-reserve-pallet .msk-pallet-qty {
  color: #0f766e;
}
.msk-pallet-sub {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.85;
}
.msk-sto-foot {
  border-top: 1px dashed var(--taxi-line, #e2e8f0);
  padding: 10px 14px 12px;
  background: #fffbeb;
}
.msk-sto-shelf {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin: 0;
  border: 2px solid #d97706;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
  transition: background 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.msk-sto-shelf:hover:not(:disabled) {
  background: #fef3c7;
  border-color: #b45309;
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.35);
}
.msk-sto-shelf.is-selected {
  border-color: #92400e;
  background: #fde68a;
  box-shadow: inset 0 0 0 2px #92400e;
}
.msk-sto-shelf.is-filled {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
}
.msk-sto-shelf:disabled {
  opacity: 0.45;
  cursor: default;
}
.msk-sto-shelf-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}
.msk-sto-shelf-sub {
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  line-height: 1.2;
}
.msk-sto-shelf .msk-pallet-qty {
  color: #92400e;
}
.cells-pallet-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 0;
}
.cells-pallet-group {
  border: 1px solid var(--taxi-line, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.cells-pallet-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--taxi-th, #f8fafc);
  border-bottom: 1px solid var(--taxi-line-soft, #f1f5f9);
  font-size: 12px;
}
.cells-pallet-group-head b {
  font-variant-numeric: tabular-nums;
}
.cells-pallet-group-lines {
  padding: 8px;
}
.msk-floor-slots {
  margin-top: 2px;
}
.msk-floor-slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.msk-floor-slot {
  min-width: 72px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: inherit;
  cursor: pointer;
  color: #0f172a;
  text-align: left;
}
.msk-floor-slot span {
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.msk-floor-slot small {
  font-size: 10px;
  color: #64748b;
}
.msk-floor-slot.is-filled {
  background: #ecfdf5;
  border-color: #99f6e4;
}
.msk-floor-slot.is-empty {
  color: #94a3b8;
}
.msk-floor-slot.is-selected {
  outline: 2px solid #0f766e;
  outline-offset: 1px;
}
.msk-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  font-size: 11px;
  color: #64748b;
}
.msk-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.msk-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid transparent;
}
.msk-swatch.is-a {
  background: #f9e7d0;
  border-color: #e0a86a;
}
.msk-swatch.is-b {
  background: #d6eaf8;
  border-color: #7eb6e0;
}
.msk-swatch.is-aisle {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.msk-swatch.is-filled {
  background: #ecfdf5;
  border-color: #99f6e4;
}
.msk-swatch.is-sto {
  background: #fffbeb;
  border-color: #fcd34d;
}
.msk-bay-detail {
  margin-top: 12px;
  padding: 12px 14px;
}
.msk-bay-detail.is-placeholder {
  background: #f8fafc;
}
.msk-bay-detail-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.msk-bay-detail-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}
.msk-bay-detail-head .cells-print-ico {
  margin-left: auto;
  margin-top: 2px;
}
.msk-bay-sub {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #cbd5e1;
}
.msk-bay-sub-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cells-tile-sub {
  border-color: #fcd34d;
  background: #fffbeb;
}
.msk-bay-levels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  .msk-schema { min-width: 0; }
  .msk-top {
    grid-template-columns: 1fr 1fr;
  }
  .msk-top .msk-soft.is-recovery {
    grid-column: 1 / -1;
    padding-right: 8px;
  }
  .msk-entrance-tag {
    position: static;
    transform: none;
    margin-left: auto;
  }
  .msk-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .msk-col-a {
    border-right: 0;
    border-bottom: 1px dashed var(--taxi-line, #e2e8f0);
  }
  .msk-soft-stack.is-work {
    min-height: 200px;
  }
  .msk-work-row {
    min-height: 140px;
  }
  .msk-courier-pallet,
  .msk-reserve-pallet {
    flex: 0 0 80px;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
  }
  .msk-dim {
    writing-mode: horizontal-tb;
    transform: none;
    border-left: 0;
    border-top: 1px solid var(--taxi-line-soft, #f1f5f9);
    font-size: 10px;
    padding: 4px;
  }
  .msk-racks-wrap {
    grid-template-columns: 1fr;
  }
}

/* Остатки по складам в позициях заказа */
.deal-stock-cell { white-space: nowrap; vertical-align: top; }
.deal-stock-btn {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: auto !important;
  box-shadow: none !important;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.deal-stock-btn.danger { color: var(--danger, #dc2626) !important; }
.deal-stock-pop.is-fixed {
  position: fixed;
  z-index: 10070;
  min-width: 220px;
  max-width: min(340px, calc(100vw - 16px));
  max-height: min(320px, calc(100vh - 24px));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--taxi-line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
}
.deal-stock-pop-head {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  margin: 0 0 8px;
}
.deal-stock-pop-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.deal-stock-pop-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--taxi-line-soft, #f1f5f9);
  font-size: 12px;
}
.deal-stock-pop-list li:first-child { border-top: 0; }
.deal-stock-pop-wh { color: var(--taxi-ink, #0f172a); min-width: 0; }
.deal-stock-pop-qty { font-weight: 600; flex-shrink: 0; }
.deal-stock-pop-empty { margin: 0; font-size: 12px; }


/* Закупки · Drive: коды поставщиков видны, ячейки не режем */
.pd-folders-wrap > table#pd-folders td {
  overflow: visible !important;
  max-width: none !important;
  white-space: normal !important;
  text-overflow: unset !important;
}
.pd-sup-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--taxi-ink, #0f172a);
}

/* Закупки · прайсы: превью встроенных фото */
.price-intake .pi-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  background: #f8fafc;
  vertical-align: middle;
}
.price-intake td.pi-pic {
  width: 56px;
  text-align: center;
}

/* Рабочий стол корзины */
.price-intake .pi-desk-head {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.price-intake .pi-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}
@media (max-width: 960px) {
  .price-intake .pi-desk { grid-template-columns: 1fr; }
}
.price-intake .pi-desk-side {
  position: sticky;
  top: 8px;
  padding: 12px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 8px;
  background: var(--taxi-surface, #fff);
}
.price-intake .pi-notes {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  font: inherit;
  padding: 8px;
  box-sizing: border-box;
}
.price-intake .pi-side-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-intake .pi-side-actions .btn,
.price-intake .pi-side-actions a.btn {
  text-align: center;
}
.price-intake .pi-add-line {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 8px;
}
.price-intake .pi-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.price-intake .pi-add-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--taxi-muted, #64748b);
}
.price-intake .pi-add-grid input {
  font: inherit;
  padding: 6px 8px;
}

/* —— Налоги и зарплата —— */
.tax-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.tax-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 12px;
  background: var(--taxi-select, #f8fafc);
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
}
.tax-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.tax-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--taxi-muted, #64748b);
  font-weight: 500;
}
.tax-select,
.tax-input,
.tax-settings textarea,
.tax-settings .tax-select,
.tax-settings .tax-input {
  font: inherit;
  font-size: 13px;
  color: var(--taxi-ink, #0f172a);
  padding: 6px 9px;
  border: 1px solid var(--taxi-line, #cbd5e1);
  border-radius: 8px;
  background: #fff;
  min-height: 34px;
}
.tax-input-year { width: 88px; }
.tax-select-q { width: 64px; }
.tax-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tax-actions .btn { white-space: nowrap; }
.tax-lead { margin: 0; font-size: 13px; line-height: 1.45; }
.tax-h3 {
  margin: 8px 0 6px;
  font-size: 14px;
  font-weight: 650;
}
.tax-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}
.tax-kpi-card {
  padding: 10px 12px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}
.tax-kpi-label {
  font-size: 11px;
  color: var(--taxi-muted, #64748b);
  margin-bottom: 4px;
}
.tax-kpi-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tax-callout {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--taxi-line-soft, #e2e8f0);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}
.tax-callout.is-warn {
  background: #fff7ed;
  border-color: #fed7aa;
}
.tax-callout.is-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tax-empty {
  padding: 28px 16px;
  text-align: center;
  border: 1px dashed var(--taxi-line, #cbd5e1);
  border-radius: 12px;
  background: #fafbfc;
}
.tax-empty-title {
  font-weight: 650;
  margin-bottom: 6px;
}
.tax-empty .muted { margin: 0; }
.tax-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.tax-row-muted td { color: var(--taxi-muted, #64748b); }
.tax-pay-detail { margin-top: 12px; }
.tax-hub .data-table th.num,
.tax-hub .data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tax-settings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 16px;
  max-width: 720px;
}
.tax-settings label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--taxi-muted, #64748b);
  font-weight: 500;
}
.tax-settings .tax-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--taxi-ink, #0f172a);
  font-size: 13px;
  padding-top: 22px;
}
.tax-settings .tax-span { grid-column: 1 / -1; }
.tax-file input[type="file"] {
  max-width: 220px;
  font-size: 12px;
}
@media (max-width: 720px) {
  .tax-toolbar-left { width: 100%; }
  .tax-actions { width: 100%; }
  .tax-actions .btn { flex: 1 1 auto; }
}

/* Подсказка услуг внутри заказа (не лайтбокс) */
.deal-svc-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
}
.deal-svc-hint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.deal-svc-hint-head strong {
  font-size: 14px;
}
.deal-svc-suggest-for {
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 4px;
}
.deal-svc-suggest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(194, 65, 12, 0.12);
  cursor: pointer;
}
.deal-svc-suggest-row:last-child { border-bottom: 0; }
.deal-svc-suggest-name { flex: 1 1 auto; font-size: 13px; }
.deal-svc-suggest-price {
  white-space: nowrap;
  font-size: 13px;
  color: var(--taxi-muted, #64748b);
}
.deal-svc-hint-note {
  margin: 8px 0 0;
  font-size: 12px;
}
.deal-svc-hint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Тосты справа сверху */
.ui-toast-stack {
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 12050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}
.ui-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 12px 11px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  font-size: 13px;
  line-height: 1.35;
  color: #0f172a;
  background: #fff;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ui-toast.is-in {
  opacity: 1;
  transform: translateX(0);
}
.ui-toast.is-out {
  opacity: 0;
  transform: translateX(16px);
}
.ui-toast-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.ui-toast-x {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: -4px -4px -4px 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ui-toast-x:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.06);
}
.ui-toast--ok {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #6ee7b7;
  color: #065f46;
}
.ui-toast--warn {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fcd34d;
  color: #92400e;
}
.ui-toast--error {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
  color: #991b1b;
}
.ui-toast--info {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  color: #1e3a8a;
}
html.ui-phone .ui-toast-stack {
  top: 52px;
  right: 10px;
  left: 10px;
  max-width: none;
  align-items: stretch;
}
.deal-svc-hint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

/* Производство — синяя кнопка и подсветка заданий склада */
button.primary.btn-production,
.btn-production {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35) !important;
}
button.primary.btn-production:hover,
.btn-production:hover {
  background: #1d4ed8 !important;
}
table tr.wt-production-row td {
  background: #eff6ff;
}
table tr.wt-production-row.active td {
  background: #dbeafe;
}
.wt-production-panel.is-production {
  border-left: 4px solid #2563eb;
  background: linear-gradient(90deg, #eff6ff 0%, var(--card, #fff) 48px);
}
.deal-production-hint b {
  color: #1d4ed8;
}
