/* WMS layout + overrides поверх Vuexy (core.css или vuexy-lite.css) */
/* Vuexy-inspired — светлая тема, чёрные кнопки */
:root {
  --bg: var(--vuexy-body-bg, #f8f7fa);
  --surface: var(--vuexy-paper, #ffffff);
  --card: var(--vuexy-paper, #ffffff);
  --border: var(--vuexy-border, #e6e6e8);
  --border-light: var(--vuexy-border-light, #f1f0f2);
  --text: #000000;
  --sub: #1a1a1a;
  --muted: var(--vuexy-muted, #6d6d72);
  --primary: #2f2f2f;
  --primary-hover: #1a1a1a;
  --primary-soft: #f1f0f2;
  --accent: var(--vuexy-primary, #7367f0);
  --acbg: var(--vuexy-primary-soft, #f0efff);
  --green: var(--vuexy-success, #28c76f);
  --greenbg: #e8f8ef;
  --red: var(--vuexy-danger, #ea5455);
  --redbg: #fce8e8;
  --amber: var(--vuexy-warning, #ff9f43);
  --amberbg: #fff3e6;
  --purple: var(--vuexy-primary, #7367f0);
  --purplebg: var(--vuexy-primary-soft, #f0efff);
  --sidebar: 260px;
  --navbar-h: 62px;
  --shadow: var(--vuexy-shadow, 0 2px 6px rgba(47, 43, 61, 0.08));
  --shadow-lg: 0 4px 18px rgba(47, 43, 61, 0.1);
  --font: var(--vuexy-font, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --bs-font-sans-serif: var(--font);
  --bs-body-font-family: var(--font);
  --r: var(--vuexy-radius, 0.375rem);
  --r-lg: var(--vuexy-radius-lg, 0.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

/* Основной текст — чёрный (поверх Vuexy / Bootstrap) */
[data-bs-theme="light"] {
  --bs-body-color: #000000;
  --bs-heading-color: #000000;
}
.layout-wrapper,
.layout-page,
.wms-content,
.wms-content p,
.wms-content li,
.wms-content td,
.wms-content label,
.wms-content .form-group label,
.wms-content .card-title,
.wms-content .page-header h1,
.menu-inner .menu-link,
.table,
.table td,
.table th,
.form-control,
.form-select {
  color: var(--text);
}
.text-muted,
.wms-content .text-muted,
.menu-header-text {
  color: var(--muted) !important;
}
.menu-link {
  color: var(--sub);
}
.menu-item.active > .menu-link:not(.menu-toggle) {
  color: #fff !important;
}

/* Логотип в сайдбаре */
.app-brand-link,
.app-brand-text,
.app-brand .menu-text {
  color: #000000 !important;
}
.app-brand-link:hover,
.app-brand-link:hover .app-brand-text {
  color: #000000 !important;
  opacity: 0.85;
}
.app-brand-logo-ff {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  background: #000000;
  color: #ffffff !important;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  border-radius: 0.6875rem;
  line-height: 1;
}
.app-brand-logo-ff svg {
  display: none;
}

.wms-app-brand {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  overflow: visible !important;
  padding-right: 0.8125rem !important;
}
.wms-sidebar-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #4a4653;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wms-sidebar-toggle:hover {
  background: #f3f2f7;
  color: #000;
}
.wms-sidebar-toggle .ti {
  font-size: 1.375rem;
  line-height: 1;
}
.wms-sidebar-toggle__desk {
  transition: transform 0.2s ease;
}
html.layout-menu-collapsed .wms-sidebar-toggle__desk {
  transform: rotate(180deg);
}
.wms-sidebar-toggle__mob {
  display: none;
}
@media (max-width: 1199.98px) {
  .wms-sidebar-toggle {
    width: 2rem;
    height: 2rem;
  }
  .wms-sidebar-toggle__desk {
    display: none !important;
  }
  .wms-sidebar-toggle__mob {
    display: block !important;
  }
}

/* ── Vuexy layout: WMS-контент ── */
.wms-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.0625rem;
  margin-bottom: 1.625rem;
  padding-bottom: 1.375rem;
  border-bottom: 1px solid var(--border-light);
}
.wms-page-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.wms-page-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: #000000;
  color: #ffffff;
  border-radius: var(--r-lg);
}
.wms-page-header-icon .ti {
  font-size: 1.25rem;
  line-height: 1;
}
.wms-page-header-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.wms-page-header-sub {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
}
.wms-page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.wms-page-header-actions .btn {
  white-space: nowrap;
}
.wms-page-header-icon--avatar {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.wms-page-header--client .text-muted {
  margin-top: 0.15rem;
}
.wms-content .page-header:not(.wms-page-header) {
  margin-bottom: 1.375rem;
}
.wms-content .page-header:not(.wms-page-header) h1 {
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
/* ── Сворачивание бокового меню (без поломки hover-expand Vuexy) ── */
@media (min-width: 1200px) {
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .menu-text,
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .wms-menu-user-info,
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .app-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .menu-vertical,
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu.menu-vertical .menu-inner > .menu-item,
  html.layout-menu-collapsed:not(.layout-menu-hover) .menu-vertical .menu-inner > .menu-item {
    width: 5rem;
  }
  html.layout-menu-collapsed.layout-menu-fixed .layout-page {
    padding-left: 5rem;
  }
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .menu-link {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .menu-icon {
    margin: 0;
  }
  /* Убираем «плавающие» заголовки секций Vuexy в узком режиме */
  html.layout-menu-collapsed:not(.layout-menu-hover) .layout-menu .menu-inner > .menu-header {
    display: none !important;
  }

  /* При наведении — полная ширина поверх контента, без конфликта с нашими правилами */
  html.layout-menu-collapsed.layout-menu-hover .layout-menu {
    z-index: 1100;
    box-shadow: 4px 0 24px rgba(47, 43, 61, 0.14);
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-vertical,
  html.layout-menu-collapsed.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-item,
  html.layout-menu-collapsed.layout-menu-hover .menu-vertical .menu-inner > .menu-item {
    width: 16.25rem;
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-inner > .menu-header {
    display: list-item !important;
    position: static !important;
    margin: 0 !important;
    padding: 0.5rem 1.0625rem !important;
    width: auto !important;
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-inner > .menu-header::before {
    display: none !important;
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-inner > .menu-header .menu-header-text {
    opacity: 1 !important;
    overflow: visible !important;
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-link > div:not(.menu-block),
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-text,
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .wms-menu-user-info,
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .app-brand-text {
    opacity: 1 !important;
    width: auto !important;
    overflow: visible !important;
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-link {
    justify-content: flex-start !important;
    padding-left: 1.0625rem !important;
    padding-right: 1.0625rem !important;
  }
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-icon {
    margin-right: 0.5rem !important;
  }
}
.wms-menu-reopen {
  display: none;
  position: fixed;
  z-index: 1080;
  left: 0.8125rem;
  top: 0.8125rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border, #e6e6e8);
  border-radius: var(--r-lg, 0.5rem);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text, #333);
}
.wms-menu-reopen.is-visible {
  display: inline-flex;
}
.wms-menu-reopen:hover {
  background: #f3f2f7;
}

/* Без верхней navbar — контент вплотную к верху */
.layout-menu-fixed .layout-page,
.layout-content-navbar .layout-page,
html.layout-navbar-hidden .layout-page {
  padding-top: 0 !important;
}
.layout-content-navbar .content-wrapper {
  padding-top: 0 !important;
}
.wms-content-pad.container-p-y {
  padding-top: 30px !important;
  padding-bottom: 1.375rem !important;
}
.wms-content .breadcrumb {
  margin-bottom: 0.8125rem;
}
.wms-page-header {
  margin-top: 0;
}

/* Пользователь в левом меню */
.wms-menu-user-block {
  pointer-events: none;
}
.wms-menu-user {
  display: flex;
  align-items: center;
  gap: 0.8125rem;
  padding: 0.75rem 1.0625rem;
  margin: 0.25rem 0.8125rem;
}
.wms-menu-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: #000000;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
  letter-spacing: -0.02em;
}
.wms-menu-user-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #000000;
  line-height: 1.3;
}
.wms-menu-user-site {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 0.1rem;
}

/* Карточки WMS поверх Vuexy .card */
.wms-content .card {
  margin-bottom: 1.375rem;
}
.wms-content .card:not(.mb-0) {
  padding: 1.375rem 1.625rem;
}
.wms-content .card.product-table-card,
.wms-content .card[style*="padding:0"] {
  padding: 0 !important;
}

#items .order-item-desc {
  color: rgba(10, 0, 0, 1);
  font-size: 15px;
}

/* ── Cards (fallback вне Vuexy / login) ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 1.375rem 1.625rem;
  margin-bottom: 1.375rem;
}
.card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.0625rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.card-title__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.card-title small,
.card-title .text-muted {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Dashboard period + analytics metrics ── */
.dashboard-period-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-bottom: 0.75rem;
  vertical-align: top;
}
.dashboard-period-trigger {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  width: auto;
  max-width: min(100%, 36rem);
  padding: 0 0 0 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  line-height: 1.25;
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.dashboard-period-trigger:hover {
  border-color: #93c5fd;
}
.dashboard-period-wrap.is-open .dashboard-period-trigger {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.dashboard-period-trigger__text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.4rem 0.5rem 0.4rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-period-trigger__main {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.dashboard-period-trigger__compare {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-period-trigger__caret {
  flex-shrink: 0;
  width: 2.125rem;
  min-height: 100%;
  margin: 0;
  border-left: 1px solid var(--border);
  background-color: #f8f9fa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236d6d72' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  transition: transform 0.2s, background-color 0.15s;
}
.dashboard-period-trigger:hover .dashboard-period-trigger__caret {
  background-color: #f1f5f9;
}
.dashboard-period-wrap.is-open .dashboard-period-trigger__caret {
  transform: rotate(180deg);
  background-color: #eff6ff;
}
.dashboard-period-panel {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 30;
  width: 52rem;
  min-width: 52rem;
  max-width: min(52rem, calc(100vw - 2rem));
}
.dashboard-period-panel .dashboard-period-bar {
  width: 100%;
  box-sizing: border-box;
}
.dashboard-period-panel .dashboard-period-bar {
  padding: 1.125rem 1.35rem 1.25rem;
}
.dashboard-period-panel .dashboard-period-bar__head {
  margin-bottom: 0.875rem;
}
.dashboard-period-panel .dashboard-period-ranges {
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}
.dashboard-period-panel .dashboard-period-range {
  padding: 0.75rem 1rem;
}
.dashboard-period-panel .dashboard-period-range__label {
  margin-bottom: 0.5rem;
}
.dashboard-period-panel .dashboard-period-range__dates {
  flex-wrap: nowrap;
  gap: 0.5rem 0.65rem;
}
.dashboard-period-panel .dashboard-period-range__dates .form-control {
  width: 9.25rem;
  padding: 0.35rem 0.55rem;
}
.dashboard-period-panel .dashboard-period-range__hint {
  margin-top: 0.5rem;
  line-height: 1.4;
}
.dashboard-period-panel .dashboard-period-form__footer {
  flex-wrap: nowrap;
  gap: 1rem;
  padding-top: 0.875rem;
  margin-top: 0.125rem;
}
.dashboard-period-panel .dashboard-period-presets {
  flex-wrap: nowrap;
  gap: 0.5rem;
}
.dashboard-period-panel .dashboard-period-preset {
  padding: 0.38rem 0.75rem;
}
.dashboard-period-panel .dashboard-period-form__actions {
  gap: 0.5rem;
}
.dashboard-period-panel .dashboard-period-bar .btn-sm {
  padding: 0.38rem 0.85rem;
}
.dashboard-period-panel[hidden] {
  display: none !important;
}
.dashboard-period-wrap.is-open .dashboard-period-panel {
  display: block;
}
.dashboard-period-wrap.is-open .dashboard-period-bar {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}
.dashboard-period-bar {
  padding: 0.65rem 0.85rem 0.75rem;
  margin-bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.dashboard-period-bar__head {
  margin-bottom: 0.5rem;
}
.dashboard-period-form__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}
.dashboard-period-form {
  min-width: 0;
}
.dashboard-period-ranges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}
.dashboard-period-range {
  padding: 0.5rem 0.65rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  background: var(--bg);
}
.dashboard-period-range--main {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.dashboard-period-range--compare {
  background: #f8fafc;
}
.dashboard-period-range__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.dashboard-period-range--main .dashboard-period-range__label {
  color: #1d4ed8;
}
.dashboard-period-range__dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.dashboard-period-range__dates .form-control {
  width: 8.5rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  min-height: 0;
}
.dashboard-period-range__dates--readonly {
  font-weight: 600;
}
.dashboard-period-range__hint {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.dashboard-period-range__hint strong {
  color: var(--sub);
  font-weight: 600;
}
.dashboard-period-form__sep {
  color: var(--muted);
  font-weight: 500;
}
.dashboard-period-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}
.dashboard-period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dashboard-period-preset {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sub);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.dashboard-period-preset:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.dashboard-period-preset.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.dashboard-period-form__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.dashboard-period-bar .btn-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.8125rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.625rem;
}
.dash-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem 1.125rem 0.875rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 8.5rem;
}
.dash-metric--good { background: linear-gradient(135deg, #f0fdf4 0%, var(--surface) 55%); }
.dash-metric--warn { background: linear-gradient(135deg, #fffbeb 0%, var(--surface) 55%); }
.dash-metric--bad { background: linear-gradient(135deg, #fef2f2 0%, var(--surface) 55%); }
.dash-metric--accent { background: linear-gradient(135deg, #eff6ff 0%, var(--surface) 55%); }
.dash-metric--purple { background: linear-gradient(135deg, #f5f3ff 0%, var(--surface) 55%); }
.dash-metric__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.dash-metric__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sub);
  line-height: 1.3;
}
.dash-metric__info {
  font-size: 0.75rem;
  color: var(--muted);
  cursor: help;
  flex-shrink: 0;
}
.dash-metric__value {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.dash-metric__primary { color: var(--text); }
.dash-metric__secondary { color: var(--muted); font-weight: 600; }
.dash-metric__slash { color: var(--muted); font-weight: 500; font-size: 1.125rem; }
.dash-metric__money { font-size: 1.25rem; }
.dash-metric--good .dash-metric__primary { color: var(--green); }
.dash-metric--warn .dash-metric__primary { color: var(--amber, #d97706); }
.dash-metric--accent .dash-metric__primary { color: var(--accent, #2563eb); }
.dash-metric--purple .dash-metric__primary { color: var(--purple, #7c3aed); }
.dash-metric__sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: auto;
  padding-bottom: 0.65rem;
  line-height: 1.35;
}
.dash-metric__compare {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
}
.dash-metric__prev {
  color: var(--muted);
  font-weight: 500;
}
.dash-metric__delta {
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.dash-metric__delta--good {
  background: var(--greenbg);
  color: var(--green);
}
.dash-metric__delta--bad {
  background: var(--redbg);
  color: var(--red);
}
.dash-metric__arrow {
  font-size: 0.875rem;
  font-weight: 700;
  margin-left: auto;
}
.dash-metric__arrow.dash-metric__delta--good { color: var(--green); }
.dash-metric__arrow.dash-metric__delta--bad { color: var(--red); }

/* ── Дашборд: требуют внимания ── */
.dash-attention {
  margin-bottom: 1.25rem;
}
.dash-attention__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.dash-attention__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dash-attention__chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.dash-attention__chip--warn { background: #fffbeb; color: #b45309; }
.dash-attention__chip--pay { background: #eff6ff; color: #1d4ed8; }
.dash-attention__chip--ok { background: var(--greenbg); color: var(--green); }
.dash-attention__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.dash-attention__panel {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 0.875rem 1rem 1rem;
}
.dash-attention__panel-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sub);
  margin-bottom: 0.75rem;
}
.dash-attention__groups {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}
.dash-attention-client {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r);
  padding: 0.5rem 0.65rem;
}
.dash-attention-client__head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.dash-attention-client__name {
  font-weight: 700;
  font-size: 0.9375rem;
}
.dash-attention-client__meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.dash-attention-client__sum {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--amber, #d97706);
  white-space: nowrap;
}
.dash-attention-client__orders {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-attention-client__orders li {
  margin: 0;
  padding: 0;
}
.dash-attention-client__more {
  font-size: 0.75rem;
  padding: 0.2rem 0 0 0.25rem;
}
.dash-attention-order-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.25rem;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  font-size: 0.8125rem;
}
.dash-attention-order-link:hover {
  background: var(--border-light);
  color: var(--primary);
}
.dash-attention-order-link__sum {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dash-attention__table-wrap {
  margin-bottom: 0.5rem;
}
.dash-attention-table {
  width: 100%;
  font-size: 0.8125rem;
}
.dash-attention-table th,
.dash-attention-table td {
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--border-light);
}
.dash-attention-ready-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-attention-ready-list li {
  margin: 0 0 0.35rem;
}
.dash-attention-ready-list .dash-attention-order-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.dash-attention__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
}
.dash-attention__footnote {
  font-size: 0.75rem;
  margin: 0.35rem 0 0;
}

/* ── Metrics (Vuexy stat cards, legacy) ── */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.0625rem;
  margin-bottom: 1.625rem;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.375rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-soft);
  opacity: 0.6;
}
.metric .ml {
  font-size: 0.875rem;
  color: var(--sub);
  margin-bottom: 0.35rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.metric .mv {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
/* Дашборд — задания упаковщиков */
.dashboard-packer-card .card-title {
  margin-bottom: 0.75rem;
}
.dashboard-packer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.dashboard-packer-chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--r, 0.375rem);
  background: var(--bg);
  color: var(--muted);
}
.dashboard-packer-chip strong {
  color: var(--text);
}
.dashboard-packer-chip--overdue {
  background: var(--redbg);
  color: var(--red);
}
.dashboard-packer-chip--overdue strong {
  color: var(--red);
}
.dashboard-packer-chip--today {
  background: var(--purplebg);
  color: var(--purple);
}
.dashboard-packer-chip--done {
  background: var(--greenbg);
  color: var(--green);
}
.dashboard-packer-group {
  margin-bottom: 1rem;
}
.dashboard-packer-group:last-child {
  margin-bottom: 0;
}
.dashboard-packer-group__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-light);
}
.dashboard-packer-group--overdue .dashboard-packer-group__head {
  border-bottom-color: #f5c2c2;
}
.dashboard-packer-group__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.dashboard-packer-group--overdue .dashboard-packer-group__title {
  color: var(--red);
}
.dashboard-packer-group__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}
.dashboard-packer-group__hint {
  font-size: 0.6875rem;
  color: var(--muted);
  width: 100%;
}
.dashboard-packer-item {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.dashboard-packer-item:last-child {
  border-bottom: none;
}
.dashboard-packer-item:hover {
  background: var(--bg);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: var(--r-lg, 0.5rem);
}
.dashboard-packer-item__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.dashboard-packer-item__name {
  font-weight: 600;
  font-size: 0.875rem;
}
.dashboard-packer-item__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}
.dashboard-packer-item__date {
  font-weight: 600;
  color: var(--sub);
}
.dashboard-packer-item__desc {
  font-size: 0.8125rem;
  margin-top: 0.35rem;
  color: var(--text);
}
.dashboard-packer-empty {
  text-align: center;
  color: var(--muted);
  padding: 1.75rem 0 1.25rem;
}
.dashboard-packer-empty p {
  margin: 0 0 1rem;
}

.wms-dl {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
  margin: 0;
}
.wms-dl dt { color: var(--muted); margin: 0; }
.wms-dl dd { margin: 0; }

.driver-cargo-capacity-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.5;
}

.reception-order-context {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--acbg, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  font-size: 0.875rem;
  line-height: 1.45;
}
.reception-order-context__sep {
  color: var(--muted, #9ca3af);
  margin: 0 0.2rem;
}

.orders-list-pickup-cell {
  white-space: nowrap;
}
.orders-list-pickup-badge {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.orders-list-actions-cell {
  white-space: nowrap;
}

/* Карточка заказа: контент слева, расчёт и клиент справа (прямые потомки .order-edit-layout) */
.wms-content .order-edit-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem 1.5rem;
  align-items: stretch;
  width: 100%;
}
.wms-content .order-edit-layout > .order-edit-layout__content {
  grid-column: 1;
  grid-row: 1;
  display: block;
  min-width: 0;
}
.wms-content .order-edit-layout > .order-edit-layout__sidebar {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 280px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}
/* Старый вложенный блок, если остался в DOM */
.wms-content .order-edit-layout__content .order-edit-layout__sidebar,
.wms-content .order-edit-layout__content .order-edit-layout__aside {
  display: none !important;
}
.order-edit-sticky {
  position: sticky;
  top: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-bottom: 0.5rem;
}
.order-edit-summary-card {
  margin-bottom: 0;
}
.btn-disabled {
  cursor: not-allowed;
}
@media (max-width: 520px) {
  .wms-content .order-edit-layout {
    grid-template-columns: 1fr;
  }
  .wms-content .order-edit-layout > .order-edit-layout__content,
  .wms-content .order-edit-layout > .order-edit-layout__sidebar {
    grid-column: 1;
    width: 100%;
  }
  .wms-content .order-edit-layout > .order-edit-layout__sidebar {
    grid-row: 2;
    align-self: auto;
  }
  .order-edit-sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.reception-receive-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.reception-receive-card.is-collapsed .reception-receive-card__head {
  margin-bottom: 0;
}
.reception-receive-card.is-collapsed .reception-receive-card__body {
  display: none;
}

.order-logistics-trip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
  background: var(--bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
}
.order-logistics-trip__timeline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}
.order-logistics-trip__step {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}
.order-logistics-trip__step.is-current .order-logistics-trip__step-label {
  font-weight: 700;
}
.order-logistics-trip__step-label { font-weight: 600; }
.order-logistics-trip__step-time {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.order-logistics-trip__status { font-weight: 600; font-size: 0.875rem; }
.order-logistics-trip__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: flex-start;
}

.order-logistics-service-pick {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--acbg, #f9fafb);
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: var(--r-lg, 8px);
}
.order-logistics-service-pick select {
  font-size: 1rem;
  line-height: 1.5;
  padding: 4px 6px;
}
.order-logistics-service-pick select option {
  font-size: 1rem;
  line-height: 1.5;
  padding: 8px 6px;
}

.order-logistics-addon-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.order-logistics-addon-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: var(--acbg, #f9fafb);
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: var(--r-md, 6px);
  font-size: 0.8125rem;
}
.order-logistics-addon-list__item:last-child {
  margin-bottom: 0;
}

.dashboard-last-orders-card {
  width: 100%;
  margin-bottom: 1.25rem;
}

.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
.dashboard-split-grid--single {
  grid-template-columns: 1fr;
}
.dashboard-split-grid .dashboard-packer-card,
.dashboard-split-grid .dashboard-trips-card {
  margin-top: 0;
  min-width: 0;
  height: 100%;
}
.dashboard-last-orders-card .tbl-wrap {
  overflow-x: auto;
}
.dashboard-last-orders-card table {
  width: 100%;
  min-width: 640px;
}

.dashboard-trips-card .card-title { margin-bottom: 0.75rem; }
.dashboard-trip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}
.dashboard-trip-row:last-child { border-bottom: none; }
.dashboard-trip-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.875rem;
}
.dashboard-trip-row__driver { font-weight: 600; }
.dashboard-trip-row__route { color: var(--muted); }
.dashboard-trip-row__actions { display: flex; gap: 0.35rem; }
.dashboard-trip-form { margin: 0; display: inline; }

.metric .ms {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ── Table ── */
.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
thead th {
  background: #f3f2f7;
  color: var(--text);
  padding: 0.8125rem 1.0625rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
thead th.r { text-align: right; }
tbody tr { transition: background 0.12s; }
tbody tr:nth-child(even) { background: #faf9fb; }
tbody tr:hover { background: #f3f2f7; cursor: pointer; }
td {
  padding: 0.8125rem 1.0625rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text);
}
td.r { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td {
  background: #f3f2f7;
  font-weight: 600;
  padding: 0.8125rem 1.0625rem;
  border-top: 1px solid var(--border);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}
.badge-green { background: var(--greenbg); color: var(--green); }
.badge-red { background: var(--redbg); color: var(--red); }
.badge-blue { background: var(--primary-soft); color: var(--text); }
.badge-amber { background: var(--amberbg); color: var(--amber); }
.badge-purple { background: var(--purplebg); color: var(--purple); }
.badge-gray { background: #f3f2f7; color: var(--sub); }

/* ── Buttons — чёрные primary ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--r-lg);
  border: none;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(47, 47, 47, 0.2);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(47, 47, 47, 0.25);
}
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(0.95); }
.reception-bag-btn-unpack {
  background: #111;
  border-color: #111;
  color: #fff;
}
.reception-bag-btn-unpack:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}
.reception-bag-btn-layout {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.reception-bag-box-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  background: #1f2937;
  border-radius: 999px;
  vertical-align: middle;
}
.reception-place-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.reception-place-row--bag.reception-place-row--styled td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
.reception-place-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}
.reception-place-form__label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  margin-right: 4px;
}
.reception-place-form__field {
  flex: 0 0 20%;
  width: 20%;
  max-width: 20%;
  min-width: 72px;
  box-sizing: border-box;
}
.reception-place-form__submit {
  flex: 0 0 auto;
  margin-left: auto;
}
tr.reception-layout-slot[hidden] {
  display: none !important;
}
.reception-layout-slot__cell {
  padding: 0 !important;
  border: 0 !important;
  height: 0;
  line-height: 0;
}
.reception-layout-slot__mount {
  display: none;
}
.wms-layout-drawer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  visibility: hidden;
}
.wms-layout-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.wms-layout-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.wms-layout-drawer.is-open .wms-layout-drawer__backdrop {
  opacity: 1;
}
.wms-layout-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  max-width: 100%;
  background: var(--surface, #fff);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}
.wms-layout-drawer.is-open .wms-layout-drawer__panel {
  transform: translateX(0);
}
.wms-layout-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #f0fdf4;
}
.wms-layout-drawer__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.wms-layout-drawer__sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.wms-layout-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}
.wms-layout-drawer__body .reception-layout-panel-form {
  padding: 16px 18px 24px;
  border: none;
  background: transparent;
}
.wms-layout-drawer__body .order-product-edit__head {
  display: none;
}
.wms-layout-drawer__body .reception-layout-panel-form,
.wms-layout-drawer__body .reception-layout-panel-form .form-row,
.wms-layout-drawer__body .reception-layout-panel-form .form-group,
.wms-layout-drawer__body .reception-layout-panel-form .wms-product-picker,
.wms-layout-drawer__body .reception-layout-panel-form .order-product-edit__sizes,
.wms-layout-drawer__body .reception-layout-panel-form .order-product-edit__sizes-table-wrap,
.wms-layout-drawer__body .reception-layout-panel-form .box-edit-section,
.wms-layout-drawer__body .reception-layout-panel-form .reception-layout-storage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.wms-layout-drawer__body .reception-layout-panel-form .order-product-edit__sizes-table-wrap {
  max-height: none;
}
.wms-layout-drawer__body .reception-layout-panel-form .order-product-edit__sizes-table {
  width: 100%;
  table-layout: fixed;
}
.wms-layout-drawer__body .reception-layout-panel-form .order-product-edit__sizes-table .layout-size-sel,
.wms-layout-drawer__body .reception-layout-panel-form .order-product-edit__sizes-table .form-control {
  width: 100%;
  max-width: 100%;
}
body.wms-layout-drawer-open {
  overflow: hidden;
}
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--bg);
  border-color: var(--muted);
}
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.875rem; }
.btn-xs { padding: 0.2rem 0.6rem; font-size: 0.8125rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.0625rem; }
.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
  text-transform: none;
  letter-spacing: 0;
}
.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0.5rem 0.85rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 47, 47, 0.08);
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 2.35rem;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236d6d72' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
}
select.form-control:focus {
  background-color: var(--surface);
}
.form-row { display: grid; gap: 1.0625rem; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }
.form-row-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Flash ── */
.flash {
  padding: 0.85rem 1.25rem;
  border-radius: var(--r-lg);
  margin-bottom: 1.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.flash-success { background: var(--greenbg); color: #1e7e4a; border: 1px solid #b8e6cf; }
.flash-error { background: var(--redbg); color: #c92a2a; border: 1px solid #f5c2c2; }
.flash-info { background: var(--primary-soft); color: var(--text); border: 1px solid var(--border); }

/* Vuexy menu: активный пункт — чёрный акцент WMS */
.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
  background: linear-gradient(72deg, #2f2f2f 0%, #1a1a1a 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(47, 47, 47, 0.28);
}
.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) .menu-icon {
  color: #fff !important;
}

/* Подменю «Логистика» */
.menu-vertical .menu-item:not(.open) > .menu-sub {
  display: none;
}
.menu-vertical .menu-item.open > .menu-sub {
  display: flex;
  flex-direction: column;
}
.menu-vertical .menu-sub .menu-link {
  padding-left: 2.6rem;
  font-size: 0.875rem;
}
.menu-vertical .menu-item.open > .menu-toggle::after {
  transform: rotate(90deg);
}

/* ── Page (legacy fallback) ── */
.page-header:not(.wms-page-header) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.625rem;
  flex-wrap: wrap;
  gap: 0.8125rem;
}
.page-header:not(.wms-page-header) h1 {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.divider { height: 1px; background: var(--border); margin: 1.375rem 0; }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); font-weight: 600; }
.text-red { color: var(--red); font-weight: 600; }

/* План / факт: совпадение и расхождение (факт > 0) */
.op-qty--ok {
  color: var(--green);
  font-weight: 600;
}
.op-qty--mismatch {
  color: var(--amber);
  font-weight: 600;
}
.op-size-pf-cell.op-qty--ok .form-control,
.order-product-edit__input-wrap.op-qty--ok .form-control {
  border-color: var(--green);
  background: var(--greenbg);
}
.op-size-pf-cell.op-qty--mismatch .form-control,
.order-product-edit__input-wrap.op-qty--mismatch .form-control {
  border-color: var(--amber);
  background: var(--amberbg);
}

/* Логистика заказа */
.order-logistics-methods {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}
.order-logistics-method {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.1rem 0;
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: 500;
}
.order-logistics-method input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.order-logistics-method__text {
  color: var(--text);
}
.order-logistics-method__switch {
  position: relative;
  flex: 0 0 auto;
  width: 31px;
  height: 19px;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  transition: background-color .2s ease, border-color .2s ease;
}
.order-logistics-method__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}
.order-logistics-method input:checked + .order-logistics-method__text + .order-logistics-method__switch {
  background: #0f172a;
  border-color: #0f172a;
}
.order-logistics-method input:checked + .order-logistics-method__text + .order-logistics-method__switch::after {
  transform: translateX(14px);
}
.order-logistics-method input:focus-visible + .order-logistics-method__text + .order-logistics-method__switch {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
.order-logistics-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.order-logistics-price-row--with-entry {
  grid-template-columns: 1fr 1fr 1fr;
}
#new-order-create-form .order-logistics-price-row {
  grid-template-columns: repeat(2, minmax(0, 25%));
  justify-content: start;
  gap: 0.75rem;
}
#new-order-create-form .order-logistics-price-row--with-entry {
  grid-template-columns: repeat(3, minmax(0, 25%));
}
.order-logistics-new-block {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 12px 0 16px;
}
.order-logistics-new-block__head {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.order-logistics-new-block__body {
  display: block;
}
#new-order-create-form .order-logistics-new-block {
  padding: 18px 20px;
  border-radius: 12px;
}
#new-order-create-form .order-logistics-new-block__head {
  margin-bottom: 14px;
}
#new-order-create-form .order-logistics-cargo-params {
  margin-bottom: 18px;
  padding-bottom: 16px;
}
#new-order-create-form .order-logistics-cargo-params .form-row {
  gap: 1rem;
  margin-bottom: 0.25rem;
}
#new-order-create-form .order-logistics-panel--driver .form-row {
  margin-top: 0.4rem;
}
#new-order-create-form .order-logistics-calc {
  margin-top: 8px;
  margin-bottom: 16px;
}
.order-logistics-new-block + .gap-2 {
  margin-top: 14px;
}
.order-logistics-card .form-hint {
  font-size: 0.8125rem;
}
.text-amber { color: var(--amber); font-weight: 600; }
.text-accent { color: var(--text); font-weight: 600; }
.text-right { text-align: right; }
.mono { font-family: ui-monospace, monospace; font-size: 0.875rem; }
.gap-2 { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.hidden { display: none !important; }

.wms-packer-field { display: flex; flex-direction: column; gap: 8px; }
.wms-packer-new { margin-top: 0; }
.wms-packer-manage-link {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}
.wms-packer-manage-link:hover { color: var(--accent); text-decoration: underline; }

/* Filter bar (Vuexy) */
.filter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.0625rem 1.375rem;
  margin-bottom: 1.0625rem;
  box-shadow: var(--shadow);
}
.filter-card .filter-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.8125rem;
  color: var(--text);
}

@media (max-width: 1024px) {
  .metrics,
  .dash-metrics { grid-template-columns: 1fr 1fr; }
  .form-row-3, .form-row-4, .form-row-5 { grid-template-columns: 1fr 1fr; }
}
/* ── Clients section ── */
.clients-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8125rem;
  margin-bottom: 1.375rem;
}
.clients-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0.85rem 1.0625rem;
  box-shadow: var(--shadow);
}
.clients-stat .n { font-size: 1.5rem; font-weight: 700; }
.clients-stat .l { font-size: 0.8125rem; color: var(--sub); margin-top: 2px; }

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: #000000;
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.client-avatar--sm {
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
}

/* Таблица клиентов */
.client-table-card {
  padding: 0 !important;
  overflow: hidden;
}
.client-table-card .tbl-wrap {
  border: none;
  border-radius: 0;
}
.client-list-table {
  width: 100%;
  border-collapse: collapse;
}
.client-list-table th {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.client-list-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.client-list-table tbody tr.client-list-row {
  cursor: pointer;
  transition: background 0.12s;
}
.client-list-table tbody tr.client-list-row:hover {
  background: #faf9fc;
}
.client-list-table tbody tr:last-child td {
  border-bottom: none;
}
.client-list-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.client-list-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #000000;
  text-decoration: none;
}
.client-list-name:hover {
  color: var(--sub);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.0625rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--sub); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); font-weight: 500; }

.client-detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.375rem;
  align-items: start;
}
.client-tab-nav {
  margin-bottom: 0.75rem;
}

.client-detail-grid--full {
  grid-template-columns: 1fr;
}
.client-profile-card .profile-name {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.client-info-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9375rem;
}
.client-info-row:last-child { border-bottom: none; }
.client-info-row .k { color: var(--sub); flex-shrink: 0; }
.client-info-row .v { font-weight: 500; text-align: right; word-break: break-word; }

.client-quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1.0625rem 0;
}
.client-quick-stats .q {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 0.75rem;
  text-align: center;
}
.client-quick-stats .q strong { display: block; font-size: 1.375rem; }
.client-quick-stats .q small { color: var(--muted); font-size: 0.8125rem; }

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.0625rem;
}
.tab {
  padding: 0.5rem 1.0625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--sub);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.wms-form-tabs .tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.wms-edit-tab-panel {
  padding-top: 0.25rem;
  margin-bottom: 0.5rem;
}
.wms-edit-tab-panel[hidden] {
  display: none !important;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8125rem;
  margin-bottom: 1.0625rem;
}
.toolbar .search-input {
  min-width: 220px;
  max-width: 320px;
}

.product-empty {
  text-align: center;
  padding: 2.5rem 1.0625rem;
  color: var(--muted);
}
.product-empty a { color: var(--text); font-weight: 600; }

.svc-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.svc-chip {
  font-size: 0.8125rem;
  padding: 0.2rem 0.5rem;
  background: var(--primary-soft);
  border-radius: 0.25rem;
  color: var(--sub);
}

/* ── Product services picker ── */
.product-services-product-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.0625rem;
  padding-bottom: 1.0625rem;
  border-bottom: 1px solid var(--border-light);
}
.product-services-product-name {
  font-weight: 600;
  font-size: 1.0625rem;
}
.product-edit-tabs { border-bottom: none; }
.product-edit-tabs .tab { font-size: 0.9375rem; padding: 0.4rem 0.85rem; }

.svc-picker {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
}
.svc-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.8125rem;
  padding: 1.0625rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.svc-picker-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.svc-stat-pill {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.35rem 0.8125rem;
  background: var(--primary-soft);
  border-radius: 2rem;
  color: var(--text);
}
.svc-stat-total { background: var(--primary); color: #fff; }

.svc-selected-bar {
  display: none;
  padding: 0.8125rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.svc-selected-bar-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.svc-selected-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.svc-chip-btn {
  font-size: 0.8125rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.svc-chip-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.svc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.8125rem 1.25rem;
  align-items: center;
}
.svc-toolbar .form-control { flex: 1; min-width: 200px; max-width: 360px; }

.svc-categories { padding: 0 0.5rem 0.5rem; }
.svc-cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-top: 0.5rem;
  overflow: hidden;
}
.svc-cat-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.0625rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  list-style: none;
}
.svc-cat-summary::-webkit-details-marker { display: none; }
.svc-cat-name { flex: 1; min-width: 0; }
.svc-cat-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sub);
  background: var(--bg);
  padding: 0.2rem 0.55rem;
  border-radius: 2rem;
}
.svc-cat-actions { display: flex; gap: 0.35rem; }

.svc-table-wrap { border: none; border-radius: 0; border-top: 1px solid var(--border-light); }
.svc-table tbody tr { cursor: default; }
.svc-table tbody tr.is-on { background: #f3f2f7 !important; }
.svc-table tbody tr.is-on td { font-weight: 500; }
.svc-row-label { cursor: pointer; display: block; }
.svc-qty {
  width: 88px !important;
  padding: 0.35rem 0.5rem !important;
  font-size: 0.875rem !important;
  text-align: right;
}
.svc-cb { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* ── Product form: clothing ── */
.product-type-bar {
  display: flex;
  align-items: center;
  gap: 1.0625rem;
  margin-bottom: 1.0625rem;
  flex-wrap: wrap;
}
.product-type-label { font-size: 0.9375rem; font-weight: 600; color: var(--sub); }
.product-type-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 3px;
}
.product-type-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 1.0625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: calc(var(--r-lg) - 2px);
  cursor: pointer;
  font-family: inherit;
  color: var(--sub);
}
.product-type-btn.active {
  background: var(--primary);
  color: #fff;
}
.product-card-block { margin-bottom: 1.0625rem; }
.product-card-block-head { margin-bottom: 0.8125rem; }
.product-form-cols > div { display: flex; flex-direction: column; gap: 0; }

/* Переключатель «Нужна маркировка ЧЗ» (Vuexy form-switch) */
.wms-form-switch {
  padding-left: 2.75em;
  min-height: 1.625rem;
  margin-top: 0.25rem;
}
.wms-form-switch .form-check-input {
  width: 2.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.wms-form-switch .form-check-label {
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #000000;
  padding-top: 0.15rem;
  user-select: none;
}
.wms-form-switch .form-check-input:checked {
  background-color: #000000;
  border-color: #000000;
}
.wms-form-switch .form-check-input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.15);
}

.sizes-table-wrap { margin-top: 0.5rem; }
.sizes-table thead th.col-size-accent,
.sizes-table td.col-size-accent {
  background: #f3f2f7;
}
.sizes-table td.col-size-accent input { font-weight: 600; }
.cz-inputs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}
.cz-inputs input { width: 52px !important; padding: 0.35rem 0.4rem !important; text-align: center; }
.cz-inputs span { color: var(--muted); font-size: 0.8125rem; }
.size-row td { vertical-align: middle; }

/* ── Product list & thumbs ── */
.product-table-card { padding: 0 !important; overflow: hidden; }
.product-table-card .tbl-wrap { border: none; border-radius: 0; }
.product-list-table { width: 100%; border-collapse: collapse; }
.product-list-table th {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.product-list-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.product-list-table tbody tr:hover { background: #faf9fc; }
.product-list-table tbody tr:last-child td { border-bottom: none; }
.product-thumb {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.product-list-table .product-thumb,
.product-list-table .product-thumb--empty {
  width: 64px;
  height: 64px;
  border-radius: 6px;
}
.product-list-table .product-thumb--empty {
  font-size: 1.25rem;
}
.product-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.product-list-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
}
.product-list-name:hover { color: var(--primary); }
.product-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.product-list-sub { font-size: 0.8125rem; color: var(--muted); margin-top: 0.15rem; }
.article-cell { min-width: 140px; }
.article-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.45;
}
.article-line + .article-line { margin-top: 0.15rem; }
.article-line--seller {
  color: var(--sub);
  font-size: 0.8125rem;
}
.article-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
  background: var(--primary-soft);
  color: var(--sub);
  flex-shrink: 0;
}
.article-tag--seller { background: #fff3e0; color: #e65100; }
.product-services-cell {
  min-width: 160px;
  max-width: 280px;
}
.product-services-cell .svc-chips-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
/* Редактирование товара в заказе (orders_edit) */
.op-row-product {
  cursor: pointer;
}
.op-data-row > td {
  transition: background-color 0.15s ease;
}
.op-data-row:hover > td {
  background: var(--primary-soft, #f1f0f2);
}
.op-data-row.op-row--open > td {
  background: var(--acbg, #f0efff);
}
.op-data-row.op-row--open + .order-product-edit-row td {
  border-top: none;
  background: var(--acbg, #f0efff);
}
#products .col-actions {
  width: 108px;
  min-width: 108px;
}
#products .op-row-actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
#products .op-row-actions .action-btns {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}
#products .btn-icon.op-svc-btn--empty {
  background: #fff3e6;
  border-color: #ff9f43;
  color: #ff9f43;
  box-shadow: 0 0 0 2px rgba(255, 159, 67, 0.28);
}
#products .btn-icon.op-svc-btn--empty .ti {
  color: #ff9f43;
}
#products .btn-icon.op-svc-btn--empty:hover {
  background: #ffe8cc;
  border-color: #e68a2e;
  color: #e68a2e;
}
.order-product-edit-row td {
  padding: 0.5rem 0.75rem 0.75rem !important;
  background: var(--acbg, #f0efff);
  border-bottom: 1px solid var(--border-light);
}
.order-product-edit {
  background: var(--card, #fff);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg, 0.5rem);
  padding: 1rem 1.25rem 1.125rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(47, 43, 61, 0.06));
}
.order-product-edit__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.order-product-edit__alert {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-lg);
  background: #fff3e6;
  border: 1px solid rgba(255, 159, 67, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 159, 67, 0.12);
}
.order-product-edit__alert-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #b45309;
  line-height: 1.35;
}
.order-product-edit__alert-text {
  margin: 0.4rem 0 0.75rem;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.45;
}
.order-product-edit__alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.order-product-edit__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.order-product-edit__sub {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.2rem;
  line-height: 1.35;
}
.order-product-edit__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(6.5rem, 8.5rem)) minmax(10rem, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}
.order-product-edit__grid .form-group {
  margin: 0;
}
.order-product-edit__input-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.order-product-edit__input-wrap .form-control {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.order-product-edit__input-wrap .form-control::-webkit-outer-spin-button,
.order-product-edit__input-wrap .form-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.order-product-edit__unit {
  display: inline-flex;
  align-items: center;
  padding: 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--r-lg, 0.5rem) var(--r-lg, 0.5rem) 0;
  white-space: nowrap;
}
.order-product-edit__notes {
  min-width: 0;
}
.order-product-edit__sizes {
  margin-bottom: 1rem;
}
.order-product-edit__sizes-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.order-product-edit__sizes-table-wrap {
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg, 0.5rem);
  overflow: hidden;
  background: #f3f2f7;
}
.order-product-edit__sizes-table {
  width: 100%;
  font-size: 0.875rem;
  background: #f3f2f7;
}
/* Перебиваем глобальные tbody tr (фиолетовый фон родительской строки / hover) */
.order-product-edit__sizes-table-wrap tbody tr,
.order-product-edit__sizes-table-wrap tbody tr:nth-child(even),
.order-product-edit__sizes-table-wrap tbody tr:hover {
  background: #f3f2f7 !important;
  cursor: default;
}
.order-product-edit__sizes-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: #ebe9f0 !important;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
}
.order-product-edit__sizes-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  background: #f3f2f7 !important;
}
.order-product-edit__sizes-table tbody tr:last-child td {
  border-bottom: none;
}
.order-product-edit__size-name {
  font-weight: 600;
}
.order-product-edit__input-wrap--sm .form-control {
  min-width: 3.5rem;
  max-width: 5rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}
.order-product-edit__input-wrap--sm .order-product-edit__unit {
  padding: 0 0.45rem;
  font-size: 0.75rem;
}
.order-product-edit__totals {
  padding-top: 0.25rem;
}
.order-product-edit__totals-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.65rem;
}
.order-product-edit__grid--totals {
  padding-top: 0.25rem;
  border-top: 1px dashed var(--border);
}
.order-product-edit__grid--totals .op-total-qty[readonly] {
  background: var(--bg);
  color: var(--text);
  cursor: default;
}
.order-product-edit__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-light);
}
.order-product-edit-row--saved .order-product-edit {
  box-shadow: 0 0 0 2px rgba(40, 199, 111, 0.35);
}
.wms-toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  left: auto;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  width: max-content;
  margin: 0;
  padding: 0.7rem 1rem 0.7rem 0.85rem;
  border-radius: var(--r-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 6px 24px rgba(47, 43, 61, 0.2);
  animation: wms-toast-in 0.22s ease;
}
.wms-toast[hidden] { display: none !important; }
.wms-toast__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
}
.wms-toast__icon--success::before {
  content: "✓";
}
.wms-toast__icon--error::before {
  content: "!";
}
.wms-toast__text {
  white-space: nowrap;
}
.wms-toast--success {
  background: #28c76f;
  color: #fff;
  border: none;
}
.wms-toast--error {
  background: #ea5455;
  color: #fff;
  border: none;
}
@keyframes wms-toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem) translateX(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}
.op-save-btn.is-saving {
  min-width: 7.5rem;
  pointer-events: none;
  opacity: 0.92;
}
.op-save-btn__spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.35rem;
  vertical-align: -0.15em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: op-save-spin 0.65s linear infinite;
}
@keyframes op-save-spin {
  to { transform: rotate(360deg); }
}
.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
  line-height: 1.35;
}
@media (max-width: 768px) {
  .order-product-edit__grid {
    grid-template-columns: 1fr 1fr;
  }
  .order-product-edit__notes {
    grid-column: 1 / -1;
  }
  .order-product-edit__sizes-table th:nth-child(3),
  .order-product-edit__sizes-table td:nth-child(3) {
    display: none;
  }
}

.order-qty-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
  white-space: nowrap;
}
.svc-qty-mini { min-width: 4.5rem; }
.svc-compact-item .svc-qty-mini::placeholder { font-size: 0.75rem; }

/* ── Product picker (заказ, приёмка) ── */
.wms-product-picker {
  margin-bottom: 1.0625rem;
}
.wms-product-picker__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sub);
  margin-bottom: 0.5rem;
}
.wms-product-picker__search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8125rem;
}
.wms-product-picker__search-row .wms-product-picker__search {
  flex: 1;
}
.wms-product-picker__results {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  padding: 0.35rem;
}
.wms-product-picker.is-selected .wms-product-picker__search-row {
  opacity: 0.65;
}
.wms-product-picker__item {
  display: flex;
  align-items: flex-start;
  gap: 0.8125rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.8125rem;
  border: none;
  border-radius: var(--r-md);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}
.wms-product-picker__item:hover,
.wms-product-picker__item:focus {
  background: #f3f2f7;
  outline: none;
}
.wms-product-picker__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg);
}
.wms-product-picker__thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--muted);
}
.wms-product-picker__body {
  flex: 1;
  min-width: 0;
}
.wms-product-picker__name {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--text);
}
.wms-product-picker__color {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.wms-product-picker__articles {
  font-size: 0.8125rem;
  color: var(--sub);
  margin-top: 0.35rem;
  line-height: 1.5;
}
.wms-product-picker__dot {
  color: var(--muted);
  margin: 0 0.15rem;
}
.wms-product-picker__selected {
  margin-bottom: 0.8125rem;
  padding: 0.8125rem;
  border: 2px solid var(--primary);
  border-radius: var(--r-lg);
  background: var(--primary-soft, #f3f2f7);
}
.wms-product-picker__selected-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.8125rem;
  margin-bottom: 0.75rem;
}
.wms-product-picker__empty,
.wms-product-picker__hint {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.8125rem;
  text-align: center;
}
th.c, td.c { text-align: center; }
.wms-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}
.wms-check-label--sm { font-size: 0.8125rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); }
.wms-check-label input { margin: 0; }
.svc-cat-flag-form { display: inline-block; margin: 0; }

.svc-chips-compact { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.svc-chip-mini {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 0.25rem;
  color: var(--sub);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc-chip-more {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  color: var(--muted);
  font-weight: 600;
}
.action-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}
.action-form { display: inline; margin: 0; }
/* ── Кнопки действий WMS (Vuexy icon) ── */
.action-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.action-btns form { display: inline; margin: 0; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0 !important;
  line-height: 1;
  border-radius: var(--r-lg);
}
.btn-icon .ti {
  font-family: tabler-icons, 'tabler-icons' !important;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
  speak: never;
  font-style: normal;
  font-weight: normal;
  color: inherit;
}
.btn-icon.btn-outline .ti { color: var(--sub); }
.btn-icon.btn-outline:hover .ti { color: var(--text); }
.btn-icon.btn-success .ti { color: #fff; }
.btn-icon.btn-icon-danger .ti,
.btn-icon.btn-danger .ti { color: var(--red); }
.btn-icon.btn-outline {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--sub);
}
.btn-icon.btn-outline:hover {
  background: var(--bg);
  border-color: var(--muted);
  color: var(--text);
}
.btn-icon.btn-success {
  background: var(--green);
  border: none;
  color: #fff;
  box-shadow: 0 2px 4px rgba(40, 199, 111, 0.35);
}
.btn-icon.btn-success:hover {
  filter: brightness(0.95);
  color: #fff;
}
.btn-icon.btn-icon-danger,
.btn-icon.btn-danger {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--red);
}
.btn-icon.btn-icon-danger:hover,
.btn-icon.btn-danger:hover {
  background: var(--redbg) !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
}
td.r .action-btns,
td .action-btns { margin-left: auto; }
.col-actions { width: 88px; }

/* Устаревшие btn-xs с эмодзи — не использовать */
.btn-xs.btn-icon,
.action-btns .btn-icon { width: 32px; height: 32px; }

/* ── Product form preview ── */
.product-preview-bar {
  display: flex;
  gap: 1.0625rem;
  align-items: flex-start;
  padding: 1.0625rem !important;
  margin-bottom: 1.0625rem;
}
.product-preview-photo { flex-shrink: 0; }
.product-preview-fields { flex: 1; min-width: 0; }
.label-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Services picker compact ── */
.svc-picker--compact {
  margin-top: 1.0625rem;
  border: none;
  background: transparent;
}
.svc-compact-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.svc-compact-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.0625rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  list-style: none;
}
.svc-compact-summary::-webkit-details-marker { display: none; }
.svc-compact-title { flex: 1; min-width: 0; }
.svc-compact-chevron {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.15s;
}
.svc-compact-panel[open] .svc-compact-chevron { transform: rotate(180deg); }
.svc-compact-body { border-top: 1px solid var(--border-light); }
.svc-toolbar--compact {
  padding: 0.5rem 0.8125rem;
  border-bottom: 1px solid var(--border-light);
}
.svc-toolbar--compact .form-control {
  min-width: 120px;
  max-width: 240px;
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem !important;
}
.btn-xs {
  padding: 0.2rem 0.45rem !important;
  font-size: 0.75rem !important;
}
.svc-categories--compact { padding: 0.35rem 0.5rem 0.5rem; }
.svc-cat--compact { margin-top: 0.35rem; }
.svc-cat--compact .svc-cat-summary { padding: 0.45rem 0.8125rem; font-size: 0.875rem; }
.svc-compact-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
}
.svc-compact-head,
.svc-compact-item {
  display: grid;
  grid-template-columns: 20px 1fr auto 6.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8125rem;
  font-size: 0.875rem;
  margin: 0;
}
.svc-compact-head {
  cursor: default;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.svc-compact-qty-label {
  text-align: right;
  white-space: nowrap;
}
.svc-compact-item {
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.svc-compact-item:last-child { border-bottom: none; }
.svc-compact-item:hover { background: var(--bg); }
.svc-compact-item.is-on { background: #f3f2f7; }
.svc-compact-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc-compact-price {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}
.svc-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  white-space: nowrap;
}
.svc-qty-mini {
  width: 3.25rem !important;
  min-width: 3.25rem;
  padding: 0.25rem 0.35rem !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  text-align: right;
}
.svc-qty-unit {
  font-size: 0.875rem;
  color: var(--sub);
  min-width: 1.75rem;
}

/* Секретные поля (WB API и т.п.) */
.wms-secret-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8125rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.8125rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r, 6px);
}
.wms-secret-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  background: var(--greenbg);
  color: var(--green);
  border-radius: 4px;
}
.wms-secret-mask {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--text);
  background: transparent;
  padding: 0;
}
.wms-secret-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.wms-secret-input-row .form-control { flex: 1; min-width: 0; }
.wms-secret-toggle { flex-shrink: 0; white-space: nowrap; }
.wms-secret-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--sub);
}

/* Модальное окно услуг товара в заказе */
.wms-op-svc-modal {
  max-width: 520px;
}
.wms-op-svc-body {
  padding: 1rem 1.5rem 1.25rem;
  overflow-y: auto;
  max-height: min(420px, calc(100vh - 12rem));
}
.wms-op-svc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}
.wms-op-svc-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.wms-op-svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wms-op-svc-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}
.wms-op-svc-item:last-child {
  border-bottom: none;
}
.wms-op-svc-item-name {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
}
.wms-op-svc-cat {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.wms-op-svc-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--sub);
}

/* Модальное окно выбора услуги (заказ) */
.d-none { display: none !important; }
body.wms-modal-open { overflow: hidden; }

.wms-svc-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(47, 43, 61, 0.32);
  backdrop-filter: blur(2px);
}
.wms-svc-picker-backdrop[hidden] { display: none !important; }

.wms-svc-picker-modal {
  width: 100%;
  max-width: 1140px;
  max-height: min(780px, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  background: var(--card, #fff);
  border-radius: var(--r-lg, 0.5rem);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.wms-svc-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--card, #fff);
}
.wms-svc-picker-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.wms-svc-picker-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.45;
}
.wms-svc-picker-close {
  border: none;
  background: var(--bg);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sub);
  font-size: 1.125rem;
  line-height: 1;
  border-radius: var(--r-lg, 0.5rem);
  flex-shrink: 0;
}
.wms-svc-picker-close:hover { background: var(--primary-soft); color: var(--text); }

.wms-svc-picker-body {
  display: flex;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  background: var(--bg);
}
.wms-svc-picker-cats {
  width: 176px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  padding: 0.75rem 0.5rem;
  background: var(--card, #fff);
}
.wms-svc-cat {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: calc(100% - 0.5rem);
  margin: 0 0.25rem;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--sub);
  cursor: pointer;
  border-radius: var(--r-lg, 0.5rem);
  transition: background 0.12s ease, color 0.12s ease;
}
.wms-svc-cat .ti { font-size: 1.0625rem; flex-shrink: 0; opacity: 0.85; }
.wms-svc-cat:hover { background: var(--bg); color: var(--text); }
.wms-svc-cat.is-active {
  background: var(--primary-soft);
  color: var(--text);
  font-weight: 600;
}
.wms-svc-cat.is-active .ti { opacity: 1; }
.wms-svc-cat-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.5rem 0.75rem;
}

.wms-svc-picker-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wms-svc-picker-panel {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.wms-svc-picker-panel--list,
#wms-svc-panel-list,
#wms-svc-panel-manual {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 30%);
}
.wms-svc-picker-detail--manual {
  gap: 1rem;
}
.wms-svc-picker-panel[hidden] { display: none !important; }

.wms-svc-picker-list {
  overflow-y: auto;
  padding: 0.75rem 0.625rem;
  min-width: 0;
  background: var(--card, #fff);
  border-right: 1px solid var(--border-light);
}
.wms-svc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 0.25rem);
  margin: 0 0.125rem;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: var(--r-lg, 0.5rem);
  transition: background 0.12s ease;
}
.wms-svc-item:hover { background: var(--bg); }
.wms-svc-item.is-active {
  background: var(--primary-soft);
  font-weight: 500;
}
.wms-svc-item__name { flex: 1; min-width: 0; padding-right: 0.25rem; }
.wms-svc-item__price {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
}
.wms-svc-item__unit { font-size: inherit; }

.wms-svc-picker-detail {
  min-width: 0;
  padding: 1.375rem 1.375rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
}
.wms-svc-picker-panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.125rem;
  min-width: 0;
  background: var(--card, #fff);
}
.wms-svc-picker-manual-form .form-group {
  margin-bottom: 1rem;
}
.wms-svc-picker-manual-form .form-row {
  margin-bottom: 0.25rem;
}
.wms-svc-picker-panel-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.wms-svc-detail-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.wms-svc-detail-card {
  background: var(--card, #fff);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg, 0.5rem);
  padding: 1rem 1.125rem;
}
.wms-svc-detail-card--head {
  padding: 1.125rem 1.25rem;
}
.wms-svc-picker-detail-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.35rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.wms-svc-picker-detail-unit {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}
.wms-svc-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
.wms-svc-detail-row .wms-svc-picker-total-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}
.wms-svc-picker-field--phase .form-control {
  font-size: 0.875rem;
  padding: 0.55rem 0.75rem;
}
.wms-svc-picker-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 2rem 1.25rem;
  line-height: 1.5;
}
.wms-svc-detail-card .wms-svc-picker-price-grid {
  margin: 0;
}
.wms-svc-picker-field {
  margin: 0 !important;
}
.wms-svc-picker-field label {
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.wms-svc-picker-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}
.wms-svc-picker-price-grid > div {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg, 0.5rem);
  padding: 0.875rem 0.625rem;
  text-align: center;
}
.wms-svc-picker-price-grid .k {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.wms-svc-picker-price-grid .v { font-size: 1.0625rem; font-weight: 600; }
.wms-svc-picker-total-box {
  background: var(--card, #fff);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg, 0.5rem);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(47, 43, 61, 0.06));
}
.wms-svc-picker-total-box .k {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.wms-svc-picker-total-box .v {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.wms-svc-picker-detail .form-control {
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
}

/* Количество: шаг 1, свои кнопки ± вместо нативных стрелок */
.wms-qty-stepper {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg, 0.5rem);
  overflow: hidden;
  background: var(--card, #fff);
}
.wms-qty-stepper .form-control {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  text-align: center;
  -moz-appearance: textfield;
}
.wms-qty-stepper .form-control:focus {
  box-shadow: none;
  outline: none;
}
.wms-qty-stepper .form-control::-webkit-outer-spin-button,
.wms-qty-stepper .form-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wms-qty-stepper-btn {
  flex-shrink: 0;
  width: 2.25rem;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease;
}
.wms-qty-stepper-btn:hover {
  background: var(--primary-soft);
}
.wms-qty-stepper-btn:active {
  background: var(--border-light);
}

.wms-svc-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--card, #fff);
}
.wms-svc-picker-foot-info {
  font-size: 0.8125rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  padding-right: 0.5rem;
}
.wms-svc-picker-foot .gap-2 {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}
.wms-svc-picker-foot .btn { padding: 0.5rem 1.125rem; }

@media (max-width: 640px) {
  .wms-svc-picker-backdrop { padding: 0.75rem; }
  .wms-svc-picker-modal { max-width: 100%; max-height: calc(100vh - 1.5rem); }
  .wms-svc-picker-body { flex-direction: column; min-height: 0; }
  .wms-svc-picker-cats {
    width: 100%;
    max-height: 132px;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.5rem;
  }
  .wms-svc-cat { white-space: nowrap; width: auto; flex-shrink: 0; margin: 0 0.125rem; }
  .wms-svc-picker-panel--list,
  #wms-svc-panel-list,
  #wms-svc-panel-manual {
    display: flex;
    flex-direction: column;
  }
  .wms-svc-picker-list {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    max-height: 220px;
  }
  .wms-svc-picker-detail {
    width: 100%;
    border-top: 1px solid var(--border-light);
  }
  .wms-svc-detail-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .client-detail-grid { grid-template-columns: 1fr; }
  .product-form-cols { grid-template-columns: 1fr !important; }
  .product-preview-bar { flex-direction: column; }
}
@media (max-width: 640px) {
  .metrics,
  .dash-metrics,
  .dashboard-split-grid { grid-template-columns: 1fr; }
  .dashboard-period-ranges { grid-template-columns: 1fr; }
  .dashboard-period-form__footer { flex-direction: column; align-items: stretch; }
  .dashboard-period-form__actions { justify-content: flex-end; }
  .form-row-2, .form-row-3, .form-row-4, .form-row-5 { grid-template-columns: 1fr; }
  .wms-content.container-p-y { padding-top: 0 !important; padding-bottom: 1.0625rem !important; }
}

/* Редактирование места (приёмка) */
.box-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}
.box-edit-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
}
.box-edit-section--storage {
  background: #fffbeb;
  border-color: #fde68a;
}
.box-edit-section__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sub);
  margin-bottom: 10px;
}
.box-edit-section--inline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}
.box-edit-wrap .order-product-edit.box-edit-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 4px;
}
.box-edit-panel .box-edit-sizes-empty {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.box-edit-panel .box-edit-field-half {
  max-width: 50%;
  width: 100%;
  min-width: 260px;
}
.box-edit-panel .order-product-edit__sizes {
  max-width: 50%;
  width: 100%;
  min-width: 260px;
}
.box-edit-panel .order-product-edit__sizes-table-wrap {
  max-height: 240px;
  overflow-y: auto;
}
.box-edit-panel .order-product-edit__totals {
  max-width: 50%;
  width: 100%;
  min-width: 260px;
}
.box-edit-panel .box-edit-totals-grid {
  grid-template-columns: minmax(5.5rem, 7rem) minmax(5.5rem, 7rem) minmax(9rem, 1fr) minmax(5rem, 7rem);
  gap: 0.75rem 1rem;
}
.box-edit-panel .box-edit-totals-supplier .form-control {
  min-width: 0;
}
@media (max-width: 900px) {
  .box-edit-panel .box-edit-field-half,
  .box-edit-panel .order-product-edit__sizes,
  .box-edit-panel .order-product-edit__totals {
    max-width: 100%;
  }
}

/* Заполненность короба (склад) */
.wms-fill {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wms-fill__track {
  flex: 1;
  min-width: 72px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.wms-fill__bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.2s;
}
.wms-fill__label {
  font-size: 11px;
  font-weight: 700;
  min-width: 32px;
}
.wms-fill__qty {
  font-size: 11px;
  color: var(--muted);
}
.box-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.box-edit-msg {
  font-size: 13px;
  min-height: 1.2em;
}

/* Упаковка в задании упаковщика */
.packer-work-panel {
  margin-top: 12px;
  padding: 14px;
  background: var(--acbg);
  border-radius: 8px;
}
.packer-work-panel__title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.packer-work-panel__hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.packer-work-block {
  margin-top: 14px;
  padding: 12px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.packer-work-block__head {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.packer-work-empty {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.packer-work-extra {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.packer-work-extra__summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.packer-work-extra__summary::-webkit-details-marker {
  display: none;
}
.packer-work-extra__summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.packer-work-extra[open] .packer-work-extra__summary::before {
  transform: rotate(90deg);
}
.packer-work-extra__body {
  margin-top: 12px;
}
.packer-work-extra__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
}
.packer-work-extra__service {
  margin-bottom: 0;
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
  box-sizing: border-box;
}
.packer-work-extra__service label,
.packer-work-extra__qty label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.packer-manual-service-select {
  width: 100%;
  max-width: 100%;
  min-height: 38px;
}
.packer-work-extra__qty {
  margin-bottom: 0;
  flex: 0 0 100px;
  width: 100px;
}
.packer-work-extra__qty .form-control {
  width: 100%;
}
.packer-work-extra__btn {
  flex: 0 0 auto;
  margin-bottom: 2px;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .packer-work-extra__service {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .packer-work-extra__row {
    align-items: stretch;
  }
}
.packer-svc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.packer-svc-table th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  padding: 0 8px 6px 0;
}
.packer-svc-table td {
  padding: 6px 8px 6px 0;
  vertical-align: middle;
}
.packer-svc-table .form-control {
  max-width: 100px;
}
.packer-svc-name {
  display: block;
  font-weight: 600;
}
.packer-svc-meta {
  font-size: 11px;
  color: var(--muted);
}
.packer-svc-stock {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.packer-svc-stock--ok { color: #16a34a; }
.packer-svc-stock--low { color: #d97706; }
.packer-svc-stock--critical { color: #dc2626; }
.packer-svc-rate {
  white-space: nowrap;
  font-size: 12px;
  color: var(--sub);
}
.packer-boxes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.packer-box-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
}
.packer-box-row:hover {
  background: var(--acbg);
}
.packer-box-row__num {
  font-weight: 700;
  min-width: 72px;
}
.packer-box-row__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.packer-box-row__qty {
  font-size: 12px;
}
.packer-box-row__meta,
.packer-box-row__parent {
  font-size: 11px;
  color: var(--muted);
}

.packer-order-packed-notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 13px;
  line-height: 1.45;
}
.packer-create-form--locked {
  opacity: 0.55;
  pointer-events: none;
}

.cargo-types-table th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.cargo-types-table--compact td,
.cargo-types-table--compact th {
  font-size: 12px;
  padding: 8px 10px;
}
.cargo-types-row--off {
  opacity: 0.5;
}
.order-logistics-cargo-params {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #e8e8e8);
}
.logistics-calc-card {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border, #e4e4e7);
}
.logistics-calc-card.is-selected {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}
.logistics-calc-card--green { background: #f0fdf4; border-color: #86efac; }
.logistics-calc-card--yellow { background: #fffbeb; border-color: #fde68a; }
.logistics-calc-card--red { background: #fef2f2; border-color: #fca5a5; }
.logistics-calc-card--blue { background: #eff6ff; border-color: #bfdbfe; }
.logistics-calc-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.logistics-calc-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,.06);
}
.logistics-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
}
.logistics-calc-row span:first-child { color: var(--muted, #71717a); }
.logistics-calc-pick {
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
}
.logistics-calc-warn {
  margin-top: 8px;
  font-size: 12px;
  color: #92400e;
}

.svc-vehicle-multiselect {
  min-height: 7.5rem;
}

.packer-task-status-select {
  display: inline-block;
  width: auto;
  min-width: 148px;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 32px 8px 12px;
  line-height: 1.3;
  height: auto;
  min-height: 40px;
}
