:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --line: #dbe1dc;
  --line-strong: #c5d0c8;
  --text: #17211b;
  --muted: #66746b;
  --teal: #0f766e;
  --teal-strong: #0b5f58;
  --teal-soft: #dff4ef;
  --amber: #b45309;
  --amber-soft: #fff4dd;
  --red: #b42318;
  --red-soft: #fee4e2;
  --shadow: 0 10px 30px rgba(23, 33, 27, 0.08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

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

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}

.about-intro-copy {
  max-width: 850px;
}

.about-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.about-intro h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.about-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.about-version {
  min-width: 180px;
  padding: 14px 18px;
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  background: var(--teal-soft);
}

.about-version span,
.about-version small {
  display: block;
  color: var(--muted);
}

.about-version strong {
  display: block;
  margin: 4px 0;
  font-size: 30px;
  line-height: 1;
}

.about-changelog-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 24px 0 8px;
}

.about-changelog-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.about-changelog-header > div > span {
  color: var(--muted);
}

.about-search {
  width: min(360px, 100%);
}

.about-search .search {
  width: 100%;
  margin: 0;
}

.about-changelog-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.about-release {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.about-release-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.about-release-meta strong {
  color: var(--teal);
  font-size: 18px;
}

.about-release-meta time {
  color: var(--muted);
  font-size: 13px;
}

.about-release-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 11px;
  font-weight: 800;
}

.about-release-body {
  min-width: 0;
  padding: 16px 18px;
}

.about-release-body h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

.about-release-body ul {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 20px;
}

.about-release-body li {
  break-inside: avoid;
  margin-bottom: 7px;
  color: var(--text);
  line-height: 1.4;
}

.about-empty {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .about-release-body ul {
    columns: 1;
  }
}

@media (max-width: 700px) {
  .about-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-version,
  .about-search {
    width: 100%;
  }

  .about-changelog-header {
    flex-direction: column;
    align-items: stretch;
  }

  .about-release {
    grid-template-columns: 1fr;
  }

  .about-release-meta {
    flex-flow: row wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

:root[data-accent="teal"] {
  --teal: #0891b2;
  --teal-strong: #0e7490;
  --teal-soft: #d8f4fb;
}

:root[data-accent="blue"] {
  --teal: #2563eb;
  --teal-strong: #1d4ed8;
  --teal-soft: #dbeafe;
}

:root[data-accent="violet"] {
  --teal: #7c3aed;
  --teal-strong: #6d28d9;
  --teal-soft: #ede9fe;
}

:root[data-accent="graphite"] {
  --teal: #334155;
  --teal-strong: #1f2937;
  --teal-soft: #e2e8f0;
}

:root[data-theme="dark"] {
  --bg: #0f1512;
  --surface: #151f1a;
  --surface-soft: #1c2922;
  --line: #2c3d34;
  --line-strong: #3a5146;
  --text: #eef6f0;
  --muted: #a4b4aa;
  --amber-soft: #382815;
  --red-soft: #3b1918;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .cell-input,
:root[data-theme="dark"] .cell-select {
  background: #111a16;
  color: var(--text);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] input::placeholder {
  color: #7f9086;
}

:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .settings-panel,
:root[data-theme="dark"] .table-wrap,
:root[data-theme="dark"] .modal-panel,
:root[data-theme="dark"] .job-panel {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

:root[data-theme="dark"] .data-table th {
  background: #1a261f;
  color: var(--text);
}

:root[data-theme="dark"] .data-table td {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.hidden,
.app-shell.hidden,
.auth-screen.hidden,
.landing-screen.hidden {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 28px;
  padding: 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(15, 118, 110, 0.18), transparent 30%),
    linear-gradient(135deg, #eef7f3 0%, #f7faf8 46%, #e8f1ed 100%);
}

.auth-hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 28px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.auth-logo-card {
  width: min(300px, 48vw);
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(23, 33, 27, 0.12);
}

.auth-logo-card img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-copy {
  align-self: center;
  max-width: 860px;
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-copy h1 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
}

.auth-copy p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.auth-benefits div,
.auth-preview,
.auth-panel {
  border: 1px solid rgba(197, 208, 200, 0.86);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.auth-benefits div {
  min-height: 116px;
  padding: 15px;
  border-radius: 12px;
}

.auth-benefits strong,
.auth-benefits span {
  display: block;
}

.auth-benefits strong {
  color: var(--teal);
  font-size: 14px;
}

.auth-benefits span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.auth-preview {
  max-width: 560px;
  padding: 14px;
  border-radius: 16px;
}

.auth-preview-header {
  display: flex;
  gap: 6px;
  margin-bottom: 13px;
}

.auth-preview-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #bdd9d2;
}

.auth-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-preview-card,
.auth-preview-line {
  border-radius: 10px;
  background: #f4f8f6;
}

.auth-preview-card {
  padding: 13px;
}

.auth-preview-card.accent {
  background: var(--teal-soft);
}

.auth-preview-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.auth-preview-card strong {
  display: block;
  margin-top: 5px;
  font-size: 30px;
}

.auth-preview-line {
  height: 34px;
}

.auth-preview-line.wide {
  grid-column: 1 / -1;
}

.auth-panel {
  align-self: center;
  padding: 22px;
  border-radius: 18px;
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: #edf3ef;
}

.auth-mode button {
  border: 0;
  border-radius: 9px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.auth-mode button.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 8px 18px rgba(23, 33, 27, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form h2 {
  margin: 0;
  font-size: 25px;
}

.auth-form-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.auth-submit {
  min-height: 46px;
}

.bot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 14px 12px 12px;
  background: #111b16;
  border-right: 1px solid rgba(184, 211, 197, 0.09);
  color: #f8fbf8;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 0 5px 12px;
  border-bottom: 1px solid rgba(184, 211, 197, 0.1);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  background: #071328;
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.1);
}

.brand-name {
  color: #f4f8f5;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.nav {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 11px;
  align-content: start;
  overflow-y: auto;
  padding: 0 3px 2px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(170, 199, 184, 0.28) transparent;
}

.nav-group {
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
}

.nav-group + .nav-group {
  padding-top: 11px;
  border-top: 1px solid rgba(184, 211, 197, 0.08);
}

.nav-group-warehouse {
  border-color: rgba(119, 210, 187, 0.16);
}

.nav-group-warehouse .nav-group-label {
  color: #80c9b7;
}

.nav-group-label {
  padding: 0 9px 4px;
  color: #81968b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd7d0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #67d2b8;
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.nav-item:hover {
  color: #f1f6f3;
  background: rgba(255, 255, 255, 0.045);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(63, 181, 153, 0.13);
}

.nav-item.active::before {
  opacity: 1;
}

.nav-item:focus-visible,
.sidebar .account-badge .button:focus-visible {
  outline: 2px solid #7fe0c8;
  outline-offset: 2px;
}

.nav-item.hidden {
  display: none;
}

.nav-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #b7c9bf;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: rgba(255, 255, 255, 0.055);
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: #91e4d0;
  background: rgba(103, 210, 184, 0.11);
}

.button-icon {
  width: 20px;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.note-label,
.stat-label,
.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar .note-label,
.sidebar .note-muted {
  color: #abc1b2;
}

.note-value {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.note-muted {
  margin-top: 8px;
  font-size: 12px;
}

.workspace {
  position: relative;
  z-index: 0;
  min-width: 0;
  padding: 14px;
}

.workspace.modal-open {
  z-index: 60;
}

.topbar {
  min-height: 56px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

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

.topbar-actions,
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.account-badge {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 47px;
}

.topbar-actions > .account-badge {
  display: none;
}

.sidebar .account-badge {
  width: 100%;
  margin-top: auto;
  padding: 12px 4px 0;
  border: 0;
  border-top: 1px solid rgba(184, 211, 197, 0.1);
  border-radius: 0;
  color: #eef5f1;
  background: transparent;
  box-shadow: none;
}

.sidebar .account-badge .button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #a9bbb1;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}

.sidebar .account-badge .button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #9be6d4;
  background: rgba(103, 210, 184, 0.12);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.mobile-logout-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.account-copy strong,
.account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  color: #eef5f1;
  font-size: 13px;
  font-weight: 650;
}

.account-copy span {
  color: #82978c;
  font-size: 11px;
}

.sidebar .logout-label {
  display: none;
}

.topbar-action-stack {
  display: grid;
  gap: 3px;
  justify-items: stretch;
}

.topbar-action-stack .button {
  width: 100%;
}

.action-update-time {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.global-loader {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 900;
  transform: translateX(-50%);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #c2ded5;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(23, 33, 27, 0.14);
}

.global-loader.hidden {
  display: none;
}

.inspire-spinner {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, var(--teal) 0 72deg, transparent 72deg 112deg, #21a59a 112deg 184deg, transparent 184deg 236deg, #7dd3c7 236deg 316deg, transparent 316deg 360deg);
  animation: inspire-spin 0.85s linear infinite;
}

.inspire-spinner::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.overflow-tooltip {
  position: fixed;
  z-index: 1300;
  max-width: min(520px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid #cfe0da;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 14px 34px rgba(23, 33, 27, 0.18);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
}

.overflow-tooltip.hidden {
  display: none;
}

@keyframes inspire-spin {
  to {
    transform: rotate(360deg);
  }
}

.undo-redo-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.button,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 34px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.button.icon-only {
  width: 34px;
  min-width: 34px;
  padding: 7px;
}

.button:disabled,
.segment:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.button:hover,
.segment:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 12px rgba(23, 33, 27, 0.08);
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.button.secondary {
  background: #edf6f2;
  border-color: #c2ded5;
  color: #0c5d57;
}

.button.ghost {
  background: transparent;
}

.button.ghost.active {
  border-color: #92c9bd;
  background: var(--teal-soft);
  color: var(--teal);
}

.button.hidden,
.button-tooltip.hidden {
  display: none;
}

.button-tooltip {
  position: fixed;
  z-index: 3000;
  max-width: 280px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #17211b;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 33, 27, 0.22);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view.is-loading {
  cursor: progress;
}

.view.planning-transform-busy {
  cursor: progress;
}

.view.planning-transform-busy :is(button, input, select, textarea):disabled {
  cursor: progress;
}

.view.is-loading .inline-hint {
  color: var(--teal);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.stat-card {
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card.accent {
  background: var(--teal-soft);
  border-color: #b8ddd4;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 23px;
  line-height: 1;
}

.toolbar {
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #edf1ee;
}

.segment {
  border: 0;
  min-height: 30px;
  padding: 6px 10px;
  background: transparent;
  box-shadow: none;
}

.segment.active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 1px 8px rgba(23, 33, 27, 0.08);
}

.search,
.field select,
.field input[type="date"] {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
  color: var(--text);
}

.search {
  min-width: 220px;
}

.product-search-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 360px;
  width: min(360px, 100%);
  min-width: 280px;
  max-width: 100%;
}

.product-search-control .search {
  width: 100%;
  min-width: 0;
  margin-left: 0;
  padding-left: 36px;
  padding-right: 36px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.product-search-control .search:focus {
  border-color: var(--teal);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.13);
}

.product-search-control .search.has-list-filter {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-weight: 700;
}

.product-search-control .search.has-list-filter::placeholder {
  color: var(--teal-strong);
  opacity: 1;
}

.product-search-icon {
  position: absolute;
  z-index: 2;
  left: 11px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.product-search-clear {
  position: absolute;
  z-index: 3;
  right: 3px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.product-search-clear:hover,
.product-search-clear:focus-visible {
  background: rgba(13, 148, 136, 0.12);
  color: var(--text);
  outline: 0;
}

.product-search-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 7px);
  right: 0;
  display: none;
  width: 100%;
  min-width: min(340px, calc(100vw - 32px));
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
  max-height: min(390px, calc(100vh - 120px));
  overflow: hidden;
}

.product-search-control.is-open .product-search-menu {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.product-search-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  gap: 3px;
  padding: 3px;
  overflow: hidden;
}

.product-search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  gap: 10px;
  padding: 3px 7px;
}

.product-search-history-header strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-search-history-clear {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  padding: 4px 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.product-search-history-clear:hover,
.product-search-history-clear:focus-visible {
  background: var(--teal-soft);
  color: var(--teal-strong);
  outline: 0;
}

.product-search-history-list {
  display: grid;
  min-height: 0;
  gap: 2px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.product-search-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 2px;
}

.product-search-history-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 38px;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 7px 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.product-search-history-item:hover,
.product-search-history-item:focus-visible {
  background: var(--teal-soft);
  color: var(--teal-strong);
  outline: 0;
}

.product-search-history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-search-history-remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.product-search-history-remove:hover,
.product-search-history-remove:focus-visible {
  background: var(--teal-soft);
  color: var(--text);
  outline: 0;
}

.product-search-history-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-search-history:not(.hidden) + .product-search-menu-button {
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
}

.product-search-menu-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.product-search-menu-button:hover,
.product-search-menu-button:focus-visible {
  background: var(--teal-soft);
  color: var(--teal-strong);
  outline: 0;
}

.product-search-menu-icon,
.product-search-menu-chevron {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-search-menu-icon {
  width: 22px;
  height: 22px;
  justify-self: center;
  color: var(--teal);
}

.product-search-menu-chevron {
  justify-self: end;
}

.product-search-menu-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-search-menu-copy strong,
.product-search-menu-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-search-menu-copy strong {
  font-size: 14px;
}

.product-search-menu-copy small {
  color: var(--muted);
  font-size: 11px;
}

.view > .toolbar > .search,
.view > .toolbar > .product-search-control {
  order: 100;
  margin-left: auto;
}

.field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.daily-toolbar > .search,
.daily-toolbar > .product-search-control {
  margin-left: auto;
}

.daily-period-box {
  display: grid;
  gap: 6px;
  align-self: stretch;
  width: fit-content;
}

.daily-date-row {
  display: grid;
  grid-template-columns: auto minmax(0, auto) auto auto;
  align-items: center;
  gap: 10px;
}

.daily-presets {
  flex-wrap: wrap;
  justify-self: center;
  align-self: center;
  width: fit-content;
  padding: 2px;
}

.daily-presets .segment {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

.daily-sku-field {
  align-items: flex-start;
}

.daily-sku-field select {
  min-width: 260px;
  min-height: 86px;
}

.daily-sku-summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.analytics-toolbar {
  align-items: center;
  gap: 10px;
}

.analytics-toolbar > .search,
.analytics-toolbar > .product-search-control {
  margin-left: auto;
  min-width: 220px;
}

.marketplace-news-toolbar {
  align-items: center;
}

.marketplace-news-toolbar .search {
  margin-left: auto;
  min-width: min(320px, 100%);
}

.news-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.news-section-tab {
  min-height: 30px;
  border: 1px solid #cfe0da;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f7fbf9;
  color: #31564f;
  cursor: pointer;
  font-weight: 800;
}

.news-section-tab.active {
  border-color: #92c9bd;
  background: var(--teal-soft);
  color: var(--teal);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
}

.marketplace-news-list {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 248, 0.92));
  box-shadow: var(--shadow);
}

.news-chat {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.news-flow {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.news-message,
.news-flow-card {
  position: relative;
  min-width: 0;
  border: 1px solid #d8e6e0;
  background: #ffffff;
}

.news-message {
  width: min(820px, 92%);
  padding: 13px 46px 13px 14px;
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 8px 20px rgba(23, 33, 27, 0.06);
}

.news-message:nth-child(even) {
  justify-self: end;
  border-radius: 8px 8px 2px 8px;
  background: #f5fbf8;
}

.news-message.personal,
.news-flow-card.personal {
  border-color: #9fd8ce;
  background: linear-gradient(180deg, #f1fffb, #ffffff);
}

.news-flow-card {
  padding: 12px 46px 12px 14px;
  border-radius: 8px;
}

.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.news-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #edf3ef;
  color: #40564c;
  font-size: 11px;
  font-weight: 900;
}

.news-badge.store {
  background: #10231d;
  color: #ffffff;
}

.news-badge.personal {
  background: #fff4dd;
  color: #9a4d00;
}

.news-badge.section {
  background: var(--teal-soft);
  color: var(--teal);
}

.news-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.news-message h3,
.news-flow-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.news-message p,
.news-flow-card p {
  margin: 7px 0 0;
  color: #36453d;
  font-size: 13px;
  line-height: 1.45;
}

.news-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid #d8e6e0;
  border-radius: 8px;
  background: #ffffff;
  color: #d39100;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.news-favorite:hover {
  border-color: #e5b143;
  background: #fff9e8;
}

.news-link {
  display: inline-flex;
  margin-top: 9px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.news-link:hover {
  text-decoration: underline;
}

.news-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.analytics-period-box {
  flex: 0 1 auto;
}

.analytics-stats {
  margin-top: 14px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
  margin: 16px 0;
}

.analytics-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.analytics-panel-wide {
  grid-row: span 3;
}

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

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

.analytics-panel-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.analytics-overlay-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
}

.analytics-layer {
  --layer-color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.analytics-layer::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--layer-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--layer-color) 14%, transparent);
}

.analytics-layer input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--teal);
}

.analytics-layer.layer-orders-qty {
  --layer-color: #2458ff;
}

.analytics-layer.layer-sales-qty {
  --layer-color: #ff4b55;
}

.analytics-layer.layer-orders-revenue {
  --layer-color: #0ea5e9;
}

.analytics-layer.layer-sales-revenue {
  --layer-color: #ff6b70;
}

.analytics-layer.layer-returns {
  --layer-color: #f97316;
}

.analytics-layer.layer-logistics {
  --layer-color: #14b8a6;
}

.analytics-chart {
  width: 100%;
  height: 280px;
  min-width: 0;
}

.analytics-chart.compact-chart {
  height: 205px;
}

.chart-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.chart-grid {
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 1;
}

.chart-bar {
  fill: rgba(13, 148, 136, 0.72);
}

.chart-bar.wb,
.share-fill.wb {
  fill: #8b5cf6;
  background: #8b5cf6;
}

.chart-bar.ozon,
.share-fill.ozon {
  fill: #0ea5e9;
  background: #0ea5e9;
}

.chart-bar.returns {
  fill: #f97316;
}

.chart-bar.logistics {
  fill: #14b8a6;
}

.chart-line.qty {
  stroke: #0f172a;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.chart-label.strong {
  fill: var(--text);
  font-weight: 700;
}

.analytics-combo-chart {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 330px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 253, 251, 0.72)),
    radial-gradient(circle at 18% 12%, rgba(20, 184, 166, 0.12), transparent 24%),
    radial-gradient(circle at 86% 4%, rgba(14, 165, 233, 0.1), transparent 20%);
  overflow: hidden;
}

.analytics-combo-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.analytics-bar {
  fill: var(--bar-color);
  opacity: 0.84;
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.12));
  animation: analyticsBarIn 0.5s ease-out both;
  transform-box: fill-box;
  transform-origin: bottom;
}

.analytics-bar.analytics-salesRevenue {
  opacity: 0.74;
}

.analytics-line {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 7px rgba(15, 23, 42, 0.14));
  animation: analyticsLineIn 0.5s ease-out both;
}

.analytics-line.money {
  stroke-width: 2.6;
  stroke-dasharray: 6 7;
}

.analytics-point {
  fill: #fff;
  stroke: var(--line-color);
  stroke-width: 2.4;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.12));
}

.analytics-hit {
  fill: transparent;
  cursor: crosshair;
}

.analytics-hover-line {
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
  pointer-events: none;
}

.analytics-chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 220px;
  max-width: 260px;
  padding: 11px 12px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.analytics-chart-tooltip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-strong);
  font-size: 13px;
}

.analytics-chart-tooltip div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12px;
}

.analytics-chart-tooltip b {
  text-align: right;
}

.axis-label {
  font-size: 11px;
}

.axis-title {
  font-weight: 800;
  fill: var(--teal-strong);
}

.date-label {
  font-size: 11px;
}

@keyframes analyticsBarIn {
  from {
    transform: scaleY(0.08);
    opacity: 0.2;
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes analyticsLineIn {
  from {
    stroke-dasharray: 4 12;
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}

.share-bars {
  display: grid;
  gap: 10px;
  padding: 12px 2px;
}

.share-row,
.share-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.share-row strong {
  font-size: 15px;
}

.share-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.share-fill {
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
}

.share-total {
  color: var(--muted);
}

#analyticsSkuTable .image-cell {
  width: 58px;
}

.toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  white-space: nowrap;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 210px);
}

.table-wrap.wide::-webkit-scrollbar:horizontal {
  display: none;
  height: 0 !important;
}

.table-wrap::-webkit-scrollbar:vertical {
  width: 12px;
}

.table-wrap.wide {
  max-height: calc(100vh - 165px);
  /* A single fixed scrollbar controls wide desktop tables. Keeping the
     native track hidden avoids a second horizontal scrollbar in Firefox. */
  overflow-x: hidden;
  overflow-y: auto;
}

.table-column-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 4px 0;
}

.table-column-tools .button {
  min-height: 32px;
  padding: 6px 10px;
}

.table-zoom-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-zoom-button {
  min-height: 28px;
  width: 28px;
  min-width: 28px;
  padding: 4px;
}

.table-zoom-label {
  min-width: 44px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.daily-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.daily-fixed-scroll.hidden {
  display: none;
}

.daily-fixed-scroll {
  position: fixed;
  bottom: 0;
  z-index: 40;
  height: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 24px rgba(23, 33, 27, 0.14);
}

.daily-fixed-scroll > div {
  height: 1px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1120px;
  font-size: 12.5px;
  zoom: var(--table-zoom, 1);
}

.data-table.resizable-table {
  table-layout: fixed;
  min-width: 0;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eaf2ee;
  color: #213027;
  border-bottom: 1px solid var(--line-strong);
  font-weight: 800;
  text-align: center;
  padding: 8px 16px 8px 8px;
  white-space: nowrap;
  vertical-align: middle;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.data-table th[draggable="true"] {
  cursor: grab;
}

.data-table.dragging-column th[draggable="true"] {
  cursor: grabbing;
}

.column-hidden {
  display: none !important;
}

.data-table th[data-sort]::after {
  content: "↕";
  display: inline-block;
  margin-left: 6px;
  color: #7b8a80;
  font-size: 11px;
}

.data-table th.sorted {
  color: var(--teal);
}

.data-table th.sorted.asc::after {
  content: "↑";
  color: var(--teal);
}

.data-table th.sorted.desc::after {
  content: "↓";
  color: var(--teal);
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: center;
}

.data-table td {
  border-bottom: 1px solid #eef2ef;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table tbody tr:hover {
  background: #f6faf8;
}

.sku-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
}

.data-table td.sku-value-cell {
  min-width: 190px;
}

.data-table td.sku-value-cell.sku-compact-value-cell {
  min-width: 132px;
}

.sku-main-line {
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.sku-copy-text {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.sku-copy-text.sku-text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--teal) 34%, transparent);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.sku-copy-text.sku-text-link:hover,
.sku-copy-text.sku-text-link:focus-visible {
  color: var(--teal-strong);
  text-decoration-color: currentColor;
}

.sku-input-line {
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.sku-input-line .cell-input,
.sku-input-line .unit-edit-input {
  min-width: 0;
  width: auto;
  max-width: calc(100% - 24px);
  flex: 0 1 auto;
}

.sku-copy-button {
  display: inline-grid;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  place-items: center;
  flex: 0 0 20px;
  background: transparent;
  color: #8a959f;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.sku-value-cell:hover .sku-copy-button,
.sku-cell:hover .sku-copy-button,
.sku-copy-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.sku-copy-button:hover {
  color: #111827;
  background: transparent;
  transform: translateY(-1px);
}

.sku-copy-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: none;
}

.sku-copy-button:focus-visible {
  color: #111827;
  background: transparent;
  outline: 2px solid color-mix(in srgb, var(--teal) 55%, transparent);
  outline-offset: 2px;
}

:root[data-theme="dark"] .sku-copy-button:hover,
:root[data-theme="dark"] .sku-copy-button:focus-visible {
  color: #f8fafc;
}

@media (prefers-reduced-motion: reduce) {
  .sku-copy-button,
  .sku-copy-text.sku-text-link,
  .sku-product-link {
    transition: none;
  }
}

.sku-product-link {
  flex: 0 0 auto;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 4px;
  color: #7d858c;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.sku-product-link:hover,
.sku-product-link:focus-visible {
  color: #111827;
  background: transparent;
  text-decoration: none;
}

.sku-product-link.sku-product-link-wb {
  color: #7c3aed;
}

.sku-product-link.sku-product-link-ozon {
  color: #0866ff;
}

.sku-product-link.sku-product-link-wb:hover,
.sku-product-link.sku-product-link-wb:focus-visible {
  color: #3b0764;
}

.sku-product-link.sku-product-link-ozon:hover,
.sku-product-link.sku-product-link-ozon:focus-visible {
  color: #003b99;
}

:root[data-theme="dark"] .sku-product-link:hover,
:root[data-theme="dark"] .sku-product-link:focus-visible {
  color: #f8fafc;
}

.data-table th.sticky-sku-column,
.data-table td.sticky-sku-column {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 180px;
  box-shadow: 1px 0 0 var(--line), 8px 0 14px rgba(23, 33, 27, 0.06);
}

.data-table th.sticky-sku-column {
  z-index: 6;
  background: #eaf2ee;
  text-align: center;
}

.data-table td.sticky-sku-column {
  text-align: left;
}

.data-table td.sticky-sku-column {
  background: var(--surface);
}

.data-table tbody tr:hover td.sticky-sku-column {
  background: #f6faf8;
}

.sticky-sku-column .sku-cell {
  align-items: flex-start;
  text-align: left;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  width: 14px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 5px;
  width: 2px;
  height: calc(100% - 12px);
  border-radius: 999px;
  background: rgba(32, 126, 110, 0.18);
}

.column-resize-handle:hover::after,
.data-table.resizing .column-resize-handle::after {
  background: var(--teal);
  box-shadow: 0 0 0 2px rgba(32, 126, 110, 0.12);
}

.data-table.resizable-table th {
  background-clip: padding-box;
}

.data-table.resizing,
.data-table.resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.sku-code {
  color: var(--muted);
  font-size: 11.5px;
}

.sku-link {
  color: var(--teal);
  text-decoration: none;
}

.sku-link:hover {
  text-decoration: underline;
}

.unit-readonly-cell {
  color: var(--text);
  background: #f8fbfa;
  font-weight: 700;
}

.image-cell {
  width: 62px;
  min-width: 62px;
}

.product-thumb {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 1px solid #dce7e2;
  border-radius: 6px;
  object-fit: cover;
  background: #f3f7f5;
}

.image-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px dashed #c8d7d1;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.need {
  color: var(--teal);
  font-weight: 800;
}

.risk {
  color: var(--red);
  font-weight: 800;
}

.warehouse-negative-stock {
  color: var(--red);
  background: var(--red-soft);
  font-weight: 800;
}

.warehouse-negative-stock .cell-input {
  color: var(--red);
  background: transparent;
  font-weight: 800;
}

.warehouse-negative-row > td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  border-radius: 999px;
  padding: 2px 7px;
  font-weight: 800;
}

.badge.buy {
  color: var(--teal);
  background: var(--teal-soft);
}

.badge.wait {
  color: var(--muted);
  background: #eef2ef;
}

.data-table.compact {
  min-width: 1760px;
}

.unit-table {
  min-width: 3300px;
  width: max-content;
  table-layout: fixed;
}

.unit-table.unit-own-mode {
  min-width: 1960px;
}

.unit-table.unit-comparison-mode {
  min-width: 2380px;
}

.unit-table .unit-comparison-best {
  color: var(--teal);
  font-weight: 800;
}

.unit-table td,
.unit-table th {
  white-space: nowrap;
}

.unit-table th {
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.unit-table .column-resize-handle {
  right: 0;
  width: 16px;
  z-index: 8;
}

.unit-table .column-resize-handle::after {
  background: rgba(15, 118, 110, 0.24);
}

.unit-table .column-resize-handle:hover::after,
.unit-table.resizing .column-resize-handle::after {
  background: var(--teal);
}

.unit-name-cell {
  min-width: 260px;
  max-width: 360px;
  text-align: left;
  white-space: normal;
}

.unit-table .unit-name-cell,
.unit-table .unit-edit-input,
.unit-table .unit-edit-input[type="text"],
.unit-table .unit-edit-input.unit-name-cell,
.unit-table .cell-select {
  min-width: 0;
  max-width: 100%;
}

.unit-table .unit-edit-input {
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-marketplace-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#unitEconomicsMode {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

#unitEconomicsMode .segment {
  flex: 0 0 auto;
}

.unit-input-disabled .unit-edit-input {
  color: var(--muted);
  background: var(--surface-muted, #f3f6f4);
  cursor: not-allowed;
  opacity: 1;
}

.unit-input-disabled .unit-edit-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.unit-calculation-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.unit-recalculate-button {
  max-width: 100%;
}

.unit-recalculate-button.needs-refresh {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
}

.unit-add-marketplace-btn {
  min-height: 38px;
}

#unitEconomicsView .stats-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

#unitEconomicsView .stat-card {
  min-height: 62px;
  padding: 9px 11px;
}

#unitEconomicsView .stat-card strong {
  margin-top: 4px;
  font-size: 21px;
}

#unitEconomicsView > .toolbar {
  padding: 7px;
  margin-bottom: 6px;
  gap: 6px;
}

#unitEconomicsView .button,
#unitEconomicsView .segment {
  min-height: 34px;
  padding: 7px 10px;
}

#unitEconomicsView .segmented {
  padding: 2px;
}

#unitEconomicsView .search,
#unitEconomicsView .cell-select {
  min-height: 34px;
  padding: 7px 9px;
}

#unitEconomicsView .product-search-control .search {
  padding-left: 36px;
  padding-right: 36px;
}

#unitEconomicsHint {
  margin: -2px 0 8px;
}

.unit-store-profile-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.unit-store-profile-bar.needs-attention {
  border-left: 3px solid var(--amber);
}

.unit-store-profile-bar > strong {
  margin-right: 2px;
  font-size: 13px;
}

.unit-store-profile-bar .cell-select {
  width: min(250px, 100%);
}

.unit-store-profile-status {
  color: var(--muted);
  font-size: 12.5px;
}

.unit-store-profile-bar.needs-attention .unit-store-profile-status {
  color: var(--amber);
  font-weight: 700;
}

.unit-comparison-store-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: -2px 0 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.unit-comparison-store-bar > strong {
  font-size: 13px;
}

.unit-comparison-store-bar > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.unit-comparison-store-bar .cell-select {
  width: min(230px, 100%);
}

.unit-comparison-store-note {
  color: var(--muted);
  font-size: 12.5px;
}

.unit-data-quality {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: -2px 0 8px;
  padding: 7px 9px;
  border-left: 3px solid var(--teal);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
}

.unit-data-quality strong {
  color: var(--text);
}

.unit-data-quality .unit-quality-warning {
  color: var(--amber);
  font-weight: 700;
}

.unit-store-profile-panel,
.unit-breakdown-panel {
  width: min(1120px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.modal-header-note {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
}

.unit-store-profile-body,
.unit-breakdown-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 18px 20px 20px;
}

.unit-profile-section {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.unit-profile-section h3 {
  margin: 0;
  font-size: 16px;
}

.unit-profile-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.unit-profile-section-heading > span {
  color: var(--muted);
  font-size: 12.5px;
}

.unit-profile-tax-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.unit-own-payment-grid {
  grid-template-columns: minmax(260px, 420px);
}

.unit-profile-tax-grid > label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.unit-profile-tax-grid .cell-input,
.unit-profile-tax-grid .cell-select {
  width: 100%;
  min-height: 36px;
  text-align: left;
}

.unit-profile-checkbox {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  align-self: end;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.unit-profile-checkbox input,
.unit-expense-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.unit-expense-toggle {
  display: grid;
  width: 100%;
  min-height: 32px;
  place-items: center;
  cursor: pointer;
}

.unit-expense-table-wrap {
  max-height: min(400px, calc(100vh - 390px));
}

.unit-expense-table {
  min-width: 940px;
}

.unit-expense-table th,
.unit-expense-table td {
  padding: 6px 7px;
}

.unit-expense-table th:first-child,
.unit-expense-table td:first-child {
  width: 72px;
  text-align: center;
}

.unit-expense-table .cell-input,
.unit-expense-table .cell-select {
  width: 100%;
  min-width: 118px;
}

.unit-expense-table tr.unit-expense-disabled td:not(:first-child) {
  opacity: 0.58;
}

.unit-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.unit-breakdown-cell {
  min-width: 82px;
  text-align: center;
}

.unit-breakdown-button {
  min-height: 28px !important;
  padding: 4px 7px !important;
  font-size: 12px;
}

.unit-breakdown-panel {
  width: min(920px, calc(100vw - 32px));
}

.unit-breakdown-status {
  padding: 8px 10px;
  border-left: 3px solid var(--teal);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.unit-breakdown-status.is-blocked {
  border-left-color: var(--amber);
  color: var(--amber);
  font-weight: 700;
}

.unit-breakdown-table-wrap {
  max-height: min(520px, calc(100vh - 250px));
}

.unit-breakdown-table {
  min-width: 720px;
}

.unit-breakdown-table th:nth-child(2),
.unit-breakdown-table td:nth-child(2),
.unit-breakdown-table th:nth-child(3),
.unit-breakdown-table td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.unit-breakdown-warnings {
  padding: 9px 10px;
  border-left: 3px solid var(--amber);
  background: #fff8ea;
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 700;
}

.unit-search-tools {
  order: 100;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.unit-search {
  min-width: 300px;
}

.unit-group-picker {
  position: relative;
}

.unit-group-button {
  max-width: 190px;
  min-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-group-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  width: min(360px, 78vw);
  max-height: 360px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(23, 33, 27, 0.18);
  overflow: auto;
}

.unit-group-menu.hidden {
  display: none;
}

.unit-row-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 36px;
  margin: 0 0 6px;
}

.unit-row-tools .inline-column-tools {
  margin-left: auto;
  margin-bottom: 0;
}

.unit-row-tools .button {
  min-height: 32px;
  padding: 6px 10px;
}

.unit-row-tools .button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.button.danger {
  color: var(--red);
  border-color: #f1c4bd;
  background: #fff7f5;
}

.unit-selected-summary {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.unit-row-tools .hidden {
  display: none;
}

.unit-group-option {
  width: 100%;
  min-height: 32px;
  justify-content: space-between;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.unit-group-option:hover,
.unit-group-option.active {
  background: var(--teal-soft);
  color: var(--teal);
}

.unit-group-count {
  color: var(--muted);
  font-size: 12px;
}

.unit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px;
  margin: 0 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.unit-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.unit-page-size select {
  min-width: 86px;
  background: var(--surface);
}

.unit-pagination-info {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.unit-pagination-pages {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.unit-page-button {
  min-width: 30px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

.unit-page-button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}

.unit-page-button:disabled {
  color: var(--muted);
  background: #f4f6f4;
  cursor: default;
}

.unit-page-ellipsis {
  min-width: 22px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 620px) {
  #unitEconomicsView > .toolbar,
  .unit-marketplace-tabs,
  .unit-search-tools {
    width: 100%;
  }

  .unit-calculation-actions,
  .unit-calculation-actions .unit-recalculate-button:not(.hidden) {
    width: 100%;
  }

  .unit-store-profile-bar {
    align-items: stretch;
  }

  .unit-store-profile-bar > strong,
  .unit-store-profile-bar .cell-select,
  .unit-store-profile-bar .button,
  .unit-store-profile-status {
    width: 100%;
  }

  .unit-comparison-store-bar {
    align-items: stretch;
  }

  .unit-comparison-store-bar > strong,
  .unit-comparison-store-bar > label,
  .unit-comparison-store-bar .cell-select,
  .unit-comparison-store-note {
    width: 100%;
  }

  .unit-comparison-store-bar > label {
    align-items: stretch;
    flex-direction: column;
  }

  .unit-store-profile-body,
  .unit-breakdown-body {
    padding: 14px;
  }

  .unit-store-profile-panel,
  .unit-breakdown-panel {
    width: calc(100vw - 24px);
    height: calc(100dvh - 40px);
    max-height: calc(100dvh - 40px);
  }

  .unit-store-profile-panel .modal-blue-header,
  .unit-breakdown-panel .modal-blue-header {
    min-height: 64px;
    padding: 12px 14px;
  }

  .unit-store-profile-panel .modal-blue-header h2,
  .unit-breakdown-panel .modal-blue-header h2 {
    font-size: 19px;
    line-height: 1.2;
  }

  .unit-profile-tax-grid {
    grid-template-columns: 1fr;
  }

  .unit-profile-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .unit-profile-actions .button {
    flex: 1 1 0;
  }

  .unit-marketplace-tabs,
  .unit-search-tools {
    flex-wrap: wrap;
  }

  .unit-search {
    min-width: 0;
    flex: 1 1 210px;
  }

  .unit-data-quality {
    align-items: flex-start;
    gap: 5px;
  }

  .unit-data-quality > span {
    flex: 1 0 100%;
  }

  .unit-pagination {
    align-items: stretch;
  }

  .unit-pagination-pages {
    flex: 1 0 100%;
    justify-content: flex-start;
  }

  .unit-page-button {
    min-height: 40px;
  }
}

.unit-select-cell {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.unit-table.unit-selection-mode th.unit-select-cell,
.unit-table.unit-selection-mode td.unit-select-cell {
  position: sticky;
  left: 0;
  z-index: 7;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line), 7px 0 12px rgba(23, 33, 27, 0.05);
}

.unit-table.unit-selection-mode th.unit-select-cell {
  z-index: 10;
  background: #eaf2ee;
}

.unit-table.unit-selection-mode th.sticky-sku-column,
.unit-table.unit-selection-mode td.sticky-sku-column {
  left: 42px;
}

.unit-select-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.unit-edit-input {
  width: 100%;
  min-width: 86px;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 62%, transparent);
  border-radius: 6px;
  padding: 5px 7px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  color: inherit;
  font: inherit;
  text-align: center;
}

.unit-edit-input[type="text"] {
  min-width: 150px;
  text-align: left;
}

.unit-edit-input.unit-name-cell {
  min-width: 250px;
}

.unit-currency-editor {
  display: flex;
  min-width: 118px;
  align-items: center;
  gap: 3px;
}

.unit-table .unit-edit-input.unit-currency-input {
  min-width: 82px;
  flex: 1 1 auto;
  padding-right: 2px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.unit-currency-suffix {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.unit-input-with-source {
  min-width: 180px;
}

.unit-static-value {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-static-value.unit-static-wrap {
  min-width: 190px;
  max-width: 340px;
  white-space: normal;
}

.unit-value-source {
  display: block;
  max-width: 240px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}

.unit-edit-input:hover,
.unit-edit-input:focus {
  border-color: var(--line-strong);
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(32, 126, 110, 0.12);
}

.unit-edit-input[aria-invalid="true"] {
  border-color: #c2413a;
  background: #fff7f6;
  box-shadow: 0 0 0 3px rgba(194, 65, 58, 0.12);
}

.unit-table td.unit-calculation-excluded {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 7px,
    color-mix(in srgb, var(--muted) 5%, transparent) 7px,
    color-mix(in srgb, var(--muted) 5%, transparent) 14px
  );
}

.unit-table td.unit-calculation-excluded .unit-edit-input,
.unit-table td.unit-calculation-excluded .unit-static-value {
  opacity: 0.72;
}

.unit-fill-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 3;
  width: 9px;
  height: 9px;
  border: 1px solid #ffffff;
  border-radius: 2px;
  background: var(--teal);
  opacity: 0;
  cursor: crosshair;
  box-shadow: 0 0 0 1px rgba(32, 126, 110, 0.25);
}

.unit-table td:hover .unit-fill-handle,
.unit-edit-input:focus + .unit-fill-handle,
.unit-currency-editor:focus-within + .unit-fill-handle {
  opacity: 0.8;
}

.unit-fill-source {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.unit-fill-target {
  background: #e6f5f1 !important;
  box-shadow: inset 0 0 0 2px rgba(32, 126, 110, 0.35);
}

.unit-marketplace-panel {
  width: min(520px, calc(100vw - 40px));
}

.unit-marketplace-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.unit-marketplace-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.unit-marketplace-field .search {
  width: 100%;
  margin-left: 0;
  font-weight: 500;
}

.unit-marketplace-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

#dailyTable {
  width: max-content;
  min-width: 0;
  table-layout: fixed;
}

#dailyTable th,
#dailyTable td {
  padding: 5px 6px;
}

#dailyTable th[data-sort]::after {
  margin-left: 3px;
}

#dailyTable .column-resize-handle {
  right: 0;
  width: 8px;
}

#dailyTable .daily-photo-col {
  width: 44px;
  min-width: 44px;
}

#dailyTable .daily-total-col {
  width: 56px;
  min-width: 50px;
}

#dailyTable .daily-day-col,
#dailyTable .daily-cell {
  width: 52px;
  min-width: 48px;
}

#dailyTable .daily-date-label,
#dailyTable .daily-weekday-label {
  display: block;
  line-height: 1.05;
}

#dailyTable .daily-weekday-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: lowercase;
}

#dailyTable .daily-sku-col.sticky-sku-column {
  width: auto;
  min-width: 150px;
  max-width: none;
}

#dailyTable .daily-sku-col .sku-cell {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#dailyTable .daily-sku-col .sku-cell strong,
#dailyTable .daily-sku-col .sku-code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dailyTable .image-cell {
  width: 44px;
  min-width: 44px;
}

#dailyTable .product-thumb,
#dailyTable .image-empty {
  width: 32px;
  height: 32px;
}

.report-table {
  min-width: 2300px;
}

.report-calculation-parameter {
  white-space: nowrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.report-calculation-parameter[data-parameter-source="temporary"] {
  color: var(--teal-strong);
  font-weight: 700;
}

.compact th,
.compact td {
  padding: 7px 8px;
}

.compact td.positive {
  background: #dcfce7;
  color: #166534;
}

.daily-main {
  font-weight: 800;
  line-height: 1.1;
}

.daily-split {
  margin-top: 2px;
  color: #4f6358;
  font-size: 9.5px;
  line-height: 1.15;
}

.compact td.positive .daily-split {
  color: #2f6b45;
}

.daily-cell[data-heat-level="5"] .daily-split {
  color: rgba(255, 255, 255, 0.82);
}

.daily-cell[data-heat-level="5"] .daily-main {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.settings-table {
  min-width: 1400px;
}

.api-toolbar {
  justify-content: flex-start;
}

.api-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px;
}

.api-field {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.api-field span {
  color: var(--text);
  font-weight: 800;
}

.api-field input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface-soft);
}

.api-field input:focus {
  outline: 2px solid #bde4dc;
  border-color: var(--teal);
  background: #ffffff;
}

.api-field small {
  color: var(--muted);
}

.api-field-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.api-test-button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.api-store-section {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.api-store-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.api-store-title h3 {
  margin: 0;
  font-size: 17px;
}

.api-store-title span,
.api-store-status {
  color: var(--muted);
  font-size: 13px;
}

.api-store-list {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.api-store-row {
  display: grid;
  grid-template-columns: 34px minmax(160px, 0.85fr) repeat(2, minmax(170px, 1fr)) repeat(2, minmax(86px, 0.38fr)) minmax(110px, 0.5fr) minmax(104px, auto);
  gap: 8px;
  align-items: end;
  min-width: 1160px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.api-store-row.wb {
  grid-template-columns: 34px minmax(180px, 1fr) minmax(230px, 1.25fr) repeat(2, minmax(86px, 0.38fr)) minmax(110px, 0.5fr) minmax(104px, auto);
  min-width: 900px;
}

.api-store-slot {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e9f3f1;
  color: var(--teal);
  font-weight: 800;
}

.api-store-cell {
  display: grid;
  gap: 4px;
}

.api-store-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.api-store-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.api-store-cell input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #ffffff;
}

.api-store-cell.configured input {
  border-color: #84c7bd;
  background: #f4fbf9;
}

.api-key-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dff5ef;
  color: #157c6b !important;
  font-size: 11px !important;
  white-space: nowrap;
}

.api-store-status {
  align-self: center;
  justify-self: end;
  text-align: right;
}

.api-store-test-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.api-test-modal-panel {
  width: min(560px, calc(100vw - 32px));
}

.api-test-result-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.api-test-result-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-size: 27px;
  font-weight: 900;
}

.api-test-failure .api-test-result-icon {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.api-test-result-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.api-test-result-copy strong {
  font-size: 19px;
}

.api-test-result-copy p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.api-test-result-copy small {
  color: var(--muted);
}

.api-test-result-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px 22px;
}

.supply-table {
  min-width: 1900px;
}

.supply-store-field {
  display: inline-grid;
  gap: 3px;
  min-width: 230px;
}

.supply-store-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supply-store-select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
  color: var(--text);
}

.supply-plan-bar {
  display: grid;
  grid-template-columns: minmax(200px, 240px) auto auto minmax(260px, 1fr) auto;
  grid-template-areas: "store create library scenario share";
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.supply-plan-select {
  grid-area: store;
}

.supply-plan-create {
  grid-area: create;
}

.supply-plan-library {
  grid-area: library;
}

.supply-plan-scenario {
  grid-area: scenario;
}

.supply-plan-share {
  grid-area: share;
}

.supply-plan-library-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.supply-plan-select,
.supply-plan-scenario {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
  color: var(--text);
}

.supply-plan-scenario {
  min-width: 0;
}

.supply-snapshot-notice {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 132, 122, 0.3);
  border-radius: 8px;
  background: rgba(20, 132, 122, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.supply-view.is-snapshot .cluster-grid,
.supply-view.is-snapshot .data-table {
  opacity: 0.88;
}

@media (max-width: 980px) {
  .supply-plan-bar {
    grid-template-columns: minmax(200px, 1fr) auto auto auto;
    grid-template-areas:
      "store create library share"
      "scenario scenario scenario scenario";
  }

  .supply-plan-scenario {
    grid-area: scenario;
  }
}

@media (max-width: 680px) {
  .supply-plan-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "store store"
      "scenario scenario"
      "create library"
      "share share";
  }

  .supply-plan-bar .button,
  .supply-plan-select,
  .supply-plan-scenario {
    width: 100%;
    min-width: 0;
  }
}

#ozonSupplyTable {
  min-width: 2460px;
}

#ozonSupplyTable thead tr:first-child th {
  background: #f4f8fb;
  border-right: 1px solid var(--line);
}

.supply-cluster-head,
.supply-cluster-subhead,
.supply-cluster-cell {
  background: #dff8fc;
}

.supply-filter-row th {
  background: #f8fbfa;
  padding: 6px;
}

.supply-filter-row input {
  width: 100%;
  min-width: 54px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  text-align: center;
}

.supply-pivot-input {
  min-width: 58px;
  background: transparent;
}

.supply-total-row td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #f6faf8;
  border-top: 1px solid var(--line-strong);
  font-weight: 800;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.42);
}

.modal-panel {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.modal-confirm.hidden {
  display: none;
}

.modal-confirm {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.28);
}

.modal-confirm-panel {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.modal-confirm-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal-confirm-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.modal-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-blue-header {
  min-height: 72px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #15201a;
  color: #f8fbf8;
}

.modal-blue-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fbf8;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.product-bulk-search-panel {
  width: min(760px, calc(100vw - 40px));
  height: min(760px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.product-bulk-search-header {
  align-items: flex-start;
}

.product-bulk-search-header > div {
  min-width: 0;
}

.product-bulk-search-header p {
  margin: 5px 0 0;
  color: rgba(248, 251, 248, 0.72);
  font-size: 13px;
}

.product-bulk-search-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 12px;
  min-height: 0;
  padding: 18px 22px;
  overflow: hidden;
}

.product-bulk-search-query {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.product-bulk-search-query > span:first-child,
.product-bulk-search-article-header strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.product-bulk-search-query-control {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 36px;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding-left: 13px;
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.product-bulk-search-query-control:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.13);
}

.product-bulk-search-query-control > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-bulk-search-query-control input {
  min-width: 0;
  height: 44px;
  border: 0;
  padding: 0 8px;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.product-bulk-search-query-control input::-webkit-search-cancel-button {
  display: none;
}

.product-bulk-search-query-clear {
  width: 36px;
  height: 36px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.product-bulk-search-query-clear:hover,
.product-bulk-search-query-clear:focus-visible {
  color: var(--text);
  outline: 0;
}

.product-bulk-search-articles {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.product-bulk-search-article-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px 10px;
}

.product-bulk-search-article-header span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.product-bulk-search-list-head,
.product-bulk-search-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.product-bulk-search-list-head {
  min-height: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-bulk-search-list-head input,
.product-bulk-search-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.product-bulk-search-article-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-bulk-search-option {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.product-bulk-search-option:last-child {
  border-bottom: 0;
}

.product-bulk-search-option:hover,
.product-bulk-search-option:focus-within {
  background: var(--surface-soft);
}

.product-bulk-search-option.is-selected {
  background: var(--teal-soft);
}

.product-bulk-search-option-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-bulk-search-option-text strong,
.product-bulk-search-option-text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-bulk-search-option-text strong {
  font-size: 13px;
}

.product-bulk-search-option-text small {
  color: var(--muted);
  font-size: 11px;
}

.product-bulk-search-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.product-bulk-search-utility,
.product-bulk-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-bulk-search-utility .button {
  min-height: 38px;
}

.product-bulk-search-utility svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-bulk-search-error {
  border-left: 3px solid var(--red);
  padding: 8px 10px;
  background: #fff1f2;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.product-bulk-search-actions {
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.daily-sku-panel {
  width: min(760px, calc(100vw - 40px));
  height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.daily-sku-body {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.daily-sku-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.daily-sku-tools .search {
  margin-left: 0;
  flex: 1 1 260px;
}

.daily-sku-list-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-sku-head-check {
  width: 16px;
  height: 16px;
  margin: 0;
  justify-self: center;
}

.daily-sku-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.daily-sku-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
}

.daily-sku-option:hover {
  border-color: #b8ddd4;
}

.daily-sku-option-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.daily-sku-option-text strong,
.daily-sku-option-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-sku-option-text small {
  color: var(--muted);
}

.daily-sku-option-total {
  min-width: 48px;
  text-align: right;
  color: var(--teal);
  font-weight: 800;
}

.daily-sku-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.access-sku-panel {
  width: min(720px, calc(100vw - 40px));
  height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.access-sku-body {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.access-sku-body > .inline-hint {
  margin: 0;
}

.access-sku-search {
  gap: 6px;
}

.access-sku-search .search {
  width: 100%;
  margin-left: 0;
}

.access-sku-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.access-sku-toggle-found {
  min-height: 36px;
}

.access-sku-feedback {
  display: grid;
  gap: 4px;
}

.access-sku-feedback > .inline-hint {
  margin: 0;
}

.access-sku-error {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.access-sku-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.access-sku-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.access-sku-option:hover,
.access-sku-option:focus-within {
  border-color: var(--teal);
}

.access-sku-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.access-sku-option-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.access-sku-option-text strong,
.access-sku-option-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-sku-option-text small {
  color: var(--muted);
}

.access-sku-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.dashboard-scenario-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-scenario-button.is-active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.dashboard-scenario-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 6px 10px 6px 14px;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  color: var(--text);
  font-size: 13px;
}

.dashboard-scenario-notice > span {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-scenario-notice .button {
  min-height: 30px;
  padding: 4px 10px;
}

.dashboard-scenario-panel {
  width: min(1040px, calc(100vw - 40px));
  height: min(760px, calc(100dvh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dashboard-scenario-panel .modal-blue-header > div {
  min-width: 0;
}

.dashboard-scenario-panel .modal-blue-header p {
  margin: 4px 0 0;
  color: rgba(248, 251, 248, 0.72);
  font-size: 13px;
}

.dashboard-scenario-body {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(320px, 0.95fr);
  min-height: 0;
}

.dashboard-scenario-skus,
.dashboard-scenario-parameters {
  display: grid;
  align-content: start;
  min-height: 0;
  padding: 18px;
}

.dashboard-scenario-skus {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  border-right: 1px solid var(--line);
}

.dashboard-scenario-parameters {
  gap: 0;
  overflow: auto;
}

.dashboard-scenario-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.dashboard-scenario-section-heading strong {
  font-size: 16px;
}

.dashboard-scenario-section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-scenario-skus > .search {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

.dashboard-scenario-select-found {
  min-height: 34px;
}

.dashboard-scenario-sku-list {
  padding: 6px;
}

.dashboard-scenario-sku-list .access-sku-option {
  min-height: 68px;
  padding-block: 10px;
}

.dashboard-scenario-sku-list .access-sku-option-text {
  gap: 4px;
  padding-block: 2px;
}

.dashboard-scenario-sku-list .access-sku-option-text strong {
  line-height: 1.25;
}

.dashboard-scenario-sku-list .access-sku-option-text small {
  line-height: 1.35;
}

.dashboard-scenario-field {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(170px, 0.9fr);
  align-items: center;
  gap: 10px 14px;
  min-height: 76px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-scenario-field > .toggle {
  justify-self: start;
}

.dashboard-scenario-field .cell-input,
.dashboard-scenario-field .cell-select {
  width: 100%;
  min-width: 0;
}

.dashboard-scenario-number {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-scenario-date-range {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-scenario-date-range label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-scenario-parameters > .inline-hint,
.dashboard-scenario-parameters > .access-sku-error {
  margin: 12px 0 0;
}

.dashboard-scenario-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #b8ddd4;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-scenario-progress.hidden,
.dashboard-scenario-spinner.hidden {
  display: none;
}

.dashboard-scenario-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: inspire-spin 0.85s linear infinite;
}

.dashboard-scenario-sku-list[aria-busy="true"] {
  cursor: wait;
}

.dashboard-scenario-panel .modal-close:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dashboard-scenario-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.dashboard-scenario-action-spacer {
  flex: 1 1 auto;
}

#reportTable tbody tr.order-scenario-row > td {
  background: color-mix(in srgb, var(--teal-soft) 58%, var(--surface));
}

@media (max-width: 720px) {
  .dashboard-scenario-notice {
    align-items: flex-start;
  }

  .dashboard-scenario-panel {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
  }

  .dashboard-scenario-panel .modal-blue-header {
    min-height: 64px;
    padding: 12px 14px;
  }

  .dashboard-scenario-panel .modal-blue-header h2 {
    font-size: 18px;
  }

  .dashboard-scenario-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(300px, 42dvh) auto;
    overflow: auto;
  }

  .dashboard-scenario-skus {
    min-height: 0;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-scenario-parameters {
    padding: 12px;
    overflow: visible;
  }

  .dashboard-scenario-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

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

  .dashboard-scenario-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }

  .dashboard-scenario-action-spacer {
    display: none;
  }

  .dashboard-scenario-actions .button {
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    line-height: 1.15;
    white-space: normal;
  }
}

.sku-access-button {
  min-width: 90px;
}

.supply-wizard-body {
  padding: 24px;
  overflow: auto;
  max-height: calc(100vh - 126px);
}

.wizard-tabs {
  display: flex;
  align-items: end;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.wizard-tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 12px 18px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-size: 16px;
}

.wizard-tab.active {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}

.wizard-help {
  margin-left: auto;
  padding-bottom: 16px;
  color: #777;
}

.wizard-grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.wizard-stack {
  display: grid;
  gap: 18px;
}

.wizard-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
}

.wizard-field input,
.wizard-field select {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
}

.wizard-note {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.wizard-inline-hint {
  margin-top: -8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.file-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 20px;
}

.file-row span {
  padding: 16px 18px;
  background: #f8faf8;
}

.file-row span + span {
  background: #ffffff;
  border-left: 1px solid var(--line);
}

.wizard-clusters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
  row-gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.wizard-cluster {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 68px auto;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.wizard-cluster span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-cluster input[type="number"] {
  height: 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.wizard-actions {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.button.muted {
  background: #6f7880;
  border-color: #6f7880;
  color: #ffffff;
}

.transit-table,
.production-table {
  min-width: 1700px;
}

.settings-table td {
  vertical-align: middle;
}

.settings-panel {
  display: grid;
  gap: 12px;
  max-width: 940px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.appearance-settings-panel {
  margin-top: 12px;
  border-color: color-mix(in srgb, var(--teal) 28%, var(--line));
  background:
    radial-gradient(circle at 94% 18%, color-mix(in srgb, var(--teal-soft) 64%, transparent) 0 74px, transparent 75px),
    linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--teal-soft) 42%, var(--surface)) 100%);
}

.appearance-settings-grid {
  max-width: 620px;
}

.theme-preview-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-preview-dot {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 8px 16px rgba(23, 33, 27, 0.08);
}

.theme-preview-dot.green {
  background: #0f766e;
}

.theme-preview-dot.teal {
  background: #0891b2;
}

.theme-preview-dot.blue {
  background: #2563eb;
}

.theme-preview-dot.violet {
  background: #7c3aed;
}

.theme-preview-dot.graphite {
  background: #334155;
}

.program-settings-actions {
  margin-top: 12px;
}

.access-panel {
  max-width: none;
  margin-bottom: 12px;
}

.access-create-panel {
  max-width: 1040px;
  overflow: hidden;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading.compact h2,
.section-heading.compact h3 {
  margin: 0;
  font-size: 18px;
}

.section-heading.compact span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.access-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr) minmax(240px, 1.1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 920px;
}

.access-form .field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.access-form .field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.access-form input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.access-form input:focus {
  outline: 2px solid rgba(0, 118, 111, 0.18);
  border-color: rgba(0, 118, 111, 0.45);
}

.access-form .button {
  min-height: 38px;
  white-space: nowrap;
}

.access-log-toolbar {
  align-items: end;
  margin-bottom: 10px;
}

.access-log-toolbar .search {
  min-width: 220px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 6px;
  min-width: 0;
}

.permission-item {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 132px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.permission-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-item select {
  width: 100%;
  min-width: 0;
}

.user-cell {
  display: grid;
  gap: 4px;
  min-width: 210px;
}

.user-cell strong,
.user-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-cell small {
  color: var(--muted);
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.access-table {
  min-width: 980px;
}

#accessUsersTable {
  width: 100%;
  min-width: 1460px;
  table-layout: fixed;
}

#accessUsersTable .access-user-column {
  width: 230px;
}

#accessUsersTable .access-status-column {
  width: 120px;
}

#accessUsersTable .access-role-column {
  width: 145px;
}

#accessUsersTable .access-actions-column {
  width: 300px;
}

#accessUsersTable th,
#accessUsersTable td {
  overflow: visible;
  text-align: left;
  white-space: normal;
  vertical-align: top;
}

#accessUsersTable .access-actions-cell,
#accessUsersTable .access-permissions-cell {
  overflow: visible;
}

#accessUsersTable .access-actions .button {
  max-width: 100%;
  white-space: normal;
}

.access-protected-summary {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  white-space: normal;
}

.access-protected-summary strong {
  color: var(--text);
  font-size: 13px;
}

.access-protected-summary span,
.access-protected-actions {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.inline-hint.is-error {
  color: var(--red);
  font-weight: 700;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-infrastructure {
  min-width: 0;
  margin-bottom: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-infrastructure .section-heading {
  margin-bottom: 8px;
}

.admin-refresh-action {
  font-weight: 750;
}

.admin-infrastructure .admin-refresh-action {
  min-height: 38px;
  box-shadow: 0 4px 14px rgba(12, 93, 87, 0.1);
}

.admin-refresh-action[aria-busy="true"] {
  opacity: 0.78;
  cursor: progress;
}

.admin-refresh-action[aria-busy="true"] .button-icon {
  animation: inspire-spin 0.85s linear infinite;
}

#adminUsersTable[aria-busy="true"] {
  opacity: 0.72;
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .admin-refresh-action[aria-busy="true"] .button-icon {
    animation: none;
  }
}

.admin-infrastructure-wrap {
  width: 100%;
  max-width: 100%;
}

.admin-infrastructure-table {
  min-width: 980px;
}

.admin-infrastructure-table th:first-child,
.admin-infrastructure-table td:first-child {
  min-width: 210px;
}

.admin-infrastructure-cell {
  display: grid;
  gap: 3px;
  min-width: 120px;
}

.admin-infrastructure-cell strong {
  font-size: 13px;
}

.admin-infrastructure-cell small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-infrastructure-status.ok {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

.admin-infrastructure-status.warning {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.admin-infrastructure-status.pending {
  background: rgba(100, 116, 139, 0.13);
  color: #475569;
}

.admin-infrastructure-status.critical,
.admin-infrastructure-status.unavailable {
  background: rgba(239, 68, 68, 0.13);
  color: #b91c1c;
}

.admin-infrastructure-status-detail {
  display: block;
  max-width: 190px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-infrastructure-placeholder {
  color: var(--muted);
}

:root[data-theme="dark"] .admin-infrastructure-status.ok {
  color: #6ee7b7;
}

:root[data-theme="dark"] .admin-infrastructure-status.warning {
  color: #fbbf24;
}

:root[data-theme="dark"] .admin-infrastructure-status.pending {
  color: #cbd5e1;
}

:root[data-theme="dark"] .admin-infrastructure-status.critical,
:root[data-theme="dark"] .admin-infrastructure-status.unavailable {
  color: #fca5a5;
}

.admin-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  box-sizing: border-box;
}

.admin-panel > *,
.admin-panel .section-heading,
.admin-panel .admin-heading-actions {
  min-width: 0;
}

.admin-panel .table-wrap {
  width: 100%;
  max-width: 100%;
}

.admin-table {
  min-width: 1780px;
}

.admin-table .user-cell {
  min-width: 230px;
}

.admin-company-select {
  min-width: 210px;
}

.admin-actions {
  flex-wrap: nowrap;
}

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

.admin-company-group-row td {
  padding: 8px 10px;
  border-top: 2px solid var(--teal);
  background: var(--surface-soft);
}

.admin-company-group {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(150px, 190px) minmax(220px, 1fr);
  align-items: center;
  gap: 10px;
}

.admin-company-identity {
  display: grid;
  gap: 3px;
  text-align: left;
}

.admin-company-identity small {
  color: var(--muted);
}

.admin-company-reason {
  min-width: 220px;
  text-align: left;
}

.admin-block-date,
.admin-company-block-date {
  min-width: 145px;
}

.admin-presence.online {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

.admin-presence.offline {
  background: rgba(100, 116, 139, 0.13);
  color: #475569;
}

.admin-toggle {
  white-space: nowrap;
}

.admin-status.active {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

.admin-status.limited {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.admin-status.blocked {
  background: rgba(239, 68, 68, 0.13);
  color: #b91c1c;
}

.admin-reason-input {
  min-width: 220px;
}

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

  .admin-heading-actions,
  .admin-heading-actions .button {
    width: 100%;
  }

  .admin-infrastructure .section-heading,
  .admin-infrastructure .section-heading .button {
    width: 100%;
  }

  .admin-company-group {
    grid-template-columns: minmax(210px, 1fr) auto auto minmax(145px, 180px) minmax(200px, 1fr);
  }
}

@media (max-width: 620px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-infrastructure {
    padding: 10px 0;
  }
}

.settings-subnav {
  width: fit-content;
  margin-bottom: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.settings-row div {
  display: grid;
  gap: 5px;
}

.settings-row span,
.warehouse-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.program-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px)) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
}

.program-settings-grid .field {
  align-items: stretch;
  flex-direction: column;
}

.program-settings-grid select {
  min-width: 100%;
}

.warehouse-mode-field {
  grid-column: span 2;
  max-width: 760px;
}

.warehouse-mode-field small {
  margin-top: 4px;
  min-height: 18px;
}

.settings-section-gap {
  margin-top: 18px;
}

.warehouse-mode-notice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -4px 0 10px;
  padding: 11px 13px;
  border: 1px solid #e6cf9b;
  border-radius: 8px;
  background: #fff9e9;
  color: var(--text);
}

.warehouse-mode-notice.is-editable {
  border-color: #b8dccd;
  background: #eef8f3;
}

.warehouse-mode-notice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f5e6bd;
  color: #7d5700;
}

.warehouse-mode-notice.is-editable .warehouse-mode-notice-icon {
  background: #dcefe7;
  color: #0c6d59;
}

.warehouse-mode-notice-icon svg,
.warehouse-mode-notice .button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.warehouse-mode-notice-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.warehouse-mode-status {
  color: #765515;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.warehouse-mode-notice.is-editable .warehouse-mode-status {
  color: #14705c;
}

.warehouse-mode-notice-copy strong {
  font-size: 14px;
}

.warehouse-mode-notice-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.warehouse-mode-notice > .button {
  justify-self: end;
}

.warehouse-activation-panel {
  width: min(620px, calc(100vw - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.warehouse-activation-body {
  padding: 20px 22px 10px;
  overflow: auto;
}

.warehouse-activation-body > p {
  margin: 0;
  line-height: 1.55;
}

.warehouse-activation-body ul {
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.warehouse-activation-body li {
  margin: 8px 0;
  line-height: 1.45;
}

.warehouse-activation-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #f4b9b6;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
}

.warehouse-activation-error.hidden {
  display: none;
}

.warehouse-activation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
}

@media (max-width: 760px) {
  .warehouse-mode-notice {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    padding: 10px;
  }

  .warehouse-mode-notice-icon {
    width: 34px;
    height: 34px;
  }

  .warehouse-mode-notice > .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .warehouse-activation-panel {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .warehouse-activation-body {
    padding: 16px 14px 8px;
  }

  .warehouse-activation-actions {
    padding: 12px 14px 16px;
  }

  .warehouse-activation-actions .button {
    flex: 1 1 0;
    white-space: normal;
  }
}

:root[data-theme="dark"] .warehouse-mode-notice {
  border-color: #6d5a2f;
  background: #2b281d;
}

:root[data-theme="dark"] .warehouse-mode-notice.is-editable {
  border-color: #315d4f;
  background: #1b2b25;
}

:root[data-theme="dark"] .warehouse-mode-notice-icon {
  background: #443a21;
  color: #ebca78;
}

:root[data-theme="dark"] .warehouse-mode-notice.is-editable .warehouse-mode-notice-icon {
  background: #27483c;
  color: #8ed9c0;
}

.settings-actions {
  justify-content: flex-start;
}

.warehouse-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
}

.warehouse-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f5;
  overflow-x: auto;
}

.warehouse-section-tabs {
  margin: 10px 0 2px;
}

#warehouseSectionToolbar[hidden],
#warehouseSectionToolbar [hidden] {
  display: none !important;
}

.warehouse-section-panel[hidden] {
  display: none;
}

.warehouse-section-panel {
  min-width: 0;
}

.warehouse-tab {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.warehouse-tab:hover {
  color: var(--text);
  background: #ffffff;
}

.warehouse-tab.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.warehouse-section-title h3 {
  margin: 0;
  font-size: 16px;
}

#warehouseBalanceTable {
  min-width: 1900px;
}

.warehouse-package-missing {
  color: #a15c00;
  font-weight: 700;
}

.warehouse-package-only-row td:not(.warehouse-package-missing) {
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}

.warehouse-sku-history-cell {
  min-width: 190px;
  text-align: left;
}

.warehouse-sku-history-trigger {
  display: inline;
  color: var(--teal-strong);
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: text;
  -webkit-user-select: text;
}

.warehouse-sku-history-text {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--teal) 42%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
  user-select: text;
  -webkit-user-select: text;
}

.warehouse-sku-history-trigger:hover,
.warehouse-sku-history-trigger:focus-visible {
  color: var(--teal);
  text-decoration-color: currentColor;
}

.warehouse-sku-history-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--teal) 40%, transparent);
  outline-offset: 3px;
  border-radius: 3px;
}

#warehouseMovementTable,
#returnsTable {
  min-width: 1420px;
}

.warehouse-document-panel {
  width: min(1120px, calc(100vw - 32px));
  height: min(860px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.warehouse-document-form {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.warehouse-document-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
}

.warehouse-document-type-tabs {
  display: flex;
  width: fit-content;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.warehouse-document-type-tabs .button {
  min-width: 126px;
}

.warehouse-document-type-tabs .button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.warehouse-document-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.warehouse-document-fields .field,
.warehouse-document-line-main .field,
.warehouse-identifier-row .field {
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
}

.warehouse-document-fields input,
.warehouse-document-fields select,
.warehouse-document-line-main input,
.warehouse-identifier-row input,
.warehouse-identifier-row select {
  width: 100%;
  min-width: 0;
}

.warehouse-document-outbound-fields {
  display: grid;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.warehouse-document-outbound-fields.hidden {
  display: none;
}

.warehouse-document-comment {
  grid-column: 1 / -1;
}

.warehouse-import-source-confirmation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--amber);
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--text);
  font-weight: 700;
}

.warehouse-import-source-confirmation input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.warehouse-document-lines-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.warehouse-document-lines-toolbar h3 {
  margin: 0;
  font-size: 16px;
}

.warehouse-document-line-actions,
.warehouse-document-footer-actions,
.warehouse-line-code-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.warehouse-document-lines {
  min-height: 120px;
}

.warehouse-document-line {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.warehouse-document-line-shortage {
  margin: 4px 0;
  padding: 12px;
  border: 1px solid var(--red);
  border-radius: 6px;
  background: var(--red-soft);
}

.warehouse-document-stock-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.warehouse-document-stock-status.risk {
  color: var(--red);
}

.warehouse-document-line [aria-invalid="true"] {
  border-color: var(--red);
  color: var(--red);
  background: var(--surface);
}

.warehouse-document-line-main {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(160px, 1fr) 110px auto auto;
  gap: 10px;
  align-items: end;
}

.warehouse-document-line-main .warehouse-line-comment {
  grid-column: 1 / -2;
}

.warehouse-line-codes-toggle {
  min-height: 38px;
  white-space: nowrap;
}

.warehouse-line-identifiers {
  margin-top: 10px;
  padding: 10px 0 0 14px;
  border-left: 3px solid var(--line-strong);
}

.warehouse-line-identifiers.hidden {
  display: none;
}

.warehouse-line-identifiers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.warehouse-line-identifiers-header strong {
  font-size: 13px;
}

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

.warehouse-identifier-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: end;
}

.warehouse-document-error {
  min-height: 20px;
  margin: 0 0 2px;
  color: #b42318;
  font-weight: 700;
}

.warehouse-document-ledger-warning {
  margin-bottom: 4px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.warehouse-document-error[data-tone="status"] {
  color: var(--muted);
}

.warehouse-document-error[data-tone="success"] {
  color: var(--teal-strong);
}

.warehouse-document-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.warehouse-document-summary {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.warehouse-document-summary.attention {
  color: var(--amber);
}

.warehouse-document-footer-status {
  min-width: 0;
  flex: 1 1 auto;
}

.warehouse-document-row-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.warehouse-document-row-actions .icon-button {
  flex: 0 0 auto;
}

.warehouse-pallet-panel,
.marketplace-supply-import-panel {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.warehouse-pallet-body,
.marketplace-supply-import-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.warehouse-pallet-fieldset {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.warehouse-pallet-fieldset legend {
  padding-inline: 6px;
  font-weight: 800;
}

.warehouse-pallet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.warehouse-pallet-grid .field,
.warehouse-pallet-carton-row .field,
.marketplace-supply-import-filters .field {
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
}

.warehouse-pallet-grid input,
.warehouse-pallet-carton-row input,
.marketplace-supply-import-filters input,
.marketplace-supply-import-filters select {
  width: 100%;
  min-width: 0;
}

.warehouse-pallet-carton-toggle {
  width: fit-content;
  margin: 6px 0;
}

.warehouse-pallet-cartons {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.warehouse-pallet-cartons-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.warehouse-pallet-cartons-heading h3 {
  margin: 0 0 2px;
  font-size: 16px;
}

.warehouse-pallet-cartons-heading span {
  color: var(--muted);
  font-size: 13px;
}

.warehouse-pallet-carton-rows {
  display: grid;
  gap: 8px;
}

.warehouse-pallet-carton-row {
  display: grid;
  grid-template-columns: 82px 100px repeat(4, minmax(110px, 1fr)) 40px;
  align-items: end;
  gap: 8px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}

.warehouse-pallet-carton-number {
  align-self: center;
}

.warehouse-pallet-result {
  display: grid;
  gap: 12px;
}

.warehouse-pallet-visual-section {
  min-width: 0;
  padding-top: 4px;
}

.warehouse-pallet-visual-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.warehouse-pallet-visual-heading h3,
.warehouse-pallet-visual-heading p {
  margin: 0;
}

.warehouse-pallet-visual-heading h3 {
  font-size: 17px;
}

.warehouse-pallet-visual-heading p,
.warehouse-pallet-visual-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-pallet-visual-heading p {
  margin-top: 3px;
  line-height: 1.4;
}

.warehouse-pallet-visual-heading > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.warehouse-pallet-visual-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 210px);
  gap: 10px;
  min-width: 0;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
}

.warehouse-pallet-visual-card {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  scroll-snap-align: start;
}

.warehouse-pallet-visual-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

.warehouse-pallet-visual-card figcaption strong {
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
}

.warehouse-pallet-visual-card figcaption span {
  flex: 0 0 auto;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 10px;
  font-weight: 800;
}

.warehouse-pallet-visual-diagram {
  position: relative;
  height: 210px;
  margin: 10px 0 12px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  overflow: hidden;
}

.warehouse-pallet-visual-maximum {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  padding: 3px 5px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.warehouse-pallet-visual-cargo {
  position: absolute;
  z-index: 1;
  left: 26px;
  right: 18px;
  bottom: var(--pallet-base-height, 0%);
  height: var(--pallet-cargo-height, 0%);
  min-height: 2px;
  border: 2px solid var(--teal);
  background: var(--surface-soft);
}

.warehouse-pallet-visual-density {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pallet-density, 0%);
  background: #76c7b9;
}

.warehouse-pallet-visual-height {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 50%;
  padding: 1px 3px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.warehouse-pallet-visual-base {
  position: absolute;
  z-index: 2;
  left: 17px;
  right: 9px;
  bottom: 0;
  height: max(10px, var(--pallet-base-height, 0%));
}

.warehouse-pallet-visual-deck {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border: 1px solid #826b4b;
  background: #c6a46d;
}

.warehouse-pallet-visual-foot {
  position: absolute;
  bottom: 0;
  width: 18%;
  height: calc(100% - 6px);
  min-height: 4px;
  border-inline: 1px solid #826b4b;
  border-bottom: 1px solid #826b4b;
  background: #d8bd91;
}

.warehouse-pallet-visual-foot.left {
  left: 4%;
}

.warehouse-pallet-visual-foot.center {
  left: 41%;
}

.warehouse-pallet-visual-foot.right {
  right: 4%;
}

.warehouse-pallet-visual-details {
  display: grid;
  gap: 5px;
  margin: 0;
}

.warehouse-pallet-visual-details > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.warehouse-pallet-visual-details dt,
.warehouse-pallet-visual-details dd {
  margin: 0;
  font-size: 11px;
}

.warehouse-pallet-visual-details dt {
  color: var(--muted);
}

.warehouse-pallet-visual-details dd {
  min-width: 0;
  font-weight: 700;
  text-align: right;
}

.warehouse-pallet-result-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.warehouse-pallet-result-summary > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.warehouse-pallet-result-summary > div:last-child {
  border-right: 0;
}

.warehouse-pallet-result-summary span,
.warehouse-pallet-result-summary strong {
  display: block;
}

.warehouse-pallet-result-summary span {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-pallet-result-summary strong {
  margin-top: 4px;
  font-size: 17px;
}

.warehouse-pallet-result-table {
  min-width: 820px;
}

.warehouse-pallet-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.marketplace-supply-import-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 10px;
  margin: 14px 0 8px;
}

.marketplace-supply-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.marketplace-supply-option {
  display: grid;
  grid-template-columns: 28px minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(150px, 0.9fr) 130px 110px;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.marketplace-supply-option:hover {
  background: var(--surface-soft);
}

.marketplace-supply-option.disabled {
  color: var(--muted);
  cursor: default;
}

.marketplace-supply-option-main strong,
.marketplace-supply-option-main span {
  display: block;
}

.marketplace-supply-option-main span,
.marketplace-supply-option-meta {
  color: var(--muted);
  font-size: 12px;
}

.marketplace-supply-status {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.marketplace-supply-status.accepted {
  color: #16794c;
  background: #e8f7ef;
}

.marketplace-supply-status.problem,
.marketplace-supply-status.cancelled {
  color: #b42318;
  background: #fff0ed;
}

.marketplace-supply-status.not_shipped {
  color: #5e6670;
  background: #eef1f3;
}

.marketplace-supply-status.in_transit,
.marketplace-supply-status.receiving {
  color: #075b8f;
  background: #e8f4fb;
}

.marketplace-supply-browser-panel,
.marketplace-supply-details-panel {
  width: min(1240px, calc(100vw - 32px));
  height: min(880px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#marketplaceSupplyDetailsModal {
  z-index: 1020;
}

.marketplace-supply-browser-panel .modal-blue-header > div,
.marketplace-supply-details-panel .modal-blue-header > div {
  min-width: 0;
}

.marketplace-supply-browser-panel .modal-blue-header p,
.marketplace-supply-details-panel .modal-blue-header p {
  margin: 4px 0 0;
  color: rgba(248, 251, 248, 0.72);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.marketplace-supply-browser-body,
.marketplace-supply-details-body {
  min-height: 0;
  padding: 14px 18px;
}

.marketplace-supply-browser-body {
  display: grid;
  grid-template-rows: auto auto auto minmax(160px, 1fr) auto;
  gap: 9px;
  overflow: auto;
  overscroll-behavior: contain;
}

.marketplace-supply-browser-filters {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(170px, 0.7fr) minmax(250px, 1.3fr) auto;
  align-items: end;
  gap: 10px;
}

.marketplace-supply-browser-refresh {
  min-height: 42px;
  white-space: nowrap;
}

.marketplace-supply-browser-filters .field {
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
}

.marketplace-supply-browser-filters input,
.marketplace-supply-browser-filters select {
  width: 100%;
  min-width: 0;
}

.marketplace-supply-browser-hint {
  min-height: 18px;
  margin: 0;
}

.marketplace-supply-browser-hint.error {
  color: var(--red);
  font-weight: 700;
}

.marketplace-supply-browser-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-height: 38px;
  padding: 7px 10px;
  border-block: 1px solid var(--line);
  background: var(--surface-soft);
}

.marketplace-supply-browser-summary > span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.marketplace-supply-browser-summary small {
  color: var(--muted);
  font-size: 12px;
}

.marketplace-supply-browser-summary strong {
  font-size: 13px;
}

.marketplace-supply-browser-table-wrap,
.marketplace-supply-details-table-wrap {
  min-height: 0;
  overflow: auto;
}

.marketplace-supply-browser-table {
  min-width: 980px;
}

.marketplace-supply-details-table {
  min-width: 1120px;
}

.marketplace-supply-browser-table th,
.marketplace-supply-details-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.marketplace-supply-browser-table th:nth-child(1) {
  width: 220px;
}

.marketplace-supply-browser-table th:nth-child(2) {
  width: 140px;
}

.marketplace-supply-browser-table th:nth-child(3) {
  width: 230px;
}

.marketplace-supply-browser-table th:nth-child(4) {
  width: 150px;
}

.marketplace-supply-browser-table th:nth-child(5) {
  width: 145px;
}

.marketplace-supply-browser-number,
.marketplace-supply-browser-number strong,
.marketplace-supply-browser-number span {
  display: block;
  min-width: 0;
}

.marketplace-supply-browser-number strong {
  overflow-wrap: anywhere;
}

.marketplace-supply-browser-number span,
.marketplace-supply-browser-date {
  color: var(--muted);
  font-size: 12px;
}

.marketplace-supply-browser-route {
  overflow-wrap: anywhere;
}

.marketplace-supply-browser-composition {
  white-space: nowrap;
}

.marketplace-supply-browser-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.marketplace-supply-browser-actions .button {
  min-height: 30px;
  padding: 5px 8px;
}

.marketplace-supply-browser-pagination {
  margin: 0;
}

.marketplace-supply-details-body {
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr);
  gap: 12px;
  overflow: auto;
  overscroll-behavior: contain;
}

@media (max-height: 620px) and (min-width: 761px) {
  .marketplace-supply-browser-table-wrap,
  .marketplace-supply-details-table-wrap {
    min-height: 160px;
    max-height: 46dvh;
  }
}

.marketplace-supply-details-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: var(--surface-soft);
}

.marketplace-supply-details-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.marketplace-supply-details-summary > div:first-child {
  border-left: 0;
}

.marketplace-supply-details-summary span,
.marketplace-supply-details-summary strong {
  display: block;
}

.marketplace-supply-details-summary span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.marketplace-supply-details-summary strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.marketplace-supply-detail-status.accepted {
  color: #16794c;
}

.marketplace-supply-detail-status.problem,
.marketplace-supply-detail-status.cancelled {
  color: #b42318;
}

.marketplace-supply-detail-status.in_transit,
.marketplace-supply-detail-status.receiving {
  color: #075b8f;
}

.marketplace-supply-details-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1000px) {
  .marketplace-supply-details-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketplace-supply-details-summary > div:nth-child(4) {
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .warehouse-document-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .warehouse-document-panel .modal-blue-header {
    min-height: 58px;
    padding: 9px 12px;
  }

  .warehouse-document-panel .modal-blue-header h2 {
    font-size: 19px;
  }

  .warehouse-document-body {
    padding: 12px;
  }

  .warehouse-document-type-tabs,
  .warehouse-document-type-tabs .button {
    width: 100%;
  }

  .warehouse-document-type-tabs .button {
    min-width: 0;
  }

  .warehouse-document-fields,
  .warehouse-document-outbound-fields,
  .warehouse-document-line-main,
  .warehouse-identifier-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .warehouse-document-outbound-fields,
  .warehouse-document-comment,
  .warehouse-document-line-main .warehouse-line-comment {
    grid-column: auto;
  }

  .warehouse-document-lines-toolbar,
  .warehouse-document-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-document-line-actions,
  .warehouse-document-footer-actions {
    width: 100%;
  }

  .warehouse-document-footer-status {
    width: 100%;
  }

  .warehouse-document-line-actions .button,
  .warehouse-document-footer-actions .button {
    flex: 1 1 0;
    min-width: 0;
  }

  .warehouse-document-line {
    position: relative;
    padding: 14px 0;
  }

  .warehouse-document-line-main > .icon-button {
    position: absolute;
    top: 10px;
    right: 0;
  }

  .warehouse-document-line-main > .field:first-child {
    padding-right: 48px;
  }

  .warehouse-line-identifiers {
    padding-left: 9px;
  }

  .warehouse-document-footer {
    padding: 10px 12px;
  }

  .warehouse-pallet-panel,
  .marketplace-supply-import-panel,
  .marketplace-supply-browser-panel,
  .marketplace-supply-details-panel {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .marketplace-supply-browser-panel .modal-blue-header,
  .marketplace-supply-details-panel .modal-blue-header {
    min-height: 58px;
    padding: 9px 12px;
  }

  .marketplace-supply-browser-panel .modal-blue-header h2,
  .marketplace-supply-details-panel .modal-blue-header h2 {
    font-size: 19px;
  }

  .marketplace-supply-browser-body,
  .marketplace-supply-details-body {
    display: block;
    padding: 12px;
    overflow: auto;
  }

  .marketplace-supply-browser-filters {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 8px;
  }

  .marketplace-supply-browser-refresh {
    width: 100%;
  }

  .marketplace-supply-browser-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin: 8px 0;
  }

  .marketplace-supply-browser-summary > span {
    display: grid;
    gap: 1px;
  }

  .marketplace-supply-browser-panel .marketplace-supply-browser-table-wrap,
  .marketplace-supply-details-panel .marketplace-supply-details-table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .marketplace-supply-browser-table,
  .marketplace-supply-details-table {
    width: 100%;
    min-width: 0;
  }

  .marketplace-supply-browser-table thead,
  .marketplace-supply-details-table thead {
    display: none;
  }

  .marketplace-supply-browser-table tbody,
  .marketplace-supply-details-table tbody,
  .marketplace-supply-browser-table tr,
  .marketplace-supply-details-table tr {
    display: block;
  }

  .marketplace-supply-browser-table tr,
  .marketplace-supply-details-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .marketplace-supply-browser-table td,
  .marketplace-supply-details-table td {
    display: grid;
    grid-template-columns: minmax(132px, 0.44fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 34px;
    padding: 7px 2px;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .marketplace-supply-browser-table td::before,
  .marketplace-supply-details-table td::before {
    content: attr(data-label);
    min-width: 0;
    padding-right: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .marketplace-supply-browser-table td.empty-cell,
  .marketplace-supply-details-table td.empty-cell {
    display: block;
    min-height: 54px;
    padding: 16px 2px;
  }

  .marketplace-supply-browser-table td.empty-cell::before,
  .marketplace-supply-details-table td.empty-cell::before {
    content: none;
  }

  .marketplace-supply-browser-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .marketplace-supply-browser-actions .button {
    min-height: 40px;
  }

  .marketplace-supply-browser-pagination {
    margin-top: 10px;
  }

  .marketplace-supply-details-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 8px 0 12px;
  }

  .marketplace-supply-details-summary > div:nth-child(odd) {
    border-left: 0;
  }

  .marketplace-supply-details-summary > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .marketplace-supply-details-table td.numeric {
    text-align: left;
  }

  .marketplace-supply-browser-panel .warehouse-pallet-footer .button,
  .marketplace-supply-details-panel .warehouse-pallet-footer .button {
    flex: 1 1 0;
  }

  .warehouse-pallet-grid,
  .warehouse-pallet-carton-row,
  .marketplace-supply-import-filters,
  .marketplace-supply-option {
    grid-template-columns: minmax(0, 1fr);
  }

  .warehouse-pallet-carton-number {
    padding-right: 44px;
  }

  .warehouse-pallet-carton-row {
    position: relative;
  }

  .warehouse-pallet-carton-row > .icon-button {
    position: absolute;
    top: 8px;
    right: 0;
  }

  .warehouse-pallet-visual-heading {
    align-items: start;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .warehouse-pallet-visual-heading p {
    max-width: 240px;
  }

  .warehouse-pallet-visual-gallery {
    grid-auto-columns: minmax(174px, 76vw);
  }

  .warehouse-pallet-visual-diagram {
    height: 190px;
  }

  .warehouse-pallet-carton-toggle {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    line-height: 1.35;
    white-space: normal;
  }

  .warehouse-pallet-carton-toggle input {
    flex: 0 0 18px;
    margin-top: 1px;
  }

  .warehouse-pallet-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-pallet-result-summary > div {
    border-bottom: 1px solid var(--line);
  }

  .warehouse-pallet-footer .button {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .marketplace-supply-browser-summary,
  .marketplace-supply-details-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-supply-details-summary > div,
  .marketplace-supply-details-summary > div:nth-child(even) {
    border-left: 0;
  }

  .marketplace-supply-browser-table td,
  .marketplace-supply-details-table td {
    grid-template-columns: minmax(94px, 0.4fr) minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .warehouse-document-line-actions,
  .warehouse-document-footer-actions {
    flex-wrap: wrap;
  }

  .warehouse-document-line-actions .button,
  .warehouse-document-footer-actions .button {
    flex-basis: calc(50% - 4px);
  }

  .warehouse-document-footer-actions .button.primary {
    flex-basis: 100%;
  }
}

@media (max-height: 480px) {
  .warehouse-document-panel {
    width: min(1120px, calc(100vw - 8px));
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
  }

  .warehouse-document-panel .modal-blue-header {
    min-height: 48px;
    padding: 4px 10px;
  }

  .warehouse-document-body {
    padding: 8px 12px;
  }

  .warehouse-document-footer {
    padding-block: 6px;
  }
}

.warehouse-return-stats {
  margin-bottom: 8px;
}

.warehouse-sku-history-panel {
  width: min(1480px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#warehouseSkuHistoryModal {
  z-index: 1010;
}

.warehouse-sku-history-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 20px;
}

.warehouse-sku-history-product {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
}

.warehouse-sku-history-product > div:first-child,
.warehouse-sku-history-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.warehouse-sku-history-meta {
  max-width: 580px;
  justify-items: end;
  text-align: right;
}

.warehouse-sku-history-sku {
  color: var(--teal-strong);
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.warehouse-sku-history-barcode,
.warehouse-sku-history-meta > span:first-child {
  color: var(--muted);
  font-size: 13px;
}

#warehouseSkuHistorySource {
  margin: 0;
}

#warehouseSkuHistorySource.warning {
  color: var(--amber);
  font-weight: 700;
}

.warehouse-sku-history-stats {
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  margin-bottom: 18px;
}

.warehouse-sku-history-section + .warehouse-sku-history-section {
  margin-top: 20px;
}

.warehouse-sku-history-section .section-heading.compact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#warehouseSkuHistoryWarehouseTable {
  min-width: 760px;
}

#warehouseSkuHistoryTable {
  min-width: 1540px;
}

#warehouseSkuHistoryWarehouseTable td:not(:first-child),
#warehouseSkuHistoryTable td:nth-child(7),
#warehouseSkuHistoryTable td:nth-child(8) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.warehouse-history-operation,
.warehouse-history-delta {
  font-weight: 750;
  white-space: nowrap;
}

.warehouse-history-operation.inbound,
.warehouse-history-delta.positive {
  color: var(--teal-strong);
}

.warehouse-history-operation.outbound,
.warehouse-history-delta.negative {
  color: var(--red);
}

.warehouse-history-delta.neutral {
  color: var(--muted);
}

.warehouse-history-document {
  color: var(--teal-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--teal) 35%, transparent);
  text-underline-offset: 2px;
  user-select: text;
  -webkit-user-select: text;
}

.warehouse-history-sku {
  font-weight: 700;
  user-select: text;
  -webkit-user-select: text;
}

.warehouse-sku-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding-top: 10px;
}

.warehouse-sku-history-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.warehouse-sku-history-page-actions .button {
  min-width: 96px;
}

@media (max-width: 980px) {
  .warehouse-sku-history-stats {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
  }
}

@media (max-width: 760px) {
  .warehouse-sku-history-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .warehouse-sku-history-panel .modal-blue-header {
    min-height: 58px;
    padding: 9px 12px;
  }

  .warehouse-sku-history-panel .modal-blue-header h2 {
    font-size: 19px;
  }

  .warehouse-sku-history-body {
    padding: 12px;
  }

  .warehouse-sku-history-product {
    display: grid;
    gap: 10px;
  }

  .warehouse-sku-history-meta {
    max-width: none;
    justify-items: start;
    text-align: left;
  }

  .warehouse-sku-history-sku {
    font-size: 20px;
  }

  .warehouse-sku-history-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-sku-history-section .section-heading.compact {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .warehouse-sku-history-section .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #warehouseSkuHistoryWarehouseTable,
  #warehouseSkuHistoryTable {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
  }

  #warehouseSkuHistoryWarehouseTable thead,
  #warehouseSkuHistoryTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #warehouseSkuHistoryWarehouseTable tbody,
  #warehouseSkuHistoryTable tbody {
    display: grid;
    gap: 8px;
  }

  #warehouseSkuHistoryWarehouseTable tbody tr,
  #warehouseSkuHistoryTable tbody tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }

  #warehouseSkuHistoryWarehouseTable tbody td,
  #warehouseSkuHistoryTable tbody td {
    display: grid;
    grid-template-columns: minmax(116px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #warehouseSkuHistoryTable tbody td:nth-child(7),
  #warehouseSkuHistoryTable tbody td:nth-child(8) {
    text-align: left;
  }

  #warehouseSkuHistoryWarehouseTable tbody td:last-child,
  #warehouseSkuHistoryTable tbody td:last-child {
    border-bottom: 0;
  }

  #warehouseSkuHistoryWarehouseTable tbody td::before,
  #warehouseSkuHistoryTable tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  #warehouseSkuHistoryTable tbody td.empty-cell {
    display: block;
  }

  #warehouseSkuHistoryTable tbody td.empty-cell::before {
    content: none;
  }

  .warehouse-sku-history-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-sku-history-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-sku-history-page-actions .button {
    width: 100%;
    min-width: 0;
  }
}

.warehouse-history-panel {
  width: min(1180px, calc(100vw - 40px));
}

.warehouse-history-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.warehouse-history-toolbar {
  margin: 0;
}

.warehouse-history-toolbar .search {
  margin-left: auto;
}

#warehouseHistoryTable {
  min-width: 1120px;
}

.settings-table {
  min-width: 1480px;
}

.settings-select-cell {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.settings-select-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.settings-config-button {
  width: 100%;
  min-width: 96px;
  white-space: nowrap;
}

.settings-fill-cell {
  position: relative;
}

.settings-table td:hover .settings-fill-handle,
.settings-fill-cell:focus-within .settings-fill-handle {
  opacity: 0.8;
}

.settings-period-cell {
  min-width: 130px;
}

.settings-group-cell {
  min-width: 190px;
}

.settings-group-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.cell-input.settings-group-input {
  padding-left: 34px;
  text-align: left;
  text-align-last: left;
}

.settings-group-search-icon {
  position: absolute;
  z-index: 1;
  left: 8px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.settings-group-suggestions {
  position: fixed;
  z-index: 260;
  display: grid;
  gap: 3px;
  max-height: min(320px, calc(100vh - 16px));
  padding: 5px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.2);
}

.settings-group-suggestion {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.settings-group-suggestion:hover,
.settings-group-suggestion:focus-visible,
.settings-group-suggestion.active {
  background: var(--teal-soft);
  outline: 0;
}

.settings-group-suggestion strong,
.settings-group-suggestion small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-group-suggestion small,
.settings-group-suggestion-empty {
  color: var(--muted);
  font-size: 12px;
}

.settings-group-suggestion-empty {
  padding: 10px;
}

.settings-table .sku-section-cell {
  width: 78px;
  min-width: 64px;
  text-align: center;
}

.settings-table .sku-section-cell input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.cell-input,
.cell-select {
  width: 100%;
  min-width: 72px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 6px;
  background: #f8faf8;
  text-align: center;
  text-align-last: center;
}

.cell-input:focus,
.cell-select:focus {
  outline: 2px solid #bde4dc;
  border-color: var(--teal);
  background: #ffffff;
}

.cell-input.manual-input {
  border-color: #d39a2c;
  background: #fff7df;
}

.data-table .cell-input,
.data-table .cell-select,
.unit-table .unit-edit-input,
.unit-table .unit-edit-input[type="text"],
.unit-table .unit-edit-input.unit-name-cell,
.unit-table .cell-select {
  min-width: 0;
  max-width: 100%;
}

.data-table input,
.data-table select,
.data-table textarea {
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-table .sku-text {
  min-width: 190px;
  text-align: left;
}

.data-table th[data-sort="sku"],
.data-table th.sku-column-heading {
  text-align: left;
}

.sku-config-panel {
  width: min(620px, calc(100vw - 32px));
}

.sku-config-body {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 20px;
}

.sku-config-section-list {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sku-config-section-list legend {
  padding: 0 6px;
  font-weight: 800;
}

.sku-dimension-preview {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.sku-dimension-preview-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  color: var(--muted);
  border-left: 3px solid transparent;
}

.sku-dimension-preview-row.active {
  color: var(--text);
  border-left-color: var(--teal);
  background: var(--surface-soft);
}

.sku-manual-dimensions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.sku-manual-dimension-grid input {
  width: 100%;
}

#skuManualDimensionsSummary {
  margin: 0;
}

.settings-dimension-button.warning {
  color: #a15c00;
}

#skuConfigSections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.sku-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 620px) {
  #skuConfigSections,
  .sku-custom-period {
    grid-template-columns: 1fr;
  }

  .sku-config-actions .button {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .sku-manual-dimension-grid {
    grid-template-columns: 1fr;
  }
}

.cluster-grid {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 96px;
  overflow: auto;
  margin: -2px 0 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.cluster-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  font-size: 12px;
  white-space: nowrap;
}

.cluster-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

#ozonSupplyClusters {
  display: none;
}

.ozon-api-supplies-panel {
  width: min(1180px, calc(100vw - 40px));
}

.modal-table-wrap {
  max-height: min(560px, calc(100vh - 190px));
}

.column-settings-panel {
  width: min(560px, calc(100vw - 32px));
}

.column-settings-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.column-settings-list {
  display: grid;
  gap: 8px;
  max-height: min(520px, calc(100vh - 260px));
  overflow: auto;
  padding-right: 4px;
}

.column-settings-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(112px, auto) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.column-settings-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.column-settings-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-settings-actions {
  display: inline-flex;
  gap: 6px;
}

.column-calculation-toggle {
  display: inline-flex;
  min-width: 112px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.column-calculation-toggle input {
  flex: 0 0 auto;
}

.column-calculation-toggle span {
  overflow: visible;
}

.column-calculation-empty {
  visibility: hidden;
}

.column-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.empty-cell {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.muted-row {
  color: var(--muted);
  background: #fafbfa;
}

.warning-row {
  background: #fff8ea;
}

.row-select-cell {
  width: 48px;
  min-width: 48px;
}

.row-select-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.transit-table td:nth-child(3) input,
.production-table td:nth-child(3) input {
  min-width: 170px;
}

.transit-table td:nth-child(4) select,
.transit-table td:nth-child(5) select,
.production-table td:nth-child(4) select,
.production-table td:nth-child(5) select {
  min-width: 140px;
}

.transit-table td:nth-child(6) input,
.production-table td:nth-child(6) input {
  min-width: 260px;
}

.transit-table td:nth-child(7) input,
.transit-table td:nth-child(8) input,
.transit-table td:nth-child(9) input,
.production-table td:nth-child(7) input,
.production-table td:nth-child(8) input,
.production-table td:nth-child(9) input {
  min-width: 130px;
}

.transit-table td:nth-child(10) input,
.production-table td:nth-child(10) input {
  min-width: 240px;
}

.transit-table th.planning-sku-column,
.production-table th.planning-sku-column,
.transit-table td.planning-sku-column,
.production-table td.planning-sku-column {
  text-align: left;
}

.transit-table td.planning-sku-column .cell-input,
.production-table td.planning-sku-column .cell-input {
  width: auto;
  min-width: 0;
  max-width: calc(100% - 24px);
  flex: 0 1 auto;
  text-align: left;
  text-align-last: auto;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

.icon-button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 10px rgba(23, 33, 27, 0.08);
}

.icon-button:disabled,
.icon-button:disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.icon-button.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f4b9b6;
}

.icon-button.success {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: #acd9d0;
}

.inline-hint {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.job-panel {
  margin-bottom: 14px;
  border: 1px solid #e1ca99;
  border-radius: 8px;
  padding: 12px;
  background: var(--amber-soft);
}

.job-panel.hidden {
  display: none;
}

.job-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.job-close {
  min-height: 30px;
  padding: 5px 10px;
  background: #ffffff;
}

.job-panel pre {
  max-height: 180px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: #4b3820;
  font-size: 12px;
  white-space: pre-wrap;
}

.status-pill {
  border-radius: 999px;
  padding: 4px 9px;
  background: #ffffff;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.hidden {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .nav-item::before,
  .nav-icon,
  .sidebar .account-badge .button {
    transition: none;
  }
}

@media (max-width: 980px) {
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .auth-hero {
    min-height: auto;
  }

  .auth-benefits,
  .access-form {
    grid-template-columns: 1fr;
  }

  .permission-grid {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: max-content minmax(0, 1fr);
    align-content: start;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 9px 12px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(184, 211, 197, 0.1);
    box-shadow: 0 8px 20px rgba(4, 19, 12, 0.14);
  }

  .sidebar .brand,
  .nav-group-label {
    display: none;
  }

  .nav {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 3px;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nav-group {
    display: flex;
    flex: none;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-group + .nav-group {
    padding-top: 0;
    border-top: 0;
  }

  .nav-item {
    width: auto;
    min-height: 44px;
    flex: none;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .nav-item::before {
    left: 50%;
    top: auto;
    bottom: 1px;
    width: 20px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    transform: translateX(-50%);
  }

  .sidebar .account-badge {
    display: block;
    width: 40px;
    min-width: 40px;
    height: 44px;
    margin-top: 0;
    padding: 2px 0 0;
    border: 0;
    flex: none;
  }

  .sidebar .account-avatar,
  .sidebar .account-copy,
  .sidebar .logout-label {
    display: none;
  }

  .sidebar .account-badge .button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .topbar {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-panel-wide {
    grid-row: auto;
  }

  .analytics-combo-chart {
    min-height: 300px;
  }

  .analytics-toolbar .search {
    margin-left: 0;
    width: 100%;
  }

  .daily-date-row {
    grid-template-columns: auto auto;
  }

  .daily-presets {
    justify-self: start;
  }

  .search {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: auto;
    padding: 8px;
    flex-direction: row;
    align-items: center;
    gap: 0;
    box-shadow: 0 8px 20px rgba(4, 19, 12, 0.18);
  }

  .sidebar .brand,
  .nav-group-label {
    display: none;
  }

  .sidebar .account-badge {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0 0 3px 6px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .sidebar .account-badge div,
  .sidebar .account-badge .account-avatar,
  .sidebar .account-badge .logout-label {
    display: none;
  }

  .sidebar .account-badge .button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .mobile-logout-icon {
    display: block;
  }

  .nav {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 3px;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nav-group {
    display: flex;
    flex: none;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-group + .nav-group {
    padding-top: 0;
    border-top: 0;
  }

  .nav-item {
    width: auto;
    min-height: 44px;
    flex: none;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .nav-item:hover {
    transform: none;
  }

  .workspace {
    padding: 78px 12px 12px;
  }

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

  .stat-card {
    min-width: 0;
  }

  .stat-card strong {
    font-size: 21px;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > .button:not(.icon-only) {
    flex: 1 1 150px;
  }

  .toolbar .button {
    max-width: 100%;
  }

  .segmented {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .segmented .segment {
    flex: none;
    min-height: 42px;
  }

  .topbar-actions .button,
  .toolbar .button,
  .pagination button,
  .table-column-tools .button {
    min-height: 44px;
  }

  .topbar-actions .button.icon-only,
  .toolbar .button.icon-only {
    min-width: 44px;
  }

  .appearance-settings-panel select {
    min-height: 44px;
  }

  .daily-period-box,
  .daily-date-row,
  .daily-presets {
    width: 100%;
  }

  .analytics-overlay-controls {
    gap: 6px;
  }

  .analytics-layer {
    flex: 1 1 calc(50% - 6px);
    justify-content: flex-start;
    padding: 5px 7px;
    font-size: 11px;
  }

  .daily-date-row {
    grid-template-columns: 1fr;
  }

  .daily-presets {
    justify-content: center;
    justify-self: stretch;
  }

  .table-wrap,
  .table-wrap.wide,
  .daily-table-wrap {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
  }

  .table-wrap.wide,
  .daily-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (hover: none), (pointer: coarse) {
  .button,
  .segment,
  .warehouse-tab,
  .unit-page-button,
  .wizard-tab,
  .product-search-clear,
  .modal-close,
  .icon-button {
    min-height: 44px;
  }

  .button.icon-only,
  .product-search-clear,
  .modal-close,
  .icon-button {
    min-width: 44px;
  }

  .search,
  .field select,
  .field input[type="date"] {
    min-height: 44px;
  }

  .unit-table.unit-own-mode .unit-edit-input,
  .unit-table.unit-own-mode .unit-breakdown-button,
  .unit-table.unit-comparison-mode .unit-edit-input {
    min-height: 44px;
  }

  .sku-copy-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-basis: 44px;
    color: #7d858c;
    opacity: 1;
    pointer-events: auto;
  }

  .daily-fixed-scroll {
    display: none !important;
  }

  .table-wrap,
  .table-wrap.wide,
  .daily-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap.wide::-webkit-scrollbar:horizontal {
    display: block;
    height: 12px !important;
  }
}

.data-table.resizable-table th:not(.unit-select-cell),
.data-table.resizable-table td:not(.unit-select-cell):not(.sku-value-cell),
.data-table.resizable-table .image-cell,
.data-table.resizable-table .daily-photo-col,
.data-table.resizable-table .daily-total-col,
.data-table.resizable-table .daily-day-col,
.data-table.resizable-table .daily-cell,
.data-table.resizable-table .sticky-sku-column:not(.sku-value-cell),
.data-table.resizable-table .sku-text:not(.sku-value-cell),
.data-table.resizable-table .unit-name-cell,
.data-table.resizable-table .cell-input,
.data-table.resizable-table .cell-select,
.data-table.resizable-table .unit-edit-input {
  min-width: 0 !important;
  max-width: 100%;
}

.data-table.resizable-table .sku-cell,
.data-table.resizable-table .sku-cell strong,
.data-table.resizable-table .sku-code {
  min-width: 0 !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table.resizable-table .sku-input-line .cell-input,
.data-table.resizable-table .sku-input-line .unit-edit-input {
  max-width: calc(100% - 24px);
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 200;
  width: calc(100vw - 44px);
  max-width: 760px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(197, 208, 200, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(23, 33, 27, 0.16);
  backdrop-filter: blur(14px);
}

.cookie-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #15201a;
  color: #dfff60;
  font-weight: 950;
  font-style: italic;
}

.cookie-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cookie-copy strong {
  font-size: 15px;
}

.cookie-copy span,
.cookie-details,
.cookie-warning {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cookie-warning {
  margin: 2px 0 0;
  color: #9a3b1e;
  font-weight: 750;
}

.cookie-details {
  margin: 2px 0 0;
}

.cookie-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.landing-screen {
  min-height: 100vh;
  background: #f6f8f5;
  color: var(--text);
}

.landing-top-strip {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 8px max(18px, calc((100vw - 1180px) / 2));
  background: #effbd1;
  border-bottom: 1px solid #d7e8ab;
  color: #1d301f;
  font-size: 14px;
}

.landing-top-strip span {
  font-weight: 900;
  color: #0f766e;
}

.landing-top-strip strong {
  justify-self: center;
  font-size: 15px;
}

.landing-mini-cta {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  background: #15201a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 30;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 12px 18px;
  background: rgba(246, 248, 245, 0.88);
  backdrop-filter: blur(16px);
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  width: 178px;
  min-width: 150px;
}

.landing-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.landing-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  min-width: 0;
}

.landing-nav a {
  color: #324038;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
}

.landing-nav a:hover {
  color: var(--teal);
}

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

.landing-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 82px;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 34px;
  padding: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: 38px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 33, 28, 0.96), rgba(9, 19, 16, 0.98)),
    radial-gradient(circle at 72% 18%, rgba(92, 225, 185, 0.24), transparent 32%);
  box-shadow: 0 30px 80px rgba(12, 24, 18, 0.18);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -8%;
  width: 58%;
  height: 130%;
  transform: rotate(-18deg);
  border: 4px solid rgba(87, 226, 184, 0.38);
  border-radius: 999px;
  box-shadow:
    0 0 34px rgba(39, 224, 159, 0.34),
    inset 0 0 28px rgba(45, 212, 191, 0.2);
}

.landing-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219, 255, 122, 0.18), transparent 64%);
}

.landing-hero-copy,
.landing-visual {
  position: relative;
  z-index: 1;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #c6fff1;
  font-size: 13px;
  font-weight: 900;
}

.landing-hero h1 {
  max-width: 740px;
  margin: 22px 0 0;
  font-size: clamp(42px, 5.1vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.52;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.landing-cta,
.landing-secondary-cta {
  min-height: 50px;
  border-radius: 999px;
  padding: 13px 22px;
  border: 0;
  font-weight: 950;
  cursor: pointer;
}

.landing-cta {
  background: linear-gradient(135deg, #56f08d, #22c55e);
  color: #07140e;
  box-shadow: 0 16px 34px rgba(34, 197, 94, 0.3);
}

.landing-secondary-cta {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

.landing-metrics div {
  min-height: 92px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

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

.landing-metrics strong {
  font-size: 25px;
}

.landing-metrics span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.3;
}

.landing-visual {
  min-height: 440px;
  display: grid;
  place-items: center;
}

.landing-glow-line {
  position: absolute;
  border-radius: 999px;
  border: 2px solid rgba(88, 242, 185, 0.32);
  filter: drop-shadow(0 0 22px rgba(45, 212, 191, 0.34));
}

.landing-glow-line.one {
  width: 290px;
  height: 620px;
  right: 24px;
  top: -90px;
  transform: rotate(32deg);
}

.landing-glow-line.two {
  width: 210px;
  height: 480px;
  right: 142px;
  bottom: -130px;
  transform: rotate(32deg);
  border-color: rgba(219, 255, 122, 0.26);
}

.landing-dashboard-card {
  position: relative;
  width: min(100%, 500px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.landing-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 7px 15px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.landing-card-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
}

.landing-card-head strong {
  margin-left: auto;
}

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

.landing-kpi,
.landing-chart,
.landing-table-preview {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(7, 20, 14, 0.56);
}

.landing-kpi {
  min-height: 104px;
  padding: 15px;
}

.landing-kpi.accent {
  background: linear-gradient(135deg, rgba(89, 240, 143, 0.28), rgba(32, 176, 151, 0.3));
}

.landing-kpi small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
}

.landing-kpi strong {
  display: block;
  margin-top: 12px;
  font-size: 32px;
}

.landing-chart {
  grid-column: 1 / -1;
  min-height: 168px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 18px;
}

.landing-chart i {
  flex: 1;
  min-width: 0;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #dfff60, #21d08f);
}

.landing-table-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  padding: 16px;
}

.landing-table-preview span {
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.landing-section,
.landing-split,
.landing-demo {
  margin-top: 42px;
}

.landing-section-title {
  max-width: 760px;
}

.landing-section-title span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.landing-section-title h2,
.landing-split h2,
.landing-demo h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.05;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.landing-feature-grid article,
.landing-split,
.landing-demo {
  border: 1px solid rgba(197, 208, 200, 0.9);
  background: #fff;
  box-shadow: var(--shadow);
}

.landing-feature-grid article {
  min-height: 220px;
  padding: 22px;
  border-radius: 20px;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 950;
}

.landing-feature-grid h3 {
  margin: 18px 0 0;
  font-size: 20px;
}

.landing-feature-grid p,
.landing-split p,
.landing-demo p {
  color: var(--muted);
  line-height: 1.5;
}

.landing-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: 28px;
  padding: 34px;
  border-radius: 28px;
}

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

.landing-cluster-map span {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #edf7f3;
  color: #17423d;
  font-weight: 900;
}

.landing-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 32px;
  border-radius: 28px;
  background: #15201a;
  color: #fff;
}

.landing-demo h2 {
  margin-top: 0;
}

.landing-demo p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.auth-screen {
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 100vh;
  padding: 34px 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 118, 110, 0.16), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(219, 255, 122, 0.22), transparent 26%),
    #f4f6f4;
}

.auth-page-brand {
  width: min(430px, calc(100vw - 36px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-page-brand img {
  width: 174px;
  height: auto;
  display: block;
}

.auth-back-home {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 14px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.auth-back-home:hover {
  color: var(--teal);
  border-color: #b7dcd3;
}

.auth-screen .auth-hero {
  display: none;
}

.auth-screen .auth-panel {
  width: min(430px, calc(100vw - 36px));
  align-self: auto;
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.auth-screen .auth-form h2 {
  font-size: 27px;
}

.auth-screen .auth-submit {
  border-radius: 14px;
}

.auth-screen .field {
  display: grid;
  gap: 7px;
  align-items: stretch;
}

.auth-screen .field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

.auth-screen .field input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: #9fd7ce;
}

.auth-screen .field .password-field {
  position: relative;
  display: block;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

@media (max-width: 980px) {
  .landing-top-strip {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .landing-header {
    grid-template-columns: 1fr;
    justify-items: center;
    position: static;
  }

  .landing-nav {
    flex-wrap: wrap;
  }

  .landing-hero,
  .landing-split {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding: 34px;
  }

  .landing-visual {
    min-height: 360px;
  }

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

@media (max-width: 620px) {
  .wizard-clusters {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .wizard-cluster {
    grid-template-columns: 22px minmax(0, 1fr) 58px auto;
  }

  .landing-main {
    padding-inline: 12px;
  }

  .landing-actions,
  .landing-cta-row,
  .landing-demo {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-hero {
    min-height: auto;
    padding: 26px;
    border-radius: 24px;
  }

  .landing-hero h1 {
    font-size: 40px;
  }

  .landing-metrics,
  .landing-feature-grid,
  .landing-cluster-map {
    grid-template-columns: 1fr;
  }

  .landing-visual {
    min-height: 310px;
  }

  .landing-dashboard-card {
    padding: 12px;
  }

  .landing-card-grid {
    grid-template-columns: 1fr;
  }

  .landing-kpi,
  .landing-chart,
  .landing-table-preview {
    grid-column: 1;
  }

  .auth-page-brand {
    flex-direction: column;
  }

  .cookie-banner {
    width: calc(100vw - 24px);
    bottom: 12px;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .cookie-mark {
    display: none;
  }

  .cookie-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-actions .button {
    flex: 1;
  }

  .marketplace-news-toolbar {
    align-items: stretch;
  }

  .marketplace-news-toolbar .segmented,
  .marketplace-news-toolbar .button,
  .marketplace-news-toolbar .search {
    width: 100%;
  }

  .marketplace-news-toolbar .search {
    margin-left: 0;
  }

  .news-message,
  .news-flow-card {
    width: 100%;
    padding-right: 42px;
  }

  .news-date {
    width: 100%;
    margin-left: 0;
  }
}
.warehouse-routing-section {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.warehouse-routing-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.warehouse-routing-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(280px, 2fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.warehouse-routing-item h4 {
  margin: 0;
  font-size: 15px;
}

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

.warehouse-routing-summary span {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 13px;
}

.warehouse-routing-summary strong {
  color: var(--muted);
  font-weight: 600;
}

.warehouse-routing-open {
  min-width: 112px;
}

.warehouse-routing-panel {
  width: min(860px, calc(100vw - 40px));
  height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.warehouse-routing-modal-body {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.warehouse-routing-modal-body > .inline-hint {
  margin: 0;
}

.warehouse-routing-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.warehouse-routing-tabs .button {
  min-width: 132px;
}

.warehouse-routing-tabs .button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.warehouse-routing-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.warehouse-routing-search {
  min-width: 0;
}

.warehouse-routing-zone-list {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.warehouse-routing-zone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.warehouse-routing-zone-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.warehouse-routing-zone-copy strong,
.warehouse-routing-zone-copy small {
  overflow-wrap: anywhere;
}

.warehouse-routing-zone-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.warehouse-routing-boundary {
  color: #9a6700 !important;
}

.warehouse-routing-owner {
  min-width: 0;
}

.warehouse-routing-owner select {
  width: 100%;
}

.warehouse-routing-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 760px) {
  .warehouse-routing-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .warehouse-routing-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .warehouse-routing-open {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .warehouse-routing-panel {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
  }

  .warehouse-routing-modal-body {
    padding: 12px;
  }

  .warehouse-routing-tools,
  .warehouse-routing-zone-row {
    grid-template-columns: 1fr;
  }

  .warehouse-routing-tools .button {
    justify-self: start;
  }

  .warehouse-routing-zone-row {
    gap: 8px;
    padding: 10px 2px;
  }

  .warehouse-routing-modal-actions .button {
    flex: 1 1 0;
  }
}

@media (max-width: 360px) {
  .warehouse-routing-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 480px) {
  .warehouse-routing-panel {
    width: min(860px, calc(100vw - 8px));
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
  }

  .warehouse-routing-panel .modal-blue-header {
    min-height: 48px;
    padding: 4px 10px;
  }

  .warehouse-routing-panel .modal-blue-header h2 {
    font-size: 18px;
  }

  .warehouse-routing-panel .modal-close {
    width: 36px;
    height: 36px;
  }

  .warehouse-routing-modal-body {
    grid-template-rows: auto auto auto minmax(64px, 1fr) auto;
    gap: 6px;
    padding: 8px;
  }

  .warehouse-routing-modal-body > #warehouseRoutingModalHint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .warehouse-routing-tools .field > span {
    display: none;
  }

  .warehouse-routing-zone-list {
    min-height: 64px;
  }

  .warehouse-routing-modal-actions {
    padding-top: 0;
  }
}

.button.recalculation-required {
  border-color: #d97706;
  background: #fbbf24;
  color: #422006;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.14);
}

.button.recalculation-required:hover {
  border-color: #b45309;
  background: #f59e0b;
  color: #2f1704;
}

.button.settings-unsaved {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.12);
}

.button.save-action-busy {
  cursor: progress;
  opacity: 0.78;
}

.button.save-action-saved {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
}

.dashboard-warehouse-status {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-warehouse-status.is-warning {
  color: #a16207;
  font-weight: 700;
}

.save-status-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid #166534;
  border-radius: 8px;
  background: #14532d;
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
  font-size: 14px;
  font-weight: 700;
}

.save-status-toast.is-saving {
  border-color: #0369a1;
  background: #075985;
}

.save-status-toast.is-error {
  border-color: #b91c1c;
  background: #991b1b;
}

@media (max-width: 720px) {
  .column-settings-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .column-calculation-toggle {
    grid-column: 2;
    grid-row: 2;
  }

  .column-calculation-empty {
    display: none;
  }

  .column-settings-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .dashboard-warehouse-status {
    flex-basis: 100%;
    order: 2;
  }

  .settings-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-row > *,
  .settings-row strong {
    min-width: 0;
    max-width: 100%;
  }

  .settings-row strong {
    display: block;
    overflow-wrap: anywhere;
  }

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

  .program-settings-grid .button {
    width: fit-content;
    max-width: 100%;
  }

  .save-status-toast {
    right: 16px;
    bottom: 16px;
  }
}

:root[data-theme="dark"] .product-bulk-search-error {
  background: rgba(220, 38, 38, 0.12);
}

@media (max-width: 620px) {
  .product-search-control,
  .view > .toolbar > .product-search-control,
  .daily-toolbar > .product-search-control,
  .analytics-toolbar > .product-search-control,
  .unit-search-tools .product-search-control {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-left: 0;
  }

  .product-search-control .search {
    min-height: 42px;
  }

  .product-search-clear {
    width: 36px;
    height: 36px;
  }

  .product-search-menu {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    top: auto;
    width: auto;
    min-width: 0;
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
  }

  .product-search-menu-button {
    min-height: 62px;
  }

  .product-bulk-search-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .product-bulk-search-header {
    min-height: 78px;
    padding: 15px 16px;
  }

  .product-bulk-search-header h2 {
    font-size: 19px;
  }

  .product-bulk-search-body {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 13px;
    min-height: 0;
    padding: 16px;
  }

  .product-bulk-search-option {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .product-bulk-search-utility {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-bulk-search-utility .button {
    width: 100%;
    min-height: 44px;
  }

  .product-bulk-search-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }

  .product-bulk-search-actions .button {
    width: 100%;
    min-height: 44px;
  }
}

:root[data-theme="dark"] .segmented,
:root[data-theme="dark"] .warehouse-tabs {
  background: var(--surface-soft);
}

:root[data-theme="dark"] .overflow-tooltip,
:root[data-theme="dark"] .product-bulk-search-option.is-selected,
:root[data-theme="dark"] .daily-sku-option,
:root[data-theme="dark"] .wizard-tab.active,
:root[data-theme="dark"] .file-row span,
:root[data-theme="dark"] .warehouse-tab:hover,
:root[data-theme="dark"] .warehouse-tab.active,
:root[data-theme="dark"] .cluster-toggle,
:root[data-theme="dark"] .job-close,
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .unit-page-button:disabled {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

:root[data-theme="dark"] .marketplace-news-list,
:root[data-theme="dark"] .news-message,
:root[data-theme="dark"] .news-message:nth-child(even),
:root[data-theme="dark"] .news-message.personal,
:root[data-theme="dark"] .news-flow-card,
:root[data-theme="dark"] .news-flow-card.personal,
:root[data-theme="dark"] .analytics-panel,
:root[data-theme="dark"] .analytics-layer,
:root[data-theme="dark"] .analytics-chart-tooltip {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

:root[data-theme="dark"] .news-message p,
:root[data-theme="dark"] .news-flow-card p {
  color: var(--muted);
}

:root[data-theme="dark"] .news-favorite {
  border-color: var(--line);
  background: var(--surface-soft);
}

:root[data-theme="dark"] .api-field input:focus,
:root[data-theme="dark"] .api-store-cell input,
:root[data-theme="dark"] .api-store-cell.configured input,
:root[data-theme="dark"] .unit-edit-input:hover,
:root[data-theme="dark"] .unit-edit-input:focus,
:root[data-theme="dark"] .cell-input:focus,
:root[data-theme="dark"] .cell-select:focus,
:root[data-theme="dark"] .cell-input.manual-input,
:root[data-theme="dark"] .wizard-field input,
:root[data-theme="dark"] .wizard-field select {
  border-color: var(--line-strong);
  background: #111a16;
  color: var(--text);
}

:root[data-theme="dark"] .unit-breakdown-warnings,
:root[data-theme="dark"] .job-panel pre {
  background: var(--amber-soft);
  color: #f2c26f;
}

:root[data-theme="dark"] .unit-fill-target {
  background: rgba(13, 148, 136, 0.22) !important;
}

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