@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg-0: #f3f6fb;
  --bg-1: #dbe8ff;
  --bg-2: #fef6e4;
  --surface: rgba(255, 255, 255, 0.83);
  --surface-solid: #ffffff;
  --surface-muted: #f7f9fd;
  --border: rgba(16, 35, 68, 0.12);
  --text-main: #18253d;
  --text-muted: #58708f;
  --brand-500: #0e9f6e;
  --brand-600: #0a8f64;
  --brand-700: #087451;
  --accent-500: #0b6fc2;
  --accent-600: #0958a8;
  --danger-500: #dc3d4f;
  --danger-600: #c13041;
  --shadow-soft: 0 20px 44px -30px rgba(24, 38, 66, 0.55);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --billing-col-service: 270px;
  --billing-col-tariff: 120px;
  --billing-col-total: 140px;
  --font-ui: "Manrope", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", "SFMono-Regular", "Menlo", monospace;
  --control-height: 40px;
  --control-line-height: 1.24;
}

.dokz-delivery-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(135px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.dokz-delivery-stat {
  --delivery-accent: #3867a8;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--delivery-accent) 18%, #dce4ef);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 15%, color-mix(in srgb, var(--delivery-accent) 7%, #fff));
  box-shadow: 0 10px 25px rgba(21, 43, 76, 0.06);
}

.dokz-delivery-stat.is-new { --delivery-accent: #2878d4; }
.dokz-delivery-stat.is-progress { --delivery-accent: #e28a18; }
.dokz-delivery-stat.is-done { --delivery-accent: #15956a; }
.dokz-delivery-stat.is-cancelled { --delivery-accent: #9a6270; }
.dokz-delivery-stat.is-money { --delivery-accent: #6750b5; }

.dokz-delivery-stat-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--delivery-accent);
  background: color-mix(in srgb, var(--delivery-accent) 12%, #fff);
  font-size: 21px;
  font-weight: 800;
}

.dokz-delivery-stat div { display: grid; gap: 3px; }
.dokz-delivery-stat strong { color: #162944; font-size: 25px; line-height: 1; }
.dokz-delivery-stat div span { color: #687b95; font-size: 13px; font-weight: 650; }

.dokz-delivery-close-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #c8d8ed;
  border-radius: 18px;
  background: linear-gradient(115deg, #f5f9ff, #eef5ff 55%, #f8fbff);
}

.dokz-delivery-close-card.is-closed {
  border-color: #b9dfcf;
  background: linear-gradient(115deg, #f0fbf6, #e8f8f1);
}

.dokz-delivery-close-copy { display: grid; gap: 4px; }
.dokz-delivery-close-copy strong { color: #172b48; font-size: 18px; }
.dokz-delivery-close-copy > span:last-child { color: #607590; font-size: 13px; }
.dokz-delivery-close-kicker { color: #167655; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dokz-delivery-close-actions { display: flex; align-items: end; gap: 10px; }
.dokz-delivery-close-actions label { display: grid; gap: 5px; color: #607590; font-size: 12px; font-weight: 700; }
.dokz-delivery-close-actions input { min-width: 165px; }

@media (max-width: 1250px) {
  .dokz-delivery-stats { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 760px) {
  .dokz-delivery-stats { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .dokz-delivery-close-card, .dokz-delivery-close-actions { align-items: stretch; flex-direction: column; }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  line-height: 1.35;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% -8%, var(--bg-1), transparent 52%),
    radial-gradient(circle at 90% -20%, var(--bg-2), transparent 45%),
    linear-gradient(180deg, var(--bg-0) 0%, #eef3fb 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  line-height: var(--control-line-height);
}

body.platform-windows {
  --control-height: 42px;
  --control-line-height: 1.2;
}

body.platform-macos {
  --control-height: 40px;
  --control-line-height: 1.24;
}

.pwa-install-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand-600);
  box-shadow: 0 14px 34px -18px rgba(8, 61, 46, 0.7);
  font-weight: 700;
  cursor: pointer;
}

.pwa-install-button:hover {
  background: var(--brand-700);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(16, 35, 68, 0.05);
}

*::-webkit-scrollbar-thumb {
  background: rgba(16, 35, 68, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 35, 68, 0.34);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(560px, 100%);
  padding: 34px;
  display: grid;
  gap: 18px;
  animation: rise-in 380ms ease-out;
}

.login-card h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.login-card p {
  margin: 0;
  color: var(--text-muted);
}

.portal-picker-card {
  width: min(980px, 100%);
  padding: 30px;
  display: grid;
  gap: 18px;
  animation: rise-in 380ms ease-out;
}

.portal-picker-head {
  display: grid;
  gap: 6px;
}

.portal-picker-head h1 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.portal-picker-head p {
  margin: 0;
  color: var(--text-muted);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.portal-card {
  border: 1px solid rgba(11, 111, 194, 0.22);
  background: linear-gradient(130deg, rgba(11, 111, 194, 0.12), rgba(14, 159, 110, 0.08));
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 8px;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.portal-card:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 111, 194, 0.34);
  box-shadow: 0 18px 26px -26px rgba(10, 36, 69, 0.9);
}

.portal-card strong {
  font-size: 20px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.portal-card small {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.portal-card-status {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: fit-content;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
  background: rgba(14, 159, 110, 0.14);
  border: 1px solid rgba(14, 159, 110, 0.26);
}

.portal-card.locked {
  border-color: rgba(24, 37, 61, 0.16);
  background: rgba(24, 37, 61, 0.05);
}

.portal-card.locked .portal-card-status {
  color: var(--danger-600);
  background: rgba(220, 61, 79, 0.1);
  border-color: rgba(220, 61, 79, 0.2);
}

.portal-placeholder-card {
  width: min(640px, 100%);
  padding: 28px;
  display: grid;
  gap: 14px;
}

.portal-placeholder-card h1 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.portal-placeholder-card p {
  margin: 0;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  color: var(--text-muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  border-radius: 12px;
  padding: 11px 12px;
  min-height: var(--control-height);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.month-picker-control {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
}

.month-picker-control input[type="month"] {
  padding-right: 46px;
}

.month-picker-control input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

.month-picker-trigger {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(9, 99, 189, 0.16);
  background: rgba(225, 236, 250, 0.96);
  color: var(--accent-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

.month-picker-control.is-open .month-picker-trigger {
  border-color: rgba(9, 99, 189, 0.34);
  background: rgba(206, 226, 248, 0.98);
}

.month-picker-host-open {
  position: relative;
  z-index: 260;
  overflow: visible;
}

.month-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 400;
  width: min(280px, 100vw - 32px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(17, 39, 73, 0.18);
  backdrop-filter: blur(18px);
  padding: 14px;
}

.month-picker-popover-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.month-picker-popover-head strong {
  text-align: center;
  font-size: 16px;
  color: var(--text-main);
}

.month-picker-nav {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 10px;
  padding: 0;
  border: 1px solid rgba(9, 99, 189, 0.14);
  background: rgba(241, 246, 255, 0.96);
  color: var(--accent-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.month-picker-month-btn {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(9, 99, 189, 0.12);
  background: rgba(245, 248, 254, 0.98);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
}

.month-picker-month-btn.current {
  border-color: rgba(25, 157, 104, 0.34);
}

.month-picker-month-btn.selected {
  border-color: rgba(9, 99, 189, 0.34);
  background: rgba(219, 233, 250, 0.98);
  color: var(--accent-700);
}

.month-picker-popover-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.month-picker-today-btn {
  min-height: 36px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: none;
  accent-color: var(--accent-500);
  flex: 0 0 auto;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: 0 0 0 3px rgba(22, 112, 207, 0.16);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(9, 99, 189, 0.52);
  box-shadow: 0 0 0 4px rgba(22, 112, 207, 0.14);
}

textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.35;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.error-text {
  margin: 0;
  color: var(--danger-500);
  font-size: 13px;
}

.btn {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  padding: 10px 14px;
  min-height: var(--control-height);
  white-space: nowrap;
  font-weight: 700;
  transition: transform 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand-500), var(--brand-700));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--brand-600), var(--brand-700));
}

.btn-secondary {
  background: rgba(11, 111, 194, 0.1);
  color: var(--accent-600);
}

.btn-secondary:hover {
  background: rgba(11, 111, 194, 0.16);
}

.btn-danger {
  background: rgba(220, 61, 79, 0.12);
  color: var(--danger-600);
}

.btn-danger:hover {
  background: rgba(220, 61, 79, 0.2);
}

.app-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.layout {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-width: 0;
  overflow-x: hidden;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(24, 37, 61, 0.92), rgba(12, 25, 45, 0.92)),
    linear-gradient(120deg, rgba(14, 159, 110, 0.22), transparent 50%);
  color: #ecf4ff;
  padding: 20px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
}

.brand {
  display: grid;
  gap: 4px;
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 0;
  font-size: 12px;
  color: rgba(236, 244, 255, 0.75);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-btn {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-btn.active {
  background: linear-gradient(120deg, rgba(14, 159, 110, 0.45), rgba(11, 111, 194, 0.36));
  border-color: rgba(255, 255, 255, 0.24);
}

.sidebar-quick {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  min-height: 0;
}

.sidebar-quick h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(236, 244, 255, 0.84);
  font-weight: 600;
}

.quick-counterparties {
  display: grid;
  gap: 8px;
}

.quick-counterparty {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  border-radius: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
  display: grid;
  gap: 3px;
}

.quick-counterparty.active {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.15);
}

.quick-counterparty small {
  color: rgba(236, 244, 255, 0.68);
  font-size: 11px;
}

.chem-quick-list {
  gap: 8px;
}

.chem-quick-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.chem-quick-card strong {
  font-size: 12px;
}

.chem-quick-card small {
  font-size: 12px;
  color: rgba(236, 244, 255, 0.86);
}

.chem-year-field {
  width: 120px;
}

.chem-year-field input {
  text-align: center;
}

.chem-month-field {
  width: 180px;
}

.chem-month-field select {
  text-align: center;
}

.workspace {
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.topbar h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-size: 23px;
}

.topbar p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-shell {
  overflow-x: hidden;
}

.admin-workspace {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav-btn {
  border: 1px solid rgba(24, 37, 61, 0.18);
  background: rgba(24, 37, 61, 0.06);
  color: var(--text-main);
  border-radius: 11px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-nav-btn.active {
  background: linear-gradient(120deg, rgba(11, 111, 194, 0.2), rgba(14, 159, 110, 0.15));
  border-color: rgba(11, 111, 194, 0.35);
}

.user-chip {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.main-content {
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
}

.page {
  display: none;
  animation: rise-in 260ms ease-out;
  min-width: 0;
  overflow-x: hidden;
}

.page.active {
  display: grid;
  gap: 16px;
}

.page.active > * {
  min-width: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.test1-dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.test1-dashboard-grid .metric-card:first-child .metric-value {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.2;
  white-space: normal;
}

.test1-receiving-head {
  align-items: flex-start;
}

.test1-receiving-head .actions-row {
  justify-content: flex-end;
}

.test1-receiving-metrics .metric-value {
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
}

.test1-receiving-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.test1-field-span-2 {
  grid-column: span 2;
}

.test1-receiving-toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.test1-receiving-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-muted);
  font-size: 13px;
}

.test1-receiving-form-actions {
  justify-content: flex-start;
}

.test1-receiving-plan-result {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.test1-receiving-plan-result table {
  min-width: 760px;
}

.test1-address-map {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.test1-address-map-head,
.test1-address-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.test1-address-row {
  display: grid;
  grid-template-columns: 44px minmax(var(--test1-address-grid-width, 580px), 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.test1-address-row-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  text-align: right;
}

.test1-address-cells {
  display: grid;
  grid-template-columns: repeat(var(--test1-address-position-count, 25), minmax(24px, 1fr));
  gap: 4px;
  min-width: var(--test1-address-grid-width, 580px);
}

.test1-address-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

button.test1-address-cell {
  cursor: pointer;
}

.test1-address-cell.available {
  background: rgba(14, 159, 110, 0.14);
  border-color: rgba(10, 143, 100, 0.32);
  color: var(--brand-700);
}

.test1-address-cell.occupied {
  background: rgba(11, 111, 194, 0.14);
  border-color: rgba(11, 111, 194, 0.32);
  color: var(--accent-600);
}

.test1-address-cell.reserved {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(180, 83, 9, 0.46);
  color: #713f12;
}

.test1-address-cell.blocked {
  background: rgba(220, 61, 79, 0.12);
  border-color: rgba(220, 61, 79, 0.28);
  color: #991b1b;
}

.test1-address-cell.missing {
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), rgba(100, 116, 139, 0.5) 50%, transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(100, 116, 139, 0.5) 50%, transparent calc(50% + 1px)),
    rgba(148, 163, 184, 0.1);
  border-color: rgba(100, 116, 139, 0.32);
  color: #475569;
}

.test1-address-cell.selected {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.test1-address-aisle {
  display: grid;
  grid-template-columns: 44px minmax(var(--test1-address-grid-width, 580px), 1fr);
  gap: 8px;
}

.test1-address-aisle span {
  grid-column: 2;
  display: block;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--surface-muted);
}

.test1-address-legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 4px;
}

.test1-address-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.test1-address-legend .test1-address-cell {
  width: 14px;
  height: 14px;
  aspect-ratio: auto;
}

.test1-address-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.test1-address-table {
  max-height: 520px;
}

.test1-address-editor-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.test1-address-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.test1-address-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
}

.test1-address-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.test1-address-control-item {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.test1-address-control-item:disabled {
  cursor: default;
  opacity: 1;
}

.test1-address-control-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.test1-address-control-item strong {
  font-size: 26px;
  line-height: 1;
}

.test1-address-rows-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.test1-address-row-size-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.test1-address-row-size-card > div:first-child {
  display: grid;
  gap: 4px;
}

.test1-address-row-size-card > div:first-child span,
.test1-address-row-size-stats {
  color: var(--muted);
  font-size: 12px;
}

.test1-address-row-size-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.test1-address-row-size-stats span {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.test1-address-row-size-stats span.warning {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #713f12;
}

.test1-address-row-size-stats span.danger {
  border-color: rgba(220, 61, 79, 0.28);
  background: rgba(220, 61, 79, 0.1);
  color: #991b1b;
}

.test1-address-row-size-controls {
  display: grid;
  grid-template-columns: 34px minmax(84px, 1fr) 34px 42px;
  gap: 8px;
  align-items: end;
}

.test1-warehouse-alert-list {
  display: grid;
  gap: 8px;
}

.test1-warehouse-alert-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.test1-warehouse-alert-item span {
  color: var(--muted);
  font-size: 12px;
}

.test1-warehouse-alert-item.warning {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.test1-warehouse-alert-item.danger {
  border-color: rgba(220, 61, 79, 0.28);
  background: rgba(220, 61, 79, 0.08);
}

.test1-address-reservation-card,
.test1-address-manual-stock-card {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.test1-address-reserve-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.test1-address-reserve-current {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
}

.test1-address-reserve-current span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.test1-address-reserve-current strong {
  color: #713f12;
  overflow-wrap: anywhere;
}

.test1-address-stock-card {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.test1-pick-recommendation {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.test1-address-movement-card {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.test1-address-stock-head,
.test1-address-stock-item,
.test1-address-movement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.test1-address-stock-head span,
.test1-address-stock-item span,
.test1-address-movement-item span {
  color: var(--muted);
  font-size: 12px;
}

.test1-address-stock-list,
.test1-address-movement-list {
  display: grid;
  gap: 8px;
}

.test1-address-stock-item,
.test1-address-movement-item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.test1-address-stock-item {
  align-items: start;
  flex-wrap: wrap;
}

.test1-address-stock-item > div:first-child,
.test1-address-movement-item > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 180px;
}

.test1-address-stock-item strong,
.test1-address-stock-item span,
.test1-address-movement-item strong,
.test1-address-movement-item span {
  overflow-wrap: anywhere;
}

.test1-address-stock-item .amount,
.test1-address-movement-item .amount {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  text-align: right;
}

.test1-address-adjust-form,
.test1-address-move-form,
.test1-address-ship-form {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.test1-address-adjust-form {
  grid-template-columns: repeat(4, minmax(96px, 1fr)) auto;
}

.test1-address-movement-item.move {
  border-color: rgba(11, 111, 194, 0.22);
}

.test1-address-movement-item.place {
  border-color: rgba(10, 143, 100, 0.24);
}

.test1-address-movement-item.remove {
  border-color: rgba(217, 119, 6, 0.24);
}

.compact-empty {
  padding: 14px;
}

.selected-row {
  background: rgba(11, 111, 194, 0.06);
}

.status-pill.status-success {
  color: var(--brand-700);
  background: rgba(14, 159, 110, 0.15);
  border-color: rgba(10, 143, 100, 0.25);
}

.status-pill.status-info {
  color: var(--accent-600);
  background: rgba(11, 111, 194, 0.12);
  border-color: rgba(11, 111, 194, 0.26);
}

.status-pill.status-warning {
  color: #9a5a00;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(217, 119, 6, 0.26);
}

.status-pill.status-danger {
  color: var(--danger-600);
  background: rgba(220, 61, 79, 0.12);
  border-color: rgba(220, 61, 79, 0.26);
}

.test1-export-panel .panel-head {
  align-items: center;
}

.test1-receiving-table {
  min-width: 1140px;
}

.test1-placement-table {
  min-width: 1480px;
}

.test1-scan-panel {
  border-color: rgba(11, 111, 194, 0.18);
}

.test1-worker-scanner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.test1-worker-period-row {
  margin-bottom: 12px;
}

.test1-address-import-form {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(240px, 1fr) minmax(150px, auto) auto;
  gap: 12px;
  align-items: end;
}

.test1-address-import-file input {
  min-height: 40px;
}

.test1-address-import-check {
  align-self: stretch;
  justify-content: end;
}

.test1-address-journal-table {
  max-height: 360px;
}

.test1-address-journal-table table {
  min-width: 980px;
}

.test1-access-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.test1-access-summary span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.test1-access-diagnostics-table table {
  min-width: 760px;
}

.test1-worker-confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.test1-scan-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.test1-worker-mobile-shell .test1-scan-form input {
  min-height: 52px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.test1-worker-mobile-shell .test1-scan-form .btn,
.test1-worker-mobile-shell .test1-worker-confirm-grid .btn {
  min-height: 52px;
}

.test1-scan-empty {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-muted);
}

.test1-scan-result {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(11, 111, 194, 0.18);
  border-radius: 8px;
  background: rgba(11, 111, 194, 0.06);
}

.test1-scan-result.warning {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.test1-scan-result.placed {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.08);
}

.test1-scan-target,
.test1-scan-details > div {
  display: grid;
  gap: 4px;
}

.test1-scan-target span,
.test1-scan-details span,
.test1-scan-footer span {
  color: var(--muted);
  font-size: 12px;
}

.test1-scan-target strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  color: var(--brand-700);
}

.test1-scan-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.test1-scan-details strong {
  overflow-wrap: anywhere;
}

.test1-scan-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.test1-replenishment-table {
  min-width: 1360px;
}

.test1-picking-packing-table {
  min-width: 1380px;
}

.test1-shipping-table {
  min-width: 1600px;
}

.test1-inventory-table {
  min-width: 1720px;
}

.test1-receiving-cell-main {
  font-weight: 700;
  margin-bottom: 2px;
}

.test1-receiving-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-xs {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.compact-input {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 13px;
  margin-top: 6px;
}

.wide-field {
  grid-column: span 2;
}

.metric-card-warning {
  border-color: rgba(218, 141, 28, 0.28);
  background: linear-gradient(140deg, rgba(255, 247, 230, 0.94), rgba(255, 255, 255, 0.98));
}

.metric-card-danger {
  border-color: rgba(220, 61, 79, 0.28);
  background: linear-gradient(140deg, rgba(255, 235, 239, 0.92), rgba(255, 255, 255, 0.98));
}

.dashboard-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.direction-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  border-color: rgba(11, 111, 194, 0.22);
  background: linear-gradient(140deg, rgba(11, 111, 194, 0.08), rgba(14, 159, 110, 0.07));
}

.direction-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.direction-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.direction-card-value {
  margin: 0;
  font-size: 27px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.direction-card-meta {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.direction-card-meta strong {
  color: var(--text-main);
}

.metric-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric-title {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.metric-value {
  margin: 0;
  font-size: 28px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.metric-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.metric-card-positive {
  border-color: rgba(14, 159, 110, 0.34);
  background: linear-gradient(120deg, rgba(14, 159, 110, 0.16), rgba(11, 111, 194, 0.08));
}

.metric-card-negative {
  border-color: rgba(220, 61, 79, 0.28);
  background: linear-gradient(120deg, rgba(220, 61, 79, 0.14), rgba(255, 255, 255, 0.78));
}

.metric-card-neutral {
  border-color: rgba(11, 111, 194, 0.24);
  background: linear-gradient(120deg, rgba(11, 111, 194, 0.12), rgba(255, 255, 255, 0.8));
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 14px;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.table-wrap {
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(24, 37, 61, 0.07);
  border-radius: 6px;
  padding: 2px 6px;
  display: inline-block;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 13px;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: #f6f9ff;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.amount.negative {
  color: #c13648;
}

.features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.features li {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-muted);
  padding: 10px 12px;
  font-size: 13px;
}

.kpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kpi-summary-item {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px;
  background: var(--surface-muted);
  display: grid;
  gap: 6px;
}

.kpi-summary-item span {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-summary-item strong {
  font-size: 19px;
  font-family: var(--font-display);
}

.kpi-service-list {
  display: grid;
  gap: 10px;
}

.kpi-service-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 10px 12px;
  display: grid;
  gap: 7px;
}

.kpi-service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.kpi-service-head strong {
  font-size: 13px;
}

.kpi-service-head span {
  color: var(--text-muted);
  text-align: right;
}

.kpi-service-item small {
  color: var(--text-muted);
  font-size: 11px;
}

.kpi-bar {
  border-radius: 999px;
  background: rgba(11, 111, 194, 0.1);
  height: 7px;
  overflow: hidden;
}

.chem-planning-compare-list {
  gap: 12px;
}

.chem-planning-compare-item {
  gap: 10px;
}

.chem-planning-compare-row {
  display: grid;
  grid-template-columns: 52px minmax(140px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.chem-planning-compare-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

.chem-planning-compare-value {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
}

.chem-planning-compare-bar.plan {
  background: rgba(11, 111, 194, 0.12);
}

.chem-planning-compare-bar.actual {
  background: rgba(14, 159, 110, 0.18);
}

.chem-planning-compare-bar.actual span {
  background: linear-gradient(90deg, #22b573, #0f9f6e);
}

.chem-planning-period-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.chem-planning-period-toggle .status-pill {
  pointer-events: none;
}

.chem-planning-period-caret {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  min-width: 10px;
}

.chem-planning-week-row > td {
  background: rgba(11, 111, 194, 0.04);
  padding: 8px 12px 12px;
}

.chem-planning-week-wrap {
  border: 1px solid rgba(11, 111, 194, 0.2);
  border-radius: 10px;
  background: #fff;
  overflow: auto;
}

.chem-planning-week-table {
  width: 100%;
  border-collapse: collapse;
}

.chem-planning-week-table th,
.chem-planning-week-table td {
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.chem-planning-week-table th {
  position: static;
  top: auto;
  z-index: auto;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  background: rgba(11, 111, 194, 0.08);
}

.chem-planning-week-table tbody tr:last-child td {
  border-bottom: 0;
}

.counterparty-profile-shell {
  display: grid;
  gap: 14px;
}

.counterparty-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.counterparty-profile-head h3 {
  margin: 0;
  font-size: 26px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.counterparty-profile-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 220px));
  gap: 10px;
}

.counterparty-profile-metrics {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.counterparty-profile-metric {
  border: 1px solid rgba(11, 111, 194, 0.22);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(11, 111, 194, 0.09), rgba(14, 159, 110, 0.08));
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.counterparty-profile-metric span {
  font-size: 12px;
  color: var(--text-muted);
}

.counterparty-profile-metric strong {
  font-size: 20px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.counterparty-chart-shell {
  display: grid;
  gap: 10px;
}

.counterparty-chart-scroll {
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.95), rgba(236, 243, 255, 0.72));
}

.counterparty-chart-svg {
  min-width: 860px;
  width: 100%;
  display: block;
}

.counterparty-chart-grid-bg {
  fill: rgba(255, 255, 255, 0.74);
}

.counterparty-chart-grid-line {
  stroke: rgba(104, 125, 156, 0.22);
  stroke-width: 1;
}

.counterparty-chart-grid-label {
  fill: var(--text-muted);
  font-size: 11px;
  text-anchor: end;
}

.counterparty-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.counterparty-chart-line.warehouse {
  stroke: #0f5ecf;
}

.counterparty-chart-line.transport {
  stroke: #0f9f6e;
}

.counterparty-chart-line.total {
  stroke: #d17111;
}

.counterparty-chart-point {
  stroke: #ffffff;
  stroke-width: 1.5;
}

.counterparty-chart-point.warehouse {
  fill: #0f5ecf;
}

.counterparty-chart-point.transport {
  fill: #0f9f6e;
}

.counterparty-chart-point.total {
  fill: #d17111;
}

.counterparty-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.counterparty-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.counterparty-chart-legend-item i {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  display: inline-block;
}

.counterparty-chart-legend-item i.warehouse {
  background: #0f5ecf;
}

.counterparty-chart-legend-item i.transport {
  background: #0f9f6e;
}

.counterparty-chart-legend-item i.total {
  background: #d17111;
}

.counterparty-chart-axis {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.counterparty-chart-axis span {
  text-align: center;
  white-space: nowrap;
}

.counterparty-profile-table td strong {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.kpi-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
  border-radius: inherit;
}

.counterparties-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.6fr);
  gap: 14px;
}

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  justify-content: flex-start;
}

.counterparty-list {
  display: grid;
  gap: 8px;
  max-height: 72vh;
  overflow: auto;
  align-content: start;
}

.counterparties-list-panel {
  justify-content: flex-start;
}

.counterparties-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-radius: 12px;
  padding: 4px 0;
}

.counterparty-item {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-muted);
  padding: 10px 11px;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 3px;
}

.counterparty-item strong {
  font-size: 13px;
}

.counterparty-item small {
  font-size: 11px;
  color: var(--text-muted);
}

.counterparty-item.active {
  border-color: rgba(14, 159, 110, 0.45);
  background: rgba(14, 159, 110, 0.09);
}

.detail-form {
  display: grid;
  gap: 14px;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.counterparty-template-row {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 10px;
  align-items: end;
}

.tariff-table td:last-child,
.tariff-table th:last-child {
  width: 170px;
}

.tariff-note {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.access-options {
  row-gap: 6px;
  column-gap: 10px;
}

.access-options > .hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-muted);
  color: var(--text-main);
  font-size: 12px;
}

.access-options > .hint input {
  width: auto;
  margin: 0;
  transform: translateY(0.5px);
}

.task-board-access-groups {
  display: grid;
  gap: 10px;
}

.task-board-access-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px 10px;
  background: var(--surface-muted);
}

.task-board-access-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.task-board-access-group-head strong {
  font-size: 12px;
  color: var(--text-muted);
}

.task-board-access-group-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-board-access-options {
  gap: 8px 10px;
}

.btn.btn-tiny {
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
}

.billing-toolbar {
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-start;
}

.billing-toolbar .compact-field:first-child {
  flex: 0 1 280px;
}

.billing-toolbar .compact-field:nth-child(2) {
  flex: 0 1 180px;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 420px;
  min-width: 0;
  justify-content: flex-start;
  align-items: center;
}

.compact-field {
  gap: 4px;
}

.compact-field span {
  font-size: 12px;
}

.compact-field select,
.compact-field input {
  padding: 8px 10px;
  height: calc(var(--control-height) - 2px);
  min-height: calc(var(--control-height) - 2px);
}

.billing-table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  border: 1px solid var(--border);
  border-radius: 14px;
  max-height: 72vh;
  overscroll-behavior-x: contain;
}

.billing-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.billing-table th,
.billing-table td {
  min-width: 78px;
  padding: 8px;
  text-align: center;
}

.billing-table th:first-child,
.billing-table td:first-child {
  min-width: var(--billing-col-service);
  width: var(--billing-col-service);
  max-width: var(--billing-col-service);
  position: sticky;
  left: 0;
  text-align: left;
  z-index: 3;
  background: #f5f8ff;
  box-shadow: 1px 0 0 var(--border);
}

.billing-table th:nth-child(2),
.billing-table td:nth-child(2) {
  min-width: var(--billing-col-tariff);
  width: var(--billing-col-tariff);
  max-width: var(--billing-col-tariff);
  position: sticky;
  left: var(--billing-col-service);
  z-index: 3;
  background: #f5f8ff;
  box-shadow: 1px 0 0 var(--border);
}

.billing-table th:last-child,
.billing-table td:last-child {
  min-width: var(--billing-col-total);
  width: var(--billing-col-total);
  max-width: var(--billing-col-total);
  font-weight: 700;
  position: sticky;
  right: 0;
  z-index: 3;
  background: #f5f8ff;
  box-shadow: -1px 0 0 var(--border);
}

.billing-table thead th:first-child,
.billing-table thead th:nth-child(2),
.billing-table thead th:last-child {
  z-index: 5;
}

.billing-table th.weekend,
.billing-table td.weekend {
  background: rgba(220, 61, 79, 0.14);
}

.billing-table td.weekend input {
  background: rgba(255, 255, 255, 0.85);
}

.billing-table td.weekend.weekend-locked input {
  background: #edf0f6;
  color: #8d9aad;
  border-style: dashed;
  cursor: not-allowed;
}

.billing-table input[type="number"] {
  width: 70px;
  padding: 6px 4px;
  text-align: center;
  border-radius: 8px;
}

.billing-table input[type="number"]:disabled {
  background: #f2f4f8;
  color: #8d9aad;
  cursor: not-allowed;
}

.transport-table-wrap {
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.transport-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
}

.transport-table th,
.transport-table td {
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.transport-table th {
  background: #f6f9ff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.transport-table td input,
.transport-table td select {
  min-width: 130px;
  width: 100%;
  padding: 7px 8px;
}

.transport-table td .table-actions {
  justify-content: flex-end;
}

.transport-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.transport-tools > .btn {
  justify-self: start;
}

.transport-filter-summary {
  margin: 0 0 8px;
}

.billing-day-label {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.billing-day-label small {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.billing-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  padding: 14px;
  display: grid;
  gap: 7px;
}

.summary-card h4 {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-card p {
  margin: 0;
  font-size: 24px;
  font-family: var(--font-display);
}

.summary-card.total {
  background: linear-gradient(120deg, rgba(14, 159, 110, 0.2), rgba(11, 111, 194, 0.2));
  border-color: rgba(10, 143, 100, 0.35);
}

.summary-card.alert {
  background: rgba(220, 61, 79, 0.1);
  border-color: rgba(220, 61, 79, 0.3);
}

.users-grid {
  display: grid;
  gap: 14px;
}

.user-form {
  display: grid;
  gap: 12px;
}

.user-form-main {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.user-form-access-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.user-form-access-card,
.user-form-task-boards {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-muted);
}

.user-form-task-boards {
  display: grid;
  gap: 8px;
}

.user-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-form-footer .hint {
  margin: 0;
  max-width: 780px;
}

.user-form-footer > .btn {
  margin-left: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid transparent;
  font-size: 11px;
  white-space: nowrap;
}

.status-pill.active {
  color: var(--brand-700);
  background: rgba(14, 159, 110, 0.15);
  border-color: rgba(10, 143, 100, 0.25);
}

.status-pill.inactive {
  color: var(--danger-600);
  background: rgba(220, 61, 79, 0.12);
  border-color: rgba(220, 61, 79, 0.26);
}

.status-pill.pending {
  color: var(--accent-600);
  background: rgba(11, 111, 194, 0.12);
  border-color: rgba(11, 111, 194, 0.26);
}

.delta-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.delta-badge.up {
  color: var(--brand-700);
  background: rgba(14, 159, 110, 0.12);
  border-color: rgba(14, 159, 110, 0.22);
}

.delta-badge.down {
  color: var(--danger-600);
  background: rgba(220, 61, 79, 0.11);
  border-color: rgba(220, 61, 79, 0.24);
}

.delta-badge.neutral {
  color: var(--accent-600);
  background: rgba(11, 111, 194, 0.1);
  border-color: rgba(11, 111, 194, 0.22);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tariff-templates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tasks-shell {
  display: grid;
  gap: 14px;
}

.tasks-board-strip {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 20;
  overflow: visible;
}

.tasks-filter-strip {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.tasks-filter-grid {
  display: grid;
  grid-template-columns: 1.5fr minmax(180px, 220px) minmax(180px, 220px);
  gap: 10px;
}

.tasks-board-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
}

.tasks-board-tab {
  border: 1px solid rgba(24, 37, 61, 0.16);
  background: rgba(24, 37, 61, 0.06);
  color: var(--text-main);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.tasks-board-tab:hover {
  background: rgba(24, 37, 61, 0.11);
}

.tasks-board-tab.active {
  background: linear-gradient(120deg, rgba(11, 111, 194, 0.22), rgba(14, 159, 110, 0.18));
  border-color: rgba(11, 111, 194, 0.38);
}

.tasks-board-plus {
  border: 1px dashed rgba(11, 111, 194, 0.42);
  background: rgba(11, 111, 194, 0.09);
  color: var(--accent-600);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tasks-board-tools {
  display: flex;
  align-items: center;
}

.tasks-inline-menu {
  position: relative;
  z-index: 40;
}

.tasks-inline-menu[open] .tasks-menu-trigger {
  background: rgba(11, 111, 194, 0.12);
}

.tasks-menu-trigger {
  list-style: none;
  border: 1px solid rgba(24, 37, 61, 0.14);
  background: rgba(24, 37, 61, 0.04);
  color: var(--text-muted);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 20px;
  cursor: pointer;
}

.tasks-menu-trigger::-webkit-details-marker {
  display: none;
}

.tasks-inline-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  z-index: 120;
}

.tasks-inline-menu-list button {
  border: 0;
  text-align: left;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  cursor: pointer;
  color: var(--text-main);
}

.tasks-inline-menu-list button:hover {
  background: rgba(11, 111, 194, 0.08);
}

.tasks-kanban-scroll {
  overflow: auto;
  padding-bottom: 6px;
}

.tasks-kanban-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 12px;
  align-items: start;
}

.tasks-column {
  border: 1px solid rgba(24, 37, 61, 0.15);
  border-radius: 16px;
  background: rgba(24, 37, 61, 0.045);
  padding: 12px;
  display: grid;
  gap: 10px;
  min-height: 170px;
}

.tasks-column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tasks-column-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tasks-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(24, 37, 61, 0.12);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.tasks-add-card-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #2f83ea;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.tasks-add-card-link:hover {
  color: #246bc0;
}

.tasks-card-list {
  display: grid;
  gap: 9px;
  min-height: 90px;
  padding: 2px;
  border-radius: 12px;
  transition: background-color 120ms ease;
}

.tasks-card-list.drag-over {
  background: rgba(14, 159, 110, 0.12);
}

.tasks-card {
  border: 1px solid rgba(24, 37, 61, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 11px;
  display: grid;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 10px 20px -18px rgba(24, 38, 66, 0.55);
}

.tasks-card.overdue {
  border-color: rgba(200, 63, 86, 0.35);
  background: linear-gradient(180deg, rgba(255, 241, 244, 0.9), rgba(255, 255, 255, 0.92));
}

.tasks-card.dragging {
  opacity: 0.55;
}

.tasks-card h4 {
  margin: 0;
  font-size: 14px;
}

.tasks-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.tasks-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.tasks-due-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(24, 37, 61, 0.08);
  color: var(--text-muted);
}

.tasks-due-pill.today {
  background: rgba(11, 111, 194, 0.14);
  color: #0b5d9f;
}

.tasks-due-pill.overdue {
  background: rgba(215, 66, 89, 0.14);
  color: #a92f43;
}

.tasks-column-empty {
  border: 1px dashed rgba(24, 37, 61, 0.2);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.tasks-column-add {
  background: rgba(11, 111, 194, 0.06);
  border-style: dashed;
}

.tasks-add-column-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(11, 111, 194, 0.13);
  color: var(--accent-600);
  font-weight: 700;
  cursor: pointer;
}

.tasks-add-column-btn:hover {
  background: rgba(11, 111, 194, 0.2);
}

.tasks-column-slate {
  border-top: 6px solid #9aaac5;
}

.tasks-column-amber {
  border-top: 6px solid #d29c54;
}

.tasks-column-teal {
  border-top: 6px solid #1e9a92;
}

.tasks-column-violet {
  border-top: 6px solid #7e7ce2;
}

.tasks-column-rose {
  border-top: 6px solid #d96184;
}

.tasks-column-lime {
  border-top: 6px solid #8db53f;
}

.tasks-column-sky {
  border-top: 6px solid #4c95d3;
}

.tasks-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 36, 0.42);
  display: grid;
  place-items: center;
  z-index: 60;
  padding: 20px;
}

.tasks-modal {
  width: min(640px, 100%);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.tasks-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tasks-modal-head h3 {
  margin: 0;
}

.tasks-modal-close {
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  background: rgba(24, 37, 61, 0.08);
  color: var(--text-muted);
  cursor: pointer;
}

.tasks-modal-form {
  display: grid;
  gap: 10px;
}

.tasks-modal-due-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.tasks-modal-due-hint.overdue {
  color: #b4374d;
  font-weight: 600;
}

.tasks-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tasks-comments,
.tasks-attachments {
  border-top: 1px solid rgba(24, 37, 61, 0.12);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.tasks-comments-head,
.tasks-attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tasks-comments-head h4,
.tasks-attachments-head h4 {
  margin: 0;
}

.tasks-comments-error,
.tasks-attachments-error {
  border: 1px solid rgba(199, 54, 78, 0.25);
  background: rgba(255, 238, 241, 0.78);
  color: #9c3344;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.tasks-comments-list,
.tasks-attachments-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.tasks-comments-empty,
.tasks-attachments-empty {
  border: 1px dashed rgba(24, 37, 61, 0.2);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.tasks-attachment-item {
  border: 1px solid rgba(24, 37, 61, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tasks-attachment-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tasks-attachment-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tasks-attachment-name {
  font-size: 13px;
  word-break: break-word;
}

.tasks-attachment-size {
  font-size: 11px;
  color: var(--text-muted);
}

.tasks-attachment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
}

.tasks-attachment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tasks-attachment-download,
.tasks-attachment-delete {
  border-radius: 8px;
  font-size: 11px;
  padding: 5px 9px;
  cursor: pointer;
}

.tasks-attachment-download {
  border: 1px solid rgba(38, 108, 204, 0.25);
  background: rgba(38, 108, 204, 0.08);
  color: var(--primary);
}

.tasks-attachment-delete {
  border: 1px solid rgba(199, 54, 78, 0.28);
  background: rgba(199, 54, 78, 0.09);
  color: #a73d51;
}

.tasks-comment-item {
  border: 1px solid rgba(24, 37, 61, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 8px 10px;
  display: grid;
  gap: 5px;
}

.tasks-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tasks-comment-author {
  font-size: 12px;
  font-weight: 700;
}

.tasks-comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.tasks-comment-delete {
  margin-left: auto;
  border: 1px solid rgba(199, 54, 78, 0.28);
  border-radius: 7px;
  background: rgba(199, 54, 78, 0.09);
  color: #a73d51;
  font-size: 11px;
  padding: 3px 7px;
  cursor: pointer;
}

.tasks-comment-item p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
}

.tasks-comment-form {
  display: grid;
  gap: 8px;
}

.tasks-attachments-form {
  display: grid;
  gap: 8px;
}

.sidebar-toggle {
  display: none;
}

.sidebar-overlay {
  border: 0;
  background: rgba(0, 0, 0, 0.32);
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.layout.sidebar-open .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  padding: 22px;
  color: var(--text-muted);
}

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
  z-index: 50;
}

.toast {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
}

.toast.success {
  border-color: rgba(10, 143, 100, 0.35);
}

.toast.error {
  border-color: rgba(220, 61, 79, 0.34);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .portal-picker-card {
    padding: 22px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-directions {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-lower,
  .counterparties-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-form-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tariff-templates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tasks-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tasks-attachment-item {
    flex-direction: column;
  }

  .tasks-attachment-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tasks-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .counterparty-profile-head {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .counterparty-profile-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .counterparty-profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test1-receiving-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .test1-address-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .portal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-card strong {
    font-size: 18px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(85vw, 320px);
    z-index: 40;
    transform: translateX(-110%);
    transition: transform 170ms ease;
  }

  .layout.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .workspace {
    padding: 12px;
  }

  .topbar {
    padding: 12px;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .billing-toolbar {
    align-items: stretch;
  }

  .billing-toolbar .compact-field:first-child,
  .billing-toolbar .compact-field:nth-child(2),
  .billing-actions {
    flex: 1 1 100%;
  }

  .counterparty-template-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-form-access-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .tasks-kanban-grid {
    grid-auto-columns: minmax(260px, 280px);
  }

  .tasks-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-form-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .counterparty-profile-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-receiving-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test1-worker-scanner-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-address-map {
    overflow-x: auto;
  }

  .test1-scan-result,
  .test1-scan-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-address-adjust-form,
  .test1-address-move-form,
  .test1-address-ship-form,
  .test1-address-import-form,
  .test1-address-filter-form,
  .test1-address-reserve-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-address-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test1-address-rows-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portal-picker-card {
    padding: 18px;
  }

  .dashboard-grid,
  .billing-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-service-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .chem-planning-compare-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .chem-planning-compare-value {
    grid-column: 2;
    justify-self: end;
  }

  .chem-planning-week-table {
    min-width: 620px;
  }

  .detail-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-form-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-form-footer {
    align-items: flex-start;
  }

  .user-form-footer > .btn {
    margin-left: 0;
  }

  .tariff-templates-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .tasks-modal {
    padding: 12px;
  }

  .counterparty-profile-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-receiving-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-worker-confirm-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-field-span-2 {
    grid-column: span 1;
  }

  .test1-receiving-head .actions-row {
    justify-content: flex-start;
  }

  .test1-address-row,
  .test1-address-aisle {
    grid-template-columns: 36px minmax(var(--test1-address-grid-width, 580px), 1fr);
  }

  .test1-address-control-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-address-rows-grid,
  .test1-address-row-size-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .test1-address-map-head {
    min-width: calc(var(--test1-address-grid-width, 580px) + 44px);
  }

  .test1-scan-form,
  .test1-scan-footer {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .test1-worker-mobile-shell .panel-head {
    gap: 10px;
  }

  .test1-worker-mobile-shell .status-pill {
    justify-self: flex-start;
  }

  .test1-worker-mobile-shell .test1-scan-panel {
    position: sticky;
    top: 8px;
    z-index: 3;
  }

  .test1-worker-mobile-shell .test1-scan-form .btn,
  .test1-worker-mobile-shell .test1-worker-confirm-grid .btn {
    width: 100%;
  }

  .test1-worker-mobile-shell .test1-scan-target strong {
    font-size: 34px;
  }
}

.vtb-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vtb-launch-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vtb-alert-list,
.vtb-record-list,
.vtb-activity-list {
  display: grid;
  gap: 10px;
}

.vtb-alert-item,
.vtb-activity-item,
.vtb-record-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
}

.vtb-alert-item strong,
.vtb-record-item strong,
.vtb-activity-item strong {
  display: block;
  margin-bottom: 4px;
}

.vtb-alert-item span,
.vtb-record-item span,
.vtb-activity-item span,
.vtb-alert-item small,
.vtb-record-item small,
.vtb-activity-item small,
.vtb-table-muted {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.vtb-compact-empty {
  min-height: auto;
  padding: 20px;
}

.vtb-list-detail {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.vtb-list-panel,
.vtb-detail-panel {
  min-width: 0;
}

.vtb-list-panel .panel-head,
.vtb-detail-panel .panel-head,
.vtb-inline-panel .panel-head {
  align-items: flex-start;
}

.vtb-record-list {
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
}

.vtb-record-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.vtb-record-item:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 111, 194, 0.28);
}

.vtb-record-item.active {
  border-color: rgba(11, 111, 194, 0.36);
  background: linear-gradient(120deg, rgba(11, 111, 194, 0.1), rgba(14, 159, 110, 0.08));
}

.vtb-record-item-head,
.vtb-activity-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.vtb-launch-readiness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.vtb-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vtb-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vtb-field-wide {
  grid-column: 1 / -1;
}

.vtb-detail-extras,
.vtb-documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.vtb-upload-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.vtb-upload-form .field,
.vtb-upload-form .btn {
  min-width: 0;
}

.vtb-upload-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.vtb-inline-panel {
  min-width: 0;
}

.vtb-subnav {
  flex-wrap: wrap;
}

.vtb-subnav .btn {
  min-height: 36px;
}

.vtb-multi-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
  padding: 10px 12px;
}

.checkbox-pill span {
  color: var(--text-main);
  font-size: 13px;
}

.vtb-table {
  width: 100%;
  border-collapse: collapse;
}

.vtb-table th,
.vtb-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(16, 35, 68, 0.08);
  text-align: left;
  vertical-align: top;
}

.vtb-table th {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vtb-table tbody tr:hover {
  background: rgba(11, 111, 194, 0.04);
}

.vtb-table tbody tr.dokz-stock-row-active {
  background: rgba(14, 159, 110, 0.1);
  box-shadow: inset 3px 0 0 rgba(14, 159, 110, 0.6);
}

.dokz-stock-row-active td:first-child {
  font-weight: 800;
  color: var(--brand-700);
}

.dokz-muted-line {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.dokz-stock-movement-panel {
  scroll-margin-top: 18px;
}

.dokz-stock-movement-backdrop {
  align-items: start;
  overflow: auto;
  padding: 18px;
}

.dokz-stock-movement-window {
  position: relative;
  width: min(1680px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 0 auto;
}

.dokz-stock-movement-window > .dokz-stock-movement-panel {
  margin: 0;
}

.dokz-stock-movement-panel-modal {
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(16, 35, 68, 0.26);
}

.dokz-stock-movement-close {
  position: sticky;
  top: 12px;
  left: calc(100% - 44px);
  z-index: 2;
  margin: 0 12px -44px auto;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(16, 35, 68, 0.14);
}

.dokz-stock-movement-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 14px;
}

.dokz-stock-movement-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(520px, 1.8fr);
}

.dokz-stock-movement-table td {
  min-width: 92px;
}

.dokz-stock-movement-table td:nth-child(10) {
  min-width: 220px;
}

.dokz-report-head,
.dokz-report-totals {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.dokz-report-head {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dokz-report-head > div,
.dokz-report-totals > article {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  min-width: 0;
}

.dokz-report-head strong,
.dokz-report-totals strong {
  display: block;
  color: var(--text);
}

.dokz-report-totals {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dokz-report-totals span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.dokz-report-totals strong {
  font-size: 22px;
}

.dokz-report-details {
  margin-top: 12px;
}

.dokz-report-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.dokz-correction-log-panel {
  margin-top: 18px;
}

.dokz-correction-log-table td {
  vertical-align: top;
}

.dokz-correction-log-table td:nth-child(4) {
  min-width: 280px;
}

.dokz-status-lane {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dokz-status-card,
.dokz-mini-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}

.dokz-status-card strong,
.dokz-mini-card strong {
  display: block;
  color: var(--text-main);
  min-width: 0;
  font-size: 15px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.dokz-status-count {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}

.dokz-mini-card span {
  display: block;
  min-width: 0;
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.26;
  overflow-wrap: anywhere;
}

.dokz-mini-card small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dokz-mini-card-metric strong {
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 800;
  line-height: 1.05;
}

.dokz-mini-card-metric span {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.dokz-mini-card-label-value strong {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.dokz-mini-card-label-value span {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.08;
}

.dokz-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vtb-inline-panel .dokz-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dokz-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dokz-checkbox-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

.dokz-secondary-workspace {
  margin-top: 16px;
}

.dokz-quick-grid {
  display: grid;
  gap: 10px;
}

.dokz-export-panel {
  margin: 16px 0;
}

.dokz-quick-card {
  border: 1px solid rgba(11, 111, 194, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dokz-quick-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
  font-family: var(--font-display);
  color: var(--text-main);
}

.dokz-quick-card small {
  display: block;
  color: var(--text-muted);
  line-height: 1.35;
}

.dokz-storage-reminders-panel {
  margin: 16px 0;
}

.dokz-storage-reminder-list {
  display: grid;
  gap: 10px;
}

.dokz-storage-reminder-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(241, 164, 71, 0.36);
  border-radius: 10px;
  background: rgba(255, 247, 237, 0.82);
}

.dokz-storage-reminder-item.two_days,
.dokz-storage-reminder-item.overdue {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(254, 242, 242, 0.9);
}

.dokz-storage-reminder-item strong {
  color: var(--text-main);
}

.dokz-storage-reminder-item span,
.dokz-storage-reminder-item small {
  color: var(--text-muted);
  line-height: 1.35;
}

.dokz-storage-extra-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.dokz-storage-extra-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dokz-storage-extra-head h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text-main);
}

.dokz-storage-extra-head input[type="month"] {
  min-width: 160px;
}

.dokz-storage-inventory-text {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.dokz-storage-inventory-text span {
  display: block;
  padding: 8px 10px;
  border: 1px dashed rgba(16, 35, 68, 0.14);
  border-radius: 8px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.64);
}

.dokz-row-remove {
  min-width: 42px;
  padding-inline: 0;
}

.dokz-items-editor {
  min-width: 0;
}

.dokz-items-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.dokz-items-editor-footer .actions-row {
  margin: 0;
}

.dokz-items-quantity-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  min-width: 220px;
  color: var(--text-muted);
  font-size: 14px;
}

.dokz-items-quantity-total strong {
  color: var(--text-main);
  font-size: 22px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dokz-items-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dokz-items-quantity-total {
    justify-content: space-between;
    min-width: 0;
  }
}

.dokz-inline-scanner {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr);
  gap: 12px;
  align-items: end;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid rgba(50, 95, 160, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(240, 246, 255, 0.86), rgba(255, 255, 255, 0.92));
}

.dokz-inline-scanner strong,
.dokz-inline-scanner span,
.dokz-inline-scan-status {
  display: block;
}

.dokz-inline-scanner strong {
  color: var(--text-main);
  font-size: 15px;
}

.dokz-inline-scanner span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.dokz-inline-scanner-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.dokz-inline-scanner-controls input {
  min-width: 0;
}

.dokz-inline-scan-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
}

.dokz-inline-scan-status.success {
  color: #16784f;
}

.dokz-inline-scan-status.warning {
  color: #9a5b00;
}

.dokz-inline-scan-status.error {
  color: var(--danger-500);
}

tr.dokz-scan-row-hit {
  animation: dokzScanRowHit 900ms ease;
}

@keyframes dokzScanRowHit {
  0% {
    background: rgba(14, 159, 110, 0.2);
    box-shadow: inset 4px 0 0 rgba(14, 159, 110, 0.7);
  }
  100% {
    background: transparent;
    box-shadow: inset 4px 0 0 rgba(14, 159, 110, 0);
  }
}

.dokz-items-table {
  min-width: 1120px;
}

.dokz-items-table th,
.dokz-items-table td {
  vertical-align: middle;
}

.dokz-items-table input,
.dokz-items-table select {
  min-width: 0;
  max-width: 100%;
}

.dokz-items-table td:nth-child(1),
.dokz-items-table td:nth-child(2) {
  min-width: 150px;
}

.dokz-items-table td:nth-child(2):has(.dokz-order-line-tariff) {
  min-width: 340px;
}

.dokz-order-line-tariff {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(105px, 0.72fr) minmax(105px, 0.72fr);
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(44, 94, 150, 0.16);
  border-radius: 8px;
  background: rgba(235, 244, 255, 0.62);
}

.dokz-order-line-tariff label {
  min-width: 0;
}

.dokz-order-line-tariff label > span {
  display: block;
  margin-bottom: 3px;
  color: #5c6f8f;
  font-size: 11px;
  line-height: 1.2;
}

.dokz-order-line-tariff input,
.dokz-order-line-tariff select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}

.dokz-order-line-tariff-reason {
  grid-column: 1 / -1;
}

.dokz-order-line-tariff [hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .dokz-order-line-tariff {
    grid-template-columns: 1fr;
  }

  .dokz-order-line-tariff-reason {
    grid-column: auto;
  }
}

.dokz-items-table td:nth-last-child(2) {
  min-width: 150px;
}

.dokz-doc-upload-field {
  min-width: 0;
}

.dokz-scoped-doc-upload-form {
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.2fr) auto;
}

.vtb-inline-panel .dokz-scoped-doc-upload-form {
  grid-template-columns: 1fr;
}

.dokz-scoped-doc-upload-form .btn {
  width: 100%;
}

.dokz-filter-strip {
  margin-bottom: 14px;
}

.dokz-journal-panel {
  scroll-margin-top: 16px;
}

.dokz-journal-table-wrap {
  max-height: 64vh;
  overflow: auto;
  border: 1px solid rgba(16, 35, 68, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
}

.dokz-journal-table {
  min-width: 720px;
}

.dokz-journal-table th,
.dokz-journal-table td {
  padding: 10px 9px;
}

.dokz-journal-table tbody tr[data-dokz-receipt-select],
.dokz-journal-table tbody tr[data-dokz-client-select],
.dokz-journal-table tbody tr[data-dokz-order-select],
.dokz-journal-table tbody tr[data-dokz-outbound-select],
.dokz-journal-table tbody tr[data-dokz-movement-select],
.dokz-journal-table tbody tr[data-dokz-return-select] {
  cursor: pointer;
}

.dokz-journal-table tbody tr.active {
  background: rgba(14, 159, 110, 0.1);
  box-shadow: inset 3px 0 0 rgba(14, 159, 110, 0.62);
}

.dokz-receipt-registry-view,
.dokz-receipt-detail-view {
  grid-template-columns: minmax(0, 1fr);
}

.dokz-receipt-registry-view > .vtb-detail-panel,
.dokz-receipt-detail-view > .vtb-list-panel {
  display: none;
}

.dokz-receipt-registry-view .dokz-journal-table-wrap {
  min-height: clamp(420px, 62vh, 760px);
  max-height: calc(100vh - 350px);
}

.dokz-receipt-registry-view .panel-head .actions-row,
.dokz-receipt-detail-view .panel-head .actions-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dokz-receipts-table {
  min-width: 1180px;
}

.dokz-receipts-table tbody tr:hover {
  background: rgba(11, 111, 194, 0.07);
}

.dokz-client-registry-view,
.dokz-client-detail-view {
  grid-template-columns: minmax(0, 1fr);
}

.dokz-client-registry-view > .vtb-detail-panel,
.dokz-client-detail-view > .vtb-list-panel {
  display: none;
}

.dokz-client-registry-view .dokz-journal-table-wrap {
  min-height: clamp(360px, 56vh, 720px);
  max-height: calc(100vh - 430px);
}

.dokz-client-registry-view .panel-head .actions-row,
.dokz-client-detail-view .panel-head .actions-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dokz-clients-table {
  min-width: 1180px;
}

.dokz-clients-table tbody tr:hover {
  background: rgba(11, 111, 194, 0.07);
}

.dokz-order-registry-view,
.dokz-order-detail-view {
  grid-template-columns: minmax(0, 1fr);
}

.dokz-order-registry-view > .vtb-detail-panel,
.dokz-order-detail-view > .vtb-list-panel {
  display: none;
}

.dokz-order-registry-view .dokz-journal-table-wrap {
  min-height: clamp(360px, 56vh, 720px);
  max-height: calc(100vh - 430px);
}

.dokz-order-registry-view .panel-head .actions-row,
.dokz-order-detail-view .panel-head .actions-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dokz-orders-table {
  min-width: 1360px;
}

.dokz-orders-table tbody tr:hover {
  background: rgba(11, 111, 194, 0.07);
}

.dokz-return-registry-view,
.dokz-return-detail-view {
  grid-template-columns: minmax(0, 1fr);
}

.dokz-return-registry-view > .vtb-detail-panel,
.dokz-return-detail-view > .vtb-list-panel {
  display: none;
}

.dokz-return-registry-view .dokz-journal-table-wrap {
  min-height: clamp(360px, 56vh, 720px);
  max-height: calc(100vh - 430px);
}

.dokz-return-registry-view .panel-head .actions-row,
.dokz-return-detail-view .panel-head .actions-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dokz-returns-table {
  min-width: 1560px;
}

.dokz-returns-table tbody tr:hover {
  background: rgba(11, 111, 194, 0.07);
}

.dokz-journal-table td {
  overflow-wrap: anywhere;
}

.dokz-stock-tabs-panel {
  margin-bottom: 14px;
}

.dokz-stock-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
  gap: 10px;
}

.dokz-stock-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(50, 95, 160, 0.16);
  border-radius: 10px;
  background: rgba(240, 246, 255, 0.72);
  color: #24406a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dokz-stock-tab strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.dokz-stock-tab span {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #5a6d8c;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.dokz-stock-tab.active {
  border-color: rgba(14, 159, 110, 0.42);
  background: linear-gradient(135deg, rgba(14, 159, 110, 0.18), rgba(45, 105, 190, 0.13));
  color: #102344;
  box-shadow: inset 0 0 0 1px rgba(14, 159, 110, 0.08);
}

.dokz-stock-tab-workspace {
  display: block;
}

.dokz-stock-tab-hidden {
  display: none !important;
}

.dokz-transfer-workspace {
  min-width: 0;
}

.dokz-transfer-document-grid {
  align-items: start;
}

.dokz-transfer-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.dokz-transfer-route-arrow {
  display: grid;
  width: 42px;
  height: 44px;
  place-items: center;
  color: #5275a2;
  font-size: 1.45rem;
  font-weight: 700;
}

.dokz-transfer-source-summary {
  padding: 12px 14px;
  border: 1px solid rgba(50, 95, 160, 0.18);
  border-radius: 8px;
  background: rgba(240, 246, 255, 0.58);
  color: #4d6481;
  line-height: 1.45;
}

.dokz-transfer-table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.dokz-transfer-table-head .hint {
  margin-top: 3px;
}

.dokz-transfer-select-all-label {
  flex: 0 0 auto;
}

.dokz-transfer-items-wrap {
  max-height: 430px;
}

.dokz-transfer-items-table {
  min-width: 820px;
}

.dokz-transfer-items-table th:first-child,
.dokz-transfer-items-table td:first-child {
  width: 48px;
  text-align: center;
}

.dokz-transfer-quantity-input {
  width: 120px;
}

.dokz-transfer-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(50, 95, 160, 0.14);
}

.dokz-transfer-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: #526985;
}

.dokz-transfer-totals strong {
  color: #172846;
}

.dokz-transfer-document-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.dokz-transfer-document-route > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(50, 95, 160, 0.16);
  border-radius: 8px;
  background: rgba(240, 246, 255, 0.54);
}

.dokz-transfer-document-route > span {
  color: #5275a2;
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
}

.dokz-transfer-document-route div > span,
.dokz-transfer-document-meta span {
  color: #6c7f9b;
  font-size: 0.78rem;
}

.dokz-transfer-document-route strong {
  overflow-wrap: anywhere;
}

.dokz-transfer-document-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dokz-transfer-document-meta > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(50, 95, 160, 0.13);
  border-radius: 8px;
}

.dokz-transfer-document-comment {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(240, 246, 255, 0.58);
  overflow-wrap: anywhere;
}

.dokz-turnover-filter-grid {
  grid-template-columns: minmax(150px, 0.65fr) minmax(150px, 0.65fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(180px, 0.9fr) auto;
  align-items: end;
}

.dokz-turnover-filter-grid .btn {
  min-height: 44px;
}

.dokz-turnover-table {
  min-width: 1180px;
}

.dokz-turnover-details-row td {
  padding: 0 14px 14px;
  background: rgba(240, 246, 255, 0.52);
}

.dokz-turnover-events-wrap {
  border: 1px solid rgba(50, 95, 160, 0.14);
  border-radius: 8px;
  background: #fff;
}

.dokz-turnover-events-table {
  min-width: 980px;
}

.dokz-reconciliation-history,
.dokz-reconciliation-history-detail {
  margin-bottom: 16px;
  overflow: hidden;
}

.dokz-reconciliation-history-counters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dokz-reconciliation-history-counters span {
  padding: 7px 10px;
  border: 1px solid rgba(50, 95, 160, 0.14);
  border-radius: 8px;
  color: var(--text-muted);
  background: rgba(248, 251, 255, 0.86);
  font-size: 12px;
}

.dokz-reconciliation-history-counters strong {
  margin-left: 4px;
  color: var(--text-main);
}

.dokz-reconciliation-history-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.45fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.dokz-reconciliation-history-table-wrap {
  max-height: 380px;
  overflow: auto;
  border: 1px solid rgba(16, 35, 68, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.dokz-reconciliation-history-table {
  min-width: 1120px;
}

.dokz-reconciliation-history-table tr.active {
  background: rgba(224, 244, 237, 0.72);
}

.dokz-reconciliation-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.dokz-reconciliation-history-meta strong {
  color: var(--text-main);
}

.dokz-reconciliation-history-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.dokz-reconciliation-history-metrics article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(50, 95, 160, 0.14);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.86);
}

.dokz-reconciliation-history-metrics span,
.dokz-reconciliation-history-metrics strong {
  display: block;
}

.dokz-reconciliation-history-metrics span {
  color: var(--text-muted);
  font-size: 12px;
}

.dokz-reconciliation-history-metrics strong {
  margin-top: 6px;
  color: var(--text-main);
  font-size: 20px;
  line-height: 1.1;
}

.dokz-reconciliation-related-links {
  margin: 12px 0;
}

.dokz-reconciliation-related-links > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
}

.dokz-reconciliation-history-detail-table-wrap {
  max-height: 58vh;
  overflow: auto;
  border: 1px solid rgba(16, 35, 68, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.dokz-reconciliation-history-detail-table {
  min-width: 1240px;
}

.dokz-reconciliation-history-detail-table tr.has-diff {
  background: rgba(255, 248, 235, 0.72);
}

.dokz-reconciliation-history-detail-table tr.is-ok {
  background: rgba(236, 253, 245, 0.42);
}

.dokz-reconciliation-history-detail-table td:first-child strong,
.dokz-reconciliation-history-detail-table td:first-child small {
  display: block;
}

.dokz-reconciliation-history-detail-table td:first-child small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.dokz-reconciliation-panel {
  overflow: hidden;
}

.dokz-reconciliation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.dokz-reconciliation-metrics article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(50, 95, 160, 0.14);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.86);
}

.dokz-reconciliation-metrics span,
.dokz-reconciliation-metrics strong {
  display: block;
}

.dokz-reconciliation-metrics span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
}

.dokz-reconciliation-metrics strong {
  margin-top: 6px;
  color: var(--text-main);
  font-size: 22px;
  line-height: 1.05;
}

.dokz-reconciliation-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(180px, 0.75fr) minmax(200px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0 6px;
}

.dokz-reconciliation-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid rgba(16, 35, 68, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.dokz-reconciliation-table {
  min-width: 1360px;
}

.dokz-reconciliation-table td {
  vertical-align: middle;
}

.dokz-reconciliation-table td:first-child strong,
.dokz-reconciliation-table td:first-child small {
  display: block;
}

.dokz-reconciliation-table td:first-child small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.dokz-reconciliation-table input,
.dokz-reconciliation-table select {
  min-width: 0;
  max-width: 100%;
}

.dokz-reconciliation-place-list {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.dokz-reconciliation-place {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid rgba(50, 95, 160, 0.15);
  border-radius: 7px;
  background: rgba(238, 246, 255, 0.76);
}

.dokz-reconciliation-place strong,
.dokz-reconciliation-place small {
  display: block;
  line-height: 1.2;
}

.dokz-reconciliation-place strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-main);
  font-size: 12px;
}

.dokz-reconciliation-place small {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.dokz-reconciliation-place.is-unplaced {
  border-color: rgba(196, 55, 68, 0.25);
  background: rgba(255, 237, 239, 0.84);
}

.dokz-reconciliation-place.is-unplaced strong,
.dokz-reconciliation-place-empty {
  color: var(--danger-500);
}

.dokz-reconciliation-place-empty {
  font-size: 12px;
}

.dokz-reconciliation-count-input {
  width: 110px;
}

.dokz-reconciliation-row.has-diff {
  background: rgba(255, 248, 235, 0.72);
}

.dokz-reconciliation-row.is-ok {
  background: rgba(236, 253, 245, 0.42);
}

.number-cell {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.number-cell.positive {
  color: #16784f;
}

.number-cell.negative {
  color: var(--danger-500);
}

.dokz-reconciliation-unknown {
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 10px;
  background: rgba(255, 241, 242, 0.7);
}

.dokz-reconciliation-unknown h4 {
  margin: 0 0 8px;
  color: var(--text-main);
}

.dokz-reconciliation-unknown-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dokz-reconciliation-unknown-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(220, 38, 38, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.dokz-reconciliation-unknown-item strong {
  max-width: 220px;
  overflow-wrap: anywhere;
}

.dokz-reconciliation-actions {
  margin-top: 12px;
}

.dokz-sku-workspace {
  display: grid;
  grid-template-columns: minmax(520px, 1.18fr) minmax(440px, 0.82fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.dokz-sku-table-panel,
.dokz-sku-card-panel {
  min-width: 0;
}

.dokz-sku-registry-view,
.dokz-sku-detail-view {
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}

.dokz-sku-registry-view > .dokz-sku-card-panel,
.dokz-sku-detail-view > .dokz-sku-table-panel {
  display: none;
}

.dokz-sku-registry-view .dokz-sku-table-wrap {
  min-height: clamp(420px, 62vh, 760px);
  max-height: calc(100vh - 390px);
}

.dokz-sku-registry-view .panel-head .actions-row,
.dokz-sku-detail-view .panel-head .actions-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dokz-stock-balance-filter-grid {
  grid-template-columns: minmax(260px, 1.2fr) repeat(2, minmax(190px, 0.8fr));
}

.dokz-sku-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.dokz-sku-summary-grid .dokz-mini-card {
  border-radius: 10px;
  padding: 10px 12px;
}

.dokz-sku-summary-grid .dokz-mini-card strong {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dokz-sku-summary-grid .dokz-mini-card span {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

.dokz-sku-data-alerts {
  margin: -4px 0 14px;
}

.dokz-sku-bulk-label-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 150px auto 150px auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.72);
}

.dokz-sku-bulk-label-summary {
  align-self: center;
  min-width: 0;
}

.dokz-sku-bulk-label-summary strong,
.dokz-sku-bulk-label-summary span {
  display: block;
}

.dokz-sku-bulk-label-summary span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.dokz-sku-bulk-quick-quantities {
  display: flex;
  gap: 6px;
}

.dokz-sku-bulk-quick-quantities .btn {
  min-width: 46px;
  padding-inline: 10px;
}

.dokz-sku-bulk-label-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.dokz-sku-table-wrap {
  max-height: 68vh;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.dokz-sku-table {
  min-width: 1100px;
  table-layout: fixed;
}

.dokz-sku-table th,
.dokz-sku-table td {
  padding: 10px 8px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.dokz-sku-table th:nth-child(1),
.dokz-sku-table td:nth-child(1) {
  width: 42px;
  text-align: center;
}

.dokz-sku-table th:nth-child(2),
.dokz-sku-table td:nth-child(2) {
  width: 180px;
}

.dokz-sku-table th:nth-child(3),
.dokz-sku-table td:nth-child(3) {
  width: 112px;
}

.dokz-sku-product-cell {
  min-width: 220px;
}

.dokz-sku-table th:nth-child(5),
.dokz-sku-table td:nth-child(5),
.dokz-sku-table th:nth-child(6),
.dokz-sku-table td:nth-child(6),
.dokz-sku-table th:nth-child(7),
.dokz-sku-table td:nth-child(7) {
  width: 86px;
}

.dokz-sku-table th:nth-child(8),
.dokz-sku-table td:nth-child(8) {
  width: 84px;
}

.dokz-sku-table th:nth-child(9),
.dokz-sku-table td:nth-child(9) {
  width: 116px;
}

.dokz-sku-label-row-quantity {
  width: 68px;
  min-width: 0;
  padding: 7px 6px;
  text-align: center;
}

.dokz-sku-table tbody tr.dokz-sku-label-selected {
  background: rgba(37, 99, 235, 0.06);
}

.dokz-sku-table tbody tr[data-dokz-sku-select] {
  cursor: pointer;
}

.dokz-sku-table tbody tr.active {
  background: rgba(14, 159, 110, 0.1);
  box-shadow: inset 3px 0 0 rgba(14, 159, 110, 0.62);
}

.dokz-sku-code {
  color: var(--text-main);
}

.dokz-sku-card-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 14px;
}

.dokz-sku-card-tabs .dokz-stock-tab {
  min-height: 42px;
}

.dokz-sku-card-tabs .dokz-stock-tab:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dokz-sku-form-hidden,
.dokz-sku-field-hidden {
  display: none !important;
}

.dokz-sku-product-cell {
  min-width: 0;
}

.dokz-sku-product-cell,
.dokz-sku-code {
  overflow-wrap: anywhere;
}

.dokz-short-list {
  max-height: 320px;
  overflow: auto;
  margin-bottom: 16px;
}

.dokz-fulfillment-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dokz-weight-tariffs {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(16, 35, 68, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.dokz-weight-tariffs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dokz-weight-tariffs-head strong,
.dokz-weight-tariffs-head small {
  display: block;
}

.dokz-weight-tariffs-head small {
  margin-top: 3px;
  color: var(--text-muted);
  line-height: 1.35;
}

.dokz-weight-tariff-header,
.dokz-weight-tariff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr)) 42px;
  gap: 8px;
  align-items: center;
}

.dokz-weight-tariff-header {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dokz-weight-tariff-rows {
  display: grid;
  gap: 8px;
}

.dokz-weight-tariff-row select,
.dokz-weight-tariff-row input {
  width: 100%;
}

.vtb-inline-form {
  border-top: 1px solid rgba(16, 35, 68, 0.08);
  padding-top: 16px;
}

.checkbox-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.checkbox-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-main);
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.hint-row {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.employees-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: start;
}

.employees-list-panel,
.employees-editor-panel,
.employees-payments-card {
  min-width: 0;
}

.employees-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.employees-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 880px;
  overflow: auto;
  padding-right: 4px;
}

.employee-list-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.employee-list-item:hover {
  border-color: rgba(33, 94, 176, 0.34);
  box-shadow: 0 12px 28px rgba(41, 87, 152, 0.12);
  transform: translateY(-1px);
}

.employee-list-item.active {
  border-color: rgba(27, 132, 110, 0.34);
  background:
    linear-gradient(135deg, rgba(30, 193, 133, 0.08), rgba(11, 111, 194, 0.04)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(27, 132, 110, 0.14);
}

.employee-list-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.employee-list-head strong {
  font-size: 18px;
  color: var(--text-main);
}

.employee-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.employee-list-money {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.employee-list-money span {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.employee-list-money small {
  color: var(--text-muted);
  font-size: 12px;
}

.employees-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-checkbox {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}

.field-checkbox > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-main);
  font-weight: 700;
}

.checkbox-chip input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.employees-metrics-grid {
  margin-top: 18px;
}

.employee-exact-rate,
.employee-exact-rate-cell {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.employee-exact-rate {
  font-size: 28px;
}

.employees-payments-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(16, 35, 68, 0.08);
  background: rgba(246, 250, 255, 0.74);
}

.employee-payout-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.employee-payout-date-input {
  min-height: 38px;
  min-width: 168px;
}

.btn-inline {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.employee-week-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(16, 35, 68, 0.08);
}

.employee-week-line:last-child {
  border-bottom: 0;
}

.employee-week-line span {
  color: var(--text-main);
}

.employee-week-line strong {
  color: var(--accent);
  white-space: nowrap;
}

.employees-actions-row {
  margin-top: 18px;
}

.dokz-bot-access-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(16, 35, 68, 0.1);
  border-bottom: 1px solid rgba(16, 35, 68, 0.1);
}

.dokz-bot-access-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dokz-bot-access-copy small,
.dokz-bot-code-result small {
  color: var(--text-muted);
  line-height: 1.4;
}

.dokz-bot-access-actions {
  justify-content: flex-end;
}

.dokz-bot-code-result {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.dokz-bot-code-result[hidden],
.dokz-bot-access-actions [hidden] {
  display: none !important;
}

.dokz-bot-code-result small {
  grid-column: 1 / -1;
}

.dokz-registry-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 35, 68, 0.1);
  flex-wrap: wrap;
}

.dokz-registry-pagination-summary,
.dokz-registry-pagination-actions,
.dokz-registry-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dokz-registry-pagination-summary,
.dokz-registry-page-size,
.dokz-registry-loading {
  color: var(--text-muted);
  font-size: 13px;
}

.dokz-registry-page-size select {
  width: auto;
  min-width: 72px;
  min-height: 36px;
  padding: 6px 28px 6px 10px;
}

.dokz-registry-pagination-actions .btn {
  width: 40px;
  min-width: 40px;
  min-height: 36px;
  padding-right: 0;
  padding-left: 0;
}

.dokz-registry-page-number {
  min-width: 78px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.dokz-journal-quick-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dokz-journal-quick-filters select {
  width: auto;
  min-width: 190px;
  min-height: 36px;
  padding: 6px 34px 6px 10px;
}

.dokz-document-journal-view {
  min-height: 420px;
}

.dokz-document-journal-table {
  min-width: 1040px;
}

.dokz-document-journal-table th:last-child,
.dokz-document-journal-table td:last-child {
  width: 96px;
  text-align: right;
}

.dokz-document-card {
  min-width: 0;
}

.dokz-adjustment-lines {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}

.dokz-adjustment-line {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(280px, 1.7fr) minmax(100px, 0.55fr) minmax(170px, 0.9fr) minmax(180px, 1fr) 42px;
  align-items: end;
  gap: 10px;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(16, 35, 68, 0.1);
}

.dokz-adjustment-line:first-child {
  border-top: 0;
}

.dokz-adjustment-line .field,
.dokz-adjustment-line input,
.dokz-adjustment-line select {
  min-width: 0;
}

.dokz-adjustment-line .btn-icon {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

.dokz-writeoff-stock {
  display: block;
  margin-top: 5px;
  font-weight: 700;
}

.dokz-writeoff-stock.has-stock {
  color: var(--brand-700);
}

.dokz-writeoff-stock.no-stock {
  color: var(--danger-600);
}

.dokz-document-actions {
  margin-top: 14px;
}

.dokz-workplace-shell {
  min-height: 620px;
}

.dokz-workplace-message {
  max-width: 520px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.dokz-workplace-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.dokz-finance-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.dokz-finance-tab {
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(31, 94, 168, 0.18);
  border-radius: 8px;
  background: rgba(232, 241, 252, 0.72);
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dokz-finance-tab.active {
  border-color: rgba(24, 146, 103, 0.42);
  background: rgba(220, 242, 233, 0.9);
  color: #176b4f;
}

.dokz-invoice-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.5fr) minmax(160px, 0.35fr);
  gap: 14px;
  align-items: end;
}

.dokz-invoice-currency-total { display: block; margin-top: 3px; font-size: 0.55em; color: var(--text-muted); }

.dokz-invoice-purpose-field,
.dokz-invoice-customer-preview {
  grid-column: 1 / -1;
}

.dokz-invoice-customer-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(31, 94, 168, 0.16);
  border-radius: 8px;
  background: rgba(244, 248, 253, 0.78);
  color: var(--text-muted);
}

.dokz-invoice-customer-preview strong {
  color: var(--text-main);
}

.dokz-invoice-customer-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dokz-invoice-warning {
  grid-column: 1 / -1;
  color: #9a5b08;
  font-weight: 700;
}

.dokz-invoice-vat-value {
  font-size: 28px;
  line-height: 1.1;
}

.dokz-invoice-purpose-cell {
  min-width: 240px;
  max-width: 440px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dokz-workplace-tab {
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(31, 94, 168, 0.18);
  border-radius: 8px;
  background: rgba(232, 241, 252, 0.72);
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dokz-workplace-tab.active {
  border-color: rgba(24, 146, 103, 0.42);
  background: rgba(220, 242, 233, 0.9);
  color: #176b4f;
}

.dokz-workplace-command {
  min-width: 0;
  padding-top: 4px;
}

.dokz-workplace-context {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(150px, 220px);
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.dokz-workplace-progress {
  display: grid;
  gap: 4px;
  min-height: 48px;
  align-content: center;
  padding: 6px 0 6px 16px;
  border-left: 3px solid rgba(24, 146, 103, 0.42);
}

.dokz-workplace-progress span,
.dokz-workplace-product .hint-row {
  color: var(--text-muted);
  font-size: 12px;
}

.dokz-workplace-progress strong {
  color: var(--text-main);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.dokz-workplace-scan-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.dokz-workplace-scan-form input {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 12px 16px;
  border: 2px solid rgba(31, 94, 168, 0.25);
  font-size: 20px;
  font-weight: 650;
}

.dokz-workplace-scan-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 94, 168, 0.1);
}

.dokz-workplace-scan-form .btn {
  min-width: 150px;
  min-height: 60px;
}

.dokz-workplace-table-wrap {
  max-height: min(52vh, 560px);
}

.dokz-workplace-table {
  min-width: 760px;
}

.dokz-workplace-row-complete td {
  background: rgba(220, 242, 233, 0.55);
}

.dokz-workplace-row-warning td {
  background: rgba(255, 241, 214, 0.62);
}

.dokz-workplace-product {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(260px, 1.6fr) minmax(120px, 0.6fr);
  gap: 14px;
  margin: 10px 0 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(16, 35, 68, 0.1);
  border-bottom: 1px solid rgba(16, 35, 68, 0.1);
}

.dokz-workplace-product > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dokz-workplace-product strong {
  overflow-wrap: anywhere;
}

.dokz-workplace-locations {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 94, 168, 0.14);
  background: rgba(235, 244, 255, 0.52);
  border-radius: 8px;
}

.dokz-workplace-locations-warning {
  color: var(--danger);
  border-color: rgba(202, 52, 70, 0.2);
  background: rgba(255, 238, 241, 0.62);
}

.dokz-workplace-movement-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(110px, 0.55fr) auto;
  align-items: end;
  gap: 12px;
}

.dokz-workplace-inventory-head {
  margin-top: 8px;
}

.dokz-settlements-panel {
  min-width: 0;
}

.dokz-settlement-totals {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.dokz-settlement-totals span {
  display: grid;
  gap: 2px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}

.dokz-settlement-totals strong {
  color: var(--text-main);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.dokz-settlements-table {
  min-width: 1120px;
}

.dokz-settlement-detail-row > td {
  padding: 0 14px 18px;
  background: rgba(244, 248, 253, 0.72);
}

.dokz-settlement-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
  gap: 18px;
  padding-top: 14px;
}

.dokz-settlement-charge-table {
  min-width: 760px;
}

.dokz-settlement-defer-form,
.dokz-settlement-deferral-note {
  display: grid;
  gap: 10px;
  padding-left: 16px;
  border-left: 3px solid rgba(31, 94, 168, 0.2);
}

.dokz-settlement-defer-form h4,
.dokz-settlement-deferral-note p {
  margin: 0;
}

.dokz-settlement-deferral-note span,
.dokz-muted-line {
  color: var(--text-muted);
  font-size: 12px;
}

.dokz-muted-line {
  display: block;
  margin-top: 3px;
}

.dokz-control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dokz-control-head h3,
.dokz-control-detail h3 {
  margin: 0 0 4px;
}

.dokz-control-head > div:first-child {
  min-width: 0;
  max-width: 860px;
}

.dokz-control-head > .actions-row {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.dokz-control-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dokz-control-metrics .metric-card {
  min-width: 0;
}

.dokz-control-metrics .metric-value {
  font-size: clamp(26px, 2.4vw, 38px);
}

.dokz-control-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dokz-control-filters {
  display: grid;
  grid-template-columns:
    minmax(150px, 0.55fr)
    minmax(180px, 0.65fr)
    minmax(260px, 1.6fr)
    auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.dokz-control-filters .btn {
  min-height: 44px;
}

.dokz-control-table-wrap {
  max-height: min(62vh, 760px);
}

.dokz-control-table {
  min-width: 1180px;
}

.dokz-control-history-table {
  min-width: 1080px;
}

.dokz-control-table th {
  white-space: nowrap;
}

.dokz-control-table td {
  vertical-align: top;
}

.dokz-control-task {
  min-width: 330px;
  max-width: 520px;
}

.dokz-control-task-button {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  gap: 5px;
  text-align: left;
  cursor: pointer;
}

.dokz-control-task-button strong {
  line-height: 1.3;
}

.dokz-control-task-button span {
  color: var(--text-muted);
  line-height: 1.4;
}

.dokz-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.dokz-control-detail {
  display: grid;
  gap: 14px;
}

.dokz-control-quick-fix {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(16, 35, 68, 0.1);
  border-bottom: 1px solid rgba(16, 35, 68, 0.1);
}

.dokz-control-quick-fix h4 {
  margin: 0 0 4px;
}

.dokz-control-quick-place-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.5fr) auto;
  gap: 12px;
  align-items: end;
}

.dokz-control-quick-place-form .btn {
  min-height: 44px;
  white-space: nowrap;
}

.dokz-control-quick-empty {
  padding: 14px;
}

.dokz-control-detail-form {
  display: grid;
  grid-template-columns:
    minmax(170px, 0.55fr)
    minmax(220px, 0.75fr)
    minmax(0, 1.7fr);
  gap: 12px;
  align-items: start;
}

.dokz-control-detail-actions {
  grid-column: 1 / -1;
}

.dokz-control-error {
  margin-bottom: 14px;
  border-color: rgba(199, 54, 78, 0.25);
  background: rgba(255, 238, 241, 0.72);
  color: #9c3344;
}

@media (max-width: 1280px) {
  .vtb-list-detail,
  .dokz-sku-workspace,
  .vtb-overview-grid,
  .vtb-launch-readiness-grid,
  .vtb-detail-extras,
  .vtb-documents-grid,
  .dokz-stock-movement-grid {
    grid-template-columns: 1fr;
  }

  .employees-layout {
    grid-template-columns: 1fr;
  }

  .dokz-status-lane,
  .dokz-mini-grid,
  .dokz-sku-summary-grid,
  .dokz-reconciliation-metrics,
  .dokz-reconciliation-history-metrics,
  .dokz-weight-tariff-header,
  .dokz-weight-tariff-row,
  .dokz-report-head,
  .dokz-report-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dokz-stock-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dokz-turnover-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dokz-reconciliation-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dokz-transfer-document-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vtb-upload-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dokz-adjustment-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dokz-adjustment-sku,
  .dokz-adjustment-comment {
    grid-column: span 2;
  }

  .dokz-adjustment-line .btn-icon {
    justify-self: end;
  }

  .dokz-settlement-detail-grid {
    grid-template-columns: 1fr;
  }

  .dokz-sku-bulk-label-toolbar {
    grid-template-columns: minmax(180px, 1fr) 140px auto;
  }

  .dokz-sku-bulk-template-field,
  .dokz-sku-bulk-label-actions {
    grid-column: auto;
  }

  .dokz-settlement-defer-form,
  .dokz-settlement-deferral-note {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid rgba(16, 35, 68, 0.1);
    border-left: 0;
  }

  .dokz-control-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dokz-control-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dokz-control-quick-place-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dokz-control-quick-place-form .btn {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .dokz-registry-pagination {
    align-items: flex-start;
  }

  .dokz-registry-pagination-summary,
  .dokz-registry-pagination-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dokz-bot-access-panel,
  .dokz-bot-code-result {
    grid-template-columns: 1fr;
  }

  .dokz-bot-access-actions {
    justify-content: flex-start;
  }

  .dokz-workplace-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dokz-invoice-form-grid,
  .dokz-invoice-customer-preview {
    grid-template-columns: 1fr;
  }

  .dokz-invoice-customer-preview > * {
    grid-column: auto;
  }

  .dokz-workplace-context,
  .dokz-workplace-product,
  .dokz-workplace-movement-form {
    grid-template-columns: 1fr;
  }

  .dokz-workplace-progress {
    padding-left: 0;
    border-top: 3px solid rgba(24, 146, 103, 0.42);
    border-left: 0;
  }

  .dokz-workplace-message,
  .dokz-settlement-totals span {
    text-align: left;
  }

  .dokz-settlement-totals {
    justify-content: flex-start;
  }

  .dokz-adjustment-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dokz-sku-bulk-label-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dokz-sku-bulk-label-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dokz-adjustment-sku,
  .dokz-adjustment-comment {
    grid-column: 1 / -1;
  }

  .vtb-filter-grid,
  .dokz-stock-balance-filter-grid,
  .dokz-turnover-filter-grid,
  .vtb-detail-grid,
  .vtb-upload-form {
    grid-template-columns: 1fr;
  }

  .employees-filter-grid,
  .employees-form-grid {
    grid-template-columns: 1fr;
  }

  .dokz-status-lane,
  .dokz-mini-grid,
  .vtb-inline-panel .dokz-mini-grid,
  .dokz-inline-scanner,
  .dokz-inline-scanner-controls,
  .dokz-reconciliation-metrics,
  .dokz-reconciliation-history-metrics,
  .dokz-reconciliation-history-filters,
  .dokz-reconciliation-toolbar,
  .dokz-weight-tariff-header,
  .dokz-weight-tariff-row,
  .dokz-report-head,
  .dokz-report-totals {
    grid-template-columns: 1fr;
  }

  .dokz-stock-tabs {
    grid-template-columns: 1fr;
  }

  .dokz-transfer-route,
  .dokz-transfer-document-route {
    grid-template-columns: 1fr;
  }

  .dokz-transfer-route-arrow,
  .dokz-transfer-document-route > span {
    width: auto;
    height: auto;
    transform: rotate(90deg);
  }

  .dokz-transfer-table-head,
  .dokz-transfer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dokz-transfer-footer .actions-row,
  .dokz-transfer-footer .btn {
    width: 100%;
  }

  .vtb-record-item-head,
  .vtb-activity-meta,
  .employee-list-head {
    flex-direction: column;
  }

  .dokz-control-head {
    flex-direction: column;
  }

  .dokz-control-head > .actions-row {
    width: 100%;
    justify-content: flex-start;
  }

  .dokz-control-detail-form {
    grid-template-columns: 1fr;
  }

  .dokz-control-detail-actions {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .dokz-transfer-document-meta {
    grid-template-columns: 1fr;
  }

  .dokz-finance-tabs,
  .dokz-workplace-tabs,
  .dokz-adjustment-line,
  .dokz-workplace-scan-form {
    grid-template-columns: 1fr;
  }

  .dokz-workplace-scan-form .btn {
    width: 100%;
    min-width: 0;
  }

  .dokz-adjustment-sku,
  .dokz-adjustment-comment {
    grid-column: auto;
  }

  .dokz-adjustment-line .btn-icon {
    justify-self: start;
  }

  .dokz-control-metrics,
  .dokz-control-filters {
    grid-template-columns: 1fr;
  }

  .dokz-control-tabs,
  .dokz-control-head > .actions-row {
    align-items: stretch;
    flex-direction: column;
  }

  .dokz-control-tabs .btn,
  .dokz-control-head .btn,
  .dokz-control-filters .btn {
    width: 100%;
  }
}
/* Client portal */
.client-portal-shell {
  min-height: 100vh;
  padding: 28px;
  background: linear-gradient(135deg, #edf5ff 0%, #f8fbff 48%, #fffaf1 100%);
}

.client-portal-card {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 22px 55px rgba(30, 64, 175, 0.12);
}

.client-portal-head h1 { margin: 0 0 6px; font-size: clamp(28px, 3vw, 40px); }

.client-workspace-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  width: min(520px, 100%);
  margin-top: 24px;
  padding: 6px;
  border: 1px solid #dce6f1;
  border-radius: 18px;
  background: #eef3f8;
}

.client-workspace-switch button {
  display: grid;
  gap: 2px;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  color: #526780;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.client-workspace-switch span { font-size: 16px; font-weight: 850; letter-spacing: 0.04em; }
.client-workspace-switch small { color: #8a9aaf; font-size: 12px; font-weight: 650; }
.client-workspace-switch button.active { color: #fff; background: linear-gradient(135deg, #119867, #087f5b); box-shadow: 0 8px 20px rgba(8, 127, 91, 0.2); }
.client-workspace-switch button.active small { color: rgba(255, 255, 255, 0.78); }

.client-test-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  min-height: 300px;
  margin-top: 22px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid #d9e5f1;
  border-radius: 24px;
  background: radial-gradient(circle at 88% 14%, rgba(16, 185, 129, 0.18), transparent 30%), linear-gradient(135deg, #f7fbff, #eef8f4);
}

.client-test-workspace::after { content: ""; position: absolute; width: 230px; height: 230px; right: -70px; bottom: -110px; border-radius: 50%; background: rgba(37, 99, 235, 0.08); }
.client-test-badge { position: absolute; top: 22px; right: 22px; padding: 7px 11px; border-radius: 999px; color: #087f5b; background: #dff7ed; font-size: 12px; font-weight: 800; }
.client-test-copy { position: relative; z-index: 1; max-width: 650px; }
.client-test-kicker { color: #087f5b; font-size: 12px; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.client-test-copy h2 { margin: 12px 0 10px; color: #10213e; font-size: clamp(42px, 7vw, 72px); line-height: 0.95; }
.client-test-copy p { max-width: 590px; margin: 0; color: #60748c; font-size: 17px; line-height: 1.55; }
.client-test-status { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; min-width: 235px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.9); border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 0 12px 30px rgba(15,23,42,.08); backdrop-filter: blur(8px); }
.client-test-status > span { width: 11px; height: 11px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 5px rgba(16,185,129,.12); }
.client-test-status div { display: grid; gap: 2px; }
.client-test-status strong { color: #183153; }
.client-test-status small { color: #8a9aaf; }

.client-test-orders-workspace { margin-top: 22px; }
.client-test-section-switch { display: inline-flex; gap: 6px; margin-top: 22px; padding: 5px; border-radius: 14px; background: #eef3f8; }
.client-test-section-switch button { padding: 11px 18px; border: 0; border-radius: 10px; color: #526780; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.client-test-section-switch button.active { color: #fff; background: linear-gradient(135deg, #119867, #087f5b); box-shadow: 0 7px 16px rgba(8,127,91,.2); }
.client-test-repricing-workspace { margin-top: 14px; }
.client-repricing-head { align-items: center; background: radial-gradient(circle at 90% 0%, rgba(99,102,241,.14), transparent 35%), linear-gradient(135deg, #f8fbff, #f7f5ff); }
.client-repricing-mode { display: inline-flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #c7d2fe; border-radius: 999px; color: #4338ca; background: #eef2ff; font-size: 12px; font-weight: 850; white-space: nowrap; }
.client-repricing-mode i { width: 9px; height: 9px; border-radius: 50%; background: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.client-repricing-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.client-repricing-kpis article { display: grid; gap: 5px; min-height: 112px; padding: 18px; border: 1px solid #e0e8f0; border-radius: 17px; background: #fff; }
.client-repricing-kpis span { color: #60748c; font-size: 13px; font-weight: 750; }
.client-repricing-kpis strong { color: #10213e; font-size: 31px; }
.client-repricing-kpis small { color: #94a3b8; }
.client-repricing-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(380px, 1.2fr); gap: 14px; }
.client-repricing-card { display: grid; align-content: start; gap: 18px; padding: 22px; border: 1px solid #dce6f0; border-radius: 19px; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.05); }
.client-repricing-card h3 { margin: 0 0 5px; color: #183153; font-size: 20px; }
.client-repricing-card p { margin: 0; color: #71829a; line-height: 1.5; }
.client-repricing-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.client-repricing-fields label { display: grid; gap: 6px; color: #60748c; font-size: 12px; font-weight: 800; }
.client-repricing-fields input, .client-repricing-fields select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #d8e3ed; border-radius: 11px; background: #f8fafc; font: inherit; }
.client-repricing-check { display: flex; align-items: center; gap: 9px; color: #526780; font-size: 13px; font-weight: 700; }
.client-repricing-check input { width: 17px; height: 17px; }
.client-repricing-empty { display: grid; min-height: 180px; place-items: center; padding: 24px; border: 1px dashed #cbd8e5; border-radius: 15px; color: #71829a; background: #f8fafc; text-align: center; line-height: 1.55; }
.client-repricing-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(160px, 220px); gap: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid #dce6f0; border-radius: 16px; background: #f7fafc; }
.client-repricing-toolbar label { display: grid; gap: 6px; color: #60748c; font-size: 12px; font-weight: 800; }
.client-repricing-toolbar input, .client-repricing-toolbar select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #d5e0eb; border-radius: 11px; color: #183153; background: #fff; font: inherit; }
.client-repricing-catalog { display: grid; gap: 14px; }
.client-repricing-product-card { overflow: hidden; border: 1px solid #dce6f0; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.045); }
.client-repricing-product-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.client-repricing-product-card h3 { margin: 0 0 5px; color: #183153; font-size: 17px; }
.client-repricing-product-card p { margin: 0; color: #71829a; font-size: 12px; }
.client-repricing-stock { flex: 0 0 auto; padding: 8px 11px; border-radius: 10px; color: #087a55; background: #eaf8f2; font-size: 12px; }
.client-repricing-stock.is-pending { color: #8a6112; background: #fff6d8; }
.client-repricing-city-row { display: grid; grid-template-columns: 1.05fr .75fr repeat(3, 1fr) 1fr .65fr; gap: 8px; margin: 0 14px; padding: 15px; border-radius: 14px; background: #f7f9fc; }
.client-repricing-city-row > div { display: grid; align-content: start; gap: 6px; min-width: 0; }
.client-repricing-city-row span { color: #8191a6; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.client-repricing-city-row strong { overflow-wrap: anywhere; color: #294563; font-size: 13px; }
.client-repricing-product-card > footer { display: flex; align-items: center; gap: 18px; padding: 14px 20px 17px; color: #60748c; font-size: 12px; font-weight: 700; }
.client-repricing-product-card > footer label { display: inline-flex; align-items: center; gap: 6px; }
.client-repricing-awaiting { margin-right: auto; padding: 6px 9px; border-radius: 8px; color: #9a6700; background: #fff6d8; }
.client-test-module-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 25px 26px; border: 1px solid #dce7f1; border-radius: 22px; background: radial-gradient(circle at 92% 0%, rgba(16,185,129,.15), transparent 34%), linear-gradient(135deg, #f8fbff, #f1faf6); }
.client-test-module-head h2 { margin: 7px 0 5px; color: #10213e; font-size: 34px; }
.client-test-module-head p { margin: 0; color: #71829a; }
.client-test-filters { display: flex; align-items: end; gap: 10px; }
.client-test-filters label { display: grid; gap: 6px; color: #60748c; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.client-test-filters input, .client-test-filters select { min-width: 175px; min-height: 44px; padding: 9px 12px; border: 1px solid #d8e3ed; border-radius: 12px; color: #183153; background: #fff; font: inherit; font-weight: 700; }
.client-test-state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin: 14px 0; }
.client-test-state-grid button { display: grid; gap: 6px; min-height: 86px; padding: 15px 17px; border: 1px solid #e0e8f0; border-radius: 16px; background: #fff; text-align: left; font: inherit; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease; }
.client-test-state-grid button:hover { border-color: #b8dfd0; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 33, 62, .07); }
.client-test-state-grid button.active { border-color: #73c6a7; background: #eaf8f2; box-shadow: inset 0 0 0 1px rgba(16, 153, 105, .12); }
.client-test-state-grid span { color: #71829a; font-size: 12px; font-weight: 750; }
.client-test-state-grid strong { color: #10213e; font-size: 28px; }
.client-test-city-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.client-test-city-switch { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; margin: 0 0 14px; padding: 5px; overflow-x: auto; border-radius: 14px; background: #eef3f8; }
.client-test-city-switch button { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-radius: 10px; color: #526780; background: transparent; font: inherit; font-weight: 800; white-space: nowrap; cursor: pointer; }
.client-test-city-switch button strong { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 999px; color: #60748c; background: #fff; font-size: 12px; }
.client-test-city-switch button.active { color: #fff; background: linear-gradient(135deg, #119867, #087f5b); box-shadow: 0 7px 16px rgba(8,127,91,.2); }
.client-test-city-switch button.active strong { color: #087f5b; }
.client-test-city-card { min-width: 0; overflow: hidden; border: 1px solid #dce6f0; border-radius: 19px; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.05); }
.client-test-city-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 19px; border-bottom: 1px solid #e7edf4; background: #f8fafc; }
.client-test-city-head span { color: #8191a5; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.client-test-city-head h3 { margin: 3px 0 0; color: #183153; font-size: 22px; }
.client-test-city-head > strong { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border-radius: 13px; color: #087f5b; background: #e4f7ef; font-size: 20px; }
.client-test-city-card table { min-width: 820px; }
.client-test-kind-filter { display: grid; gap: 5px; min-width: 145px; }
.client-test-kind-filter > span { color: inherit; font: inherit; }
.client-test-kind-filter select { width: 100%; min-height: 32px; padding: 5px 26px 5px 8px; border: 1px solid #ccd9e7; border-radius: 9px; background: #fff; color: #294563; font: inherit; font-size: 12px; font-weight: 750; text-transform: none; }
.client-test-city-card th, .client-test-city-card td { padding: 11px 12px; font-size: 12px; vertical-align: top; }
.client-test-address { display: block; margin-top: 4px; color: #8998aa; line-height: 1.35; }
.client-test-order-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #1d4ed8; background: #dbeafe; font-size: 11px; font-weight: 800; white-space: nowrap; }
.client-test-order-state { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: #6d28d9; background: #ede9fe; font-size: 11px; font-weight: 850; white-space: nowrap; }
.client-test-order-state.is-delivery { color: #0369a1; background: #e0f2fe; }
.client-test-order-state.is-pickup { color: #b45309; background: #fef3c7; }
.client-test-order-state.is-kaspi_delivery { color: #1d4ed8; background: #dbeafe; }
.client-test-order-state.is-archive { color: #475569; background: #e2e8f0; }
.client-test-order-status.is-completed, .client-test-order-status.is-delivered { color: #067647; background: #dcfae6; }
.client-test-order-status.is-cancelled, .client-test-order-status.is-cancelling { color: #b42318; background: #fee4e2; }
.client-test-loading, .client-test-warning { margin-top: 14px; padding: 18px; border: 1px dashed #cbd8e5; border-radius: 16px; color: #60748c; background: #f8fafc; text-align: center; }
.client-test-warning { color: #92400e; border-color: #f3d49b; background: #fffbeb; }
.client-economics-head { background: radial-gradient(circle at 92% 0%, rgba(99,102,241,.14), transparent 35%), linear-gradient(135deg, #f8fbff, #f7f5ff); }
.client-economics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin: 14px 0; }
.client-economics-summary article { display: grid; gap: 7px; padding: 17px 18px; border: 1px solid #dfe7f0; border-radius: 16px; background: #fff; box-shadow: 0 7px 20px rgba(15,23,42,.04); }
.client-economics-summary span { color: #71829a; font-size: 12px; font-weight: 750; }
.client-economics-summary strong { color: #10213e; font-size: 24px; }
.client-economics-list { display: grid; gap: 10px; }
.client-economics-order { overflow: hidden; border: 1px solid #dce6f0; border-radius: 17px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.client-economics-order.is-expanded { border-color: #a9d9c7; box-shadow: 0 11px 28px rgba(15,23,42,.07); }
.client-economics-order-head { display: grid; grid-template-columns: 1.1fr .8fr 1fr .8fr 34px; gap: 14px; align-items: center; width: 100%; padding: 16px 18px; border: 0; color: #183153; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.client-economics-order-head:hover { background: #f8fbfd; }
.client-economics-order-head > span:not(.client-economics-chevron) { display: grid; gap: 4px; }
.client-economics-order-head small { color: #8998aa; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.client-economics-order-head strong { font-size: 13px; }
.client-economics-chevron { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #087f5b; background: #e8f7f1; font-size: 21px; font-weight: 600; }
.client-economics-detail { padding: 0 18px 18px; border-top: 1px solid #edf1f5; background: #fbfcfe; }
.client-economics-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
.client-economics-breakdown article { display: grid; gap: 5px; padding: 14px; border: 1px solid #e3e9f0; border-radius: 13px; background: #fff; }
.client-economics-breakdown span { color: #71829a; font-size: 11px; font-weight: 750; }
.client-economics-breakdown strong { color: #b42318; font-size: 20px; }
.client-economics-breakdown small { color: #94a3b8; font-size: 10px; }
.client-economics-breakdown .is-revenue strong, .client-economics-breakdown .is-result strong { color: #087f5b; }
.client-economics-breakdown .is-result { border-color: #bce2d3; background: #f0faf6; }
.client-economics-items { margin-top: 13px; padding: 15px; border: 1px solid #e3e9f0; border-radius: 13px; background: #fff; }
.client-economics-items h4 { margin: 0 0 9px; color: #183153; }
.client-economics-items > div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-top: 1px solid #edf1f5; color: #294563; font-size: 12px; }
.client-economics-items > div:first-of-type { border-top: 0; }
.client-economics-items span { display: grid; gap: 3px; }
.client-economics-items small { color: #94a3b8; }
.client-economics-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 11px; color: #7c5d16; background: #fff8df; font-size: 11px; line-height: 1.45; }

.client-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.client-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.client-kpi-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.08;
}

.client-kpi-card span { display: block; color: #64748b; font-weight: 700; }
.client-kpi-card strong { display: block; margin: 10px 0 4px; color: #10213e; font-size: 34px; line-height: 1; }
.client-kpi-card small { color: #94a3b8; }
.client-kpi-stock { color: #0f9f6e; }
.client-kpi-orders { color: #2563eb; }
.client-kpi-transit { color: #d97706; }
.client-kpi-done { color: #7c3aed; }
.client-kpi-due { color: #dc5b35; }

.client-charges-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: #f5f8fc;
}

.client-charges-summary > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #fff;
}

.client-charges-summary span { color: #71829a; font-size: 12px; font-weight: 700; }
.client-charges-summary strong { color: #183153; font-size: 20px; }
.client-charges-summary .is-due { border-color: #f1c7b9; background: #fff8f5; }
.client-charges-summary .is-due strong { color: #b84225; }

.client-charge-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.client-charge-status.is-paid { color: #067647; background: #dcfae6; }
.client-charge-status.is-partial { color: #92400e; background: #fef3c7; }

.client-portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.client-period-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.client-portal-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-portal-toolbar-actions .btn {
  white-space: nowrap;
}

.client-custom-period {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #dbe5ef;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.client-custom-period label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-custom-period input {
  width: 142px;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  color: #183153;
  background: #f4f7fb;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.client-custom-period input:focus {
  box-shadow: 0 0 0 3px rgba(17, 152, 103, 0.16);
}

.client-period-arrow { color: #94a3b8; font-weight: 800; }

.client-period-switch, .client-portal-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 13px;
  background: #eef3f8;
}

.client-period-switch > span { padding: 0 8px; color: #64748b; font-size: 13px; font-weight: 700; }
.client-period-switch button, .client-portal-tabs button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  color: #36516f;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.client-period-switch button.active, .client-portal-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #119867, #087f5b);
  box-shadow: 0 7px 16px rgba(8, 127, 91, 0.22);
}

.client-portal-tabs { width: fit-content; margin-top: 18px; }
.client-portal-content { margin-top: 14px; border: 1px solid #e2e8f0; border-radius: 16px; }

.client-stock-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.client-stock-filter-group {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.client-stock-filter-group label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: #475569;
  font-weight: 700;
}

.client-stock-toolbar .btn { white-space: nowrap; }

.client-request-layout { display: grid; gap: 22px; padding: 20px; background: #f8fafc; }
.client-request-form { padding: 22px; border: 1px solid #dfe7f1; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); }
.client-request-form h3, .client-request-history h3 { margin: 0 0 6px; color: #183153; }
.client-request-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.client-request-grid label { display: grid; gap: 7px; color: #526780; font-size: 13px; font-weight: 750; }
.client-request-grid input, .client-request-grid select, .client-request-grid textarea { width: 100%; padding: 11px 12px; border: 1px solid #d9e3ee; border-radius: 11px; background: #fff; font: inherit; }
.client-request-grid textarea { resize: vertical; }
.client-request-grid small { color: #8a9aaf; font-weight: 500; }
.client-request-wide { grid-column: 1 / -1; }
.client-request-items { display: grid; gap: 9px; }
.client-request-items-head, .client-request-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 42px; gap: 10px; align-items: center; }
.client-request-items-head { padding: 0 4px; color: #526780; font-size: 13px; font-weight: 750; }
.client-request-item-row select, .client-request-item-row input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #d9e3ee; border-radius: 11px; background: #fff; font: inherit; }
.client-request-product-search { min-width: 0; }
.client-request-remove-item { width: 42px; height: 42px; border: 0; border-radius: 11px; background: #feecef; color: #d63e52; font-size: 22px; cursor: pointer; }
.client-request-add-item { justify-self: start; margin-top: 2px; }
.client-request-history { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 18px; background: #fff; }
.client-request-history h3 { padding: 18px 18px 8px; }

@media (max-width: 900px) {
  .client-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-portal-toolbar { align-items: flex-start; flex-direction: column; }
  .client-period-control { width: 100%; }
  .client-portal-toolbar-actions { width: 100%; justify-content: space-between; }
  .client-test-module-head { align-items: stretch; flex-direction: column; }
  .client-test-city-grid { grid-template-columns: 1fr; }
  .client-economics-summary, .client-economics-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-economics-order-head { grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; }
}

@media (max-width: 560px) {
  .client-portal-shell { padding: 12px; }
  .client-portal-card { padding: 18px; }
  .client-kpi-grid { grid-template-columns: 1fr; }
  .client-charges-summary { grid-template-columns: 1fr; }
  .client-portal-tabs { width: 100%; overflow-x: auto; }
  .client-period-switch { width: 100%; overflow-x: auto; }
  .client-custom-period { width: 100%; }
  .client-economics-summary, .client-economics-breakdown { grid-template-columns: 1fr; }
  .client-economics-order-head { grid-template-columns: 1fr 34px; }
  .client-custom-period label { flex: 1; }
  .client-custom-period input { width: 100%; min-width: 0; }
  .client-portal-toolbar-actions { align-items: stretch; flex-direction: column; }
  .client-portal-toolbar-actions .btn { width: 100%; }
  .client-stock-toolbar { align-items: stretch; flex-direction: column; }
  .client-stock-filter-group label, .client-stock-toolbar .btn { width: 100%; }
  .client-request-layout { padding: 10px; }
  .client-request-grid { grid-template-columns: 1fr; }
  .client-request-items-head { display: none; }
  .client-request-item-row { grid-template-columns: minmax(0, 1fr) 95px 42px; }
  .client-workspace-switch { grid-template-columns: 1fr 1fr; }
  .client-workspace-switch button { padding: 11px 12px; }
  .client-workspace-switch small { display: none; }
  .client-test-workspace { grid-template-columns: 1fr; align-items: start; min-height: 360px; }
  .client-test-filters { align-items: stretch; flex-direction: column; }
  .client-test-filters input, .client-test-filters select { width: 100%; min-width: 0; }
  .client-repricing-kpis, .client-repricing-layout, .client-repricing-toolbar { grid-template-columns: 1fr; }
  .client-repricing-fields { grid-template-columns: 1fr; }
  .client-repricing-city-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-repricing-product-card > header, .client-repricing-product-card > footer { align-items: stretch; flex-direction: column; }
  .client-repricing-awaiting { margin-right: 0; }
}
.dokz-sku-generate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.dokz-sku-generate-row .btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .dokz-sku-generate-row {
    grid-template-columns: 1fr;
  }
}
