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

:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: #dde3ea;
  --accent: #156f72;
  --accent-strong: #0f575a;
  --warn: #b45309;
  --danger: #b42318;
  --ok: #087443;
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button, input, select, textarea { font: inherit; }

button {
  border: 0;
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 16px;
}

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

.sidebar {
  background: #162126;
  color: #eef6f6;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand strong { display: block; font-size: 20px; }
.brand span { color: #a7b8bd; font-size: 13px; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e6f4f1;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

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

.sidebar-footer {
  margin-top: auto;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-btn, .logout-btn {
  min-height: 42px;
  border-radius: 8px;
  background: transparent;
  color: #cbd7db;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 0 12px;
}

.nav-btn:hover, .nav-btn.active, .logout-btn:hover {
  background: #26353b;
  color: #ffffff;
}

.logout-btn {
  width: 100%;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #9fe4d9;
}

.nav-submenu {
  display: grid;
  gap: 4px;
  padding-left: 38px;
}

.nav-sub-btn {
  min-height: 32px;
  border-radius: 8px;
  background: transparent;
  color: #a7b8bd;
  text-align: left;
  padding: 0 10px;
  font-size: 13px;
}

.nav-sub-btn:hover,
.nav-sub-btn.active {
  background: #203038;
  color: #ffffff;
}

.workspace {
  padding: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

h1, h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 { font-size: 30px; }
h2 { font-size: 17px; }

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

.role-select {
  min-width: 150px;
}

.role-select select {
  min-height: 42px;
  padding: 8px 10px;
}

.user-chip {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 4px 4px 12px;
}

.user-chip strong {
  white-space: nowrap;
}

.search {
  height: 42px;
  width: min(460px, 44vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.icon-btn, .ghost-btn, .primary-btn, .danger-btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
}

.primary-btn { background: var(--accent); color: #fff; }
.primary-btn:hover { background: var(--accent-strong); }
.ghost-btn { background: #eef3f5; color: #21313a; }
.danger-btn { background: #fff1f0; color: var(--danger); }

.toolbar-select {
  min-height: 40px;
  min-width: 220px;
  border: 1px solid #d6e4ec;
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
  color: #102747;
  font-weight: 700;
}

.view { display: none; }
.view.active { display: block; }

.content-grid.settings-section { display: none; }
.content-grid.settings-section.active { display: grid; }

.permission-grid {
  display: grid;
  gap: 10px;
}

.permission-grid label {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.permission-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: var(--accent);
  order: 2;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 32px;
}

.metric.warn strong { color: var(--warn); }

.category-filters {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid #e3eef5;
}

.modal-category-filters {
  padding-top: 0;
  flex-shrink: 0;
}

.category-filter-card {
  min-width: 170px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid #d9e8f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(10, 47, 66, 0.08);
  display: grid;
  align-content: space-between;
  gap: 6px;
  text-align: left;
  color: #0c2949;
}

.category-filter-card.active {
  border-color: rgba(0, 213, 198, 0.72);
  background: linear-gradient(135deg, rgba(236, 255, 252, 0.98), rgba(255, 255, 255, 0.94));
  box-shadow: 0 0 0 3px rgba(0, 213, 198, 0.16), 0 14px 34px rgba(10, 47, 66, 0.08);
}

.category-filter-card span {
  color: #6680a2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.category-filter-card strong {
  color: #0c2949;
  font-size: 18px;
  line-height: 1.1;
}

.category-filter-card em {
  color: #008f86;
  font-style: normal;
  font-weight: 900;
}


")[1].split("


.dashboard-overview {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.dashboard-kpi {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.dashboard-kpi span,
.dashboard-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-kpi strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.dashboard-kpi.warn strong,
.dashboard-issue.warn strong,
.dashboard-activity .warn strong {
  color: var(--danger);
}

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

.dashboard-card {
  min-width: 0;
  overflow: hidden;
}

.panel-head.compact {
  min-height: 58px;
}

.panel-head.compact h2 {
  font-size: 18px;
}

.dashboard-mini-list {
  display: grid;
}

.dashboard-mini-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #edf1f5;
}

.dashboard-mini-row span,
.dashboard-mini-row strong,
.dashboard-mini-row small {
  min-width: 0;
}

.dashboard-mini-row strong,
.dashboard-mini-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-mini-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-empty {
  margin: 0;
  padding: 16px;
}

.dashboard-issue-list,
.dashboard-activity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.dashboard-issue,
.dashboard-activity div {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 10px 12px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  text-align: left;
}

.dashboard-issue span,
.dashboard-activity span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-issue strong,
.dashboard-activity strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

@media (max-width: 1180px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-workgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-kpis,
  .dashboard-issue-list,
  .dashboard-activity {
    grid-template-columns: 1fr;
  }
}

.dashboard-assembly-reminders {
  margin-bottom: 16px;
  overflow: hidden;
}

.dashboard-reminder-head .muted {
  margin: 4px 0 0;
}

.assembly-reminder-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.assembly-reminder-summary div {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.assembly-reminder-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.assembly-reminder-summary strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.assembly-reminder-summary .warn strong {
  color: var(--danger);
}

.assembly-reminder-list {
  display: grid;
  gap: 0;
}

.assembly-reminder-row {
  min-height: 58px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 90px 90px 150px;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #edf1f5;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.assembly-reminder-row:hover {
  background: #f3fbfa;
}

.assembly-reminder-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.assembly-reminder-row strong,
.assembly-reminder-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-reminder-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.assembly-reminder-row .low {
  color: var(--danger);
}

.assembly-reminder-empty {
  margin: 0;
  padding: 16px;
}

.assembly-reminder-alert {
  padding: 10px 16px;
  border-top: 1px solid #f5d7bf;
  background: #fff8ed;
  color: var(--warn);
  font-weight: 800;
  font-size: 13px;
}

@media (max-width: 980px) {
  .assembly-reminder-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assembly-reminder-row {
    grid-template-columns: minmax(180px, 1fr) 90px 90px;
  }

  .assembly-reminder-row span:nth-child(2),
  .assembly-reminder-row span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 640px) {
  .assembly-reminder-summary {
    grid-template-columns: 1fr;
  }

  .assembly-reminder-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .assembly-reminder-row span {
    white-space: normal;
  }
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.content-grid.single {
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel.wide { min-height: 320px; }

.settings-integration-panel {
  grid-column: span 2;
  width: min(780px, 100%);
}

.stock-register {
  min-height: calc(100vh - 150px);
}

.panel-head {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invoice {
  display: block;
}

.invoice-head {
  align-items: end;
}

.invoice-meta {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 150px 150px minmax(140px, 180px) minmax(240px, 340px);
  gap: 10px;
  align-items: end;
}

.supply-control {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.supply-pick-btn {
  min-width: 220px;
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-tab {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
}

.invoice-tab.active {
  background: #eef3f5;
  color: var(--text);
  font-weight: 700;
}

.invoice-lines {
  border-bottom: 1px solid var(--line);
}

/* analytics-financial-core-stage1 */
.analytics-shell { display: grid; gap: 14px; }
.analytics-toolbar { padding: 16px 18px; }
.analytics-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.analytics-heading h2 { margin: 3px 0 0; font-size: 20px; }
.analytics-heading .eyebrow { color: #6d7b91; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.analytics-filters { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) minmax(180px, 1.4fr); gap: 10px; }
.analytics-filters label { display: grid; gap: 5px; color: #65738a; font-size: 11px; font-weight: 700; }
.analytics-filters input,
.analytics-filters select { min-height: 36px; padding: 7px 10px; border: 1px solid #dfe5ee; border-radius: 8px; background: #fff; color: #1f2f46; }
.analytics-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.analytics-presets > button { padding: 6px 10px; border: 1px solid #dfe5ee; border-radius: 7px; background: #f8fafc; color: #47566d; font-size: 12px; cursor: pointer; }
.analytics-presets > button:hover { border-color: #79c9c2; color: #087f78; }
.analytics-loss-filter { display: inline-flex; align-items: center; gap: 6px; margin-left: 5px; color: #8d2630; font-size: 12px; font-weight: 800; }
.analytics-missing-cost-filter { display: inline-flex; align-items: center; gap: 6px; color: #8a6015; font-size: 12px; font-weight: 800; }
.analytics-load-status { margin-left: auto; color: #768399; font-size: 12px; }
.analytics-load-status.error { color: #b32b39; }
.analytics-kpis { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; }
.analytics-kpi { min-width: 0; padding: 11px 12px; border: 1px solid #e2e7ef; border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(39, 55, 78, .035); }
.analytics-kpi span { display: block; overflow: hidden; color: #738096; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.analytics-kpi strong { display: block; margin-top: 5px; color: #1f2e43; font-size: 17px; line-height: 1.15; }
.analytics-kpi.positive strong { color: #087b63; }
.analytics-kpi.negative strong { color: #bc2737; }
.analytics-kpi.unknown strong { color: #9aa4b3; }
.analytics-quality { display: flex; flex-wrap: wrap; gap: 8px; }
.analytics-quality-item { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; padding: 6px 10px; border: 1px solid #e1e6ee; border-radius: 8px; background: #fff; color: #55647a; font-size: 12px; }
.analytics-quality-item strong { color: #24354c; }
.analytics-quality-item.warning { border-color: #f0d6a5; background: #fffaf0; color: #8a6015; }
.analytics-quality-item.danger { border-color: #f0c2c8; background: #fff5f6; color: #a62836; }
.analytics-products-panel { padding: 0; overflow: hidden; }
.analytics-products-panel .panel-head { padding: 15px 17px 8px; }
.analytics-table-wrap { max-height: calc(100vh - 355px); }
.analytics-table { min-width: 1180px; font-size: 12px; }
.analytics-table th { position: sticky; top: 0; z-index: 2; padding: 9px 10px; background: #f7f9fc; white-space: nowrap; }
.analytics-table td { padding: 9px 10px; vertical-align: middle; }
.analytics-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analytics-product-cell { display: grid; grid-template-columns: 30px minmax(160px, 1fr); align-items: center; gap: 9px; text-align: left; }
.analytics-product-toggle { width: 28px; height: 28px; border: 1px solid #dce3ec; border-radius: 7px; background: #fff; color: #647289; cursor: pointer; }
.analytics-product-name { display: grid; gap: 2px; min-width: 0; }
.analytics-product-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-product-name small { color: #7e8a9c; }
.analytics-marketplaces { display: inline-flex; gap: 4px; margin-left: 5px; }
.analytics-marketplace-badge { padding: 1px 5px; border-radius: 5px; background: #edf4ff; color: #3b66a3; font-size: 9px; font-weight: 800; }
.analytics-missing-cost { display: inline-block; margin-top: 3px; color: #a56a09; font-size: 10px; font-weight: 800; }
.analytics-negative-row { background: #fff6f7; }
.analytics-negative-row td[data-label="Прибыль"],
.analytics-negative-value { color: #b62434; font-weight: 800; }
.analytics-detail-row td { padding: 0 !important; text-align: left !important; background: #f8fafc; }
.analytics-detail { display: grid; gap: 8px; padding: 12px 48px; border-top: 1px solid #e5e9f0; }
.analytics-detail-summary { display: flex; flex-wrap: wrap; gap: 7px; }
.analytics-detail-summary span { padding: 5px 8px; border-radius: 6px; background: #fff; color: #59677b; }
.analytics-detail-cost em { margin-left: 7px; color: #9b690e; font-style: normal; font-weight: 800; }
.analytics-offer-list { display: grid; gap: 5px; }
.analytics-offer-row { display: grid; grid-template-columns: 85px 110px minmax(160px, 1fr) repeat(4, 100px); gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid #e3e8ef; border-radius: 7px; background: #fff; font-size: 11px; }
.analytics-empty { padding: 24px !important; color: #7c899c; text-align: center !important; }

@media (max-width: 1180px) {
  .analytics-filters { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .analytics-kpis { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  .analytics-toolbar-row { align-items: flex-start; }
  .analytics-filters { grid-template-columns: 1fr 1fr; }
  .analytics-search-label { grid-column: 1 / -1; }
  .analytics-kpis { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .analytics-kpi { flex: 0 0 145px; }
  .analytics-load-status { width: 100%; margin-left: 0; }
  .analytics-table-wrap { max-height: none; }
  .analytics-detail { padding: 10px; }
  .analytics-offer-row { grid-template-columns: 1fr 1fr; }
}

/* analytics-profit-dashboard-v1 */
#analyticsView { margin: -2px; padding: 2px; overflow-x: hidden; background: #f4f7fb; }
.analytics-shell { gap: 10px; }
.analytics-toolbar { padding: 10px 12px 8px; border-color: #dfe6ef; border-radius: 9px; box-shadow: 0 2px 8px rgba(23, 47, 77, .04); }
.analytics-filter-bar { display: flex; align-items: end; gap: 7px; min-width: 0; }
.analytics-filter-bar label,
.analytics-segment-field,
.analytics-period-field { min-width: 0; margin: 0; border: 0; padding: 0; }
.analytics-filter-bar label > span,
.analytics-segment-field legend,
.analytics-period-field legend { display: block; margin: 0 0 4px; color: #68788d; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.analytics-search-control { flex: 1 1 220px; max-width: 330px; }
.analytics-category-control { flex: 0 1 155px; }
.analytics-search-control input,
.analytics-category-control select,
.analytics-period-field input { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #d9e2ed; border-radius: 6px; background: #fff; color: #172b45; font-size: 12px; }
.analytics-segment-field { flex: 0 0 auto; }
.analytics-segments { display: inline-flex; min-height: 36px; padding: 2px; border: 1px solid #d9e2ed; border-radius: 7px; background: #f7f9fc; }
.analytics-segments button { padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: #4d6077; font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.analytics-segments button.active { background: #123c66; color: #fff; box-shadow: 0 1px 3px rgba(18, 60, 102, .18); }
.analytics-period-field { flex: 0 0 235px; }
.analytics-period-field > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; }
.analytics-period-field input { min-width: 0; padding-inline: 6px; }
.analytics-period-field span { color: #8795a7; }
.analytics-settings-btn,
.analytics-sync-btn { min-height: 36px; padding: 7px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.analytics-settings-btn { border: 1px solid #ccd8e5; background: #fff; color: #29445f; cursor: pointer; }
.analytics-toolbar .analytics-sync-btn { border: 1px solid #294e73; background: #f8fbfe; color: #173c63; box-shadow: none; }
.analytics-toolbar .analytics-sync-btn:hover { border-color: #173c63; background: #eef4fa; color: #102f50; box-shadow: none; transform: none; }
.analytics-presets { min-height: 25px; margin-top: 7px; gap: 5px; }
.analytics-presets > button { padding: 4px 8px; border-radius: 5px; font-size: 10px; }
.analytics-comparison-period { margin-left: 6px; color: #697a90; font-size: 10px; }
.analytics-load-status { font-size: 10px; }

.analytics-kpis { grid-template-columns: repeat(10, minmax(132px, 1fr)); gap: 6px; }
.analytics-kpi { position: relative; min-height: 90px; padding: 8px 10px 7px; border-color: #dfe6ef; border-radius: 8px; box-shadow: 0 2px 8px rgba(25, 50, 82, .035); }
.analytics-kpi.warning { border-color: #e7c36f; background: #fffaf0; cursor: pointer; }
.analytics-kpi-label { display: flex !important; align-items: center; justify-content: space-between; gap: 4px; color: #63758b !important; font-size: 10.5px !important; font-weight: 850 !important; letter-spacing: .025em; text-transform: uppercase; }
.analytics-info { display: inline-grid; flex: 0 0 15px; width: 15px; height: 15px; place-items: center; padding: 0; border: 1px solid #c8d3e0; border-radius: 50%; background: transparent; color: #6c7d91; font: 800 9px/1 sans-serif; cursor: help; }
.analytics-kpi strong { margin-top: 4px; color: #172b45; font-size: clamp(20px, 1.12vw, 22px); line-height: 1.1; letter-spacing: -.018em; white-space: nowrap; }
.analytics-kpi em { display: block; min-height: 13px; margin-top: 2px; overflow: hidden; color: #687a90; font-size: 10.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.analytics-delta { display: flex; align-items: center; gap: 3px; min-height: 13px; margin-top: 3px; color: #7c8999; font-size: 9.75px; font-weight: 750; white-space: nowrap; }
.analytics-delta small { margin-left: auto; color: inherit; font-size: 9.5px; }
.analytics-delta.positive { color: #087858; }
.analytics-delta.negative { color: #b72c3b; }
.analytics-delta.neutral { color: #7c8999; }
.analytics-updating .analytics-kpis,
.analytics-updating .analytics-products-panel,
.analytics-updating .analytics-abc-panel { opacity: .68; transition: opacity .18s ease; }

.analytics-quality { display: block; min-width: 0; }
.analytics-quality-strip { display: flex; align-items: center; flex-wrap: nowrap; gap: 7px 15px; min-height: 28px; overflow-x: auto; padding: 5px 10px; border: 1px solid #dfe6ef; border-radius: 7px; background: #fff; color: #5c6f85; font-size: 10.5px; white-space: nowrap; scrollbar-width: thin; }
.analytics-quality-strip > span:first-child { color: #263d58; font-weight: 850; text-transform: uppercase; }
.analytics-quality-strip button { padding: 1px 3px; border: 0; border-radius: 4px; background: transparent; color: #966210; font: inherit; font-weight: 850; cursor: pointer; }
.analytics-quality-strip button:hover { background: #fff5d9; color: #754b07; }

.analytics-abc-panel,
.analytics-products-panel { border-color: #dfe6ef; border-radius: 9px; box-shadow: 0 2px 8px rgba(23, 47, 77, .035); }
.analytics-section-head { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-bottom: 1px solid #e3e9f1; }
.analytics-collapse-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 0; background: transparent; color: #172f4c; font-size: 13px; font-weight: 850; cursor: pointer; }
.analytics-collapse-btn span { color: #61758c; }
.analytics-abc-filter { display: flex; align-items: center; gap: 6px; color: #67798e; font-size: 10px; font-weight: 750; }
.analytics-abc-filter select { min-height: 28px; padding: 4px 7px; border: 1px solid #d7e0ea; border-radius: 5px; background: #fff; font-size: 10px; }
.analytics-abc-wrap { max-height: 295px; overflow: auto; scrollbar-color: #a9b7c7 #edf1f5; scrollbar-width: thin; }
.analytics-abc-table { width: 100%; min-width: 1480px; font-size: 11px; }
.analytics-abc-table th { position: sticky; top: 0; z-index: 2; padding: 8px; background: #173b62; color: #eef5fc; font-size: 9.75px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.analytics-abc-table td { height: 44px; padding: 5px 8px; border-color: #e8edf3; color: #31465e; white-space: nowrap; }
.analytics-abc-table th:nth-child(1), .analytics-abc-table td:nth-child(1) { width: 50px; min-width: 50px; max-width: 50px; }
.analytics-abc-table th:nth-child(2), .analytics-abc-table td:nth-child(2) { width: 330px; min-width: 330px; max-width: 330px; white-space: normal; }
.analytics-abc-table th:nth-child(3), .analytics-abc-table td:nth-child(3) { width: 160px; min-width: 160px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.analytics-abc-table th:nth-child(4), .analytics-abc-table td:nth-child(4) { width: 110px; min-width: 110px; max-width: 110px; }
.analytics-abc-table .analytics-product-link { display: -webkit-box; max-width: 320px; overflow: hidden; font-size: 11px; line-height: 1.25; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.analytics-abc-table td:nth-child(n+5) { font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.analytics-abc-table tr:hover td { background: #f5f8fc; }
.analytics-abc-badge { display: inline-grid; min-width: 21px; height: 20px; place-items: center; margin: 0 1px; border-radius: 5px; font-size: 9px; font-weight: 900; }
.analytics-abc-badge.abc-a { background: #dff4e9; color: #08704f; }
.analytics-abc-badge.abc-b { background: #fff0c8; color: #8b5d08; }
.analytics-abc-badge.abc-c { background: #fbe3e6; color: #a92a38; }
.analytics-abc-code { display: inline-flex; overflow: hidden; border-radius: 5px; vertical-align: middle; }
.analytics-abc-code .analytics-abc-badge { margin: 0; border-radius: 0; }

.analytics-products-head { min-height: 47px; }
.analytics-products-head h2 { margin: 0; color: #172f4c; font-size: 15px; }
.analytics-products-head p { margin: 2px 0 0; color: #748398; font-size: 10px; }
#analyticsRowsCount { color: #617288; font-size: 10px; font-weight: 800; }
.analytics-quick-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 10px; border-bottom: 1px solid #e4eaf1; background: #f9fbfd; }
.analytics-quick-filters button { min-height: 26px; padding: 4px 8px; border: 1px solid #d8e1eb; border-radius: 5px; background: #fff; color: #52667d; font-size: 10px; font-weight: 750; cursor: pointer; }
.analytics-quick-filters button.active { border-color: #315d87; background: #eaf1f8; color: #173c63; }
.analytics-table-wrap { max-height: calc(100vh - 310px); overflow: auto; scrollbar-color: #a9b7c7 #edf1f5; scrollbar-width: thin; }
.analytics-table { width: 100%; min-width: 1680px; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.analytics-table th { top: 0; z-index: 4; height: 39px; padding: 6px 9px; border-color: #284d73; background: #173b62; color: #eef5fc; font-size: 9.75px; letter-spacing: .018em; text-align: right; text-transform: uppercase; }
.analytics-table th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; cursor: pointer; white-space: nowrap; }
.analytics-table th button span { color: #9fb6cc; opacity: .38; transition: opacity .15s ease,color .15s ease; }
.analytics-table th button:hover span { opacity: .7; }
.analytics-table th button span.active { color: #fff; opacity: 1; }
.analytics-table td { height: 46px; padding: 6px 9px; border-bottom: 1px solid #e6ebf1; background: #fff; color: #2c425b; vertical-align: middle; }
.analytics-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analytics-table tbody tr:hover > td { background: #f5f8fc; }
.analytics-table .analytics-fixed-column { position: sticky; z-index: 3; text-align: left; }
.analytics-table th.analytics-fixed-column { z-index: 6; background: #173b62; }
.analytics-table tbody tr:hover > td.analytics-fixed-column { background: #f5f8fc; }
.analytics-cell-value { min-height: 16px; color: #253b55; font-size: 11.25px; }
.analytics-product-link { display: block; max-width: 260px; overflow: hidden; padding: 0; border: 0; background: transparent; color: #173d64; font-size: 11px; font-weight: 850; line-height: 1.25; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.analytics-photo-frame { display: grid; width: 36px; height: 36px; margin: auto; place-items: center; }
.analytics-product-photo { display: block; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.analytics-photo-preview { position: fixed; z-index: 120; width: 240px; height: 240px; padding: 8px; pointer-events: none; border: 1px solid #d8e1eb; border-radius: 12px; background: #fff; box-shadow: 0 18px 48px rgba(18, 45, 75, .24); }
.analytics-photo-preview[hidden] { display: none; }
.analytics-photo-preview img { display: block; width: 100%; height: 100%; border-radius: 7px; object-fit: contain; background: #fff; }
.analytics-photo-placeholder { display: grid; width: 36px; height: 36px; margin: auto; place-items: center; border: 1px solid #d4dde7; border-radius: 6px; background: #f3f6f9; color: #8c9bab; font-size: 17px; }
.analytics-photo-placeholder[hidden] { display: none; }
.analytics-marketplace-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.analytics-marketplace-chips span { padding: 2px 6px; border-radius: 4px; background: #eaf1fb; color: #24547e; font-size: 9.5px; font-weight: 900; }
.analytics-marketplace-chips + small { display: block; margin-top: 2px; color: #98a3b1; font-size: 8.5px; }
.analytics-missing-cost { display: block; margin-top: 2px; color: #9a650c; font-size: 8.75px; font-weight: 850; }
.analytics-negative-row > td:first-child { box-shadow: inset 3px 0 #cf3344; }
.analytics-missing-row > td:first-child { box-shadow: inset 3px 0 #dda52c; }
.analytics-negative-row.analytics-missing-row > td:first-child { box-shadow: inset 2px 0 #cf3344, inset 5px 0 #dda52c; }
.analytics-negative-value { color: #b82839 !important; font-weight: 850; }
.analytics-detail-row td { position: static !important; background: #f5f8fc !important; }
.analytics-detail { gap: 8px; padding: 10px 14px; }
.analytics-detail-summary,
.analytics-detail-expenses { display: flex; flex-wrap: wrap; gap: 5px; }
.analytics-detail-summary span,
.analytics-detail-expenses span { display: grid; gap: 2px; padding: 5px 7px; border: 1px solid #e0e7ef; border-radius: 5px; background: #fff; color: #718197; font-size: 9px; }
.analytics-detail-summary b,
.analytics-detail-expenses b { color: #263e59; font-size: 10px; }
.analytics-detail-summary em { color: #97640c; font-style: normal; font-weight: 800; }
.analytics-detail-grids { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.analytics-detail-grids section { min-width: 0; overflow: auto; border: 1px solid #e0e7ef; border-radius: 6px; background: #fff; }
.analytics-detail-grids h4 { margin: 0; padding: 6px 8px; color: #29445f; font-size: 10px; }
.analytics-detail-grids table { width: 100%; font-size: 9px; }
.analytics-detail-grids th,
.analytics-detail-grids td { position: static; height: auto; padding: 5px 7px; background: #fff; color: #52667c; text-align: left !important; }
.analytics-empty { padding: 26px !important; color: #74859a; text-align: center !important; }

.analytics-skeleton i,
.analytics-skeleton strong,
.analytics-skeleton small,
.analytics-table-skeleton { display: block; min-height: 10px; border-radius: 4px; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 50%, #edf1f5 75%); background-size: 200% 100%; animation: analytics-shimmer 1.2s infinite linear; }
.analytics-skeleton strong { width: 76%; height: 19px; }
.analytics-skeleton small { width: 55%; margin-top: 8px; }
.analytics-table-skeleton { height: 32px; margin: 6px; }
.analytics-table-skeleton.short { width: 70%; }
@keyframes analytics-shimmer { to { background-position: -200% 0; } }

.analytics-settings-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(16, 35, 56, .32); }
.analytics-settings-panel { display: grid; width: min(680px, 96vw); height: 100%; grid-template-rows: auto 1fr auto; background: #f8fafc; box-shadow: -12px 0 36px rgba(15, 36, 61, .18); }
.analytics-settings-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #dfe6ee; background: #fff; }
.analytics-settings-head h2 { margin: 3px 0 0; color: #18324f; font-size: 18px; }
.analytics-settings-head button { width: 32px; height: 32px; border: 1px solid #d8e1eb; border-radius: 6px; background: #fff; color: #53677d; font-size: 20px; cursor: pointer; }
.analytics-settings-content { overflow: auto; padding: 15px 18px; }
.analytics-settings-content h3 { margin: 0 0 8px; color: #2d4661; font-size: 12px; }
.analytics-settings-content section + section { margin-top: 18px; }
.analytics-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.analytics-settings-grid label { display: flex; align-items: center; gap: 7px; min-height: 31px; padding: 5px 8px; border: 1px solid #e0e7ef; border-radius: 6px; background: #fff; color: #40566e; font-size: 10px; }
.analytics-settings-grid input[type="checkbox"] { flex: 0 0 15px; width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: #123c66; }
.analytics-settings-actions { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid #dfe6ee; background: #fff; }
.analytics-tax-settings-head,.analytics-tax-profile-head,.analytics-tax-save { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.analytics-tax-settings-head p { margin: 3px 0 0; color: #718198; font-size: 11px; }
.tax-settings-shell{grid-column:1/-1}.tax-settings-heading,.tax-entity-card header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.tax-settings-warning{margin:14px 0;padding:12px;border-radius:10px;background:#fff7df;color:#755800}.tax-entity-card{margin:14px 0;padding:16px;border:1px solid #dce4ee;border-radius:14px;background:#fff}.tax-entity-card label{display:inline-flex;gap:8px;align-items:center;margin:10px 14px 10px 0}.tax-account-chips span{display:inline-block;margin:4px;padding:5px 8px;border-radius:999px;background:#eef4fa}.tax-year-list details{margin-top:8px;border-top:1px solid #edf1f5;padding:10px 0}.tax-year-list summary{display:grid;grid-template-columns:70px 1fr 1fr;gap:12px;cursor:pointer}.tax-year-list table{margin-top:8px;width:100%}.tax-empty{padding:18px;color:#718198;text-align:center}@media(max-width:700px){.tax-settings-heading,.tax-entity-card header{display:block}.tax-year-list summary{grid-template-columns:1fr}.tax-entity-card input[type=text],.tax-entity-card input:not([type]){width:100%}}
.tax-main-fields,.tax-period-row{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px;align-items:end}.tax-period-editor{margin-top:14px;padding-top:12px;border-top:1px solid #edf1f5}.tax-period-head{display:flex;align-items:center;justify-content:space-between}.tax-period-row{margin:8px 0;padding:10px;border-radius:10px;background:#f8fafc}.tax-period-row label,.tax-main-fields label{display:grid;margin:0;font-size:12px}.tax-history{margin-top:14px}.tax-history div{padding:6px 0;border-top:1px solid #edf1f5}@media(max-width:900px){.tax-main-fields,.tax-period-row{grid-template-columns:1fr 1fr}}@media(max-width:600px){.tax-main-fields,.tax-period-row{grid-template-columns:1fr}.tax-period-head{align-items:flex-start}.tax-entity-card header>div:last-child{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}}
.analytics-tax-profile { margin-top: 10px; padding: 12px; border: 1px solid #dce5ef; border-radius: 9px; background: #fff; }
.analytics-tax-profile-head > input { flex: 1 1 auto; min-width: 120px; font-weight: 700; }
.analytics-tax-profile-head > label { display: flex; align-items: center; gap: 5px; color: #52677e; font-size: 11px; white-space: nowrap; }
.analytics-tax-profile-head > button { width: 30px; height: 30px; border: 1px solid #e1e7ef; border-radius: 6px; background: #fff; color: #8a5360; cursor: pointer; }
.analytics-tax-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.analytics-tax-form-grid label { color: #52677e; font-size: 10px; font-weight: 700; }
.analytics-tax-form-grid input,.analytics-tax-form-grid select,.analytics-tax-profile-head > input { width: 100%; min-height: 34px; margin-top: 3px; padding: 6px 8px; border: 1px solid #d8e1eb; border-radius: 6px; background: #fff; color: #263d56; }
.analytics-tax-profile fieldset { margin: 11px 0 0; padding: 9px; border: 1px solid #e3e9f0; border-radius: 7px; }
.analytics-tax-profile legend { padding: 0 4px; color: #62758c; font-size: 10px; }
.analytics-tax-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.analytics-tax-checks label { display: flex; align-items: center; gap: 6px; color: #3f566f; font-size: 10.5px; }
.analytics-tax-checks small { color: #8996a7; }
.analytics-tax-note,.analytics-tax-empty { margin: 9px 0 0; padding: 8px 10px; border-radius: 6px; background: #fff7e5; color: #715823; font-size: 10.5px; }
.analytics-tax-save { margin-top: 10px; }
.analytics-tax-save span,.analytics-tax-warning { color: #8a651c; font-size: 10.5px; }

@media (max-width: 1780px) {
  .analytics-kpis { grid-template-columns: repeat(8, minmax(132px, 1fr)); }
  .analytics-filter-bar { flex-wrap: wrap; }
  .analytics-search-control { max-width: none; }
}

@media (max-width: 1450px) {
  .analytics-kpis { grid-template-columns: repeat(6, minmax(132px, 1fr)); }
  .analytics-period-field { flex-basis: 220px; }
  .analytics-table-wrap { max-height: calc(100vh - 365px); }
}

@media (max-width: 1180px) {
  .analytics-kpis { grid-template-columns: repeat(4, minmax(132px, 1fr)); }
  .analytics-filter-bar { align-items: end; }
  .analytics-search-control { flex-basis: 280px; }
  .analytics-detail-grids { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .analytics-filter-bar { display: grid; grid-template-columns: 1fr; }
  .analytics-search-control,
  .analytics-category-control,
  .analytics-period-field { max-width: none; width: 100%; }
  .analytics-segments { max-width: 100%; overflow-x: auto; }
  .analytics-kpis { display: flex; }
  .analytics-kpi { flex-basis: 160px; }
  .analytics-settings-grid { grid-template-columns: 1fr; }
}

#documentDestinationWarehouseCustom {
  margin-top: 8px;
}

.document-journal {
  padding: 18px;
  background: rgba(250, 253, 255, 0.72);
}

.document-journal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.document-journal-head h3,
.document-journal-head p {
  margin: 0;
}

.document-journal-head p {
  margin-top: 4px;
}

.document-journal-table {
  min-width: 820px;
}

.invoice-table {
  min-width: 1120px;
}

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

.check-col {
  width: 38px;
  text-align: center;
}

.check-col input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.table-input {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 6px;
}

.number-input {
  width: 86px;
}

.money-input {
  width: 118px;
}

.money-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.number-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.invoice-add-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 96px auto auto;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.qty-input {
  min-height: 38px;
}

.invoice-bottom {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 420px);
  gap: 20px;
  padding: 16px;
  align-items: start;
}

.invoice-note textarea {
  min-height: 88px;
}

.invoice-summary {
  display: grid;
  gap: 16px;
  justify-items: stretch;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 18px;
}

.summary-total strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.summary-details {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  outline: 0;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 111, 114, 0.12);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

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

.assembly-send-actions .primary-btn,
.assembly-send-actions .ghost-btn {
  min-height: 38px;
}

.table-wrap { overflow: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.stock-table {
  min-width: 1500px;
}

.stock-table th,
.stock-table td {
  padding: 8px 10px;
  font-size: 13px;
}

.table-sort-btn,
.stock-sort-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.table-sort-btn .sort-mark,
.stock-sort-btn .sort-mark {
  color: var(--muted);
  font-weight: 700;
}

.table-sort-btn:hover,
.stock-sort-btn:hover {
  color: var(--accent);
}

.table-sort-btn.active,
.stock-sort-btn.active {
  color: var(--accent);
}

.stock-view-modal-panel {
  max-width: 720px;
}

.stock-view-tools {
  justify-content: flex-end;
}

.stock-column-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stock-column-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.stock-column-row {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}

.stock-column-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
}

.stock-table th:nth-child(n+4),
.stock-table td:nth-child(n+4) {
  text-align: right;
}

.stock-table th:last-child,
.stock-table td:last-child {
  text-align: right;
}

.stock-table tbody tr {
  cursor: pointer;
}

.stock-table tbody tr:hover {
  background: #f8fafc;
}

.stock-table tbody tr.selected-row {
  background: #fffda8;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f8fafc;
}

tr.low-stock td:first-child::after {
  content: "низкий остаток";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--warn);
  font-size: 11px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef3f5;
}

.photo-hover-preview {
  position: fixed;
  z-index: 12000;
  max-width: min(260px, calc(100vw - 24px));
  max-height: min(300px, calc(100vh - 24px));
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: #20304f;
  box-shadow: 0 18px 46px rgba(7, 30, 52, .3);
  pointer-events: none;
  overflow: hidden;
}

.photo-hover-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 248px;
  max-height: 288px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3f5;
  color: #21313a;
  font-size: 12px;
}

.type-pill.receive, .type-pill.conducted { background: #ecfdf3; color: var(--ok); }
.type-pill.writeoff, .type-pill.canceled { background: #fff1f0; color: var(--danger); }
.type-pill.move, .type-pill.draft { background: #eff6ff; color: #175cd3; }

.subhead {
  color: #17202a;
  font-weight: 700;
  font-size: 14px;
}

.kit-builder {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.component-list, .compact-list {
  display: grid;
  gap: 8px;
}

.line-chip, .list-row {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
}

.list-row {
  grid-template-columns: 1fr;
  padding: 12px;
  margin: 0 16px;
}

.list-row:first-child { margin-top: 16px; }
.list-row:last-child { margin-bottom: 16px; }
.list-row span { color: var(--muted); font-size: 13px; }

.item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-cell strong, .item-cell span {
  display: block;
}

.item-cell span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.item-photo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #dbe7ea;
}

.item-photo.placeholder {
  display: inline-block;
  background:
    linear-gradient(135deg, transparent 47%, #a9bdc5 48% 52%, transparent 53%),
    #dbe7ea;
}

.hidden { display: none !important; }

.labels-preview {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.label-card {
  width: var(--label-w, 58mm);
  height: var(--label-h, 40mm);
  border: 1px dashed #9aa7b2;
  border-radius: 8px;
  padding: calc(6px * var(--label-scale, 1));
  display: grid;
  align-content: start;
  gap: calc(3px * var(--label-scale, 1));
  background: #fff;
  overflow: hidden;
}

.label-print-modal-panel { width: min(1180px, calc(100vw - 32px)); }
.label-print-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .48fr); gap: 24px; align-items: stretch; }
.label-direct-preview { display: grid; place-items: center; min-height: min(58vh, 520px); padding: 32px; border-radius: 14px; background: #eef7fa; overflow: auto; }
.label-direct-preview .label-card { margin: 0; transform: scale(1.8); transform-origin: center; }
#labelPrintForm { align-self: center; align-content: start; height: max-content; min-width: 0; }
#labelPrintForm > label { align-self: start; }
#labelPrintForm input:not([type="checkbox"]),
#labelPrintForm select { min-height: 40px; }
.label-data-row { font-size: calc(8pt * var(--label-scale, 1)); }
.label-print-fields { display: grid; gap: 10px; }
.label-group-panel { grid-column: 1 / -1; }
.view#labelsView .panel.wide { grid-column: 1 / -1; }
.label-group-settings { margin: 0; padding: 20px; border: 0; display: grid; gap: 16px; min-width: 0; }
.label-group-settings .panel-head { padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.label-group-settings .panel-head h2 { margin: 0 0 6px; }
.label-group-design { margin: 0; }
.label-group-design > .muted { margin: 8px 0; }
.label-group-design > form { gap: 12px; }
.label-group-settings .label-designer-preview { margin-top: 4px; }
.label-template-actions { justify-content: flex-start; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; color: #8b1e2d; background: #fff0f2; white-space: pre-line; }
.label-data-row { font-size: 8pt; line-height: 1.15; overflow-wrap: anywhere; }
.label-data-row strong { font-weight: 700; }
.label-card.label-invalid { outline: 2px solid #d43d51; }

@media (max-width: 760px) {
  .label-print-layout { grid-template-columns: 1fr; }
  .label-direct-preview { min-height: 340px; }
  .label-direct-preview .label-card { transform: scale(1.45); }
  .label-group-settings { padding: 16px; }
}

@media (max-width: 420px) {
  .label-template-actions { flex-direction: column; align-items: stretch; }
}

.designer-card {
  margin-top: 4px;
}

.label-name {
  display: block;
  text-align: center;
  font-size: calc(var(--name-size, 18pt) * var(--label-scale, 1));
  font-weight: var(--name-weight, 700);
  line-height: 1.05;
}

.label-card span {
  color: var(--muted);
}

.label-sku {
  display: block;
  color: #111 !important;
  line-height: 1.05;
  font-size: calc(var(--sku-size, 8pt) * var(--label-scale, 1));
  font-weight: var(--sku-weight, 400);
}

.barcode-svg {
  width: 100%;
  height: var(--barcode-h, 14mm);
  min-height: 0;
  fill: #111;
  background: #fff;
}

.label-barcode-text {
  text-align: center;
  letter-spacing: 0;
  font-size: calc(var(--barcode-text-size, 16pt) * var(--label-scale, 1));
  font-weight: var(--barcode-text-weight, 400);
}

.label-price {
  font-size: calc(var(--price-size, 10pt) * var(--label-scale, 1));
  font-weight: var(--price-weight, 700);
  color: var(--text) !important;
}

.label-custom-text {
  margin: 0;
  color: #111 !important;
  font-size: calc(var(--custom-text-size, 9pt) * var(--label-scale, 1));
  font-weight: var(--custom-text-weight, 400);
  line-height: 1.25;
  white-space: pre-wrap;
}

.label-icon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(4px * var(--label-scale, 1));
  overflow: hidden;
}

.label-icon {
  min-width: calc(22px * var(--label-scale, 1));
  min-height: calc(22px * var(--label-scale, 1));
  border: 1px solid #111;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(2px * var(--label-scale, 1)) calc(4px * var(--label-scale, 1));
  color: #111 !important;
  font-size: calc(var(--icon-size, 6pt) * var(--label-scale, 1)) !important;
  font-weight: var(--icon-weight, 700);
  line-height: 1;
}

.label-settings {
  grid-column: 1 / -1;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.label-settings summary {
  cursor: pointer;
  font-weight: 700;
}

.label-font-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, auto);
  gap: 10px;
  margin-top: 10px;
}

.check-label {
  min-width: 92px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-designer-preview {
  display: grid;
  place-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

.backup {
  margin: 16px;
  width: calc(100% - 32px);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.hidden { display: none; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #162126;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-panel {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.item-modal-panel {
  width: min(720px, 100%);
  grid-template-rows: auto minmax(0, 1fr);
}

.bulk-items-panel {
  width: min(1180px, 100%);
}

.modal-form {
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 140px);
}

.modal-head {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 120px;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}

.modal-table-wrap {
  max-height: 560px;
}

.catalog-pick-table {
  min-width: 820px;
}

.supply-pick-table {
  min-width: 920px;
}

.bulk-items-table {
  min-width: 1320px;
}

.catalog-pick-table th,
.catalog-pick-table td,
.supply-pick-table th,
.supply-pick-table td,
.bulk-items-table th,
.bulk-items-table td {
  padding: 10px 12px;
}

.bulk-items-table .table-input {
  min-width: 120px;
}

.bulk-items-table .short-input {
  min-width: 64px;
}

.print-area { display: none; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 12px;
    gap: 12px;
  }
  .brand { display: none; }
  .nav {
    display: flex;
    overflow-x: auto;
  }
  .nav-group {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .nav-btn {
    flex: 0 0 auto;
    grid-template-columns: 24px auto;
    white-space: nowrap;
  }
  .nav-submenu {
    display: flex;
    padding-left: 0;
  }
  .nav-sub-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .workspace { padding: 16px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .invoice-head { align-items: stretch; flex-direction: column; }
  .invoice-meta { grid-template-columns: 1fr 1fr; width: 100%; }
  .invoice-add-row { grid-template-columns: 1fr 96px; }
  .invoice-add-row button { width: 100%; }
  .invoice-bottom { grid-template-columns: 1fr; }
  .modal-tools { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  h1 { font-size: 24px; }
  .metrics { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .topbar-actions { flex-direction: column; align-items: stretch; }
  .icon-btn { width: 100%; }
  .invoice-meta,
  .invoice-add-row { grid-template-columns: 1fr; }
}

@media print {
  @page { size: 58mm 40mm; margin: 0; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area {
    display: block;
    position: absolute;
    inset: 0;
    padding: 0;
  }
  .print-label {
    width: var(--label-w, 58mm);
    height: var(--label-h, 40mm);
    box-sizing: border-box;
    border: 0;
    padding: 2.5mm 3mm;
    display: grid;
    align-content: start;
    gap: calc(1.5mm * var(--label-scale, 1));
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: page;
    page-break-after: always;
    font-family: Arial, sans-serif;
  }
  .print-label:last-child { break-after: auto; page-break-after: auto; }
  .print-label .label-name { font-size: calc(var(--name-size, 14pt) * var(--label-scale, 1)); line-height: 1.05; }
  .print-label .label-sku { font-size: calc(var(--sku-size, 10pt) * var(--label-scale, 1)); }
  .print-label .label-barcode-text { font-size: calc(var(--barcode-text-size, 14pt) * var(--label-scale, 1)); }
  .print-label .label-price { font-size: calc(var(--price-size, 10pt) * var(--label-scale, 1)); }
  .print-label .label-custom-text {
    font-size: calc(var(--custom-text-size, 8pt) * var(--label-scale, 1));
    line-height: 1.15;
  }
  .print-label .label-icon {
    min-width: calc(5mm * var(--label-scale, 1));
    min-height: calc(5mm * var(--label-scale, 1));
    font-size: calc(var(--icon-size, 6pt) * var(--label-scale, 1)) !important;
  }
  .print-label .barcode-svg {
    height: var(--barcode-h, 14mm);
    min-height: 0;
  }
}

/* Marmelad design layer */
:root {
  --bg: #f5fbfd;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #08213f;
  --muted: #6d7fa3;
  --line: #dcebf3;
  --accent: #00bdae;
  --accent-strong: #008f86;
  --accent-soft: #dffbf8;
  --lime: #c6ff4b;
  --sidebar: #06253a;
  --sidebar-deep: #03192a;
  --warn: #d28a00;
  --danger: #df3d3d;
  --ok: #13a86f;
  --shadow: 0 18px 50px rgba(11, 48, 79, 0.10);
  --glow: 0 0 0 1px rgba(0, 213, 196, 0.10), 0 18px 55px rgba(0, 189, 174, 0.12);
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 7%, rgba(0, 213, 196, 0.13), transparent 20%),
    radial-gradient(circle at 15% 88%, rgba(198, 255, 75, 0.10), transparent 18%),
    linear-gradient(135deg, #f9fdff 0%, #f2fbfd 46%, #f7fbff 100%);
  color: var(--text);
  font-size: 14px;
}

.auth-screen {
  background:
    radial-gradient(circle at 68% 18%, rgba(0, 213, 196, 0.18), transparent 24%),
    linear-gradient(135deg, #f9fdff, #effafe);
}

.auth-card {
  border-color: rgba(173, 212, 229, 0.85);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 276px;
  height: 100vh;
  overflow: auto;
  background:
    radial-gradient(circle at 89% 28%, rgba(198, 255, 75, 0.22), transparent 5%),
    radial-gradient(circle at 78% 88%, rgba(0, 213, 196, 0.22), transparent 12%),
    linear-gradient(165deg, #073754 0%, var(--sidebar) 48%, var(--sidebar-deep) 100%);
  color: #f4fffe;
  padding: 28px 20px 22px;
  gap: 30px;
  box-shadow: 12px 0 38px rgba(2, 24, 39, 0.15);
}

.brand {
  gap: 14px;
}

.brand strong {
  color: #ffffff;
  font-size: 21px;
  line-height: 1.1;
}

.brand span {
  color: #9fc6da;
  font-size: 12px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, #caff4b 0 34%, #00d5c4 34% 67%, #1d6aff 67%);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 213, 196, 0.26);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 4px 8px rgba(3, 25, 42, 0.22));
}

.nav {
  gap: 7px;
}

.nav-btn,
.logout-btn {
  min-height: 48px;
  grid-template-columns: 32px 1fr;
  border-radius: 13px;
  color: #d4ebf4;
  padding: 0 13px;
  font-weight: 700;
  transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.nav-btn:hover,
.logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-btn.active,
.nav-sub-btn.active {
  background: linear-gradient(90deg, rgba(0, 189, 174, 0.36), rgba(0, 189, 174, 0.11));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(70, 255, 235, 0.18), 0 0 28px rgba(0, 213, 196, 0.22);
}

.nav-icon {
  color: #49efe2;
  font-size: 17px;
}

.nav-submenu {
  margin: 5px 0 3px 16px;
  padding-left: 17px;
  border-left: 1px solid rgba(144, 199, 220, 0.35);
}

.nav-sub-btn {
  min-height: 34px;
  border-radius: 10px;
  color: #c2deea;
  font-size: 13px;
  padding: 0 12px;
}

.sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(179, 222, 237, 0.13);
}

.workspace {
  padding: 26px 32px 34px;
  margin-left: 276px;
  min-height: 100vh;
}

.topbar {
  margin-bottom: 24px;
}

.topbar > div:first-child {
  min-width: 220px;
}

.eyebrow {
  color: #00a99c;
  font-weight: 700;
}

h1 {
  color: var(--text);
  font-size: 29px;
  line-height: 1.15;
}

h2 {
  color: var(--text);
  font-size: 17px;
}

.topbar-actions {
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.search,
.user-chip,
.icon-btn,
input,
select,
textarea {
  border-color: #d9e8f2;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 20px rgba(28, 72, 103, 0.05);
}

.search {
  height: 48px;
  width: clamp(220px, 18vw, 320px);
  flex: 0 0 clamp(220px, 18vw, 320px);
  min-width: 220px;
  padding: 0 16px;
}

.search input {
  min-width: 0;
}

.search-clear {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  flex: 0 0 auto;
  background: #eef7fa;
  color: #46627f;
  font-weight: 800;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.search-clear:hover {
  background: #dffbf8;
  color: var(--accent-strong);
}

.search span {
  color: #1f6eab;
  font-weight: 700;
}

.user-chip {
  min-height: 48px;
  padding: 6px 14px;
  order: 2;
}

.search {
  order: 1;
}

#printLabelsBtn {
  order: 3;
}

.user-chip::before {
  content: "♙";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}

.panel,
.metric,
.modal-panel {
  background: var(--panel);
  border-color: rgba(198, 223, 236, 0.95);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-head,
.modal-head {
  min-height: 64px;
  padding: 16px 20px;
  border-bottom-color: #e3eef5;
}

.stock-register {
  min-height: calc(100vh - 158px);
}

.content-grid.single {
  margin-top: 18px;
}

.invoice-head {
  background:
    radial-gradient(circle at 93% 18%, rgba(0, 213, 196, 0.12), transparent 16%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.72));
  border-radius: 16px 16px 0 0;
}

.invoice-tabs {
  padding: 12px 18px 0;
  gap: 12px;
}

.invoice-tab {
  min-height: 42px;
  border-radius: 12px 12px 0 0;
  padding: 0 18px;
  color: #62769b;
}

.invoice-tab.active {
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.invoice-view-btn {
  margin-left: auto;
  align-self: center;
}

.invoice-add-row,
.invoice-bottom {
  padding: 14px 18px;
  background: rgba(250, 253, 255, 0.72);
}

.invoice-summary {
  padding: 18px;
  border: 1px solid #dcebf3;
  border-radius: 16px;
  background: #ffffff;
}

.summary-total strong {
  color: #071d39;
  font-size: 26px;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.icon-btn,
.mini-btn {
  border-radius: 11px;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.primary-btn {
  background: linear-gradient(180deg, #02cabb, #00a99c);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 189, 174, 0.22);
}

.primary-btn:hover {
  background: linear-gradient(180deg, #00bdae, #008f86);
}

.ghost-btn {
  background: #eff8fa;
  color: #123253;
  border: 1px solid #dcebf3;
}

.ghost-btn:hover,
.mini-btn:hover,
.icon-btn:hover {
  background: #e5f7f6;
}

.danger-btn {
  background: #fff4f3;
  color: var(--danger);
  border: 1px solid #ffd4d0;
}

.primary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.icon-btn:active,
.mini-btn:active {
  transform: translateY(1px);
}

input,
select,
textarea {
  min-height: 40px;
  padding: 10px 12px;
  color: #123253;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 189, 174, 0.78);
  box-shadow: 0 0 0 4px rgba(0, 189, 174, 0.12);
}

label {
  color: #49607e;
  font-weight: 600;
}

.table-wrap {
  border-radius: 0 0 16px 16px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom-color: #e5eef5;
  color: #14324f;
}

th {
  height: 44px;
  background: #f7fbfd;
  color: #63779d;
  font-size: 11px;
  font-weight: 800;
}

tbody tr {
  background: rgba(255, 255, 255, 0.78);
}

tbody tr:hover,
.stock-table tbody tr:hover {
  background: #f2fbfb;
}

.stock-table tbody tr.selected-row {
  background: #fffddc;
  box-shadow: inset 4px 0 0 var(--lime);
}

.table-sort-btn {
  color: #63779d;
  font-size: 11px;
  text-transform: uppercase;
}

.table-sort-btn.active {
  color: var(--accent-strong);
}

.item-cell {
  gap: 12px;
}

.item-cell strong {
  color: #0c2949;
  font-weight: 800;
}

.item-cell span {
  color: #6680a2;
}

.item-photo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background-color: #eaf3f7;
}

.item-photo.placeholder {
  background:
    linear-gradient(135deg, transparent 47%, #b8d1dc 48% 52%, transparent 53%),
    #edf7fa;
}

.item-photo[data-preview-photo] {
  cursor: zoom-in;
}

.photo-editor {
  border: 1px solid #d9e8f1;
  border-radius: 12px;
  padding: 12px;
  background: #f8fcfd;
}

.photo-editor-grid {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.photo-editor-preview {
  width: 96px;
  aspect-ratio: 1;
  border: 1px solid #d9e8f1;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.photo-editor-preview img,
.photo-editor-preview .item-photo {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.photo-editor-controls {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.photo-preview-panel {
  width: min(980px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.photo-preview-body {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: auto;
  background: #f8fcfd;
}

.photo-preview-body img {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(8, 31, 44, 0.18);
}

.type-pill {
  min-height: 24px;
  border-radius: 999px;
  font-weight: 800;
}

.type-pill.receive,
.type-pill.conducted {
  background: #dcfaec;
  color: #0b9662;
}

.type-pill.writeoff,
.type-pill.canceled {
  background: #fff0ef;
  color: #c83232;
}

.type-pill.move,
.type-pill.draft {
  background: #edf5ff;
  color: #2464af;
}

.mini-btn {
  background: #eef7fa;
  color: #123253;
}

.modal {
  background: rgba(4, 23, 39, 0.42);
  backdrop-filter: blur(4px);
}

.modal-panel {
  border-radius: 18px;
}

.toast {
  background: #071d2c;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(4, 23, 39, 0.22);
}

.stock-column-row,
.permission-grid label,
.line-chip,
.list-row,
.kit-builder,
.label-settings,
.label-designer-preview {
  border-color: #dcebf3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

/* Kit fidelity: Inter typography, logo mark, decorative cubes */
body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

h1 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
}

h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.eyebrow,
.brand span,
.item-cell span,
.muted,
th,
label,
.type-pill {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.app-shell {
  position: relative;
  isolation: isolate;
}

.app-shell::before,
.app-shell::after,
.workspace::before,
.workspace::after,
.sidebar::before,
.sidebar::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
  width: 82px;
  height: 82px;
  transform: rotate(-18deg);
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cdefs%3E%3Cfilter id='blur'%3E%3CfeGaussianBlur stdDeviation='3'/%3E%3C/filter%3E%3ClinearGradient id='top' x1='20' y1='16' x2='98' y2='46' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23F0FFFC' stop-opacity='.96'/%3E%3Cstop offset='1' stop-color='%236BF3E7' stop-opacity='.86'/%3E%3C/linearGradient%3E%3ClinearGradient id='left' x1='12' y1='35' x2='58' y2='108' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%235AF4E3' stop-opacity='.94'/%3E%3Cstop offset='1' stop-color='%2300BDAE' stop-opacity='.72'/%3E%3C/linearGradient%3E%3ClinearGradient id='right' x1='62' y1='39' x2='108' y2='104' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2389FFF3' stop-opacity='.92'/%3E%3Cstop offset='1' stop-color='%2300A99C' stop-opacity='.68'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cellipse cx='60' cy='66' rx='48' ry='44' fill='%2300D5C4' opacity='.46' filter='url(%23blur)'/%3E%3Cpath d='M59 9 103 34 60 58 17 34 59 9Z' fill='url(%23top)' stroke='%23DFFFFA' stroke-width='2'/%3E%3Cpath d='M17 39 58 63v48L17 86V39Z' fill='url(%23left)' stroke='%23CFFFF8' stroke-width='2'/%3E%3Cpath d='M103 39 62 63v48l41-25V39Z' fill='url(%23right)' stroke='%23DFFFFA' stroke-width='2'/%3E%3Cpath d='M58 63 58 110M17 39 58 63 103 39M31 47 58 62 87 46' fill='none' stroke='%23FFFFFF' stroke-opacity='.72' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='101' cy='82' r='7' fill='%23FFFFFF' opacity='.96'/%3E%3Ccircle cx='101' cy='82' r='11' fill='%23C6FF4B' opacity='.32'/%3E%3C/svg%3E");
  opacity: 0.90;
  filter: saturate(1.18) drop-shadow(0 0 20px rgba(0, 213, 196, 0.46)) drop-shadow(0 0 8px rgba(198, 255, 75, 0.22));
}

.app-shell::before {
  top: 34px;
  right: 62px;
}

.app-shell::after {
  right: -28px;
  top: 118px;
  width: 116px;
  height: 116px;
  opacity: 0.52;
}

.workspace {
  position: relative;
}

.workspace::before {
  top: 108px;
  left: 43%;
  width: 64px;
  height: 64px;
  opacity: 0.40;
}

.workspace::after {
  bottom: 34px;
  left: 58%;
  width: 96px;
  height: 96px;
  opacity: 0.32;
}

.sidebar::before {
  left: 164px;
  bottom: 132px;
  width: 74px;
  height: 74px;
  z-index: 0;
  opacity: 0.66;
}

.sidebar::after {
  left: -52px;
  bottom: 44px;
  width: 124px;
  height: 124px;
  z-index: 0;
  opacity: 0.70;
}

.workspace > *,
.sidebar > * {
  position: relative;
  z-index: 1;
}

body::before,
body::after {
  content: none;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 12px 20px rgba(0, 213, 196, 0.22));
}

.brand-mark svg path {
  stroke: none;
}

.brand-mark .logo-top {
  fill: #c6ff4b;
}

.brand-mark .logo-left {
  fill: #00bdae;
}

.brand-mark .logo-right {
  fill: #00e5d3;
}

.brand-mark .logo-core {
  fill: #063047;
}

.brand-mark .logo-spark {
  fill: none;
  stroke: #c6ff4b;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.brand strong {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.app-shell .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 276px;
  height: 100vh;
}

/* Modal redesign */
.modal {
  background:
    radial-gradient(circle at 74% 20%, rgba(0, 213, 196, 0.12), transparent 26%),
    rgba(8, 26, 43, 0.58);
  backdrop-filter: blur(6px);
  padding: 28px;
}

.modal-panel {
  width: min(1080px, calc(100vw - 56px));
  max-height: min(860px, calc(100vh - 56px));
  border: 1px solid rgba(210, 229, 240, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 254, 255, 0.96));
  box-shadow:
    0 30px 90px rgba(3, 25, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.74) inset;
}

.item-modal-panel {
  width: min(920px, calc(100vw - 56px));
}

.bulk-items-panel {
  width: min(1280px, calc(100vw - 56px));
}

.modal-head {
  min-height: 74px;
  padding: 20px 28px;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.84));
}

.modal-head h2 {
  font-size: 24px;
  line-height: 32px;
}

.modal-head .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border-color: #cfe3ef;
  color: #173553;
}

.modal-form {
  padding: 10px 28px 0;
  max-height: calc(100vh - 168px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.modal-form > label:has(input[name="name"]),
.modal-form .barcode-builder,
.modal-form .kit-builder,
.modal-form > .button-row {
  grid-column: 1 / -1;
}

.modal-form label {
  color: #314966;
}

.modal-form input,
.modal-form select,
.modal-form textarea,
.modal-tools input {
  min-height: 46px;
  border-radius: 10px;
  background: #ffffff;
}

.modal-form .field-row {
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.barcode-builder,
.kit-builder {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.barcode-builder .subhead,
.kit-builder .subhead {
  margin-top: 4px;
  color: #102747;
  font-size: 18px;
  line-height: 26px;
}

.barcode-builder > .ghost-btn,
.kit-builder > .ghost-btn {
  justify-self: start;
  min-height: 42px;
}

.component-list {
  gap: 10px;
}

.component-list:empty {
  display: none;
}

.component-list .line-chip,
#pendingItemBarcodes > div,
#pendingMarketplaceLinks > div,
#pendingComponents > div {
  min-height: 48px;
  border: 1px solid #d8e8f2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(28, 72, 103, 0.04);
}

.modal-form > .button-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  margin: 4px -28px 0;
  padding: 18px 28px;
  border-top: 1px solid #e2edf4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.modal-form > .button-row .primary-btn {
  order: 10;
  min-width: 210px;
}

.item-action-menu {
  position: relative;
}

.item-action-menu[open] {
  z-index: 5;
}

.item-action-menu summary {
  list-style: none;
}

.item-action-menu summary::-webkit-details-marker {
  display: none;
}

.item-action-menu .icon-btn {
  display: inline-grid;
  place-items: center;
  gap: 4px;
  width: 46px;
  height: 38px;
  min-height: 38px;
  padding: 0;
}

.item-action-menu .icon-btn span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.item-action-menu-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 8px;
  min-width: 156px;
  padding: 10px;
  border: 1px solid #d8e8f2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 54, 82, 0.18);
}

.item-action-menu-list .ghost-btn,
.item-action-menu-list .danger-btn {
  width: 100%;
  justify-content: flex-start;
}

.modal-form > .button-row .danger-btn,
.modal-form > .button-row .ghost-btn {
  min-width: 116px;
}

.modal-tools {
  padding: 0 28px 18px;
  border-bottom-color: #e2edf4;
}

.modal-table-wrap {
  border-radius: 0 0 18px 18px;
}

.assembly-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(460px, 1.2fr);
  gap: 16px;
  padding: 18px 28px;
  border-top: 1px solid #e3eef5;
  border-bottom: 1px solid #e3eef5;
  background: rgba(255, 255, 255, 0.72);
}

.assembly-account-panel,
.assembly-box-panel {
  display: grid;
  gap: 12px;
}

.assembly-account-panel .permission-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.assembly-account-panel .permission-grid label {
  min-height: 40px;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 16px;
}

.assembly-account-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: #0db3a7;
}

.assembly-box-panel {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.assembly-box-panel strong,
.assembly-box-panel .muted {
  grid-column: 1 / -1;
}

.box-capacity-modal-panel {
  width: min(1180px, 100%);
}

.box-capacity-tools {
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
}

.box-capacity-table {
  min-width: 980px;
}

.box-capacity-table th:last-child,
.box-capacity-table td:last-child {
  text-align: right;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.file-btn input {
  display: none;
}

.assembly-sheet-wrap {
  padding: 18px 28px 24px;
  overflow: visible;
}

.assembly-sheet {
  min-height: 260px;
  border: 1px solid #d9e8f1;
  border-radius: 14px;
  overflow: visible;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(20, 70, 100, 0.08);
}

.assembly-sheet-title {
  padding: 10px 14px;
  background: linear-gradient(90deg, #0db3a7, #00e5d6);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

.assembly-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  padding: 16px;
}

.assembly-store-form {
  position: relative;
  border: 1px solid #d9e8f1;
  border-radius: 12px;
  overflow: visible;
  background: #ffffff;
}

.assembly-store-form:focus-within {
  z-index: 60;
}

.assembly-store-form header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #d9e8f1;
  background: linear-gradient(180deg, #f7fcff, #eef9fb);
}

.assembly-store-form h3 {
  margin: 0;
  color: #102747;
  font-size: 15px;
  line-height: 22px;
}

.assembly-store-form header span {
  color: #5d7290;
  font-weight: 700;
}

.assembly-supply-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #d9e8f1;
  background: #f8fcfe;
}

.assembly-supply-control span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assembly-supply-control small {
  color: #5d7290;
}

.assembly-supply-control strong {
  overflow: hidden;
  color: #102747;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-store-add {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 92px auto;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #d9e8f1;
  background: rgba(255, 255, 255, 0.86);
}

.assembly-product-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  position: relative;
  min-width: 0;
}

.assembly-product-picker input {
  width: 100%;
  cursor: pointer;
}

.assembly-product-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(520px, 60vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid #cfe3ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(4, 23, 39, 0.18);
}

.assembly-product-option {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #102747;
  text-align: left;
  cursor: pointer;
}

.assembly-product-option:hover {
  background: #eefafa;
}

.assembly-product-option img,
.assembly-product-option .item-photo {
  width: 42px;
  height: 42px;
  border-radius: 7px;
}

.assembly-product-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.assembly-product-option strong,
.assembly-product-option em,
.assembly-product-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-product-option em {
  flex: 1 1 auto;
  min-width: 80px;
  color: #506781;
  font-style: normal;
  font-size: 12px;
}

.assembly-product-option small {
  flex: 0 0 auto;
  color: #7d8da6;
  font-size: 11px;
}

.assembly-product-empty {
  padding: 12px;
  color: #7d8da6;
  font-weight: 700;
}

.assembly-product-modal-panel {
  width: min(1120px, 100%);
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.assembly-product-modal-tools {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.assembly-modal-unit-control {
  display: grid;
  grid-template-columns: auto 104px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px 5px 4px 14px;
  border: 1px solid #d9e8f1;
  border-radius: 10px;
  background: #f7fbfd;
  color: #5d7290;
  font-size: 12px;
  font-weight: 800;
}

.assembly-modal-unit-control select {
  height: 36px;
  border: 1px solid #cfe1eb;
  border-radius: 8px;
  background: #ffffff;
  color: #102747;
  font: inherit;
  font-size: 14px;
  padding: 0 9px;
}

@media (max-width: 760px) {
  .assembly-product-modal-tools {
    grid-template-columns: 1fr;
  }

  .assembly-modal-unit-control {
    grid-template-columns: 1fr 120px;
  }
}

.assembly-product-modal-list {
  display: grid;
  gap: 8px;
  padding: 18px 28px 24px;
  overflow: auto;
  min-width: 0;
}

.assembly-modal-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, auto);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid #d9e8f1;
  border-radius: 12px;
  background: #ffffff;
  color: #102747;
  min-width: 0;
  overflow: hidden;
}

.assembly-modal-product:hover {
  border-color: #7ce3d1;
  background: #f0fffb;
}

.assembly-modal-product-main {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.assembly-modal-product img,
.assembly-modal-product .item-photo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.assembly-modal-product span {
  display: block;
  min-width: 0;
}

.assembly-modal-product strong,
.assembly-modal-product em,
.assembly-modal-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-modal-product strong {
  font-size: 15px;
}

.assembly-modal-product em {
  margin-top: 3px;
  color: #506781;
  font-style: normal;
}

.assembly-modal-product small {
  margin-top: 4px;
  color: #7d8da6;
  font-size: 12px;
  font-weight: 700;
}

.assembly-modal-product-qty {
  display: grid;
  grid-template-columns: 82px auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.assembly-modal-product-qty input {
  height: 38px;
  border: 1px solid #d9e8f1;
  border-radius: 8px;
  background: #ffffff;
  color: #102747;
  font: inherit;
  font-weight: 700;
  padding: 0 10px;
}

.assembly-modal-product-qty input:focus,
.assembly-modal-unit-control select:focus {
  border-color: #00d5c6;
  box-shadow: 0 0 0 3px rgba(0, 213, 198, 0.14);
  outline: 0;
}

.assembly-store-head,
.assembly-store-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 96px 100px 88px 42px;
  align-items: center;
}

.assembly-store-head {
  min-height: 30px;
  padding: 0 14px;
  background: rgba(240, 248, 252, 0.88);
  color: #5d7290;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.assembly-store-row {
  min-height: 68px;
  padding: 8px 14px;
  border-top: 1px solid #e4eef4;
  background: rgba(202, 255, 245, 0.52);
}

.assembly-store-row:nth-child(2n) {
  background: rgba(224, 255, 250, 0.42);
}

.assembly-stock-cell {
  justify-self: start;
  font-variant-numeric: tabular-nums;
}

.assembly-stock-cell.low {
  color: #d92d20;
}
.assembly-store-row strong,
#assemblyTasksTable strong {
  color: #102747;
}

.assembly-task-destination {
  display: block;
  margin-top: 3px;
  color: #102747;
  font-size: 12px;
  font-weight: 800;
}

.assembly-store-row span {
  display: block;
  margin-top: 2px;
  color: #6c7f98;
  font-size: 12px;
}

.assembly-line-product {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.assembly-line-product img,
.assembly-line-product .item-photo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.assembly-line-product > div {
  min-width: 0;
}

.assembly-line-product strong,
.assembly-line-product span,
.assembly-line-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-line-product small {
  margin-top: 2px;
  color: #7d8da6;
  font-size: 11px;
  font-weight: 700;
}

.assembly-store-row input,
.assembly-store-add input {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
}

.assembly-store-row input {
  width: 78px;
  text-align: right;
}

.assembly-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: #7d8da6;
  font-weight: 700;
}

.assembly-empty-row {
  padding: 18px 14px;
  color: #7d8da6;
  font-weight: 700;
}

.integration-store-form {
  margin-top: 18px;
  padding-top: 18px;
  padding-left: 16px;
  padding-right: 16px;
  border-top: 1px solid #e3eef5;
}

.integration-store-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.wb-store-card {
  display: grid;
  gap: 12px;
  min-height: 168px;
  padding: 16px;
  border: 1px solid #d9e8f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(10, 47, 66, 0.08);
}

.wb-store-card-new {
  border-style: dashed;
  background: linear-gradient(135deg, rgba(236, 255, 252, 0.96), rgba(255, 255, 255, 0.94));
}

.wb-store-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wb-store-card-head strong {
  display: block;
  margin-top: 4px;
  color: #0c2949;
  font-size: 16px;
  line-height: 1.25;
}

.kpi-label {
  display: block;
  color: #6680a2;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.wb-store-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-self: end;
}

.integration-store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #d9e8f1;
  border-radius: 12px;
  background: #ffffff;
}

.integration-store-actions {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto auto;
  align-items: center;
  gap: 8px;
}

.integration-store-actions input {
  min-width: 0;
}

.integration-store-row strong,
.integration-store-row span {
  display: block;
}

.integration-store-row span {
  margin-top: 2px;
  color: #6c7f98;
  font-size: 12px;
}

@media (max-width: 900px) {
  .integration-store-row,
  .integration-store-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .integration-store-row {
    display: grid;
  }
}

@media (max-width: 1100px) {
  .assembly-toolbar {
    grid-template-columns: 1fr;
  }

  .assembly-modal-product {
    grid-template-columns: 1fr;
  }

  .assembly-box-panel,
  .assembly-store-add {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .modal {
    padding: 12px;
  }

  .modal-panel,
  .item-modal-panel {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .modal-form,
  .modal-form .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    display: grid;
  }

  .sidebar {
    position: sticky;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    border-radius: 0;
    padding: 12px;
  }

  .workspace {
    margin-left: 0;
    padding: 16px;
  }

  .search {
    width: 100%;
  }
}


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

.duplicate-group-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.duplicate-group-head,
.duplicate-child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.duplicate-group-head {
  border-bottom: 1px solid var(--line);
  background: #f7fbfd;
}

.duplicate-child-list {
  display: grid;
}

.duplicate-child-row + .duplicate-child-row {
  border-top: 1px solid var(--line);
}

.duplicate-empty {
  margin: 0;
  padding: 16px;
}

.catalog-duplicates-panel {
  width: min(1040px, calc(100vw - 56px));
  max-height: min(860px, calc(100svh - 56px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.catalog-duplicates-head,
.catalog-duplicates-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-duplicates-head {
  justify-content: space-between;
}

.catalog-duplicates-head h2,
.catalog-duplicates-head p {
  margin: 0;
}

.catalog-duplicates-head p {
  margin-top: 4px;
}

.catalog-duplicate-groups {
  overflow: auto;
  align-content: start;
  background: #f7fbfd;
}

.catalog-duplicates-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
  color: #5e7392;
}

.catalog-duplicates-empty strong {
  color: var(--ink);
  font-size: 18px;
}

@media (max-width: 720px) {
  .catalog-duplicates-panel {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
  }

  .catalog-duplicates-head {
    align-items: flex-start;
  }

  .catalog-duplicates-head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .catalog-duplicates-head-actions .primary-btn {
    min-height: 44px;
  }

  .catalog-duplicate-groups .duplicate-group-head,
  .catalog-duplicate-groups .duplicate-child-row {
    grid-template-columns: 1fr;
  }

  .catalog-duplicate-groups .duplicate-group-actions {
    justify-content: stretch;
  }

  .catalog-duplicate-groups .duplicate-group-actions button {
    flex: 1;
  }
}


.duplicate-modal-panel {
  width: min(1120px, calc(100vw - 56px));
  grid-template-rows: auto minmax(0, 1fr);
}

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

.duplicate-picker {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr);
  gap: 12px;
}

.duplicate-picker > div:first-child {
  min-height: 54px;
}

.duplicate-picker > div:first-child strong {
  display: block;
  margin-top: 4px;
  line-height: 1.25;
}

.duplicate-picker-list {
  min-height: 320px;
  max-height: min(540px, calc(100vh - 280px));
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #f8fcfd;
}

.duplicate-picker-option {
  width: 100%;
  min-height: 58px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
}

.duplicate-picker-option:hover {
  border-color: rgba(0, 189, 174, 0.45);
}

.duplicate-picker-option.active {
  border-color: rgba(0, 189, 174, 0.9);
  box-shadow: 0 0 0 3px rgba(0, 189, 174, 0.12);
}

.duplicate-picker-option:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}


.duplicate-picker-item span {
  color: #5e7392;
  font-size: 12px;
  font-weight: 800;
}

.duplicate-picker-empty {
  padding: 12px;
  color: var(--muted);
  font-weight: 700;
}

.duplicate-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 860px) {
  .duplicate-modal-body {
    grid-template-columns: 1fr;
  }
}


.dashboard-mini-button {
  width: 100%;
  border: 0;
  border-top: 1px solid #edf1f5;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.dashboard-mini-button:hover {
  background: #f3fbfd;
}

.dashboard-mini-row.warn strong:last-child,
.dashboard-mini-button.warn strong:last-child {
  color: var(--danger);
}

.dashboard-card .ghost-btn {
  white-space: nowrap;
}


.sync-progress {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(12, 43, 70, 0.08);
}

.sync-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 8px;
}

.sync-progress-head span {
  color: var(--muted);
  white-space: nowrap;
}

.sync-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(126, 166, 204, 0.22);
  overflow: hidden;
}

.sync-progress-track span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #13d6c6);
  transition: width 0.25s ease;
}

/* dashboard-reference-pass-20260708 */
#dashboardView.active { display: grid; gap: 18px; }
.dashboard-assembly-reminders { position: relative; overflow: hidden; min-height: 210px; padding: 22px 24px; border: 1px solid #dcebf5; border-radius: 16px; background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 70%, rgba(255,255,255,.72) 100%), radial-gradient(circle at 100% 0%, rgba(0, 199, 190, .13), transparent 260px); box-shadow: 0 18px 42px rgba(27, 66, 104, .09); }
.dashboard-assembly-reminders::after { content: ""; position: absolute; right: -26px; top: -46px; width: 270px; height: 220px; background: center / contain no-repeat url("assets/marmelad-decor.svg"); opacity: .72; pointer-events: none; }
.ref-hero-copy, .ref-hero-kpis { position: relative; z-index: 1; }
.ref-hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin-bottom: 18px; }
.ref-hero-copy h2 { margin: 0; color: #14325a; font-size: 22px; font-weight: 900; }
.ref-hero-copy p { margin: 6px 0 0 48px; color: #6a7fa0; font-weight: 750; }
.ref-hero-icon { float: left; width: 34px; height: 34px; margin-right: 14px; display: grid; place-items: center; border-radius: 12px; color: #06aaa7; background: rgba(6, 170, 167, .11); font-size: 22px; }
.ref-hero-action { min-width: 170px; height: 58px; }
.ref-hero-kpis, .ref-kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ref-hero-kpi, .ref-kpi, .ref-card { border: 1px solid #dcebf5; background: rgba(255, 255, 255, .94); box-shadow: 0 14px 30px rgba(28, 64, 102, .07); }
.ref-hero-kpi { min-height: 94px; padding: 16px 18px; border-radius: 14px; }
.ref-hero-kpi span, .ref-kpi span, .ref-supply-metrics span { display: block; color: #6680a5; font-size: 13px; font-weight: 850; }
.ref-hero-kpi strong, .ref-kpi strong { display: block; margin-top: 7px; color: #0f2f58; font-size: 26px; font-weight: 950; }
.ref-hero-kpi small, .ref-kpi small { color: #6f84a3; font-weight: 750; }
.ref-hero-kpi.warn, .ref-kpi.warn { border-color: rgba(255, 64, 109, .25); background: linear-gradient(135deg, rgba(255, 64, 109, .1), rgba(255, 255, 255, .95)); }
.ref-hero-kpi.warn strong, .ref-kpi.warn strong { color: #ff2b61; }
.ref-kpi-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ref-kpi { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; column-gap: 12px; min-height: 92px; padding: 16px; border-radius: 12px; }
.ref-kpi i { grid-row: span 3; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #00a5a7; background: rgba(0, 197, 190, .12); font-style: normal; font-size: 24px; font-weight: 900; }
.ref-kpi strong { margin-top: 2px; font-size: 24px; }
.ref-dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr .85fr; gap: 16px; }
.ref-card { min-width: 0; border-radius: 14px; padding: 18px; }
.ref-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ref-card-head h2 { margin: 0; color: #14325a; font-size: 18px; font-weight: 900; }
.ref-task-table, .ref-list, .ref-progress-list { display: grid; gap: 8px; }
.ref-task-row, .ref-list-row, .ref-progress-row { width: 100%; min-height: 52px; display: grid; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid #eef3f8; background: transparent; color: #17345b; text-align: left; cursor: pointer; }
.ref-task-row { grid-template-columns: minmax(0, 1fr) 86px 82px 70px; }
.ref-task-row strong, .ref-list-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.ref-task-row small, .ref-list-row small { color: #7086a6; font-size: 12px; font-weight: 750; }
.ref-task-row em { width: fit-content; padding: 6px 10px; border-radius: 999px; background: rgba(255, 145, 31, .12); color: #ff8a00; font-size: 12px; font-style: normal; font-weight: 900; }
.ref-task-row b, .ref-list-row b, .ref-progress-row em { justify-self: end; color: #00a16d; font-weight: 950; font-style: normal; }
.ref-list-row { grid-template-columns: minmax(0, 1fr) auto; }
.ref-list-row.warn b { color: #ff2b61; }
.ref-supply-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ref-supply-metrics div { padding: 13px; border-radius: 12px; background: #f7fbff; border: 1px solid #e1edf7; }
.ref-supply-metrics strong { display: block; margin-top: 6px; color: #102f58; font-size: 18px; font-weight: 950; }
.ref-progress-row { grid-template-columns: minmax(110px, 1fr) minmax(160px, 1.5fr) 48px; }
.ref-progress-row i { height: 12px; overflow: hidden; border-radius: 999px; background: #e9f0f7; }
.ref-progress-row i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00a6a7, #12c7bf); }
.ref-empty { margin: 12px 0; color: #6e83a2; font-weight: 750; }
.dashboard-fbs-sales { grid-column: 1 / -1; padding: 0; overflow: hidden; }
.dashboard-fbs-sales .ref-card-head { margin: 0; padding: 18px; border-bottom: 1px solid #e1edf7; }
.dashboard-fbs-sales .ref-card-head p { margin: 5px 0 0; color: #7086a6; font-size: 12px; font-weight: 750; }
.dashboard-fbs-sales-actions { display: flex; align-items: end; gap: 10px; }
.dashboard-fbs-sales-actions label { display: grid; gap: 5px; min-width: 240px; color: #6680a5; font-size: 11px; font-weight: 900; }
.dashboard-fbs-sales-actions select { width: 100%; min-height: 38px; padding: 7px 34px 7px 11px; border: 1px solid #cfe1ee; border-radius: 7px; background: #fff; color: #17345b; font: inherit; font-size: 13px; }
.dashboard-fbs-sales-wrap { overflow-x: auto; }
.dashboard-fbs-sales-table { width: 100%; min-width: 720px; border-collapse: collapse; color: #17345b; }
.dashboard-fbs-sales-table th, .dashboard-fbs-sales-table td { padding: 13px 14px; border-bottom: 1px solid #e8f0f7; text-align: right; white-space: nowrap; }
.dashboard-fbs-sales-table th { background: #f6fbfe; color: #6680a5; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.dashboard-fbs-sales-table th:first-child, .dashboard-fbs-sales-table td:first-child { text-align: left; }
.dashboard-fbs-sales-table tbody tr:hover { background: #f8fcff; }
.dashboard-fbs-sales-table tbody th { color: #17345b; font-size: 13px; text-transform: none; }
.dashboard-fbs-sales-table td strong { color: #083c62; font-size: 16px; font-weight: 950; }
.dashboard-fbs-sales-table td span { color: #7890ad; font-size: 11px; font-weight: 800; }
.dashboard-fbs-sales-table tfoot th, .dashboard-fbs-sales-table tfoot td { background: #edfbfa; border-bottom: 0; font-weight: 950; }
.dashboard-fbs-sales-empty { padding: 28px !important; color: #7086a6; text-align: center !important; font-weight: 800; }
.dashboard-builder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #dcebf5;
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(28, 64, 102, .06);
}
.dashboard-builder-toolbar > div { display: grid; gap: 2px; }
.dashboard-builder-toolbar strong { color: #14325a; font-size: 15px; font-weight: 900; }
.dashboard-builder-toolbar span { color: #7086a6; font-size: 11px; font-weight: 750; }
.dashboard-builder-toolbar.is-editing { justify-content: flex-end; border-color: #83dcd6; background: #f1fcfb; }
.dashboard-builder-toolbar.is-editing > div { margin-right: auto; }
.dashboard-products-count { display: grid; grid-template-columns: auto 78px; align-items: center; gap: 8px; color: #547092; font-size: 11px; font-weight: 850; }
.dashboard-products-count input { min-height: 34px; padding: 5px 8px; border: 1px solid #bfd8e3; border-radius: 7px; background: #fff; color: #12304f; font: inherit; }
.dashboard-builder-layout { display: grid; gap: 16px; }
.dashboard-builder-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dashboard-builder-column, .dashboard-builder-full { display: grid; min-width: 0; gap: 16px; align-content: start; }
.dashboard-widget-slot { position: relative; min-width: 0; }
.dashboard-widget-slot > .ref-card, .dashboard-widget-slot > .ref-kpi-row, .dashboard-widget-slot > .ref-tip { margin: 0; }
.dashboard-builder-column .ref-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-builder-column .ref-kpi-row .ref-kpi:last-child { grid-column: 1 / -1; }
.dashboard-builder-column .ref-supply-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-builder-column .dashboard-fbs-sales { padding: 0; }
.dashboard-widget-tools {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, auto) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 6px;
  padding: 9px 10px;
  border: 1px dashed #22b9b0;
  border-radius: 9px;
  background: #e9fbf9;
}
.dashboard-widget-tools > strong { align-self: center; color: #0b6f6a; font-size: 12px; font-weight: 900; }
.dashboard-widget-tools label { display: grid; gap: 3px; color: #55728f; font-size: 10px; font-weight: 850; }
.dashboard-widget-tools select { min-height: 32px; padding: 4px 28px 4px 8px; border: 1px solid #acdcd8; border-radius: 7px; background: #fff; color: #173a57; font: inherit; font-size: 11px; }
.dashboard-widget-tools > div { display: flex; gap: 5px; }
.dashboard-widget-tools button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #abd9d5;
  border-radius: 7px;
  color: #0c756f;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.dashboard-widget-tools button:hover { border-color: #0bb9ae; background: #f5fffe; }
.dashboard-builder-layout.is-editing .dashboard-widget-slot > :not(.dashboard-widget-tools) { pointer-events: none; user-select: none; }
.dashboard-widget-slot.is-hidden-widget > :not(.dashboard-widget-tools) { opacity: .3; filter: grayscale(.35); }
.dashboard-builder-empty { min-height: 88px; display: grid; place-items: center; padding: 16px; border: 1px dashed #b8d6df; border-radius: 12px; color: #7590a8; background: rgba(247, 252, 253, .8); font-size: 12px; font-weight: 800; text-align: center; }
@media (max-width: 1200px) {
  .dashboard-builder-columns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dashboard-builder-toolbar, .dashboard-builder-toolbar.is-editing { align-items: stretch; flex-direction: column; }
  .dashboard-builder-toolbar.is-editing > div { margin-right: 0; }
  .dashboard-products-count { grid-template-columns: 1fr; }
  .dashboard-widget-tools { grid-template-columns: 1fr; }
  .dashboard-builder-column .ref-kpi-row, .dashboard-builder-column .ref-supply-metrics { grid-template-columns: 1fr; }
  .dashboard-builder-column .ref-kpi-row .ref-kpi:last-child { grid-column: auto; }
}
.dashboard-main-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dashboard-widgets-column { display: grid; min-width: 0; gap: 16px; }
.dashboard-widgets-column .ref-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-widgets-column .ref-kpi-row .ref-kpi:last-child { grid-column: 1 / -1; }
.dashboard-widgets-column .ref-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
.dashboard-widgets-column .ref-card { padding: 14px; }
.dashboard-widgets-column .dashboard-fbs-sales { padding: 0; }
@media (max-width: 1360px) { .dashboard-main-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .dashboard-widgets-column .ref-kpi-row { grid-template-columns: 1fr; } .dashboard-widgets-column .ref-kpi-row .ref-kpi:last-child { grid-column: auto; } }
.dashboard-top-products { padding: 0; overflow: hidden; }
.dashboard-top-products .ref-card-head { margin: 0; padding: 12px 14px; border-bottom: 1px solid #e1edf7; }
.dashboard-top-products .ref-card-head p { margin: 3px 0 0; color: #7086a6; font-size: 11px; font-weight: 750; }
.dashboard-top-products .ref-card-head h2 { font-size: 16px; }
.dashboard-top-products .ref-card-head .ghost-btn { min-height: 32px; padding: 6px 10px; }
.dashboard-top-products-wrap { overflow-x: auto; }
.dashboard-top-products-table { width: 100%; min-width: 680px; border-collapse: collapse; color: #17345b; }
.dashboard-top-products-table th,
.dashboard-top-products-table td { height: 36px; padding: 3px 9px; border-bottom: 1px solid #e8f0f7; text-align: right; vertical-align: middle; white-space: nowrap; }
.dashboard-top-products-table th { background: #f6fbfe; color: #6680a5; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.dashboard-top-products-table th { padding: 6px 9px; }
.dashboard-top-products-table th:nth-child(2),
.dashboard-top-products-table td:nth-child(2) { width: 100%; text-align: left; white-space: normal; }
.dashboard-top-products-table tbody tr { cursor: pointer; transition: background .16s ease; }
.dashboard-top-products-table tbody tr:hover,
.dashboard-top-products-table tbody tr:focus-visible { outline: 0; background: #f2fbfc; }
.dashboard-top-products-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-top-products-table td > strong,
.dashboard-top-products-table td > small { display: block; }
.dashboard-top-products-table td > strong { overflow: hidden; max-width: 480px; color: #17345b; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 900; }
.dashboard-top-products-table td > small { margin-top: 3px; color: #7890ad; font-size: 11px; font-weight: 750; }
.dashboard-top-products-table td > b { color: #083c62; font-size: 15px; font-weight: 950; }
.dashboard-product-info { display: flex; min-width: 0; align-items: center; gap: 9px; }
.dashboard-product-info > span { min-width: 0; }
.dashboard-product-info strong, .dashboard-product-info small { display: block; }
.dashboard-product-info strong { overflow: hidden; max-width: 560px; color: #17345b; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 900; }
.dashboard-product-info small { margin-top: 1px; color: #7890ad; font-size: 10px; font-weight: 750; }
.dashboard-product-photo { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid #dce9ef; border-radius: 7px; background: #edf7fa; object-fit: cover; }
.dashboard-product-photo.placeholder { background: linear-gradient(135deg, transparent 47%, #b8d1dc 48% 52%, transparent 53%), #edf7fa; }
.dashboard-product-rank { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #087f7a; background: #e9f9f7; font-size: 11px; font-weight: 950; }
.dashboard-stock-badge { display: inline-flex; min-width: 72px; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 950; }
.dashboard-stock-badge.ok { color: #087d59; background: #eaf9f3; }
.dashboard-stock-badge.warn { color: #ad6500; background: #fff5df; }
.dashboard-stock-badge.danger { color: #dc2850; background: #fff0f3; }
.dashboard-coverage { font-size: 12px; font-weight: 900; }
.dashboard-coverage.ok { color: #087d59; }
.dashboard-coverage.warn { color: #ad6500; }
.dashboard-coverage.danger { color: #dc2850; }
.dashboard-top-products-empty { padding: 34px !important; color: #7086a6; text-align: center !important; font-weight: 800; }
.marketplace-pill { display: inline-flex; min-width: 48px; justify-content: center; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 950; }
.marketplace-pill.wb { color: #7b36d6; background: #f1e9ff; }
.marketplace-pill.ozon { color: #1765e8; background: #e8f1ff; }
@media (max-width: 760px) {
  .dashboard-fbs-sales .ref-card-head { align-items: stretch; }
  .dashboard-fbs-sales-actions { align-items: stretch; flex-direction: column; }
  .dashboard-fbs-sales-actions label { min-width: 0; }
}
.ref-tip { grid-column: 1 / -1; min-height: 48px; display: flex; align-items: center; padding: 12px 18px; border: 1px solid #ffd9df; border-radius: 14px; background: linear-gradient(90deg, rgba(255, 64, 109, .06), rgba(255, 255, 255, .92)); color: #547094; font-weight: 800; }
@media (max-width: 1180px) { .ref-kpi-row, .ref-hero-kpis, .ref-supply-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ref-dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .ref-hero-copy { grid-template-columns: 1fr; } .ref-kpi-row, .ref-hero-kpis, .ref-supply-metrics { grid-template-columns: 1fr; } .ref-task-row, .ref-progress-row { grid-template-columns: 1fr; } .ref-task-row b, .ref-progress-row em { justify-self: start; } }

/* sidebar-reference-local-20260708 */
.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: #f7fbff;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: 24px 16px 18px;
  gap: 26px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 6%, rgba(20, 218, 205, .22), transparent 160px),
    linear-gradient(168deg, #063d56 0%, #063048 42%, #021d31 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 10px 0 34px rgba(0, 35, 58, .08);
}

.sidebar::before {
  content: "";
  position: absolute;
  left: -54px;
  right: -46px;
  bottom: 54px;
  height: 330px;
  background: center bottom / contain no-repeat url("assets/marmelad-sidebar.svg");
  opacity: .95;
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 220px;
  background: linear-gradient(0deg, rgba(2, 29, 49, .98), rgba(2, 29, 49, .24), transparent);
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  min-height: 56px;
  gap: 13px;
  padding: 0 4px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-mark svg { display: none; }

.brand strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span {
  display: block;
  margin-top: 1px;
  color: #19d4da;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.nav {
  gap: 10px;
}

.nav-group {
  gap: 7px;
}

.nav-btn,
.logout-btn {
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 14px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 0 14px;
  color: rgba(255,255,255,.88);
  font-weight: 850;
  background: transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.nav-btn:hover,
.logout-btn:hover {
  color: #ffffff;
  background: rgba(20, 184, 190, .18);
  border-color: rgba(80, 231, 226, .28);
}

.nav-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(18, 205, 202, .94), rgba(0, 136, 155, .88));
  border-color: rgba(103, 255, 245, .62);
  box-shadow: 0 14px 32px rgba(0, 195, 195, .22), inset 0 1px 0 rgba(255,255,255,.22);
}

.nav-icon {
  width: 30px;
  height: 30px;
  color: #ffffff;
  font-size: 23px;
  line-height: 1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.nav-submenu {
  gap: 5px;
  padding-left: 45px;
  margin: -3px 0 2px;
}

.nav-sub-btn {
  min-height: 30px;
  border-radius: 10px;
  color: rgba(255,255,255,.62);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
}

.nav-sub-btn:hover,
.nav-sub-btn.active {
  color: #ffffff;
  background: rgba(255,255,255,.1);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.sidebar-help,
.sidebar-user {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
}

.sidebar-help .nav-icon,
.sidebar-user > span {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 212, 218, .18);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.sidebar-help strong,
.sidebar-user strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.sidebar-help small,
.sidebar-user small {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 700;
}

.logout-btn {
  width: 100%;
  min-height: 44px;
  background: rgba(255,255,255,.06);
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; min-height: auto; }
  .sidebar::before, .sidebar::after, .sidebar-help, .sidebar-user { display: none; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* sidebar-icons-local-20260708 */
.nav-icon svg,
.nav-sub-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon {
  font-size: 0;
}

.nav-sub-btn {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.nav-sub-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.72);
}

.nav-sub-btn:hover .nav-sub-icon,
.nav-sub-btn.active .nav-sub-icon {
  color: #ffffff;
}

.sidebar-help .nav-icon svg {
  width: 23px;
  height: 23px;
}

/* dashboard-top-photo-local-20260708 */
#dashboardView.active {
  gap: 14px;
}

.dashboard-assembly-reminders {
  min-height: 174px;
  padding: 18px 210px 16px 18px;
  border-radius: 13px;
  border-color: #d9e9f3;
  background:
    linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.97) 72%, rgba(255,255,255,.78) 100%),
    radial-gradient(circle at 92% 14%, rgba(255, 64, 130, .08), transparent 180px),
    radial-gradient(circle at 95% 86%, rgba(0, 199, 190, .12), transparent 220px);
  box-shadow: 0 10px 28px rgba(32, 72, 108, .08);
}

.dashboard-assembly-reminders::before {
  content: "";
  position: absolute;
  right: 138px;
  top: 24px;
  width: 96px;
  height: 56px;
  background:
    radial-gradient(ellipse at center, transparent 45%, #ff9d13 47% 62%, transparent 64%) 0 4px / 30px 22px no-repeat,
    radial-gradient(ellipse at center, transparent 45%, #cfc9c7 47% 62%, transparent 64%) 45px 8px / 30px 22px no-repeat,
    radial-gradient(ellipse at center, transparent 45%, #cfc9c7 47% 62%, transparent 64%) 68px 26px / 28px 20px no-repeat;
  opacity: .9;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 1;
}

.dashboard-assembly-reminders::after {
  right: -18px;
  top: -38px;
  width: 210px;
  height: 168px;
  opacity: .92;
}

.ref-hero-copy {
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 20px;
  align-items: start;
  margin-bottom: 13px;
}

.ref-hero-title {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.ref-hero-copy h2 {
  font-size: 18px;
  line-height: 1.15;
  color: #112d55;
}

.ref-hero-copy p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7fa2;
}

.ref-hero-copy p strong {
  color: #00a0a6;
}

.ref-hero-icon {
  float: none;
  width: 28px;
  height: 28px;
  margin: 1px 0 0;
  border-radius: 9px;
  color: #08b981;
  background: transparent;
  border: 2px solid #12c895;
  font-size: 18px;
  font-weight: 900;
}

.ref-hero-action {
  min-width: 154px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00b7b3, #00959c);
  box-shadow: 0 10px 22px rgba(0, 154, 161, .22);
  font-size: 13px;
  font-weight: 900;
}

.ref-action-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 7px;
  font-size: 14px;
  line-height: 1;
}

.ref-hero-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ref-hero-kpi {
  min-height: 88px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 13px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 8px 24px rgba(24, 62, 100, .06);
}

.ref-hero-kpi i {
  grid-row: 1 / 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-style: normal;
  font-size: 24px;
  font-weight: 950;
}

.ref-hero-kpi span {
  font-size: 12px;
  line-height: 1.1;
}

.ref-hero-kpi strong {
  margin: 3px 0 0;
  font-size: 25px;
  line-height: 1.05;
}

.ref-hero-kpi small {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.1;
}

.ref-hero-kpi-ok i,
.ref-kpi:nth-child(1) i { color: #00ae91; background: rgba(0, 184, 151, .12); }
.ref-hero-kpi-teal i { color: #00aeb3; background: rgba(0, 190, 186, .12); }
.ref-hero-kpi-blue i,
.ref-kpi:nth-child(2) i { color: #2e80ff; background: rgba(46, 128, 255, .12); }
.ref-hero-kpi-danger i { color: #ff3d6e; background: rgba(255, 61, 110, .12); }
.ref-hero-kpi-danger { border-color: rgba(255, 61, 110, .22); background: rgba(255, 247, 250, .86); }
.ref-hero-kpi-danger strong,
.ref-hero-kpi-danger span,
.ref-hero-kpi-danger small { color: #ff2f63; }

.ref-kpi-row {
  gap: 12px;
}

.ref-kpi {
  min-height: 78px;
  grid-template-columns: 50px minmax(0, 1fr);
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 20px rgba(24, 62, 100, .06);
}

.ref-kpi i {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 22px;
}

.ref-kpi:nth-child(3) i { color: #51bd22; background: rgba(81, 189, 34, .13); }
.ref-kpi:nth-child(4) i { color: #e73370; background: rgba(231, 51, 112, .12); }
.ref-kpi:nth-child(5) i { color: #ff941b; background: rgba(255, 148, 27, .14); }

.ref-kpi span {
  font-size: 11px;
  line-height: 1.12;
}

.ref-kpi strong {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.04;
}

.ref-kpi small {
  font-size: 11px;
  line-height: 1.1;
}

@media (max-width: 1180px) {
  .dashboard-assembly-reminders { padding-right: 24px; }
  .dashboard-assembly-reminders::before,
  .dashboard-assembly-reminders::after { display: none; }
}

/* sidebar-help-repeat-local-20260708 */
.sidebar-user {
  display: none !important;
}

.sidebar-help {
  cursor: help;
}

.sidebar-help::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 12px);
  bottom: 8px;
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #061b2b;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 22, 36, .24);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  transform: translateX(-4px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 50;
}

.sidebar-help:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* dashboard-card-icons-ref-local-20260708 */
.ref-hero-icon svg,
.ref-action-icon svg,
.ref-hero-kpi i svg,
.ref-kpi i svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ref-hero-icon {
  border: 0;
  background: rgba(0, 184, 151, .1);
}

.ref-hero-icon svg {
  width: 21px;
  height: 21px;
}

.ref-action-icon {
  border: 0;
}

.ref-action-icon svg {
  width: 22px;
  height: 22px;
}

.ref-hero-kpi i,
.ref-kpi i {
  border: 0;
  font-size: 0;
}

.ref-hero-kpi-blue i svg path:first-child,
.ref-hero-kpi-teal i svg path:first-child {
  stroke-width: 2.2;
}

.ref-kpi:nth-child(5) i svg {
  width: 25px;
  height: 25px;
}

/* help-manual-popup-local-20260708 */
.sidebar-help {
  cursor: pointer;
}

.sidebar-help::after {
  content: none !important;
}

.help-manual-panel {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(900px, calc(100vh - 48px));
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
}

.help-manual-head {
  padding: 24px 28px 18px;
  border-bottom: 1px solid #dcebf5;
  background: linear-gradient(90deg, #ffffff, #f2fbfb);
}

.help-manual-head h2 {
  margin-top: 4px;
  color: #102f58;
  font-size: 26px;
  font-weight: 950;
}

.help-manual-body {
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 22px 28px 28px;
  background: #f7fbff;
}

.help-manual-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #dcebf5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(24, 62, 100, .06);
}

.help-manual-intro h3,
.help-manual-card h3 {
  margin: 0 0 8px;
  color: #102f58;
  font-weight: 950;
}

.help-manual-intro p,
.help-manual-card p {
  margin: 0;
  color: #60789c;
  font-weight: 750;
  line-height: 1.45;
}

.help-manual-intro img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
}

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

.help-manual-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid #dcebf5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 62, 100, .055);
}

.help-manual-card img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e1eef7;
  background: #f8fcff;
}

.help-manual-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #17345b;
  font-weight: 760;
  line-height: 1.5;
}

.help-manual-card li + li {
  margin-top: 5px;
}

@media (max-width: 980px) {
  .help-manual-grid,
  .help-manual-intro,
  .help-manual-card {
    grid-template-columns: 1fr;
  }

  .help-manual-card img {
    max-height: 180px;
    object-fit: cover;
  }
}

/* dashboard-articles-local-20260708 */
.ref-list-row span small + small {
  margin-top: 2px;
}

.ref-list-row span small:first-of-type {
  color: #45658f;
  font-weight: 850;
}

/* duplicates-multi-local-20260708 */
.duplicate-group-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.duplicate-mini-cell { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; }
.duplicate-mini-cell strong, .duplicate-picker-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duplicate-mini-cell span, .duplicate-picker-item span { display: block; color: #5e7392; font-size: 12px; font-weight: 800; line-height: 1.35; }
.duplicate-picker-option { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; }
.duplicate-picker-option[data-duplicate-boss] { grid-template-columns: minmax(0, 1fr); }
.duplicate-check { width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #cfe0eb; border-radius: 7px; color: #ffffff; background: #ffffff; font-size: 15px; font-weight: 950; }
.duplicate-picker-option.active .duplicate-check { border-color: #00bdb6; background: #00bdb6; }
.duplicate-child-row { grid-template-columns: minmax(0, 1fr) 42px; }
.duplicate-modal-panel { width: min(1180px, calc(100vw - 56px)); }

/* duplicates-layout-local-20260708 */
.duplicate-modal-panel {
  width: min(1160px, calc(100vw - 72px));
  max-height: min(860px, calc(100vh - 72px));
  overflow: hidden;
}

.duplicate-modal-body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 28px 22px;
  overflow: hidden;
}

.duplicate-picker {
  min-width: 0;
  grid-template-rows: auto 44px minmax(0, 1fr);
  gap: 10px;
}

.duplicate-picker > div:first-child {
  min-height: 52px;
}

.duplicate-picker input {
  min-width: 0;
}

.duplicate-picker-list {
  min-width: 0;
  min-height: 430px;
  max-height: min(520px, calc(100vh - 325px));
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  gap: 8px;
  padding: 8px;
}

.duplicate-picker-option,
.duplicate-picker-option[data-duplicate-boss] {
  width: 100%;
  min-width: 0;
  min-height: 70px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  overflow: hidden;
}

.duplicate-picker-option[data-duplicate-boss] {
  grid-template-columns: minmax(0, 1fr);
}

.duplicate-picker-option[data-duplicate-boss] .duplicate-picker-item {
  grid-column: 1;
}

.duplicate-check {
  align-self: center;
  justify-self: center;
  flex: 0 0 auto;
}

.duplicate-picker-item,
.duplicate-mini-cell {
  min-width: 0;
}

.duplicate-picker-item.item-cell,
.item-cell.duplicate-picker-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.duplicate-picker-item .item-photo,
.duplicate-picker-item img,
.duplicate-mini-cell .item-photo,
.duplicate-mini-cell img {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.duplicate-picker-item > div,
.duplicate-mini-cell > div {
  min-width: 0;
  overflow: hidden;
}

.duplicate-picker-item strong,
.duplicate-mini-cell strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.25;
}

.duplicate-picker-item span,
.duplicate-mini-cell span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.duplicate-picker-item .muted,
.duplicate-mini-cell .muted {
  display: inline-flex;
  max-width: 100%;
  margin-top: 2px;
}

.duplicate-modal-actions {
  padding-top: 4px;
  align-self: end;
}

@media (max-width: 920px) {
  .duplicate-modal-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .duplicate-picker-list {
    min-height: 280px;
  }
}

/* catalog-boss-badge-local-20260708 */
.duplicate-role-badge {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.duplicate-role-boss {
  color: #00786f;
  background: rgba(0, 189, 174, .13);
  border: 1px solid rgba(0, 189, 174, .32);
}

.duplicate-role-child {
  color: #49658a;
  background: rgba(46, 128, 255, .1);
  border: 1px solid rgba(46, 128, 255, .22);
}

.item-cell > div {
  min-width: 0;
}

/* sidebar-docs-toggle-local-20260708 */
.settings-nav-group.collapsed .nav-submenu {
  display: none;
}

.settings-nav-group > .nav-btn::after {
  content: "⌄";
  justify-self: end;
  color: rgba(255,255,255,.65);
  font-size: 16px;
  transition: transform .16s ease;
}

.settings-nav-group:not(.collapsed) > .nav-btn::after {
  transform: rotate(180deg);
}

.nav-btn[data-doc-type] {
  grid-template-columns: 34px minmax(0, 1fr);
}

/* consumables-feature-local-20260708 */
.consumable-extra-fields.hidden, .consumable-box-fields.hidden { display: none !important; }
.product-consumables-panel { width: min(1060px, calc(100vw - 56px)); }
.product-consumables-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; padding: 20px 28px; overflow: auto; }
.product-consumables-current, .product-consumables-picker { min-width: 0; display: grid; align-content: start; gap: 12px; }
.product-consumables-rules, .product-consumables-list { display: grid; gap: 10px; }
.product-consumable-rule { display: grid; grid-template-columns: minmax(160px, 1fr) 130px 100px 120px 34px; gap: 8px; align-items: end; padding: 10px; border: 1px solid #dcebf5; border-radius: 12px; background: #fff; }
.product-consumable-rule label { display: grid; gap: 4px; color: #6680a5; font-size: 12px; font-weight: 800; }
.product-consumable-rule input, .product-consumable-rule select, .product-consumables-picker input { min-height: 38px; border: 1px solid #cfe0eb; border-radius: 8px; padding: 0 10px; }
.product-consumable-option { display: grid; gap: 4px; padding: 10px; border: 1px solid #dcebf5; border-radius: 12px; background: #fff; text-align: left; }
.product-consumable-option:hover { border-color: #00bdb6; }
@media (max-width: 980px) { .product-consumables-body { grid-template-columns: 1fr; } .product-consumable-rule { grid-template-columns: 1fr; } }

.assembly-consumables-summary { display: grid; gap: 4px; margin: 12px 0; padding: 10px 12px; border: 1px solid #d7e8ee; border-radius: 8px; background: #f7fcfd; color: #17385a; font-size: 13px; line-height: 1.45; }
.assembly-consumables-summary small { color: #617b99; }


.product-consumable-rule strong small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}


.receipt-purchase-fields {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.consumable-supplier-fields {
  padding: 12px 0;
}

.consumable-supplier-history {
  display: grid;
  gap: 8px;
}

.supplier-history-row,
.supplier-history-total {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px 110px 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.supplier-history-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.supplier-history-total {
  grid-template-columns: 1fr auto;
  background: var(--soft);
}


.seller-photo-tools {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.seller-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.seller-image-option {
  position: relative;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.seller-image-option.selected {
  border-color: var(--primary);
}

.seller-image-option > button:first-child {
  width: 100%;
  height: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.seller-image-option img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.seller-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
}


.consumable-product-links-fields {
  padding: 12px 0;
}

.consumable-product-add {
  align-items: end;
}

.consumable-product-links {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.consumable-product-link {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 100px 110px 36px;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.consumable-product-link-name {
  align-self: center;
  min-width: 0;
}

@media (max-width: 900px) {
  .consumable-product-link {
    grid-template-columns: 1fr 1fr;
  }
}


/* final-ui-polish-20260709 */
.settings-nav-group > .nav-btn::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 2px solid rgba(255,255,255,.82);
  border-bottom: 2px solid rgba(255,255,255,.82);
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform .18s ease;
}

.settings-nav-group:not(.collapsed) > .nav-btn::after {
  transform: rotate(225deg);
}

.consumable-extra-fields > label:first-child {
  color: #102d50;
  font-weight: 900;
}

.consumable-extra-fields > label:first-child input {
  font-weight: 500;
}

.product-consumables-panel {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 40px));
  overflow: hidden;
}

.product-consumables-body {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  align-items: start;
  padding: 24px 28px;
}

.product-consumables-current,
.product-consumables-picker {
  align-content: start;
}

.product-consumable-rule {
  grid-template-columns: minmax(190px, 1fr) 150px 100px 120px 36px;
  align-items: end;
  border-radius: 8px;
  padding: 12px;
}

.product-consumable-rule select,
.product-consumable-rule input {
  width: 100%;
  min-width: 0;
}

.product-consumable-option {
  border-radius: 8px;
  overflow: hidden;
}

.product-consumables-list {
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.product-consumables-actions {
  padding: 16px 28px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.wb-store-fbs {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fcfd;
}

.wb-store-fbs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

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

.error-text {
  color: #d9364f;
  font-weight: 700;
}

@media (max-width: 640px) {
  .wb-store-fbs-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
.wb-store-seller-info {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.wb-store-seller-info label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wb-store-seller-info input[readonly] {
  color: var(--text);
  background: #f7fbfd;
}

@media (max-width: 980px) {
  .product-consumables-body {
    grid-template-columns: 1fr;
  }
  .product-consumable-rule {
    grid-template-columns: 1fr 1fr;
  }
}


/* consumable-photo-editor-layout-20260709 */
#itemForm > .photo-editor {
  grid-column: 1 / -1;
  min-width: 0;
}

#itemForm .photo-editor-grid {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
}

#itemForm .photo-editor-preview {
  width: 112px;
}

#itemForm .photo-editor-controls > label {
  width: 100%;
}

#itemForm .photo-editor-controls .button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#itemForm .photo-editor-controls .button-row > * {
  width: auto;
  min-width: 0;
}

#itemForm .seller-photo-tools {
  grid-template-columns: max-content minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

#itemForm .seller-image-gallery {
  grid-template-columns: repeat(auto-fill, minmax(108px, 128px));
  align-items: start;
}

#itemForm .seller-image-option > button:first-child {
  height: 108px;
}

@media (max-width: 760px) {
  #itemForm .photo-editor-grid {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  #itemForm .photo-editor-preview {
    width: 88px;
  }

  #itemForm .seller-photo-tools {
    grid-template-columns: 1fr;
  }
}


/* consumable-purchase-link-20260709 */
#consumablesTable a {
  color: #007f79;
  font-weight: 800;
  text-decoration-color: rgba(0, 127, 121, 0.35);
  text-underline-offset: 3px;
}

#consumablesTable a:hover {
  color: #005f5b;
  text-decoration-color: currentColor;
}


/* assembly-line-collected-status-20260709 */
.assembly-store-head,
.assembly-store-row {
  grid-template-columns: minmax(170px, 1fr) 96px 100px 88px 92px 120px 42px;
}

.assembly-store-row {
  transition: background-color .16s ease, box-shadow .16s ease;
}

.assembly-store-row.is-collected {
  background: #e8f7df;
  box-shadow: inset 4px 0 0 #57b33e;
}

.assembly-store-row.is-collected:nth-child(2n) {
  background: #e1f3d6;
}

.assembly-store-row.is-collected .assembly-line-product > div > strong {
  color: #237333;
}

.assembly-collected-toggle {
  display: inline-flex;
  width: max-content;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid #cfe2d0;
  border-radius: 7px;
  background: #fff;
  color: #526b5a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.assembly-collected-toggle input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #45a633;
}

.assembly-collected-toggle:has(input:checked) {
  border-color: #83c977;
  background: #f4fff0;
  color: #237333;
}

.assembly-collected-toggle span {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

@media (max-width: 980px) {
  .assembly-store-head,
  .assembly-store-row {
    grid-template-columns: minmax(220px, 1fr) 82px 88px 78px 84px 110px 36px;
  }
}


/* assembly-task-progress-20260709 */
.assembly-task-progress {
  width: 150px;
  margin-top: 9px;
}

.assembly-task-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: #667b97;
  font-size: 11px;
  font-weight: 800;
}

.assembly-task-progress-meta strong {
  color: #087f71;
  font-size: 11px;
}

.assembly-task-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8f0f4;
  box-shadow: inset 0 1px 2px rgba(18, 49, 72, .08);
}

.assembly-task-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16b8a7;
  transition: width .2s ease;
}

.assembly-task-progress:has(.assembly-task-progress-track span[style*="100%"]) .assembly-task-progress-track span {
  background: #58b83f;
}


/* mobile-main-20260710 */
:root {
  --mobile-nav-height: 82px;
}

.app-shell {
  overflow-x: clip;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.mini-btn,
.logout-btn,
.nav-btn,
.nav-sub-btn,
button,
select,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: #f3f8fb;
  }

  .app-shell {
    display: block;
    min-height: 100svh;
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  .sidebar {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    border: 1px solid rgba(153, 219, 224, .35);
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(7, 55, 84, .98), rgba(3, 25, 42, .99));
    box-shadow: 0 -18px 48px rgba(3, 25, 42, .24);
    display: block;
  }

  .sidebar::before,
  .sidebar::after,
  .brand,
  .sidebar-footer {
    display: none !important;
  }

  .nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    gap: 6px;
    overflow-x: auto;
    padding: 0 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: contents;
  }

  .nav-btn,
  .logout-btn {
    min-height: 60px;
    grid-template-columns: 1fr;
    grid-template-rows: 25px auto;
    justify-items: center;
    align-items: center;
    gap: 3px;
    padding: 7px 6px;
    border-radius: 16px;
    text-align: center;
    color: rgba(255, 255, 255, .78);
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
  }

  .nav-btn span:last-child,
  .logout-btn span:last-child {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-btn:hover,
  .nav-btn.active,
  .logout-btn:hover {
    background: linear-gradient(180deg, #14c8bc, #07958d);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 10px 24px rgba(0, 180, 170, .25);
  }

  .nav-icon {
    width: 25px;
    height: 25px;
    color: currentColor;
  }

  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .settings-nav-group > .nav-btn::after {
    display: none !important;
  }

  .nav-submenu {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 82;
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(180, 220, 230, .75);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 48px rgba(10, 36, 56, .24);
  }

  .settings-nav-group:not(.collapsed) .nav-submenu,
  .settings-nav-group .nav-btn.active + .nav-submenu {
    display: grid;
  }

  .analytics-nav-group.mobile-submenu-open .nav-submenu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-nav-group.mobile-submenu-open ~ .settings-nav-group .nav-submenu {
    display: none;
  }

  .nav-sub-btn {
    min-height: 42px;
    padding: 0 10px;
    border-radius: 13px;
    background: #f2f8fb;
    color: #0e2d4d;
    text-align: center;
    font-size: 11px;
    font-weight: 900;
  }

  .nav-sub-btn.active,
  .nav-sub-btn:hover {
    background: #ddfffb;
    color: #007a73;
  }

  .workspace {
    padding: max(14px, env(safe-area-inset-top, 0px)) 12px 18px;
    min-height: 100svh;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: -14px -12px 14px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
    background: rgba(243, 248, 251, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(197, 220, 231, .85);
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.15;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .search {
    width: 100%;
    height: 44px;
    border-radius: 14px;
  }

  .search input {
    min-width: 0;
    font-size: 15px;
  }

  .user-chip {
    min-height: 44px;
    max-width: 132px;
    border-radius: 14px;
    padding: 6px 10px;
    justify-content: center;
  }

  .user-chip strong {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .content-grid,
  .content-grid.single,
  .settings-layout,
  .dashboard-overview,
  .dashboard-grid,
  .dashboard-row,
  .dashboard-main-grid,
  .ref-dashboard-grid,
  .ref-kpi-row,
  .ref-hero-kpis,
  .ref-supply-metrics {
    grid-template-columns: 1fr !important;
  }

  .panel,
  .dashboard-card,
  .metric-card,
  .dashboard-assembly-reminders,
  .settings-card,
  .ref-panel {
    border-radius: 18px !important;
    box-shadow: 0 12px 30px rgba(18, 49, 72, .08);
  }

  .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .button-row,
  .toolbar,
  .filters-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .button-row > *,
  .toolbar > *,
  .filters-row > *,
  .toolbar-select,
  .primary-btn,
  .ghost-btn,
  .danger-btn {
    width: 100%;
    min-height: 44px;
  }

  .category-filters {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 10px;
    scrollbar-width: none;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .category-filters button,
  .category-card {
    flex: 0 0 auto;
    min-width: 140px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .table-wrap tr {
    border: 1px solid #d7e9f1;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(18, 49, 72, .06);
  }

  .table-wrap td {
    min-height: 0;
    padding: 11px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf4f7 !important;
  }

  .table-wrap td:last-child {
    border-bottom: 0 !important;
  }

  .table-wrap td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #66809d;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .table-wrap td:empty {
    display: none;
  }

  .row-actions,
  td .button-row {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mini-btn,
  .icon-btn {
    min-width: 42px;
    min-height: 42px;
    border-radius: 14px;
  }

  .modal {
    padding: 0 !important;
    align-items: stretch !important;
  }

  .modal-card,
  .modal-card.large,
  .modal-card.product-consumables-modal,
  .modal-card.duplicate-modal {
    width: 100vw !important;
    height: 100svh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: auto !important;
  }

  .modal-head,
  .modal-actions,
  .product-consumables-actions {
    position: sticky;
    z-index: 5;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
  }

  .modal-head {
    top: 0;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 14px;
  }

  .modal-actions,
  .product-consumables-actions {
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
  }

  .form-grid,
  .field-row,
  .document-form-grid,
  .assembly-form-grid,
  .duplicate-picker-grid,
  .product-consumables-body,
  .product-consumable-rule {
    grid-template-columns: 1fr !important;
  }

  label,
  .field {
    min-width: 0;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  textarea {
    min-height: 96px;
  }

  .photo-editor,
  #itemForm .photo-editor-grid,
  .seller-photo-tools {
    grid-template-columns: 1fr !important;
  }

  #itemForm .photo-editor-preview {
    width: 100% !important;
    max-width: 180px;
  }

  .seller-image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .duplicate-picker-list,
  .product-consumables-list,
  .catalog-picker-list {
    max-height: 52svh;
  }

  .assembly-store-head {
    display: none !important;
  }

  .assembly-store-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
  }

  .assembly-collected-toggle {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .assembly-task-progress {
    width: 100%;
    max-width: 260px;
  }

  .sync-progress {
    border-radius: 16px;
  }
}

@media (display-mode: standalone) and (max-width: 760px) {
  .topbar {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }
}


/* mobile-nav-fixed-20260710 */
@media (max-width: 760px) {
  .app-shell > .sidebar {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    transform: none !important;
    overflow: visible !important;
  }

  .app-shell > .sidebar > .nav {
    display: flex !important;
    grid-template-columns: none !important;
    grid-auto-flow: initial !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
  }

  .app-shell > .sidebar .nav-group {
    display: contents !important;
  }

  .app-shell > .sidebar .nav-btn {
    flex: 1 0 74px !important;
    width: auto !important;
    max-width: 96px !important;
    min-width: 74px !important;
    margin: 0 !important;
  }
}


/* mobile-overflow-fixed-20260711 */
@media (max-width: 760px) {
  .workspace,
  .view,
  .panel,
  .panel-body,
  .assembly-sheet,
  .assembly-store-grid,
  .assembly-store-form,
  .assembly-store-lines,
  .assembly-store-row,
  .assembly-line-product,
  .assembly-product-picker {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .workspace,
  .view,
  .assembly-sheet,
  .assembly-store-grid,
  .assembly-store-form {
    width: 100% !important;
  }

  .assembly-store-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 10px !important;
    gap: 12px !important;
  }

  .assembly-store-form {
    overflow: hidden !important;
  }

  .assembly-store-form header {
    padding: 12px !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .assembly-store-add {
    grid-template-columns: minmax(0, 1fr) 78px !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .assembly-store-add .assembly-product-picker {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .assembly-store-add > .ghost-btn {
    grid-column: 1 / -1 !important;
  }

  .assembly-store-add input,
  .assembly-product-picker input,
  .assembly-store-row input {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .assembly-store-row {
    overflow: hidden !important;
  }

  .assembly-line-product strong,
  .assembly-line-product span,
  .assembly-line-product small {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .app-shell > .sidebar {
    overflow: hidden !important;
  }

  .app-shell > .sidebar > .nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(45, 230, 217, .85) rgba(255, 255, 255, .12) !important;
    padding-bottom: 5px !important;
  }

  .app-shell > .sidebar > .nav::-webkit-scrollbar {
    display: block !important;
    height: 4px !important;
  }

  .app-shell > .sidebar > .nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
  }

  .app-shell > .sidebar > .nav::-webkit-scrollbar-thumb {
    background: rgba(45, 230, 217, .85);
    border-radius: 999px;
  }

  .app-shell > .sidebar .nav-btn {
    flex: 0 0 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    scroll-snap-align: start;
  }
}


/* mobile-actions-fixed-20260711 */
@media (max-width: 760px) {
  .table-wrap td:has(> .row-actions) {
    display: block !important;
    padding: 10px 12px 12px !important;
    background: #f5fafc !important;
  }

  .table-wrap td:has(> .row-actions)::before {
    content: "Действия" !important;
    display: block !important;
    margin-bottom: 8px !important;
    color: #66809d !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  .table-wrap td > .row-actions {
    display: flex !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 44px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    opacity: 1 !important;
  }

  .table-wrap .row-actions .mini-btn {
    display: inline-flex !important;
    visibility: visible !important;
    width: auto !important;
    min-width: 46px !important;
    min-height: 44px !important;
    padding: 0 13px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 1px solid #cfe5ee !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0e2d4d !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    opacity: 1 !important;
  }

  .table-wrap .row-actions .mini-btn::after {
    font-size: 12px;
    font-weight: 900;
  }

  .table-wrap .row-actions .mini-btn[title="Править"]::after { content: "Править"; }
  .table-wrap .row-actions .mini-btn[title="Расходники"]::after { content: "Расходники"; }
  .table-wrap .row-actions .mini-btn[title="Этикетка"]::after { content: "Этикетка"; }
  .table-wrap .row-actions .mini-btn[title="Собран"]::after { content: "Собран"; }
  .table-wrap .row-actions .mini-btn[title="Отправлен"]::after { content: "Отправлен"; }
  .table-wrap .row-actions .mini-btn[title="Отправить в WB"]::after { content: "В WB"; }
  .table-wrap .row-actions .mini-btn[title="Провести"]::after { content: "Провести"; }
  .table-wrap .row-actions .mini-btn[title="Отменить проведение"]::after { content: "Отменить"; }
  .table-wrap .row-actions .mini-btn[title="Удалить"]::after,
  .table-wrap .row-actions .mini-btn[title="Удалить расходник"]::after { content: "Удалить"; }

  .app-shell > .sidebar .nav-btn {
    color: #fff !important;
    opacity: 1 !important;
  }

  .app-shell > .sidebar .nav-icon {
    width: 28px !important;
    height: 28px !important;
    color: #fff !important;
    opacity: 1 !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
  }

  .app-shell > .sidebar .nav-icon svg {
    width: 26px !important;
    height: 26px !important;
    stroke: #fff !important;
    stroke-width: 2.3 !important;
    opacity: 1 !important;
  }

  .app-shell > .sidebar .nav-btn span:last-child {
    color: #fff !important;
    opacity: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .32);
  }
}


/* mobile-nav-controls-styles-20260711 */
.mobile-nav-scroll-btn { display: none; }

.document-list-filters,
.journal-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(130px, .8fr)) repeat(2, minmax(145px, .7fr));
  gap: 8px;
  align-items: end;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(245, 251, 253, .78);
}

.journal-filters {
  grid-template-columns: minmax(260px, 1.5fr) minmax(170px, .8fr) repeat(2, minmax(145px, .7fr));
}

.document-list-filters label,
.journal-filters label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.document-list-more-btn,
.journal-more-btn {
  justify-self: center;
  margin: 12px auto 16px;
}

@media (max-width: 1280px) and (min-width: 761px) {
  .document-list-filters,
  .journal-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .document-list-filters,
  .journal-filters {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }
}

/* compact-desktop-sidebar-20260910 */
@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .app-shell .sidebar {
    width: 224px;
    padding: 16px 12px 14px;
    gap: 14px;
    overflow: hidden;
  }

  .workspace {
    margin-left: 224px;
  }

  .brand {
    min-height: 46px;
    gap: 10px;
    padding: 0 5px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .brand strong {
    font-size: 20px;
    line-height: 1.05;
  }

  .brand span {
    font-size: 15px;
  }

  /* desktop-sidebar-scroll-safety-20260910 */
  .nav {
    min-height: 0;
    flex: 1 1 auto;
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    padding-right: 3px;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
  }

  .nav::-webkit-scrollbar {
    width: 5px;
  }

  .nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
  }

  .nav-group {
    gap: 2px;
  }

  .nav-btn,
  .logout-btn {
    min-height: 42px;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 8px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 13px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .nav-submenu {
    gap: 2px;
    margin: -2px 0 1px;
    padding-left: 35px;
  }

  .nav-sub-btn {
    min-height: 25px;
    padding: 0 8px;
    font-size: 11px;
  }

  .sidebar-footer {
    flex: 0 0 auto;
    gap: 6px;
  }

  .sidebar-help,
  .sidebar-user {
    min-height: 50px;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 8px;
    padding: 8px 9px;
    border-radius: 11px;
  }

  .sidebar-help .nav-icon,
  .sidebar-user > span {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .sidebar-help strong,
  .sidebar-user strong {
    font-size: 12px;
  }

  .sidebar-help small,
  .sidebar-user small {
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .app-shell > .sidebar > .nav {
    padding-left: 38px !important;
    padding-right: 38px !important;
    scroll-behavior: smooth;
  }

  .mobile-nav-scroll-btn {
    position: absolute;
    z-index: 4;
    top: 12px;
    bottom: calc(13px + env(safe-area-inset-bottom, 0px));
    display: grid;
    width: 32px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 12px;
    background: rgba(1, 25, 42, .94);
    color: #fff;
    box-shadow: 0 5px 16px rgba(0,0,0,.24);
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-nav-scroll-left { left: 7px; }
  .mobile-nav-scroll-right { right: 7px; }
  .mobile-nav-scroll-btn:disabled { opacity: .28; box-shadow: none; }
  .sidebar:not(.mobile-nav-can-scroll) .mobile-nav-scroll-btn { display: none; }
}


/* password-email-ui-styles-20260712 */
.auth-link-btn {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #087d78;
  font-weight: 850;
  cursor: pointer;
}
.auth-link-btn:hover { text-decoration: underline; }
.user-chip { border: 1px solid #dcebf3; cursor: pointer; }
.password-modal-panel { width: min(520px, calc(100vw - 32px)); }
.password-modal-form { padding: 8px 30px 30px; }
.password-modal-form .button-row { margin-top: 6px; }
.settings-email-panel { align-self: start; }
.settings-email-form { padding: 18px; }
.email-settings-status { padding: 10px 12px; border-radius: 10px; font-weight: 800; }
.email-settings-status.configured { background: #e9fbf4; color: #08785e; }
.email-settings-status.not-configured { background: #fff8e7; color: #9a6500; }
@media (max-width: 760px) {
  .password-modal-panel { width: 100vw !important; height: 100svh !important; max-width: none !important; border-radius: 0 !important; }
  .password-modal-form { padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
}


/* reference-add-forms-ui-20260712 */
.reference-add-modal {
  padding: 28px !important;
  background: rgba(5, 31, 48, .5) !important;
  backdrop-filter: blur(12px);
}
.reference-add-modal .modal-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(220, 233, 239, .95);
  border-radius: 26px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 34px 90px rgba(1,22,38,.34);
}
.reference-add-modal .modal-panel > * { position: relative; z-index: 1; }
.reference-add-modal .modal-head {
  min-height: 110px;
  padding: 28px 30px 20px 116px;
  border-bottom: 0;
  background: transparent;
}
.reference-add-modal .modal-head::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 22px;
  width: 66px;
  height: 66px;
  border-radius: 16px;
  background: #fff center / contain no-repeat url("favicon.png");
  filter: drop-shadow(0 8px 12px rgba(7,50,74,.16));
}
.reference-add-modal .modal-head h2 {
  margin: 0;
  color: #06324a;
  font-size: clamp(27px,3vw,40px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}
.reference-add-modal .modal-title-accent { color: #f51b69; }
.reference-add-modal .modal-head .icon-btn {
  width: 52px;
  height: 52px;
  border: 1px solid #cfe2ec;
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  color: #0c3151;
  font-size: 30px;
  box-shadow: 0 8px 20px rgba(10,45,68,.07);
}
.reference-add-modal input,
.reference-add-modal select,
.reference-add-modal textarea {
  border: 1px solid #cfe0e9;
  border-radius: 14px;
  background-color: rgba(255,255,255,.97);
}
.reference-add-modal input:focus,
.reference-add-modal select:focus,
.reference-add-modal textarea:focus {
  border-color: #08cabc;
  box-shadow: 0 0 0 4px rgba(8,202,188,.13), 0 10px 24px rgba(0,153,145,.08);
}
#duplicateModal .duplicate-modal-panel {
  width: min(1180px,calc(100vw - 56px));
  max-height: min(900px,calc(100svh - 56px));
}
#duplicateModal .duplicate-modal-panel::after,
#productConsumablesModal .product-consumables-panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: auto 0 0;
  height: 165px;
  pointer-events: none;
  background-image: url("assets/marmelad-sidebar.svg"),url("assets/marmelad-decor.svg");
  background-repeat: no-repeat;
  background-position: left -38px bottom -96px,right -58px bottom -118px;
  background-size: 190px auto,245px auto;
}
#duplicateModal .duplicate-modal-body {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 0;
  padding: 2px 30px 26px;
  overflow: hidden;
}
#duplicateModal .duplicate-picker { grid-template-rows: auto 54px minmax(0,1fr); gap: 12px; }
#duplicateModal .duplicate-picker:first-child { padding-right: 28px; border-right: 1px solid #eadfd8; }
#duplicateModal .duplicate-picker:nth-child(2) { padding-left: 28px; }
#duplicateModal .duplicate-picker > div:first-child { min-height: 62px; }
#duplicateModal .kpi-label { color: #6680a3; font-size: 12px; font-weight: 950; text-transform: uppercase; }
#duplicateModal .duplicate-picker > div:first-child strong { margin-top: 7px; color: #102c4c; font-size: 16px; font-weight: 950; }
#duplicateModal .duplicate-picker > input {
  height: 54px;
  padding-left: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23738aa4' stroke-width='2.3' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  font-size: 15px;
}
#duplicateModal .duplicate-picker-list {
  min-height: 430px;
  max-height: min(540px,calc(100svh - 330px));
  padding: 8px 4px 105px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#duplicateModal .duplicate-picker-option,
#duplicateModal .duplicate-picker-option[data-duplicate-boss] {
  min-height: 74px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 7px 22px rgba(7,40,61,.07);
}
#duplicateModal .duplicate-picker-option:hover { border-color: rgba(8,202,188,.55); transform: translateY(-1px); }
#duplicateModal .duplicate-picker-option.active {
  border-color: #08cabc;
  background: linear-gradient(90deg,#fff,#f0fffc);
  box-shadow: 0 0 0 3px rgba(8,202,188,.1),0 9px 24px rgba(0,150,140,.1);
}
#duplicateModal .duplicate-picker-item strong { color: #102c4c; font-size: 15px; }
#duplicateModal .duplicate-picker-item span { margin-top: 4px; color: #6880a0; font-size: 13px; }
#duplicateModal .duplicate-modal-actions,
#productConsumablesModal .product-consumables-actions {
  z-index: 3;
  justify-content: center;
  gap: 20px;
  padding: 14px 0;
  background: transparent;
}
#duplicateModal .duplicate-modal-actions > button,
#productConsumablesModal .product-consumables-actions > button {
  width: 210px;
  min-height: 58px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 950;
}
#duplicateModal .duplicate-modal-actions .ghost-btn,
#productConsumablesModal .product-consumables-actions .ghost-btn {
  border-color: #f2dccb;
  background: #fffaf4;
}
#itemModal .modal-form,
#catalogModal .modal-tools,
#assemblyProductModal .assembly-product-modal-tools,
#productConsumablesModal .product-consumables-body { padding-left: 30px; padding-right: 30px; }
@media (max-width:760px) {
  .reference-add-modal { padding: 0 !important; }
  .reference-add-modal .modal-panel { width:100vw !important; height:100svh !important; max-width:none !important; max-height:none !important; border-radius:0 !important; }
  .reference-add-modal .modal-head { min-height:82px; padding:calc(16px + env(safe-area-inset-top,0px)) 58px 14px 72px; }
  .reference-add-modal .modal-head::before { left:14px; top:calc(12px + env(safe-area-inset-top,0px)); width:46px; height:46px; border-radius:11px; }
  .reference-add-modal .modal-head h2 { font-size:25px; }
  .reference-add-modal .modal-head .icon-btn { width:44px; height:44px; }
  #duplicateModal .duplicate-modal-body { grid-template-columns:1fr; padding:8px 14px calc(16px + env(safe-area-inset-bottom,0px)); overflow-y:auto; }
  #duplicateModal .duplicate-picker:first-child,#duplicateModal .duplicate-picker:nth-child(2) { padding:0; border-right:0; }
  #duplicateModal .duplicate-picker:nth-child(2) { margin-top:18px; }
  #duplicateModal .duplicate-picker-list { min-height:260px; max-height:42svh; padding-bottom:18px; }
  #duplicateModal .duplicate-modal-actions,#productConsumablesModal .product-consumables-actions { position:sticky; bottom:0; display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:10px 0 calc(10px + env(safe-area-inset-bottom,0px)); background:rgba(255,255,255,.96); }
  #duplicateModal .duplicate-modal-actions > button,#productConsumablesModal .product-consumables-actions > button { width:100%; min-height:50px; font-size:14px; }
  #duplicateModal .duplicate-modal-panel::after,#productConsumablesModal .product-consumables-panel::after { display:none; }
}


/* modal-toast-layer-fix-20260712 */
.toast {
  z-index: 100;
}

/* component-picker-20260715 */
.component-picker-field { min-width: 0; }
.component-picker-trigger {
  width: 100%; min-height: 46px; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 0 14px; border: 1px solid #cfe0e9; border-radius: 12px;
  background: #fff; color: #173553; text-align: left; cursor: pointer;
}
.component-picker-trigger:hover,
.component-picker-trigger:focus-visible { border-color: #08cabc; box-shadow: 0 0 0 4px rgba(8, 202, 188, .12); }
.component-picker-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.component-picker-trigger.has-value { font-weight: 800; }
.component-picker-chevron { color: #597492; font-size: 20px; line-height: 1; }
.component-picker-modal-panel { width: min(920px, calc(100vw - 56px)); max-height: min(820px, calc(100svh - 56px)); }
.component-picker-tools { padding: 4px 28px 16px; }
.component-picker-tools input {
  width: 100%; min-height: 52px; padding-left: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 24 24' fill='none' stroke='%23738aa4' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px center;
}
.component-picker-list { display: grid; gap: 9px; padding: 0 28px 28px; overflow: auto; }
.component-picker-option {
  width: 100%; min-height: 74px; display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 13px;
  padding: 10px 14px; border: 1px solid #dbe9f1; border-radius: 12px;
  background: #fff; color: #102c4c; text-align: left; cursor: pointer;
}
.component-picker-option:hover,
.component-picker-option.active { border-color: #08cabc; background: linear-gradient(90deg, #fff, #effffc); box-shadow: 0 0 0 3px rgba(8, 202, 188, .1); }
.component-picker-photo { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: #edf6f9; }
.component-picker-copy,
.component-picker-copy strong,
.component-picker-copy span,
.component-picker-stock,
.component-picker-stock small,
.component-picker-stock strong { display: block; min-width: 0; }
.component-picker-copy strong { overflow: hidden; color: #102c4c; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.component-picker-copy span,
.component-picker-stock small { margin-top: 5px; color: #6680a0; font-size: 12px; }
.component-picker-stock { min-width: 105px; text-align: right; }
.component-picker-stock strong { margin-top: 4px; color: #009f83; font-size: 14px; }
.component-picker-empty { padding: 52px 20px; color: #6680a0; text-align: center; }
@media (max-width: 760px) {
  .component-picker-modal-panel { width: 100vw; height: 100svh; max-height: none; border-radius: 0; }
  .component-picker-tools { padding: 8px 14px 12px; }
  .component-picker-list { padding: 0 14px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .component-picker-option { grid-template-columns: 46px minmax(0, 1fr); }
  .component-picker-photo { width: 46px; height: 46px; }
  .component-picker-stock { grid-column: 2; min-width: 0; text-align: left; }
  .component-picker-stock small,
  .component-picker-stock strong { display: inline; margin: 0 6px 0 0; }
}
/* kit-self-component-20260715 */
.component-picker-self {
  border-color: rgba(8, 202, 188, .42);
  background: linear-gradient(90deg, #f4fffd, #ffffff);
}
.component-picker-self-icon {
  display: grid;
  place-items: center;
  background: #dffaf5;
  color: #00a997;
  font-size: 25px;
  font-weight: 900;
}
/* FBS control center */
.fbs-control-panel {
  overflow: visible;
}

.fbs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.fbs-kpi {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fbs-kpi span,
.fbs-store-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fbs-kpi strong {
  margin: 7px 0 3px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.fbs-kpi .fbs-kpi-time {
  font-size: 17px;
  line-height: 1.25;
}

.fbs-kpi small,
.fbs-schedule-block small {
  color: var(--muted);
}

.fbs-store-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.fbs-store-control {
  overflow: hidden;
  border: 2px solid #8ed9d5;
  border-radius: 8px;
  background: #fff;
  padding: 0 16px 16px;
  box-shadow: 0 8px 22px rgba(8, 103, 112, 0.1);
}

.fbs-store-control:nth-child(even) {
  border-color: #9dbfe8;
}

.fbs-store-head {
  margin: 0 -16px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #a8e4df;
  border-left: 6px solid #00aa9f;
  background: #e9fbf9;
}

.fbs-store-control:nth-child(even) .fbs-store-head {
  border-bottom-color: #bfd5f0;
  border-left-color: #4b8fe2;
  background: #edf5ff;
}

.fbs-store-head,
.fbs-schedule-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.fbs-store-head h3 {
  margin: 3px 0;
}

.fbs-store-head p,
.fbs-store-control > p {
  margin: 0;
}

.fbs-store-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.fbs-store-stats > div {
  padding: 12px;
  border-radius: 7px;
  background: #f4fafc;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fbs-store-stats strong {
  font-size: 20px;
}

.danger-text {
  color: #e62d58 !important;
}

.fbs-sync-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.fbs-sync-setting > div {
  display: grid;
  gap: 4px;
}

.fbs-sync-setting small {
  color: var(--muted);
}

.switch-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border: 1px solid #b8cfda;
  border-radius: 999px;
  background: #dfeaf0;
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(7, 48, 71, 0.2);
  transition: transform 160ms ease;
}

.switch-control input:checked + .switch-slider {
  border-color: #00a99d;
  background: #08b7aa;
}

.switch-control input:checked + .switch-slider::after {
  transform: translateX(20px);
}

.switch-control input:focus-visible + .switch-slider {
  outline: 3px solid rgba(8, 183, 170, 0.24);
  outline-offset: 2px;
}

.switch-control input:disabled + .switch-slider {
  cursor: wait;
  opacity: 0.65;
}

.fbs-schedule-block {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fbs-schedule-block > div:first-child {
  display: grid;
  gap: 4px;
}

.fbs-week {
  display: grid;
  grid-template-columns: repeat(7, 44px);
  gap: 6px;
}

.fbs-day {
  position: relative;
  cursor: pointer;
}

.fbs-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fbs-day span {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  background: #f5f9fb;
}

.fbs-day input:checked + span {
  border-color: #08b7aa;
  color: #006c72;
  background: #ddfbf7;
  box-shadow: inset 0 0 0 1px #08b7aa;
}

.fbs-store-actions {
  margin: 14px 0 10px;
}

.fbs-unprocessed {
  padding: 0 18px 18px;
}

.fbs-unprocessed .subhead {
  margin-bottom: 10px;
}

@media (max-width: 980px) {
  .fbs-kpi-grid,
  .fbs-store-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fbs-schedule-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .fbs-week {
    width: 100%;
    grid-template-columns: repeat(7, minmax(38px, 1fr));
  }
}

@media (max-width: 620px) {
  .fbs-kpi-grid,
  .fbs-store-stats {
    grid-template-columns: 1fr;
  }

  .fbs-store-head {
    align-items: flex-start;
  }

  .fbs-week {
    overflow-x: auto;
    grid-template-columns: repeat(7, 44px);
  }

  .fbs-store-actions > button {
    width: 100%;
  }
}

/* fbo-stocks-20260801 */
.catalog-composition-cell {
  min-width: 220px;
  line-height: 1.45;
}

.catalog-composition-list {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 12px;
}

.fbo-stock-button {
  min-width: 78px;
  padding: 7px 10px;
  border: 1px solid #75d8d2;
  border-radius: 7px;
  background: #edfffd;
  color: #067f79;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.fbo-stock-button:hover,
.fbo-stock-button:focus-visible {
  border-color: #00a99f;
  background: #d9fbf7;
  outline: none;
}

.fbo-stock-button.has-error {
  border-color: #f4a3ad;
  background: #fff3f5;
  color: #c92f4f;
}

.fbo-stock-modal-panel {
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
}

.fbo-stock-modal-panel .modal-head {
  align-items: flex-start;
}

.fbo-stock-modal-panel .eyebrow {
  margin: 0 0 5px;
  color: #008f88;
  font-weight: 800;
}

.fbo-stock-modal-panel #fboStockMeta {
  margin: 6px 0 0;
}

.fbo-stock-errors {
  margin: 0 20px 14px;
  padding: 10px 12px;
  border: 1px solid #f4a3ad;
  border-radius: 6px;
  background: #fff3f5;
  color: #a61f3d;
  font-size: 13px;
}

.fbo-stock-table-wrap {
  margin: 0 20px 20px;
  border: 1px solid #dce9f0;
  border-radius: 7px;
}

.fbo-stock-table-wrap table {
  min-width: 690px;
}

.fbo-stock-table-wrap .empty-cell {
  padding: 34px 16px;
  text-align: center;
  color: #64748b;
}

@media (max-width: 760px) {
  .fbo-stock-modal-panel {
    width: 100vw;
    max-width: none;
    height: 100svh;
    max-height: none;
    border-radius: 0;
  }

  .fbo-stock-table-wrap {
    margin: 0 12px 18px;
    border: 0;
    overflow: visible;
  }

  .fbo-stock-table-wrap table {
    min-width: 0;
  }

  .catalog-composition-cell {
    min-width: 0;
  }
}

/* assembly-task-cost-20260804 */
.assembly-cost-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.assembly-cost-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d7e8ee;
  border-radius: 8px;
  background: #fff;
}

.assembly-cost-summary > span.total {
  border-color: #8edfd9;
  background: #effcfb;
}

.assembly-cost-summary small,
.assembly-task-cost small {
  color: #617b99;
  font-size: 11px;
  line-height: 1.25;
}

.assembly-cost-summary strong,
.assembly-line-cost,
.assembly-task-cost strong {
  color: #102747;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.assembly-task-cost {
  display: grid;
  gap: 2px;
  min-width: 135px;
  text-align: left;
}

.assembly-task-cost small {
  display: block;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .assembly-cost-summary {
    grid-template-columns: 1fr;
  }

  .assembly-line-cost {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #d7e8ee;
    border-radius: 8px;
    background: #fff;
  }
}


.opening-stock-import-card {
  width: min(980px, calc(100vw - 32px));
  max-height: min(880px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(207, 227, 239, 0.96);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(3, 25, 42, 0.3);
}

.opening-stock-import-body {
  display: grid;
  gap: 18px;
  padding: 22px 26px;
  overflow: auto;
}

.opening-stock-import-card > .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 26px 18px;
  border-top: 1px solid #e1edf3;
  background: #fff;
}

.opening-stock-file {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.opening-stock-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.opening-stock-file .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  cursor: pointer;
}

.opening-stock-file strong {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.opening-stock-mapping label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.required-mark { color: #ff416c; }

.opening-stock-create-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cfe5ef;
  background: #f5fbfd;
  border-radius: 8px;
}

.opening-stock-create-option input { margin-top: 3px; }
.opening-stock-create-option span { display: grid; gap: 3px; }
.opening-stock-create-option small { color: var(--muted); font-weight: 500; }
.opening-stock-preview h3 { margin: 0 0 10px; }
.opening-stock-empty {
  padding: 34px 18px;
  border: 1px dashed #c8dce6;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.opening-stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.opening-stock-summary span {
  padding: 7px 10px;
  border-radius: 7px;
  background: #edf6fa;
}

.opening-stock-summary .is-update { color: #087a70; background: #e6faf6; }
.opening-stock-summary .is-create { color: #176fc1; background: #eaf4ff; }
.opening-stock-summary .is-skip { color: #ad4a39; background: #fff0ed; }
.opening-stock-table-wrap { max-height: 330px; overflow: auto; border: 1px solid #dbeaf1; border-radius: 8px; }
.opening-stock-table-wrap table { min-width: 720px; }
.opening-stock-table-wrap td:last-child { display: grid; gap: 4px; }
.opening-stock-table-wrap small { color: #d33f55; }

.opening-stock-status {
  display: inline-flex;
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.opening-stock-status.update { color: #087a70; background: #dcf8f2; }
.opening-stock-status.multi { color: #087a70; background: #dff8f5; }
.opening-stock-status.create { color: #176fc1; background: #e5f2ff; }
.opening-stock-status.missing,
.opening-stock-status.ambiguous,
.opening-stock-status.error { color: #b03549; background: #ffe9ed; }

@media (max-width: 700px) {
  .opening-stock-import-card { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .opening-stock-import-body { padding: 16px; }
  .opening-stock-file { align-items: stretch; flex-direction: column; }
  .opening-stock-file strong { white-space: normal; }
  .opening-stock-mapping { grid-template-columns: 1fr; }
}


.fbs-week {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 4px;
}

.fbs-day-card {
  min-width: 112px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.fbs-day-card.active {
  border-color: rgba(8, 183, 170, 0.5);
  background: #effbf9;
}

.fbs-day-card .fbs-day span { width: 100%; }
.fbs-day-times { display: grid; gap: 7px; margin-top: 8px; }
.fbs-day-times label { display: grid; gap: 3px; }
.fbs-day-times small { font-size: 10px; line-height: 1.15; }
.fbs-day-times input { min-width: 0; width: 100%; height: 34px; padding: 4px 6px; font-size: 12px; }
.fbs-day-times input:disabled { opacity: 0.42; background: #edf3f6; }

@media (max-width: 980px) {
  .fbs-week { grid-template-columns: repeat(7, 112px); }
}

/* Simple opening stock import */
.opening-stock-format { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.opening-stock-format span { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 12px; border: 1px solid #d6e8ef; border-radius: 8px; background: #f7fbfd; color: var(--navy); font-weight: 700; }
.opening-stock-format b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #dff8f5; color: #008f86; }
.opening-stock-format small { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 600; }
.opening-stock-filter-panel { display: grid; gap: 12px; padding: 16px; border: 1px solid #cfe5ed; border-radius: 8px; background: #f5fbfc; }
.opening-stock-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.opening-stock-filter-head h3 { margin: 0 0 3px; color: var(--navy); font-size: 16px; }
.opening-stock-filter-head p { margin: 0; color: var(--muted); font-size: 12px; }
.opening-stock-filter-reset { flex: 0 0 auto; }
.opening-stock-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opening-stock-filters label { display: grid; gap: 6px; color: var(--navy); font-weight: 700; }
.opening-stock-filters select { width: 100%; min-height: 44px; background: #fff; }
.opening-stock-note { margin: 0; }
.opening-stock-errors { margin: 10px 0 0; padding-left: 20px; color: #a33b4d; }
.opening-stock-errors li + li { margin-top: 4px; }
@media (max-width: 720px) {
  .opening-stock-format,
  .opening-stock-filters { grid-template-columns: 1fr; }
  .opening-stock-filter-head { align-items: stretch; flex-direction: column; }
}

/* Custom assembly warehouse */
.assembly-custom-warehouse { margin-top: 6px; min-width: 100%; }


/* Opening stock preview */
.opening-stock-preview-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 8px; }
.opening-stock-preview-head h3 { margin: 0; }
.opening-stock-preview .opening-stock-table-wrap table { min-width: 640px; }
.opening-stock-preview .number-cell { text-align: right; font-variant-numeric: tabular-nums; }


/* Per-warehouse FBS controls */
.fbs-warehouse-list { display: grid; gap: 12px; margin: 14px 0; }
.fbs-warehouse-control { border: 1px solid #cfe1ea; border-radius: 8px; background: #f9fcfd; padding: 14px; }
.fbs-warehouse-head, .fbs-warehouse-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fbs-warehouse-head h4 { margin: 3px 0 0; font-size: 17px; }
.fbs-warehouse-control .fbs-schedule-block { margin-top: 12px; }
.fbs-warehouse-control > p { margin: 10px 0 0; }
.fbs-warehouse-picker { display: grid; gap: 7px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbfc; }
.fbs-warehouse-picker > small { color: var(--muted); }
.fbs-warehouse-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fbs-warehouse-picker-head > div { display: grid; gap: 3px; }
.fbs-warehouse-picker-head small { color: var(--muted); }
.fbs-dashboard-warehouse-picker { margin: 14px 0; background: #f4fbfc; }
.fbs-warehouse-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.fbs-warehouse-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; }
.fbs-warehouse-option:has(input:checked) { border-color: #08b7aa; background: #ecfffc; }
.fbs-warehouse-option input { width: 18px; height: 18px; accent-color: #08b7aa; }
.fbs-warehouse-option span { display: grid; min-width: 0; gap: 2px; }
.fbs-warehouse-option small { color: var(--muted); }
@media (max-width: 760px) {
  .fbs-warehouse-head, .fbs-warehouse-state, .fbs-warehouse-control .fbs-schedule-block { align-items: flex-start; }
  .fbs-warehouse-control .fbs-schedule-block { display: grid; }
  .fbs-warehouse-options { grid-template-columns: 1fr; }
  .fbs-warehouse-picker-head { align-items: stretch; flex-direction: column; }
  .fbs-week { grid-template-columns: repeat(7, minmax(38px, 1fr)); overflow-x: auto; }
}


/* duplicate-groups-v1 */
.catalog-duplicate-filters {
  display: flex;
  gap: 8px;
  padding: 10px 14px 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.catalog-source-filters {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.catalog-source-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line, #d5e5ef);
  border-radius: 7px;
  color: var(--text, #102a4c);
  background: #fff;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.catalog-source-filter b {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #54708f;
  background: #edf6fa;
  text-align: center;
  font-size: 11px;
}

.catalog-source-filter.active {
  border-color: #0dbeb5;
  color: #007d78;
  background: #e9fbf9;
  box-shadow: inset 0 0 0 1px rgba(13, 190, 181, .12);
}

.catalog-duplicate-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line, #d5e5ef);
  border-radius: 7px;
  color: var(--text, #102a4c);
  background: #fff;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.catalog-duplicate-filter b {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #54708f;
  background: #edf6fa;
  text-align: center;
  font-size: 11px;
}

.catalog-duplicate-filter.active {
  border-color: #0dbeb5;
  color: #007d78;
  background: #e9fbf9;
  box-shadow: inset 0 0 0 1px rgba(13, 190, 181, .12);
}

.catalog-group-row.has-children > td {
  background: #fbfefe;
}

.catalog-group-row.has-children > td:first-child {
  box-shadow: inset 3px 0 0 #13bbb2;
}

.catalog-group-item {
  align-items: center;
}

.catalog-group-toggle,
.catalog-group-toggle-spacer {
  flex: 0 0 26px;
  width: 26px;
  height: 30px;
}

.catalog-group-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #0b807b;
  background: #e6f8f6;
  cursor: pointer;
}

.catalog-group-toggle span {
  display: block;
  font-size: 24px;
  line-height: 1;
  transition: transform .16s ease;
}

.catalog-group-toggle[aria-expanded="true"] span {
  transform: rotate(90deg);
}

.catalog-group-count {
  display: block;
  width: max-content;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid #a9e5df;
  border-radius: 999px;
  color: #087c77;
  background: #effbf9;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.catalog-child-row > td {
  background: #f7fbfd;
  border-bottom-color: #dceaf0;
}

.catalog-child-row > td:first-child {
  box-shadow: inset 3px 0 0 #aacbd9;
}

.catalog-child-item {
  padding-left: 18px;
}

.catalog-child-branch {
  flex: 0 0 auto;
  color: #7893aa;
  font-size: 18px;
  font-weight: 800;
}

.catalog-child-meta,
.catalog-shared-value {
  color: #57728f;
  font-size: 12px;
  line-height: 1.35;
}

.unresolved-offer-action {
  min-height: 30px;
  padding: 6px 10px;
  white-space: nowrap;
}

.catalog-group-fbo {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  color: #087c77;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.catalog-group-fbo small {
  color: #7188a0;
  font-size: 10px;
}

@media (max-width: 760px) {
  .catalog-duplicate-filters {
    padding: 10px 0 4px;
    scroll-snap-type: x proximity;
  }

  .catalog-source-filters {
    padding: 10px 0 0;
    scroll-snap-type: x proximity;
  }

  .catalog-source-filter,
  .catalog-duplicate-filter {
    scroll-snap-align: start;
  }

  #itemsTable .catalog-child-row {
    margin-left: 14px;
    border-left: 3px solid #aacbd9;
  }

  #itemsTable .catalog-child-item {
    padding-left: 0;
  }

  #itemsTable .catalog-group-toggle,
  #itemsTable .catalog-group-toggle-spacer {
    flex-basis: 32px;
    width: 32px;
    height: 34px;
  }
}


.item-cell .catalog-child-branch {
  display: block;
  margin: 0;
  color: #7893aa;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
}

.item-cell .catalog-group-toggle span {
  margin: 0;
  color: currentColor;
  font-size: 24px;
  line-height: 1;
}

.catalog-duplicate-edit-btn {
  width: auto;
  min-width: 52px;
  padding-inline: 7px;
  font-size: 10px;
  font-weight: 800;
}

.fbo-card-reference { color: #087c77; font-size: 11px; font-weight: 700; }

/* fbs-stock-exclusions-20260809 */
.fbs-stock-exclusion-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid #dcecf2;
  border-bottom: 1px solid #dcecf2;
  background: #f7fcfd;
}
.fbs-stock-exclusion-note > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.fbs-stock-exclusion-note strong {
  color: #12304f;
  font-size: 14px;
}
.fbs-stock-exclusion-note small {
  color: #67809d;
  line-height: 1.4;
}
.fbs-stock-exclusion-note .ghost-btn {
  flex: 0 0 auto;
}
#fbsExclusionModal .fbs-exclusion-modal-panel,
#ozonExclusionModal .fbs-exclusion-modal-panel {
  width: min(920px, calc(100vw - 48px));
  height: min(820px, calc(100svh - 48px));
  max-height: none;
  overflow: hidden;
}
.fbs-exclusion-modal-panel {
  display: flex;
  flex-direction: column;
}
.fbs-exclusion-body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0 26px 18px;
}
.fbs-exclusion-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}
.fbs-exclusion-intro > div {
  display: grid;
  gap: 4px;
}
.fbs-exclusion-intro strong {
  color: #102c4c;
  font-size: 16px;
}
.fbs-exclusion-intro small,
.fbs-exclusion-pane-head small {
  color: #68809e;
  line-height: 1.45;
}
.fbs-exclusion-intro .type-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #007f79;
  background: #e7fbf8;
}
.fbs-exclusion-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #eff7fa;
}
.fbs-exclusion-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: #52708f;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}
.fbs-exclusion-tabs button.active {
  color: #083b55;
  background: #fff;
  box-shadow: 0 2px 8px rgba(14, 57, 81, .1);
}
.fbs-exclusion-search {
  width: 100%;
  min-height: 46px;
  margin: 12px 0;
  padding: 0 14px;
  border: 1px solid #cfe2ea;
  border-radius: 8px;
  background: #fff;
}
.fbs-exclusion-pane {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}
.fbs-exclusion-pane.hidden {
  display: none;
}
.fbs-exclusion-pane-head {
  display: grid;
  gap: 2px;
  padding: 2px 2px 10px;
}
.fbs-exclusion-list {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #d7e7ee;
  border-radius: 8px;
  background: #fff;
}
.fbs-exclusion-option {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid #e4eef2;
  background: #fff;
  cursor: pointer;
}
.fbs-exclusion-option:last-child {
  border-bottom: 0;
}
.fbs-exclusion-option:hover {
  background: #f5fbfc;
}
.fbs-exclusion-option.selected {
  background: #e9fbf8;
}
.fbs-exclusion-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fbs-exclusion-check {
  width: 20px;
  height: 20px;
  border: 2px solid #b8ced9;
  border-radius: 5px;
  background: #fff;
}
.fbs-exclusion-option.selected .fbs-exclusion-check {
  border-color: #06bcb1;
  background: #06bcb1;
  box-shadow: inset 0 0 0 4px #fff;
}
.fbs-exclusion-option > span:last-child,
.fbs-exclusion-product-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.fbs-exclusion-option strong {
  overflow: hidden;
  color: #12304f;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fbs-exclusion-option small {
  overflow: hidden;
  color: #6a82a0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fbs-exclusion-product {
  grid-template-columns: 22px 48px minmax(0, 1fr);
  min-height: 72px;
}
.fbs-exclusion-photo {
  width: 48px;
  height: 48px;
  border: 1px solid #e0ebef;
  border-radius: 7px;
  object-fit: contain;
  background: #fff;
}
.fbs-exclusion-photo.placeholder {
  display: block;
  background: linear-gradient(135deg, #f1f8fa 48%, #cae1e8 49%, #cae1e8 52%, #f1f8fa 53%);
}
.fbs-exclusion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 26px;
  border-top: 1px solid #dce9ee;
  background: #fff;
}
.fbs-exclusion-actions button {
  min-height: 42px;
}

@media (max-width: 720px) {
  .fbs-stock-exclusion-note {
    align-items: stretch;
    flex-direction: column;
  }
  .fbs-stock-exclusion-note .ghost-btn {
    width: 100%;
  }
  #fbsExclusionModal .fbs-exclusion-modal-panel,
#ozonExclusionModal .fbs-exclusion-modal-panel {
    width: 100vw;
    height: 100svh;
    max-width: none;
    border-radius: 0;
  }
  .fbs-exclusion-body {
    padding: 0 14px 12px;
  }
  .fbs-exclusion-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .fbs-exclusion-intro .type-pill {
    align-self: flex-start;
  }
  .fbs-exclusion-product {
    grid-template-columns: 22px 42px minmax(0, 1fr);
    padding-inline: 10px;
  }
  .fbs-exclusion-photo {
    width: 42px;
    height: 42px;
  }
  .fbs-exclusion-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
}
/* ozon-fbs-20260810 */
.ozon-control-panel { border-color: #f0c9a7; }
.ozon-store-control { border: 2px solid #f2b36f; box-shadow: 0 10px 28px rgba(238, 125, 32, .09); }
.ozon-store-control .fbs-store-head { background: linear-gradient(90deg, #fff7ee, #fff); margin: -14px -14px 14px; padding: 14px; border-bottom: 1px solid #f4d5b5; }
.ozon-store-card { border-color: #f0c9a7; }
.ozon-settings-panel { border-color: #f0c9a7; }
.ozon-store-list .primary-btn { background: #ef7f1a; }
.ozon-store-list .primary-btn:hover { background: #d96c0b; }
.fbs-error { color: #c73545; background: #fff0f2; border: 1px solid #ffc8cf; border-radius: 6px; padding: 10px 12px; }
@media (max-width: 720px) {
  .ozon-store-control .button-row { display: grid; grid-template-columns: 1fr; }
  .ozon-store-control .button-row button { width: 100%; }
}
/* ozon-fbs-exclusions-v1 */
.ozon-dashboard-settings { border-color: #f2c79f; background: #fffaf5; }
.ozon-warehouse-control-row { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 10px; }
.ozon-stock-exclusion-note { border-color: #f2c79f; background: #fffaf5; }
#ozonExclusionModal .fbs-exclusion-summary { background: #fff4e8; color: #9a4b08; }
#ozonExclusionModal .fbs-exclusion-option:has(input:checked) { border-color: #ef7f1a; background: #fff5eb; }
#ozonExclusionModal .fbs-exclusion-option input { accent-color: #ef7f1a; }
@media (max-width: 720px) {
  .ozon-warehouse-control-row { grid-template-columns: 1fr; }
  .ozon-warehouse-control-row button { width: 100%; }
  #ozonExclusionModal .modal-footer { grid-template-columns: 1fr; }
  #ozonExclusionModal .modal-footer button { width: 100%; }
}



/* ozon-mapping-v1 */
.ozon-mapping-note { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px; border:1px solid #f2c79f; border-radius:7px; background:#fffaf5; }
.ozon-mapping-note div { display:grid; gap:3px; }
.ozon-mapping-note small { color:#6a82a0; }
.ozon-mapping-modal-panel { width:min(1120px, calc(100vw - 40px)); height:min(820px, calc(100svh - 40px)); }
.ozon-mapping-body { display:grid; grid-template-rows:auto auto minmax(0, 1fr); gap:12px; min-height:0; padding:0 26px 16px; }
.ozon-mapping-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.ozon-mapping-summary { display:flex; flex-wrap:wrap; gap:8px; }
.ozon-mapping-summary span { padding:8px 11px; border-radius:6px; background:#f0f8fa; color:#53708f; }
.ozon-mapping-summary strong { color:#102b4e; }
.ozon-mapping-search-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; }
.ozon-mapping-search-grid label { display:grid; gap:6px; color:#53708f; font-size:13px; font-weight:700; }
.ozon-mapping-list { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; min-height:0; }
.ozon-mapping-pane { display:grid; grid-template-rows:auto minmax(0,1fr); min-width:0; border:1px solid #d9e8ee; border-radius:7px; overflow:hidden; background:#f8fbfc; }
.ozon-mapping-pane-head { display:flex; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid #d9e8ee; background:#fff; }
.ozon-mapping-pane-head small { color:#6a82a0; }
.ozon-mapping-scroll { min-height:0; overflow:auto; padding:8px; }
.ozon-mapping-offer,.ozon-mapping-local { width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:66px; margin-bottom:7px; padding:10px 12px; border:1px solid transparent; border-radius:7px; background:#fff; color:#102b4e; text-align:left; }
.ozon-mapping-offer:hover,.ozon-mapping-local:hover { border-color:#efb87f; }
.ozon-mapping-offer.active { border-color:#ef7f1a; background:#fff5eb; box-shadow:inset 3px 0 #ef7f1a; }
.ozon-mapping-local { justify-content:flex-start; }
.ozon-mapping-local.selected { border-color:#0bb9ae; background:#ecfbf9; box-shadow:inset 3px 0 #0bb9ae; }
.ozon-mapping-offer span,.ozon-mapping-local span { display:grid; gap:3px; min-width:0; }
.ozon-mapping-offer strong,.ozon-mapping-local strong,.ozon-mapping-offer small,.ozon-mapping-local small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ozon-mapping-offer small,.ozon-mapping-local small { color:#6a82a0; }
.mapping-linked-copy { color:#008e85!important; }
.ozon-mapping-photo { width:48px; height:48px; flex:0 0 48px; border-radius:6px; object-fit:contain; background:#fff; }
@media (max-width:720px) {
  .ozon-mapping-note { align-items:stretch; flex-direction:column; }
  .ozon-mapping-note button { width:100%; }
  .ozon-mapping-modal-panel { width:100vw; height:100svh; max-width:none; border-radius:0; }
  .ozon-mapping-body { padding:0 14px 10px; }
  .ozon-mapping-toolbar { align-items:stretch; flex-direction:column; }
  .ozon-mapping-toolbar .button-row { display:grid; grid-template-columns:1fr; }
  .ozon-mapping-search-grid { grid-template-columns:1fr; }
  .ozon-mapping-list { grid-template-columns:1fr; overflow:auto; }
  .ozon-mapping-pane { min-height:360px; }
}

/* stock-history-20260814 */
.stock-history-action { color:#087f7a; font-size:18px; font-weight:800; }
.stock-history-action:hover,.stock-history-action:focus-visible { color:#005f5b; background:#dff8f6; }
.stock-history-modal-panel { width:min(1180px, calc(100vw - 48px)); max-height:min(840px, calc(100svh - 48px)); display:flex; flex-direction:column; overflow:hidden; }
.stock-history-modal-panel .modal-head { flex:0 0 auto; }
.stock-history-modal-panel .eyebrow { color:#009f96; font-weight:800; }
.stock-history-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:18px 24px; background:#f7fbfd; border-top:1px solid #dbeaf1; border-bottom:1px solid #dbeaf1; }
.stock-history-stat { min-width:0; padding:12px 14px; border:1px solid #d8e7ef; border-radius:8px; background:#fff; }
.stock-history-stat span { display:block; margin-bottom:6px; color:#6b83a3; font-size:12px; font-weight:700; }
.stock-history-stat strong { color:#102a4b; font-size:20px; }
.stock-history-stat.income { background:#f0fcf8; border-color:#bcebdc; }
.stock-history-stat.income strong,.stock-history-income { color:#07975f; }
.stock-history-stat.expense { background:#fff5f6; border-color:#ffd2d9; }
.stock-history-stat.expense strong,.stock-history-expense { color:#ed3f5f; }
.stock-history-stat.current { background:#edfbfa; border-color:#7dded8; }
.stock-history-table-wrap { flex:1 1 auto; min-height:220px; overflow:auto; margin:0; }
.stock-history-table-wrap table { min-width:980px; }
.stock-history-table-wrap td { vertical-align:top; }
.stock-history-target { display:block; max-width:300px; margin-top:4px; color:#6b83a3; font-size:12px; line-height:1.3; }
.stock-history-operation { display:inline-flex; align-items:center; min-height:26px; padding:4px 9px; border-radius:999px; background:#edf6fa; color:#21425f; font-size:12px; font-weight:700; white-space:nowrap; }
.stock-history-table-wrap .empty-cell { padding:42px 20px; text-align:center; color:#6b83a3; }
@media (max-width:760px) {
  .stock-history-modal-panel { width:100vw; height:100svh; max-height:none; border-radius:0; }
  .stock-history-summary { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; }
  .stock-history-stat { padding:10px; }
  .stock-history-stat strong { font-size:16px; }
  .mini-btn[title="???????? ????????"]::after { content:"\0418\0441\0442\043e\0440\0438\044f"; }
}

.catalog-pagination {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 12px;
  border-top: 1px solid var(--border, #d8e6ee);
  color: var(--muted, #607fa3);
}

.catalog-pagination-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.catalog-pagination-actions .icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

/* ozon-cluster-groups-20260825 */
.fbo-cluster-row td {
  background: #eaf8f7;
  border-top: 2px solid #a9ded9;
  color: #123b55;
}

.fbo-cluster-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fbo-cluster-summary strong {
  color: #007f78;
  font-size: 14px;
}

.fbo-cluster-summary span {
  color: #60758a;
  font-size: 12px;
  font-weight: 700;
}

.fbo-cluster-child-row td {
  background: #fff;
}

.fbo-cluster-branch {
  margin-right: 7px;
  color: #0aa59d;
}


/* ozon-supply-recommendations-20260825 */
.fbo-cluster-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fbo-cluster-supply {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: end;
  gap: 2px 8px;
  text-align: right;
}

.fbo-cluster-supply > span {
  color: #60758a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.fbo-cluster-supply > strong {
  color: #008f58;
  font-size: 16px;
}

.fbo-cluster-supply > small {
  grid-column: 1 / -1;
  color: #60758a;
  font-size: 11px;
  white-space: nowrap;
}

/* system-thinking-20260909 */
.system-thinking {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.system-thinking.show {
  opacity: 1;
  visibility: visible;
}

.system-thinking::before {
  content: "";
  position: absolute;
  top: 0;
  left: -42%;
  width: 42%;
  height: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, transparent, #00c9bc 45%, #ff2b72 100%);
  box-shadow: 0 2px 12px rgba(0, 190, 178, .5);
  animation: system-thinking-progress 1.15s cubic-bezier(.45, 0, .2, 1) infinite;
}

.system-thinking-bubble {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgba(7, 55, 84, .12);
  border-radius: 999px;
  background: rgba(7, 38, 57, .94);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 12px 32px rgba(7, 38, 57, .24);
  backdrop-filter: blur(10px);
  transform: translateY(8px) scale(.96);
  transition: transform .22s ease;
}

.system-thinking.show .system-thinking-bubble {
  transform: translateY(0) scale(1);
}

.system-thinking-spinner,
button.is-loading::before {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, .34);
  border-top-color: #20e5d7;
  border-radius: 50%;
  animation: system-thinking-spin .72s linear infinite;
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.is-loading::before {
  content: "";
}

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

@keyframes system-thinking-progress {
  0% { left: -42%; }
  65%, 100% { left: 100%; }
}

@media (max-width: 680px) {
  .system-thinking-bubble {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .system-thinking,
  .system-thinking-bubble { transition: none; }
  .system-thinking::before,
  .system-thinking-spinner,
  button.is-loading::before { animation-duration: 1.8s; }
}

/* warehouse-inventory-ui-20260910 */
.inventory-history-panel .panel-head { align-items:flex-start; }
.inventory-history-wrap { margin-top:4px; }
.inventory-history-table { min-width:1120px; }
.inventory-history-row { cursor:pointer; }
.inventory-history-row:hover td { background:#f4fbfb; }
.inventory-history-link { border:0; padding:0; background:transparent; color:#008f88; font:inherit; font-weight:800; cursor:pointer; text-decoration:underline; text-decoration-color:#9bded9; text-underline-offset:3px; }
.inventory-history-link:hover { color:#006b67; }
.inventory-surplus-text { color:#07975f; font-weight:800; }
.inventory-shortage-text { color:#d93655; font-weight:800; }
.inventory-editor { overflow:hidden; }
.inventory-invoice { padding-bottom:0; background:linear-gradient(180deg,#fff 0,#f9fcfd 100%); }
.inventory-invoice-meta { grid-template-columns:240px 150px 150px; }
.inventory-invoice-meta label:last-child { align-content:end; }
.inventory-status-control { display:flex; min-height:40px; align-items:center; justify-content:center; box-sizing:border-box; }
.inventory-invoice .invoice-tabs { margin-top:0; }
.inventory-invoice .invoice-add-row { grid-template-columns:minmax(240px,1fr) 96px auto; }
.inventory-invoice .invoice-bottom { align-items:start; }
.inventory-invoice .invoice-summary { min-width:420px; }
.inventory-conflict { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:16px 24px 0; padding:13px 15px; border:1px solid #f0b0bc; border-radius:10px; background:#fff5f6; color:#8f2337; }
.inventory-conflict strong { display:block; margin-bottom:4px; }
.inventory-conflict p { margin:0; font-size:13px; }
.inventory-count-wrap { max-height:420px; min-height:86px; margin:0; border-top:0; overflow:auto; }
.inventory-count-table { min-width:980px; }
.inventory-invoice .inventory-count-table { min-width:900px; }
.inventory-count-table thead { position:sticky; top:0; z-index:2; background:#f0f8fc; color:#56708e; font-size:11px; text-transform:uppercase; }
.inventory-count-table td { vertical-align:middle; }
.inventory-count-row.conflict td { background:#fff6f7; }
.inventory-line-product { display:grid; grid-template-columns:42px minmax(160px,1fr); align-items:center; gap:10px; }
.inventory-line-product strong,.inventory-line-product small { display:block; }
.inventory-line-product small { margin-top:3px; color:#7890aa; font-size:11px; }
.inventory-line-status { display:inline-flex; min-height:28px; align-items:center; padding:4px 9px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap; }
.inventory-line-status.pending { background:#f1f5f7; color:#6b7f94; }
.inventory-line-status.matched { background:#e9faf3; color:#078853; }
.inventory-line-status.difference { background:#fff0f2; color:#d93655; }
.inventory-photo { width:42px; height:42px; border-radius:8px; object-fit:cover; background:#edf3f6; }
.inventory-photo.placeholder { display:block; }
.inventory-actual-input { width:112px; height:40px; border:1px solid #bfd1dd; border-radius:8px; padding:6px 10px; color:#102a4b; background:#fff; font:inherit; font-size:16px; font-weight:800; text-align:right; }
.inventory-actual-input:focus { outline:3px solid #b6ede9; border-color:#00a99f; }
.inventory-actual-input:disabled { border-color:transparent; background:#f1f5f7; color:#51677f; }
.inventory-difference { display:inline-flex; justify-content:center; min-width:54px; padding:5px 9px; border-radius:999px; font-weight:900; }
.inventory-difference.surplus { background:#e9faf3; color:#078853; }
.inventory-difference.shortage { background:#fff0f2; color:#d93655; }
.inventory-difference.matched { background:#edf2f5; color:#667b91; }
.inventory-difference.empty { color:#8fa1b4; }
.inventory-row-actions { width:48px; text-align:center; }
.inventory-remove-item { width:30px; height:30px; border:1px solid #e0c7cd; border-radius:8px; background:#fff; color:#ba3d53; font-size:20px; line-height:1; cursor:pointer; }
.inventory-remove-item:hover { border-color:#d93655; background:#fff3f5; }
.inventory-product-modal-panel { width:min(980px,calc(100vw - 32px)); max-height:min(780px,calc(100svh - 32px)); display:flex; flex-direction:column; overflow:hidden; }
.inventory-product-tools { padding:16px 24px; border-bottom:1px solid #e0ebf1; background:#f8fbfc; }
.inventory-search { display:flex; align-items:center; gap:8px; width:100%; padding:0 12px; border:1px solid #cddde7; border-radius:9px; background:#fff; }
.inventory-search input { width:100%; height:40px; border:0; outline:0; background:transparent; color:#102a4b; font:inherit; }
.inventory-product-wrap { flex:1; min-height:260px; max-height:540px; margin:0; overflow:auto; }
.inventory-product-table { min-width:780px; }
.inventory-product-table thead { position:sticky; top:0; z-index:2; background:#f7fafc; }
.inventory-product-row { cursor:pointer; }
.inventory-product-row:hover td,.inventory-product-row.selected td { background:#effbf9; }
.inventory-product-row.added { cursor:default; }
.inventory-product-row.added td { color:#7b8da1; background:#f7f9fa; }
.inventory-product-row td { vertical-align:middle; }
.inventory-product-row td:nth-child(3) strong,.inventory-product-row td:nth-child(3) small { display:block; }
.inventory-product-row td:nth-child(3) small { margin-top:4px; color:#08978f; font-weight:700; }
.inventory-product-row input[type="checkbox"] { width:18px; height:18px; accent-color:#00a99f; }
.inventory-product-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 24px 20px; border-top:1px solid #e0ebf1; }
.inventory-product-footer > strong { color:#526b89; }
.inventory-post-modal-panel { width:min(560px,calc(100vw - 32px)); }
.inventory-post-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:20px 24px 12px; }
.inventory-post-summary > div { padding:13px 14px; border:1px solid #dbe7ed; border-radius:9px; background:#f8fbfc; }
.inventory-post-summary span { display:block; margin-bottom:6px; color:#6b83a3; font-size:12px; font-weight:700; }
.inventory-post-summary strong { color:#102a4b; font-size:19px; }
.inventory-post-note { padding:0 24px; }
.inventory-post-actions { justify-content:flex-end; padding:12px 24px 22px; }

@media (max-width:1100px) {
  .inventory-invoice-meta { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .inventory-invoice .invoice-bottom { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .inventory-invoice-meta { grid-template-columns:1fr; width:100%; }
  .inventory-invoice .invoice-add-row { grid-template-columns:minmax(0,1fr) 78px; }
  .inventory-invoice .invoice-add-row .ghost-btn { grid-column:1 / -1; }
  .inventory-invoice .invoice-summary { min-width:0; }
  .inventory-conflict { align-items:stretch; flex-direction:column; margin:12px; }
  .inventory-count-wrap { max-height:none; min-height:0; overflow:auto; }
  .inventory-actual-input { width:96px; }
  .inventory-product-tools { padding:12px 16px; }
  .inventory-product-footer { align-items:stretch; flex-direction:column; padding:12px 16px 16px; }
  .inventory-product-footer .button-row { width:100%; }
  .inventory-product-footer .button-row button { flex:1; }
  .inventory-post-summary { grid-template-columns:1fr; padding:16px 16px 8px; }
  .inventory-post-note { padding:0 16px; }
  .inventory-post-actions { padding:10px 16px 18px; }
}
/* unit-economics-20261005 */
.unit-economics-dialog { width: min(1180px,96vw) !important; max-width:1180px !important; }
.ue-full,.ue-group { grid-column:1/-1; }
.ue-group { border:1px solid #d7e0e8; border-radius:10px; padding:12px; background:#fff; min-width:0; }
.ue-group summary { cursor:pointer; font-weight:600; padding:8px; color:#173d55; }
.ue-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:12px; }
.ue-fields code { color:#6c7e8b; font-size:11px; }
.ue-fields small { color:#6c7e8b; font-size:11px; }
.ue-result-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; padding:16px; background:#edf7fa; border-radius:10px; }
.ue-result-grid b { display:block; font-size:22px; padding-top:10px; }
.ue-detail-status { padding:18px 0; font-size:13px; }
.ue-formulas { width:100%; font-size:12px; border-collapse:collapse; }
.ue-formulas td,.ue-formulas th { border-bottom:1px solid #e0e7ee; text-align:left; padding:10px; vertical-align:top; }
.ue-formulas pre { max-width:450px; white-space:pre-wrap; overflow-wrap:anywhere; font-size:11px; }
.ue-info-content { padding:20px; max-height:75vh; overflow:auto; }
.ue-info-content li { margin:12px 0; }
.unit-economics-dialog footer { position:sticky; bottom:0; background:white; flex-wrap:wrap; }
@media(max-width:800px) { .ue-fields {grid-template-columns:1fr;} .ue-result-grid {grid-template-columns:1fr 1fr;} }
#unitEconomicsView { background: #f4f7fb; margin: -2px; padding: 2px; }
.unit-economics-shell { display: grid; gap: 18px; }
.unit-economics-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.unit-economics-heading h1 { margin: 0 0 6px; color: #102a43; font-size: 30px; }
.unit-economics-heading p { margin: 0; color: #627d98; max-width: 760px; }
.unit-economics-actions,.unit-economics-toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.unit-economics-actions select,.unit-economics-toolbar input,.unit-economics-toolbar select { min-height: 42px; border: 1px solid #d7e0e8; border-radius: 10px; padding: 0 12px; background: #fff; color: #243b53; }
.unit-economics-toolbar input { min-width: 320px; flex: 1; }
.unit-economics-status { min-height: 20px; margin: -8px 0 0; color: #627d98; }
.unit-economics-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.unit-economics-kpis article { background: #fff; border: 1px solid #e4eaf0; border-radius: 14px; padding: 17px; box-shadow: 0 7px 22px rgba(24,39,75,.05); }
.unit-economics-kpis article span { display: block; color: #7b8794; font-size: 12px; margin-bottom: 7px; }
.unit-economics-kpis article strong { font-size: 24px; color: #102a43; }
.unit-economics-kpis article.danger strong { color: #c13c45; }
.unit-economics-panel { padding: 16px; }
.unit-economics-toolbar { margin-bottom: 14px; }
.unit-economics-table { width: 100%; border-collapse: collapse; }
.unit-economics-table th { color: #627d98; font-size: 12px; text-align: right; white-space: nowrap; padding: 12px 10px; border-bottom: 1px solid #dfe7ee; }
.unit-economics-table th:first-child,.unit-economics-table td:first-child { text-align: left; }
.unit-economics-table td { text-align: right; padding: 13px 10px; border-bottom: 1px solid #edf1f5; white-space: nowrap; color: #243b53; }
.unit-economics-table td:first-child { min-width: 240px; white-space: normal; }
.unit-economics-table td strong,.unit-economics-table td small,.unit-economics-table td em { display: block; }
.unit-economics-table td small { color: #829ab1; margin-top: 3px; }
.unit-economics-table td em { color: #b7791f; font-size: 11px; margin-top: 3px; font-style: normal; }
.unit-economics-table tr.loss td:nth-child(5),.unit-economics-table tr.loss td:nth-child(6) { color: #c13c45; }
.unit-economics-edit { border: 1px solid #d6e1e9; border-radius: 8px; background: #fff; color: #176b87; padding: 7px 10px; cursor: pointer; }
.unit-economics-empty { text-align: center; padding: 36px; color: #829ab1; }
.unit-economics-dialog { width: min(780px,calc(100vw - 32px)); max-height: calc(100vh - 40px); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 24px 80px rgba(16,42,67,.28); }
.unit-economics-dialog::backdrop { background: rgba(16,42,67,.42); }
.unit-economics-dialog form > header { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px 15px; border-bottom: 1px solid #e8edf2; }
.unit-economics-dialog h2 { margin: 0 0 4px; color: #102a43; }
.unit-economics-dialog header p { margin: 0; color: #829ab1; font-size: 13px; }
.unit-economics-dialog header button { border: 0; background: none; font-size: 28px; color: #627d98; cursor: pointer; }
.unit-economics-form { max-height: calc(100vh - 230px); overflow: auto; padding: 18px 24px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 18px; }
.unit-economics-form h3 { grid-column: 1/-1; margin: 10px 0 0; color: #486581; font-size: 14px; }
.unit-economics-form label { display: grid; gap: 6px; color: #526d82; font-size: 12px; }
.unit-economics-form input,.unit-economics-form select { border: 1px solid #d7e0e8; border-radius: 9px; min-height: 40px; padding: 0 10px; font-size: 15px; background: #fff; }
.unit-economics-form .unit-economics-checkbox { display: flex; align-items: center; gap: 9px; min-height: 40px; }
.unit-economics-form .unit-economics-checkbox input { min-height: auto; width: 18px; height: 18px; }
.unit-economics-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px 22px; border-top: 1px solid #e8edf2; }
@media (max-width: 900px) { .unit-economics-heading { flex-direction: column; }.unit-economics-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }.unit-economics-form { grid-template-columns: 1fr; }.unit-economics-form h3 { grid-column: 1; }.unit-economics-toolbar input { min-width: 100%; } }
