:root {
  color-scheme: light;
  --canvas: #ffffff;
  --page: #ffffff;
  --page-strong: #f7f8f5;
  --panel: #ffffff;
  --panel-soft: #f7f8f5;
  --ink: #171b22;
  --body: #343942;
  --muted: #66707d;
  --faint: #8b929c;
  --hairline: #dfe2dd;
  --line-strong: #969d9a;
  --primary: #171b22;
  --primary-active: #0d1118;
  --coral: #a9360c;
  --coral-active: #862707;
  --coral-soft: #fff0e9;
  --forest: #0d3b22;
  --forest-soft: #edf6ef;
  --mint: #9ecfb8;
  --yellow: #e9be3d;
  --yellow-soft: #fff7d8;
  --cream: #f5e9d4;
  --peach: #fcab79;
  --link: #215bbb;
  --danger: #a9360c;
  --danger-soft: #fff0e9;
  --focus: rgba(33, 91, 187, 0.18);
  --shadow: 0 1px 2px rgba(23, 27, 34, 0.06), 0 12px 32px rgba(23, 27, 34, 0.06);
  --shadow-lift: 0 22px 62px rgba(23, 27, 34, 0.14);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --container: 100%;
  --workspace-x: clamp(16px, 1.8vw, 28px);
  --sticky-panel-top: 0px;
  --table-line: rgba(23, 27, 34, 0.08);
  --table-line-soft: rgba(23, 27, 34, 0.055);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  overflow-y: scroll;
  background: var(--page);
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--body);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.36;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 520;
  letter-spacing: 0;
}

h1 {
  font-size: 56px;
  line-height: 1.03;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

h3 {
  font-size: 14px;
  line-height: 1.25;
}

.app-shell {
  min-height: 100vh;
  background: var(--canvas);
  padding: 0 0 36px;
}

.workspace {
  width: min(100%, var(--container));
  margin-right: auto;
  margin-left: auto;
}

.panel-brand-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.nav-brand,
.auth-nav .nav-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--ink);
  font-weight: 720;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 820;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--coral);
}

.brand-mark span,
.brand-mark {
  isolation: isolate;
}

.panel-user-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.panel-user-actions form {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  padding: 6px 10px;
}

.user-chip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  min-width: 92px;
  justify-content: center;
}

.user-menu-trigger {
  display: inline-grid;
  grid-template-columns: 30px minmax(0, auto) 16px;
  align-items: center;
  max-width: 260px;
  min-height: 34px;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 560;
  padding: 2px 7px 2px 2px;
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  background: var(--panel-soft);
}

.user-menu-trigger svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.user-avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #f2a32b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(260px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  box-shadow: var(--shadow-lift);
  padding: 8px;
}

.user-menu[hidden] {
  display: none;
}

.user-menu-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--hairline);
  padding: 8px 8px 10px;
}

.user-menu-head .user-avatar {
  width: 34px;
  height: 34px;
}

.user-menu-head div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-menu-head strong,
.user-menu-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.user-menu-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.user-menu form {
  margin: 0;
}

.user-menu-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 38px;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--body);
  cursor: pointer;
  font-size: 13px;
  font-weight: 560;
  padding: 9px 8px;
  text-align: left;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
  background: var(--panel-soft);
  color: var(--ink);
}

.user-menu-item svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.status-pill.busy {
  border-color: var(--yellow);
  background: var(--yellow-soft);
  color: #6b4c00;
}

.status-pill.error {
  border-color: #edb49d;
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.ok {
  border-color: var(--mint);
  background: var(--forest-soft);
  color: var(--forest);
}

.section-kicker {
  color: var(--coral);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.panel-head p,
.login-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 640;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

select {
  min-width: 0;
  font-weight: 560;
}

input::placeholder {
  color: var(--faint);
}

input[type="checkbox"] {
  accent-color: var(--primary);
}

input:focus,
select:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 3px var(--focus);
}

.small-input {
  width: 74px;
  min-width: 74px;
}

.credential-actions,
.panel-actions,
.panel-actions-left,
.panel-actions-right,
.action-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credential-actions {
  justify-content: flex-end;
}

.panel-actions {
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
}

.panel-actions-left {
  flex: 1 1 auto;
  min-width: 0;
}

.panel-actions-right {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.ozon-panel .panel-head {
  align-items: flex-start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: start;
  gap: 10px;
}

.panel-identity-row,
.panel-workspace-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 12px;
  min-width: 0;
}

.panel-identity-row {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 10px;
}

.panel-workspace-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.panel-workspace-row h2 {
  white-space: nowrap;
}

.panel-actions .button {
  min-width: 126px;
}

.panel-actions .button.danger {
  min-width: 118px;
}

.lookback-control {
  display: inline-grid;
  grid-template-columns: auto minmax(96px, 112px);
  align-items: center;
  min-height: 34px;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--muted);
  padding: 2px 5px 2px 8px;
}

.lookback-control span {
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
}

.lookback-control select {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 5px;
}

.top-selection-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 9px;
  white-space: nowrap;
}

.top-selection-toggle input {
  width: 16px;
  min-height: 16px;
}

.status-filter-slot {
  width: 164px;
  max-width: 100%;
}

.status-filter-placeholder {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  white-space: nowrap;
}

.supply-search-control {
  display: grid;
  grid-template-columns: 18px minmax(160px, 1fr);
  align-items: center;
  flex: 0 1 286px;
  min-width: 224px;
  min-height: 34px;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--muted);
  padding: 3px 9px;
}

.supply-search-control svg {
  width: 17px;
  height: 17px;
}

.supply-search-control input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
  outline: 0;
  padding: 0;
}

.supply-search-control:focus-within {
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.supply-search-control input::placeholder {
  color: var(--faint);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 650;
  letter-spacing: 0;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.button {
  padding: 6px 12px;
  text-align: center;
  white-space: nowrap;
}

.button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.button:focus-visible,
.icon-button:focus-visible,
.supply-open:focus-visible,
.supply-route-select:focus-visible,
.status-filter summary:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--focus);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button:not(:disabled):active,
.icon-button:not(:disabled):active {
  transform: translateY(1px);
}

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

.button.primary:hover:not(:disabled) {
  border-color: var(--primary-active);
  background: var(--primary-active);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--canvas);
  color: var(--ink);
}

.button.secondary:hover:not(:disabled),
.button.ghost:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--panel-soft);
  color: var(--ink);
}

.button.ghost {
  border-color: var(--hairline);
  background: var(--canvas);
  color: var(--muted);
}

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

.button.danger:hover:not(:disabled) {
  border-color: var(--coral-active);
  background: var(--coral-active);
}

.icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  border-color: var(--hairline);
  background: var(--canvas);
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "ozon"
    "preview";
  align-content: start;
  min-height: 0;
  gap: 0;
  margin-top: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel {
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ozon-panel {
  grid-area: ozon;
}

.preview-panel {
  grid-area: preview;
}

body.preview-open {
  overflow: hidden;
}

.preview-panel[hidden] {
  display: none;
}

.preview-panel {
  position: fixed;
  z-index: 80;
  top: 82px;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lift);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 12px var(--workspace-x);
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.ozon-panel .panel-head {
  position: sticky;
  z-index: 25;
  top: var(--sticky-panel-top);
  box-shadow: none;
}

.preview-panel .panel-head {
  box-shadow: none;
}

.panel-head > div:first-child {
  min-width: 0;
}

.supply-list {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0;
  scrollbar-color: var(--line-strong) transparent;
}

.supply-table {
  min-width: 1080px;
  overflow: visible;
  border-top: 1px solid var(--table-line);
  background: var(--canvas);
}

.supply-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 1080px;
  border-top: 1px solid var(--table-line);
  background: var(--canvas);
  padding: 10px var(--workspace-x) 12px;
}

.supply-table.detailed-mode + .supply-pagination {
  min-width: 1360px;
}

.supply-page-summary,
.supply-page-number {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.supply-page-size {
  display: inline-grid;
  grid-template-columns: auto minmax(76px, max-content);
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.supply-page-size select {
  min-height: 34px;
  padding-right: 30px;
}

.supply-page-buttons {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.supply-table-head,
.supply-card {
  display: grid;
  grid-template-columns:
    minmax(240px, 1.05fr)
    minmax(150px, 0.65fr)
    minmax(340px, 1.6fr)
    minmax(180px, 0.8fr)
    minmax(170px, 0.75fr);
}

.supply-table.detailed-mode {
  min-width: 1360px;
}

.supply-table.detailed-mode .supply-table-head,
.supply-table.detailed-mode .supply-card {
  grid-template-columns:
    minmax(220px, 0.9fr)
    minmax(130px, 0.55fr)
    minmax(330px, 1.25fr)
    minmax(280px, 1.1fr)
    minmax(160px, 0.65fr)
    minmax(170px, 0.7fr);
}

.supply-table-head {
  position: sticky;
  z-index: 5;
  top: 0;
  min-height: 52px;
  border-bottom: 1px solid var(--table-line);
  box-shadow: none;
  background: #f6f7f4;
  color: #5f6874;
  font-size: 13px;
  font-weight: 650;
}

.supply-table-head span {
  display: grid;
  align-content: center;
  min-width: 0;
  border-right: 1px solid var(--table-line-soft);
  padding: 8px 10px;
}

.supply-table-head span:last-child {
  border-right: 0;
}

.supply-table-head small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 540;
}

.selection-summary {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.status-filter {
  position: relative;
  width: 156px;
  max-width: 100%;
}

.status-filter summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  padding: 6px 10px;
  white-space: nowrap;
}

.status-filter summary::-webkit-details-marker {
  display: none;
}

.status-filter summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.status-filter[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.status-filter-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 4px;
  width: min(330px, 84vw);
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  box-shadow: var(--shadow-lift);
  padding: 8px;
}

.status-filter-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 7px;
}

.status-filter-option:hover {
  background: var(--panel-soft);
}

.status-filter-option input {
  width: 16px;
  min-height: 16px;
}

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

.empty {
  display: grid;
  min-height: 64px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 620;
  padding: 20px;
  text-align: center;
}

.supply-card {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--table-line);
  border-radius: 0;
  background: var(--canvas);
  color: var(--body);
  cursor: default;
  padding: 0;
  text-align: left;
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
}

.supply-card:hover {
  filter: brightness(0.985);
  box-shadow: none;
}

.supply-card.active {
  background: #f4f8ff;
}

.supply-card.bulk-selected {
  background: #fffaf0;
}

.supply-card.active:hover,
.supply-card.bulk-selected:hover,
.supply-card.match-matched:hover,
.supply-card.match-mismatch:hover,
.supply-card.match-missing:hover {
  filter: brightness(0.985);
}

.supply-card.match-matched {
  border-color: var(--table-line);
  background: var(--forest-soft);
}

.supply-card.match-mismatch {
  border-color: var(--table-line);
  background: var(--canvas);
}

.supply-card.match-missing {
  border-color: rgba(169, 54, 12, 0.12);
  background: var(--coral-soft);
}

.supply-cell {
  display: grid;
  align-content: flex-start;
  min-width: 0;
  min-height: 62px;
  border-right: 1px solid var(--table-line-soft);
  padding: 10px 12px;
}

.supply-cell:last-child {
  border-right: 0;
}

.supply-open {
  width: max-content;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.2;
  padding: 0;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.supply-open:hover {
  color: var(--link);
  text-decoration: none;
}

.supply-title {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.supply-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.supply-created {
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
}

.supply-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  min-width: 0;
  gap: 8px;
}

.supply-select-box {
  display: inline-grid;
  width: 18px;
  min-width: 18px;
  cursor: pointer;
}

.supply-select-box input,
.supply-check input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  margin-top: 1px;
}

.supply-date-cell {
  align-content: flex-start;
  gap: 4px;
}

.supply-date-main {
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef1ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  padding: 4px 8px;
  white-space: nowrap;
}

.supply-status-cell,
.supply-move-cell {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 5px;
}

.neutral-tag {
  border-color: transparent;
  background: #f7f8fa;
  color: var(--faint);
}

.direction-tag {
  white-space: normal;
}

.match-tag.match-matched {
  border-color: transparent;
  background: #e0f2e9;
  color: var(--forest);
}

.match-tag.match-mismatch {
  border-color: transparent;
  background: var(--yellow-soft);
  color: #6b4c00;
}

.match-tag.match-missing {
  border-color: transparent;
  background: var(--coral-soft);
  color: var(--coral);
}

.act-discrepancy-tag {
  border-color: transparent;
  background: var(--yellow-soft);
  color: #6b4c00;
}

.manual-control-tag {
  max-width: 100%;
  border-color: transparent;
  background: #fff4cf;
  color: #6b4c00;
  overflow-wrap: anywhere;
  white-space: normal;
}

.supply-route {
  display: grid;
  align-content: flex-start;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
}

.supply-move-route {
  --supply-move-route-padding-y: 8px;
  display: grid;
  position: relative;
  align-content: center;
  gap: 8px;
  padding-top: var(--supply-move-route-padding-y);
  padding-bottom: var(--supply-move-route-padding-y);
}

.supply-move-route:not(.multi-cluster-route) {
  --supply-route-label-space: 22px;
  padding-bottom: calc(var(--supply-move-route-padding-y) + var(--supply-route-label-space));
}

.supply-route-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.supply-move-route > .supply-route-control > span {
  line-height: 16px;
}

.supply-route-control select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.multi-cluster-parent {
  position: relative;
  cursor: default;
}

.cluster-menu-open {
  position: relative;
  z-index: 35;
}

.multi-cluster-route {
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.cluster-expand-button {
  display: inline-grid;
  grid-template-columns: 16px minmax(0, auto);
  align-items: center;
  justify-content: start;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-align: left;
}

.cluster-expand-button svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.supply-cluster-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% - 4px);
  left: 8px;
  display: grid;
  width: calc(100% - 16px);
  max-height: min(360px, calc(100vh - 210px));
  overflow: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  box-shadow: var(--shadow-lift);
}

.supply-cluster-menu-head {
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  padding: 10px 12px;
}

.supply-cluster-menu-inner {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.supply-cluster-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0 0 10px;
}

.supply-cluster-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.supply-cluster-name {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.supply-cluster-name strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.supply-route-row {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  row-gap: 2px;
}

.supply-route-label {
  white-space: normal;
}

.supply-route-value {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.missing-date {
  color: var(--danger);
}

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

.context-route {
  margin: 16px 16px 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 640;
  line-height: 1.35;
  padding: 12px;
  overflow-wrap: anywhere;
}

.action-strip {
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.context-route + .action-strip {
  padding-top: 12px;
}

.checkbox-row {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--muted);
}

.checkbox-row input {
  width: 16px;
  min-height: 16px;
}

.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  position: absolute;
  z-index: 70;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.3;
  opacity: 0;
  padding: 7px 9px;
  pointer-events: none;
  transform: translateY(3px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.has-tooltip:hover::after,
.has-tooltip:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.recent {
  border-top: 1px solid var(--hairline);
  background: var(--panel-soft);
  padding: 13px 16px 16px;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.recent-list {
  display: grid;
  gap: 7px;
  max-height: 188px;
  overflow: auto;
}

.recent-item {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--muted);
  font-size: 12px;
  padding: 9px;
}

.recent-item strong {
  color: var(--ink);
}

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.preview-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 8px;
}

.preview-title-group {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.preview-close-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.preview-close-button:hover,
.preview-close-button:focus-visible {
  color: var(--coral);
}

.preview-close-button svg {
  width: 18px;
  height: 18px;
}

.preview-body {
  overflow: auto;
  padding: 14px;
}

.bulk-preview-actions,
.selected-supply-list,
.bulk-preview-group {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.reconcile-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--body);
  font-size: 13px;
  padding: 0;
}

.reconcile-summary strong,
.bulk-preview-actions strong,
.selected-supply-row strong,
.assortment-cell strong {
  color: var(--ink);
}

.reconcile-summary.match-matched {
  background: transparent;
}

.reconcile-summary.match-mismatch {
  background: transparent;
}

.reconcile-summary.match-missing {
  background: transparent;
}

.reconcile-summary p {
  color: var(--muted);
}

.reconcile-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.24fr);
  gap: 16px;
  align-items: start;
}

.reconcile-summary-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.preview-supply-title,
.preview-move-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-move-title {
  color: var(--ink);
  font-weight: 720;
}

.preview-direction-stack {
  display: grid;
  gap: 3px;
  color: var(--body);
}

.reconcile-message {
  color: var(--muted);
}

.reconcile-position-counts {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-weight: 620;
  text-align: right;
}

.reconcile-position-counts span,
.move-route-summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.move-route-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  color: var(--body);
  font-size: 13px;
  font-weight: 540;
}

.reconcile-issue-strip {
  display: grid;
  gap: 6px;
  margin: 0;
  border-top: 1px solid var(--yellow);
  background: #fff8dd;
  color: #6b4c00;
  padding: 9px 12px 10px;
}

.reconcile-issue-strip strong {
  color: #6b4c00;
  font-weight: 620;
}

.reconcile-issue-strip ul {
  margin: 0;
  padding-left: 18px;
}

.bulk-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px;
}

.bulk-preview-actions p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.selected-supply-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  background: var(--canvas);
}

.selected-supply-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  padding: 10px 12px;
}

.selected-supply-row:last-child {
  border-bottom: 0;
}

.selected-supply-row span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.bulk-preview {
  display: grid;
  gap: 12px;
}

.bulk-preview-group {
  overflow: hidden;
  background: var(--canvas);
}

.bulk-preview-group.error {
  border-color: #edb49d;
  background: var(--danger-soft);
  padding: 12px;
}

.bulk-preview-group.error h3 {
  margin-bottom: 5px;
}

.bulk-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--hairline);
  background: var(--panel-soft);
  padding: 11px 12px;
}

.bulk-preview-head h3 {
  margin-right: auto;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  color: var(--body);
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--hairline);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 760;
}

td {
  overflow-wrap: anywhere;
}

.assortment-cell {
  display: grid;
  gap: 3px;
}

.assortment-cell span {
  color: var(--muted);
  font-size: 12px;
}

.assortment-cell .assortment-note {
  color: var(--link);
}

.assortment-cell strong {
  font-weight: 560;
}

.ok-text {
  color: var(--forest);
  font-weight: 560;
}

.error-text {
  color: var(--danger);
  font-weight: 600;
}

.stock-ok-text,
.stock-shortage-text {
  display: inline-block;
  max-width: 220px;
}

.stock-ok-text {
  color: var(--forest);
  font-weight: 560;
}

.stock-shortage-text {
  color: var(--danger);
  font-weight: 600;
}

.settings-open {
  overflow: hidden;
}

.settings-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(23, 27, 34, 0.48);
  padding: 24px;
}

.settings-overlay[hidden] {
  display: none;
}

.settings-modal {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: min(960px, 100%);
  height: min(520px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lift);
  outline: none;
}

.settings-section-head > div {
  min-width: 0;
}

.settings-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.settings-modal-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  overflow: auto;
  padding: 0;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid var(--hairline);
  background: #fbfbfa;
  padding: 16px 8px 14px;
}

.settings-close-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  margin: 0 0 12px 2px;
  padding: 0;
}

.settings-close-button:hover:not(:disabled),
.settings-close-button:focus-visible {
  background: transparent;
  color: var(--coral);
}

.settings-close-button svg {
  width: 18px;
  height: 18px;
}

.settings-tab-button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--body);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  padding: 9px 10px;
  text-align: left;
}

.settings-tab-button:hover {
  background: var(--panel-soft);
}

.settings-tab-button.active {
  background: #f0f1ef;
  color: var(--ink);
}

.settings-tab-button svg {
  width: 17px;
  height: 17px;
}

.settings-content {
  min-width: 0;
  overflow-y: auto;
  padding: 16px 16px 18px;
}

.settings-panel {
  display: grid;
  gap: 16px;
}

.settings-panel[hidden] {
  display: none;
}

.settings-panel-title {
  border-bottom: 1px solid var(--hairline);
  padding: 0 0 18px;
}

.settings-panel-title h2 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 560;
  line-height: 1.2;
}

.settings-section {
  display: grid;
  gap: 13px;
  border-bottom: 0;
  background: var(--panel);
  padding: 0 0 16px;
}

.settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-section-head h3 {
  display: inline-grid;
  grid-template-columns: 10px auto;
  align-items: center;
  column-gap: 8px;
}

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

.settings-grid-wide {
  grid-column: 1 / -1;
}

.connection-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  align-self: center;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.settings-control-disabled {
  opacity: 0.62;
}

.settings-control-disabled select {
  cursor: not-allowed;
}

.settings-mode-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: -2px 0 0;
}

.connection-dot.pending {
  border-color: #d7aa2d;
  background: var(--yellow);
}

.connection-dot.connected {
  border-color: #28a862;
  background: #42d67e;
  box-shadow: 0 0 0 3px rgba(66, 214, 126, 0.18);
}

.connection-dot.checking {
  border-color: #5b8def;
  background: #7aa7ff;
  box-shadow: 0 0 0 3px rgba(122, 167, 255, 0.18);
}

.settings-section-actions {
  display: flex;
  justify-content: flex-start;
}

.login-page {
  position: relative;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  --vf-auth-primary: #7b61ff;
  --vf-auth-primary-600: #6854f2;
  --vf-auth-primary-700: #5642d9;
  --vf-auth-blue: #4d6bff;
  --vf-auth-cyan: #62cbff;
  --vf-auth-gradient: linear-gradient(100deg, #7b61ff 0%, #6854f2 42%, #4d6bff 72%, #62cbff 100%);
  --vf-auth-bg: #fafbff;
  --vf-auth-bg-soft: #f7f4ff;
  --vf-auth-bg-blue: #eef4ff;
  --vf-auth-surface: #ffffff;
  --vf-auth-glass: rgba(255, 255, 255, 0.78);
  --vf-auth-border: #e6e8f0;
  --vf-auth-border-strong: #d9ddf0;
  --vf-auth-text: #0f1221;
  --vf-auth-text-secondary: #2f3852;
  --vf-auth-muted: #6e758a;
  --vf-auth-placeholder: #a4abbd;
  --vf-auth-focus-ring: rgba(123, 97, 255, 0.18);
  --vf-auth-error: #ef4444;
  --vf-auth-error-bg: #fff1f2;
  --vf-auth-success: #16a34a;
  --vf-auth-success-bg: #ecfdf3;
  --vf-auth-disabled: #e9ebf2;
  --vf-auth-radius-input: 12px;
  --vf-auth-radius-card: 24px;
  --vf-auth-radius-mobile: 20px;
  --vf-auth-shadow-card: 0 24px 70px rgba(15, 18, 33, 0.12);
  --vf-auth-shadow-button: 0 12px 24px rgba(77, 107, 255, 0.22);
  background:
    radial-gradient(circle at 18% 16%, rgba(123, 97, 255, 0.10), transparent 32%),
    radial-gradient(circle at 84% 8%, rgba(98, 203, 255, 0.13), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, var(--vf-auth-bg-soft) 48%, var(--vf-auth-bg-blue) 100%);
  color: var(--vf-auth-text-secondary);
}

html:has(> body.login-page) {
  min-width: 0;
  overflow-y: auto;
  background: #fafbff;
  scrollbar-gutter: auto;
}

.login-page::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background: url("./verflex-ui/wave-background.svg") center bottom / cover no-repeat;
  opacity: 0.42;
}

.auth-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - 48px, 1160px);
  min-height: 64px;
  margin: 18px auto 0;
  color: var(--vf-auth-muted);
  font-size: 13px;
  font-weight: 650;
}

.auth-nav .nav-brand {
  color: var(--vf-auth-text);
}

.auth-brand-logo {
  display: block;
  width: 184px;
  height: auto;
}

.auth-nav-status {
  border: 1px solid rgba(123, 97, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--vf-auth-primary-700);
  box-shadow: 0 8px 24px rgba(15, 18, 33, 0.06);
  padding: 8px 12px;
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 424px);
  align-items: center;
  justify-content: center;
  width: min(100% - 48px, 960px);
  min-height: calc(100vh - 100px);
  margin: 0 auto;
  padding: 42px 0 56px;
}

.login-shell--split {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 424px);
  justify-content: center;
  width: min(100% - 80px, 1180px);
  gap: 64px;
}

.login-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  align-content: center;
  justify-items: center;
  overflow: hidden;
  border: 1px solid rgba(230, 232, 240, 0.82);
  border-radius: 32px;
  background:
    radial-gradient(circle at 68% 18%, rgba(123, 97, 255, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.38);
  box-shadow: 0 24px 80px rgba(15, 18, 33, 0.08);
}

.login-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background: url("./verflex-ui/wave-background.svg") center / cover no-repeat;
  opacity: 0.74;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.62));
}

.login-visual-logo {
  position: relative;
  z-index: 1;
  width: min(280px, 48vw);
  filter: drop-shadow(0 30px 80px rgba(123, 97, 255, 0.25));
}

.login-visual p {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin-top: 28px;
  color: var(--vf-auth-muted);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}

.login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--vf-auth-border);
  border-radius: var(--vf-auth-radius-card);
  background: var(--vf-auth-glass);
  box-shadow: var(--vf-auth-shadow-card);
  backdrop-filter: blur(18px);
  padding: 40px;
}

.login-card-logo {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--vf-auth-text);
  font-size: 18px;
  font-weight: 760;
}

.login-card-logo img {
  width: 72px;
  height: auto;
  filter: drop-shadow(0 14px 34px rgba(123, 97, 255, 0.22));
}

.login-panel > * {
  position: relative;
}

.login-head {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.login-eyebrow {
  color: var(--vf-auth-primary-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.login-head h1 {
  max-width: 18ch;
  color: var(--vf-auth-text);
  font-size: 28px;
  line-height: 36px;
  font-weight: 760;
  letter-spacing: 0;
}

.login-head p {
  max-width: 32ch;
  color: var(--vf-auth-muted);
  font-size: 14px;
  line-height: 22px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label span {
  color: var(--vf-auth-text-secondary);
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
}

.login-form input {
  min-height: 48px;
  border-color: var(--vf-auth-border);
  border-radius: var(--vf-auth-radius-input);
  background: #ffffff;
  color: var(--vf-auth-text);
  font-size: 14px;
  line-height: 20px;
  padding: 0 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-form input:hover {
  border-color: var(--vf-auth-border-strong);
}

.login-form input:focus {
  border-color: var(--vf-auth-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--vf-auth-focus-ring);
}

.login-form input[aria-invalid="true"],
.login-form label.has-error input {
  border-color: var(--vf-auth-error);
  background: var(--vf-auth-error-bg);
}

.field-error {
  color: var(--vf-auth-error);
  font-size: 12px;
  font-weight: 650;
}

.login-form .code-input {
  min-height: 52px;
  font-size: 22px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: center;
}

.login-form .button.primary {
  min-height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: var(--vf-auth-radius-input);
  background: var(--vf-auth-gradient);
  box-shadow: var(--vf-auth-shadow-button);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.login-form .button.primary:hover {
  box-shadow: 0 16px 30px rgba(77, 107, 255, 0.28);
  filter: saturate(1.1) brightness(1.02);
}

.login-form .button.primary:active {
  transform: translateY(1px);
  box-shadow: 0 8px 20px rgba(77, 107, 255, 0.22);
}

.login-form .button.primary:disabled {
  background: var(--vf-auth-disabled);
  box-shadow: none;
  color: var(--vf-auth-muted);
  cursor: not-allowed;
  opacity: 0.52;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--vf-auth-muted);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.auth-switch a {
  color: var(--vf-auth-primary);
  font-weight: 760;
  text-decoration: none;
}

.auth-switch a:hover {
  color: var(--vf-auth-primary-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-error {
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 16px;
  background: var(--vf-auth-error-bg);
  color: var(--vf-auth-error);
  font-size: 13px;
  font-weight: 650;
  line-height: 20px;
  overflow-wrap: anywhere;
  padding: 12px 14px;
}

.auth-note {
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 16px;
  background: var(--vf-auth-success-bg);
  color: var(--vf-auth-success);
  font-size: 13px;
  font-weight: 650;
  line-height: 20px;
  overflow-wrap: anywhere;
  padding: 12px 14px;
}

.login-page::before {
  display: none;
}

.login-page {
  --vf-primary: #7b61ff;
  --vf-primary-600: #6854f2;
  --vf-primary-700: #5642d9;
  --vf-blue: #4d6bff;
  --vf-cyan: #62cbff;
  --vf-gradient-primary: linear-gradient(100deg, #7b61ff 0%, #6854f2 42%, #4d6bff 72%, #62cbff 100%);
  --vf-bg: #fafbff;
  --vf-surface: #ffffff;
  --vf-surface-glass: rgba(255, 255, 255, 0.78);
  --vf-surface-muted: #f6f7fb;
  --vf-border: #e6e8f0;
  --vf-border-strong: #d9ddf0;
  --vf-text: #0f1221;
  --vf-text-secondary: #2f3852;
  --vf-muted: #6e758a;
  --vf-text-muted: #6e758a;
  --vf-placeholder: #a4abbd;
  --vf-focus: #7b61ff;
  --vf-focus-ring: rgba(123, 97, 255, 0.18);
  --vf-error: #ef4444;
  --vf-error-bg: #fff1f2;
  --vf-shadow-card: 0 24px 70px rgba(15, 18, 33, 0.12);
  --vf-shadow-button: 0 12px 24px rgba(77, 107, 255, 0.22);
  --vf-radius-md: 12px;
  --vf-radius-card: 24px;
  --vf-radius-mobile: 20px;
  overflow: hidden;
  width: 100%;
  background: var(--vf-bg);
  color: var(--vf-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.vf-auth-page {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: start center;
  min-height: 100vh;
  overflow: hidden;
  background:
    url("./verflex-ui/concept-one-background.svg?v=20260704-concept-one-bg") center / cover no-repeat,
    #fbfbff;
}

.vf-visual {
  position: relative;
  display: grid;
  place-items: center;
  align-self: start;
  justify-self: center;
  grid-area: 1 / 1;
  min-width: 0;
  width: min(100%, 540px);
  overflow: hidden;
  background: transparent;
  padding: clamp(72px, 10vh, 104px) 40px 0;
}

.vf-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  display: none;
  pointer-events: none;
}

.vf-visual__logo {
  position: relative;
  z-index: 1;
  display: block;
}

.vf-visual__logo img {
  display: block;
  width: min(220px, 42vw);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(123, 97, 255, 0.13));
}

.vf-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-area: 1 / 1;
  min-width: 0;
  width: 100%;
  background: transparent;
  padding: clamp(232px, 32vh, 292px) 40px 72px;
}

.vf-auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 424px;
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius-card);
  background: var(--vf-surface-glass);
  box-shadow: var(--vf-shadow-card);
  backdrop-filter: blur(18px);
  padding: 40px;
}

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

.vf-form {
  display: grid;
  gap: 18px;
}

.vf-form-head {
  display: contents;
}

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

.vf-label {
  color: var(--vf-text-secondary);
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
}

.vf-input-wrap {
  position: relative;
}

.vf-input-icon,
.vf-input-action {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 20px;
  height: 20px;
  color: var(--vf-placeholder);
  place-items: center;
  transform: translateY(-50%);
}

.vf-input-icon {
  left: 14px;
}

.vf-input-action {
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.vf-input-action:hover {
  color: var(--vf-text-secondary);
  background: var(--vf-surface-muted);
}

.vf-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius-md);
  outline: none;
  background: #ffffff;
  color: var(--vf-text);
  font-size: 14px;
  line-height: 20px;
  padding: 0 42px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.vf-input:hover {
  border-color: #cfd4e1;
}

.vf-input:focus {
  border-color: var(--vf-focus);
  box-shadow: 0 0 0 4px var(--vf-focus-ring);
}

.vf-field.is-error .vf-input {
  border-color: var(--vf-error);
  background: var(--vf-error-bg);
}

.vf-button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--vf-radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.vf-button--primary {
  background: var(--vf-gradient-primary);
  box-shadow: var(--vf-shadow-button);
  color: #ffffff;
}

.vf-button--primary:hover {
  box-shadow: 0 15px 30px rgba(77, 107, 255, 0.28);
  filter: saturate(1.08) brightness(1.02);
}

.vf-button--primary:active {
  box-shadow: 0 8px 20px rgba(77, 107, 255, 0.22);
  transform: translateY(1px);
}

.vf-alert {
  margin-bottom: 20px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 16px;
  background: var(--vf-error-bg);
  color: var(--vf-error);
  font-size: 13px;
  font-weight: 650;
  line-height: 20px;
  overflow-wrap: anywhere;
  padding: 12px 14px;
}

@media (max-width: 1023px) {
  .vf-auth-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    place-items: stretch;
    background: url("./verflex-ui/wave-background.svg") center / cover no-repeat, var(--vf-bg);
  }

  .vf-visual {
    grid-area: auto;
    align-self: auto;
    justify-self: stretch;
    min-height: 248px;
    width: auto;
    background: transparent;
    padding: 40px 24px 12px;
  }

  .vf-visual::after {
    display: none;
  }

  .vf-visual__logo img {
    width: 176px;
  }

  .vf-form-panel {
    align-items: flex-start;
    grid-area: auto;
    background: transparent;
    width: 100%;
    padding: 24px;
  }

  .vf-auth-card {
    max-width: 424px;
    padding: 32px 24px;
  }
}

@media (max-width: 720px) {
  .login-page {
    overflow-y: auto;
  }

  .vf-auth-page {
    width: 100vw;
    min-height: 100svh;
    overflow-x: hidden;
  }

  .vf-visual {
    min-height: 154px;
    padding-top: 26px;
  }

  .vf-form-panel {
    display: block;
    width: 100vw;
    padding: 18px 32px 36px;
  }

  .vf-auth-card {
    width: 100%;
    max-width: 100%;
    border-radius: var(--vf-radius-mobile);
    padding: 24px 20px;
  }

  .vf-form {
    gap: 16px;
  }
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "ozon"
      "preview";
  }
}

@media (max-width: 1480px) {
  .panel-workspace-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .panel-workspace-row h2 {
    white-space: normal;
  }
}

@media (max-width: 1180px) {
  .panel-actions {
    flex-wrap: wrap;
  }

  .panel-actions-right {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  h1 {
    font-size: 42px;
  }

  .panel-identity-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .panel-brand-row {
    min-width: 0;
  }

  .panel-user-actions {
    justify-content: flex-end;
  }

  .login-shell {
    grid-template-columns: minmax(0, 448px);
  }

  .login-shell--split {
    grid-template-columns: minmax(0, 560px);
    width: min(100% - 64px, 720px);
    gap: 24px;
  }

  .login-visual {
    min-height: 260px;
  }

  .login-visual-logo {
    width: 156px;
  }

  .login-visual p {
    max-width: 360px;
    margin-top: 18px;
  }
}

@media (max-width: 720px) {
  :root {
    --sticky-panel-top: 0px;
  }

  body {
    font-size: 14px;
  }

  h1 {
    font-size: 34px;
  }

  .auth-nav {
    width: calc(100% - 24px);
    min-height: 56px;
    margin-top: 10px;
  }

  .auth-nav-status {
    display: none;
  }

  .login-shell {
    max-width: 100%;
    width: calc(100vw - 32px);
    min-height: 0;
    padding: 12px 0 22px;
  }

  .login-shell::before {
    display: none;
  }

  .login-shell--split {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .auth-brand-logo {
    width: 154px;
  }

  .login-visual {
    min-height: 128px;
    border-radius: var(--vf-auth-radius-card);
  }

  .login-visual::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.58));
  }

  .login-visual-logo {
    width: 86px;
  }

  .login-visual p {
    display: none;
  }

  .login-panel {
    border-radius: var(--vf-auth-radius-mobile);
    gap: 14px;
    padding: 22px 20px;
  }

  .login-card-logo {
    gap: 6px;
  }

  .login-card-logo img {
    width: 56px;
  }

  .login-head h1 {
    font-size: 24px;
    line-height: 31px;
  }

  .login-form input,
  .login-form .button.primary {
    min-height: 48px;
  }

  .app-shell {
    padding: 0 0 24px;
  }

  .workspace {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .panel-identity-row,
  .panel-workspace-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .panel-user-actions {
    grid-column: 1 / -1;
    display: flex;
    min-width: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .panel-brand-row {
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .status-pill {
    min-width: 78px;
  }

  .user-menu-trigger {
    width: 100%;
    max-width: none;
    grid-template-columns: 30px minmax(0, 1fr) 16px;
  }

  input,
  select {
    min-height: 40px;
  }

  .settings-modal {
    width: 100%;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .settings-overlay {
    align-items: stretch;
    padding: 0;
  }

  .settings-modal-body {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .settings-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 8px;
  }

  .settings-content {
    overflow: visible;
    padding: 12px;
  }

  .settings-section-head,
  .settings-section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-section-actions .button {
    width: 100%;
  }

  .credential-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .credential-actions .button {
    width: 100%;
  }

  .credential-actions .icon-button {
    width: 48px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .panel-actions {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
  }

  .panel-actions-left,
  .panel-actions-right {
    flex: 0 0 auto;
  }

  .panel-actions .button {
    width: 100%;
    min-width: 0;
  }

  .panel-actions .icon-button {
    width: 48px;
  }

  .lookback-control {
    grid-template-columns: 1fr;
    align-content: center;
    min-width: 0;
  }

  .supply-search-control {
    min-width: 0;
  }

  .top-selection-toggle,
  .status-filter-slot {
    width: 100%;
    min-width: 0;
  }

  .lookback-control span {
    display: none;
  }

  .small-input {
    width: 100%;
    min-width: 0;
  }

  .status-filter {
    width: 100%;
  }

  .status-filter summary {
    justify-content: space-between;
    width: 100%;
  }

  .status-filter-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  .supply-list {
    max-height: none;
  }

  .preview-panel {
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100vw - 24px);
  }

  .preview-head-actions {
    align-items: stretch;
    justify-content: space-between;
  }

  .supply-table {
    display: grid;
    gap: 10px;
    min-width: 0;
    border-top: 0;
    background: var(--panel-soft);
    padding: 10px;
  }

  .supply-pagination {
    align-items: stretch;
    justify-content: stretch;
    flex-wrap: wrap;
    min-width: 0;
    border-top: 0;
    background: var(--panel-soft);
    padding: 10px;
  }

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

  .supply-page-size,
  .supply-page-buttons {
    flex: 1 1 180px;
  }

  .supply-page-buttons {
    justify-content: flex-end;
  }

  .supply-table.detailed-mode {
    min-width: 0;
  }

  .supply-table-head {
    display: none;
  }

  .selected-supply-row,
  .bulk-preview-actions {
    align-items: stretch;
  }

  .supply-card {
    grid-template-columns: 1fr;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
  }

  .supply-table.detailed-mode .supply-card {
    grid-template-columns: 1fr;
  }

  .supply-cluster-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .supply-cell {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 10px;
  }

  .supply-move-route {
    --supply-move-route-padding-y: 10px;
  }

  .supply-cell:last-child {
    border-bottom: 0;
  }

  .supply-status-cell,
  .supply-move-cell {
    justify-content: flex-start;
  }

  .selected-supply-row,
  .bulk-preview-actions {
    flex-direction: column;
  }

  .summary {
    justify-content: flex-start;
  }

  .reconcile-summary-layout,
  .move-route-summary {
    grid-template-columns: 1fr;
  }

  .reconcile-position-counts {
    justify-items: start;
    text-align: left;
  }

  .action-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .action-strip .checkbox-row {
    grid-column: 1 / -1;
  }

  .action-strip .button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .checkbox-row {
    margin-right: 0;
  }

  .selected-supply-row span {
    white-space: normal;
  }

  .auth-nav,
  .login-shell {
    width: min(100% - 24px, 1160px);
  }

  .auth-nav {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 12px;
  }

  .login-shell {
    gap: 18px;
    min-height: auto;
    padding: 22px 0 28px;
  }

  .login-panel {
    padding: 28px 20px;
  }

  .auth-switch {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .panel-user-actions {
    width: 100%;
  }

  .status-pill {
    min-width: 78px;
  }

  .action-strip {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    flex-direction: column;
    overflow-x: visible;
  }

  .panel-actions-left,
  .panel-actions-right {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .panel-actions .icon-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .icon-button,
  .supply-card {
    transition: none;
  }
}

.vf-ms-body {
  background:
    radial-gradient(circle at 18% 0%, rgba(88, 108, 255, 0.14), transparent 36%),
    linear-gradient(180deg, #f7f9ff 0%, #ffffff 68%);
  color: #111426;
  min-height: 100vh;
}

.vf-ms-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

.vf-ms-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(107, 116, 148, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(23, 32, 88, 0.12);
  max-width: 720px;
  padding: 32px;
  width: min(100%, 720px);
}

.vf-ms-logo {
  display: block;
  height: 44px;
  margin-bottom: 24px;
  width: auto;
}

.vf-ms-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 8px 12px;
}

.vf-ms-status.is-ready {
  background: rgba(25, 135, 84, 0.12);
  color: #137049;
}

.vf-ms-status.is-waiting {
  background: rgba(153, 101, 21, 0.12);
  color: #87590f;
}

.vf-ms-panel h1 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.vf-ms-panel p {
  color: #4c5874;
  line-height: 1.55;
  margin: 0 0 22px;
  max-width: 620px;
}

.vf-ms-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}

.vf-ms-meta div {
  align-items: center;
  border-top: 1px solid rgba(107, 116, 148, 0.16);
  display: grid;
  gap: 14px;
  grid-template-columns: 96px minmax(0, 1fr);
  padding-top: 10px;
}

.vf-ms-meta dt {
  color: #6d7691;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.vf-ms-meta dd {
  color: #111426;
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}

.vf-ms-button {
  align-items: center;
  background: #4456ff;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
}

.vf-ms-button:hover {
  background: #3545e8;
}

@media (max-width: 560px) {
  .vf-ms-shell {
    padding: 16px;
  }

  .vf-ms-panel {
    padding: 22px;
  }

  .vf-ms-meta div {
    align-items: start;
    gap: 4px;
    grid-template-columns: 1fr;
  }
}
