:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #ff6b2c;
  --accent-dark: #d84d14;
  --green: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 22px 54px rgba(15, 23, 42, 0.10);
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,107,44,.07), transparent 260px),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 100vh;
}

/* Operational stock controls and compact price history. */
.stock-filter-control { display:grid; gap:5px; min-width:190px; }
.stock-filter-control > em,
.stock-warehouse-select { color:#64748b; font-size:11px; font-style:normal; font-weight:800; }
.stock-warehouse-select { display:grid; gap:5px; min-width:190px; }
.stock-warehouse-select select { min-height:40px; }
.damaged-warehouse-button { border-color:#fdba74; background:#fff7ed; color:#9a3412; }
.damaged-warehouse-button:hover,
.damaged-warehouse-button.active { border-color:#f97316; background:#ffedd5; color:#9a3412; }
.filters-secondary > .button.active { border-color:#2563eb; background:#eff6ff; color:#1d4ed8; }
.price-stock-day { grid-template-rows:auto auto minmax(0,1fr); flex-basis:190px; min-height:154px; }
.price-stock-orders { display:grid; grid-template-columns:1fr auto; align-items:baseline; gap:6px; padding:6px 0 5px; }
.price-stock-orders strong { color:#166534; font-size:10px; }
.price-stock-orders span { color:#64748b; font-size:9px; white-space:nowrap; }
.price-stock-groups { display:grid; align-content:start; gap:2px; max-height:88px; overflow-y:auto; scrollbar-width:thin; }
.price-stock-groups details { border:1px solid #e2e8f0; border-radius:4px; background:#fff; }
.price-stock-groups details.fbs { border-color:#fed7aa; background:#fff7ed; }
.price-stock-groups summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px; align-items:center; padding:3px 5px; color:#475569; cursor:pointer; font-size:9px; font-weight:800; list-style:none; }
.price-stock-groups summary::-webkit-details-marker { display:none; }
.price-stock-groups summary span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.price-stock-groups summary b { color:#172554; font-size:9px; }
.price-stock-groups details.fbs summary,
.price-stock-groups details.fbs summary b { color:#c2410c; }
.price-stock-groups details > div { display:grid; gap:2px; padding:2px 5px 4px; border-top:1px solid #eef2f7; }
.price-stock-groups details > div > span { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px; color:#64748b; font-size:9px; }
.price-stock-groups details i { overflow:hidden; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.price-stock-groups details b { color:#1e293b; }
.price-stock-groups > small { color:#94a3b8; font-size:10px; }
.price-edit-modal { width:min(1500px,calc(100vw - 36px)); max-height:calc(100vh - 36px); }
.price-edit-stock { display:grid; gap:12px; margin-top:18px; padding-top:16px; border-top:1px solid #dbe3ef; }
.price-edit-stock-head { display:flex; align-items:end; justify-content:space-between; gap:16px; }
.price-edit-stock-head > div:first-child { display:grid; gap:3px; }
.price-edit-stock-head > div:first-child strong { color:#172554; font-size:17px; }
.price-edit-stock-head > div:first-child span { color:#64748b; font-size:12px; }
.price-edit-stock-period { display:flex; align-items:end; gap:8px; }
.price-edit-stock-period label { display:grid; gap:4px; color:#64748b; font-size:11px; font-weight:800; }
.price-edit-stock-period input { min-height:36px; }
.price-stock-detail-scroll { max-width:100%; border:1px solid #dbe3ef; border-radius:7px; }
.price-edit-stock .stock-price-action { display:none; }
.price-stock-detail-loading { display:flex; align-items:center; gap:8px; min-height:100px; justify-content:center; color:#64748b; }
.price-stock-detail-loading .ui-icon { width:18px; height:18px; animation:spin 1s linear infinite; }
.price-stock-detail-mobile .mobile-product { margin:0; }
.stock-default-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.stock-default-options .inline-check { align-items:flex-start; padding:12px; border:1px solid #dbe3ef; border-radius:7px; background:#f8fafc; }
.stock-default-options .inline-check > span { display:grid; gap:2px; }
.stock-default-options strong { color:#172554; font-size:13px; }
.stock-default-options em { color:#64748b; font-size:11px; font-style:normal; }
.user-account-scope { grid-column:1/-1; display:grid; grid-template-columns:minmax(180px,.8fr) auto minmax(260px,1.5fr) auto; gap:12px; align-items:center; padding:10px 12px; border-top:1px solid #e7edf5; background:#f8fbff; }
.user-section-scope { grid-column:1/-1; display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:12px; align-items:center; padding:10px 12px; border-top:1px solid #e7edf5; background:#faf7ff; }
.user-section-scope > div:first-child { display:grid; gap:2px; }
.user-section-scope > div:first-child strong { color:#172554; font-size:12px; }
.user-section-scope > div:first-child span { color:#64748b; font-size:11px; }
.user-account-scope > div:first-child { display:grid; gap:2px; }
.user-account-scope > div:first-child strong { color:#172554; font-size:12px; }
.user-account-scope > div:first-child span { color:#64748b; font-size:11px; }
.user-account-list { display:flex; flex-wrap:wrap; gap:6px 12px; }
.user-account-list label { display:flex; align-items:center; gap:5px; color:#334155; font-size:12px; }
.user-account-list label.disabled { opacity:.5; }
@media (max-width:720px) {
  .price-edit-modal { width:100%; max-height:92vh; }
  .price-edit-stock-head,
  .price-edit-stock-period { align-items:stretch; flex-direction:column; }
  .stock-default-options,
  .user-account-scope,
  .user-section-scope { grid-template-columns:1fr; }
  .stock-filter-control,
  .stock-warehouse-select { width:100%; }
}

a {
  color: #2457a6;
}

a:hover {
  color: #17428c;
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px;
}

.shell-wide {
  max-width: 1720px;
}

.topbar, .panel, .table, .modal-card, .auth-card, .metric {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 10px;
}

.compact-topbar { align-items: center; }
.topbar-title { min-width: 0; }
.slim-topbar {
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  padding: 10px 12px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.section-actions {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  align-items: end;
}

.section-select-label {
  width: 100%;
  min-width: 190px;
}

.compact-action {
  min-height: 40px;
  white-space: nowrap;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sync-status span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #98a2b3;
}

.sync-status strong,
.sync-status em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status strong {
  color: #344054;
  font-weight: 800;
}

.sync-status em {
  font-style: normal;
}

.sync-ok span { background: var(--green); }
.sync-running span {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 107, 44, .14);
}
.sync-error span { background: var(--danger); }

.section-panel {
  margin-bottom: 10px;
}

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

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

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

.fbo-dropzone {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.fbo-dropzone:hover,
.fbo-dropzone:focus-visible,
.fbo-dropzone.is-dragging {
  border-color: var(--accent);
  background: #eef7ff;
  outline: none;
}

.fbo-dropzone strong { overflow-wrap: anywhere; }
.fbo-dropzone span { color: var(--muted); font-size: 13px; }
.fbo-dropzone input { display: none; }

.fbo-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.fbo-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
}

.fbo-summary span,
.fbo-summary strong {
  display: block;
}

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

.fbo-summary strong {
  margin-top: 4px;
  font-size: 18px;
}

.fbo-state {
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.fbo-state.ok {
  background: rgba(22, 163, 74, .10);
  color: #166534;
}

.fbo-state.warn {
  background: rgba(245, 158, 11, .12);
  color: #92400e;
}

.fbo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fbo-result-block {
  display: grid;
  gap: 8px;
}

.fbo-result-block h3 {
  margin: 0;
  font-size: 16px;
}

.fbo-problems {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 8px;
  background: rgba(254, 242, 242, .72);
}

.fbo-problems-head,
.fbo-problem-row {
  display: grid;
  grid-template-columns: minmax(270px, 1.65fr) 145px 96px repeat(3, minmax(150px, .9fr)) minmax(220px, 1.2fr);
  gap: 12px;
  align-items: center;
  min-width: 1280px;
}

.fbo-problems-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #991b1b;
}

.fbo-problems-title > div {
  display: grid;
  gap: 3px;
}

.fbo-problems-title > div > span {
  color: #7f1d1d;
  font-size: 12px;
}

.fbo-problems-head {
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fbo-problem-row {
  padding-top: 8px;
  border-top: 1px solid rgba(220, 38, 38, .16);
  color: #7f1d1d;
  font-size: 13px;
  transition: opacity .16s ease, background .16s ease;
}

.fbo-problem-row.is-copied,
.fbo-history-row.is-copied {
  background: #f0fdf4;
  color: #64748b;
  opacity: .68;
}

.fbo-problems-table,
.fbo-table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.fbo-hash {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fbo-table {
  display: grid;
  min-width: 1040px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.fbo-row {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(100px, .45fr) minmax(80px, .35fr) minmax(260px, 1.2fr) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .62);
}

.fbo-write-row {
  display: grid;
  grid-template-columns: minmax(270px, 1.65fr) 145px 96px repeat(3, minmax(150px, .9fr));
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .62);
}

.fbo-write-row:last-child { border-bottom: 0; }
.fbo-write-row > *,
.fbo-problem-row > *,
.fbo-history-row > * { min-width: 0; }
.fbo-result-block p { margin: -2px 0 10px; color: var(--muted); font-size: 13px; }
.fbo-before { color: #64748b; font-weight: 650; }
.fbo-after { color: #166534; }
.fbo-quantity { white-space: nowrap; }

.fbo-copy-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: copy;
  font: inherit;
  font-weight: 800;
  text-align: left;
}
.fbo-copy-cell > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.fbo-copy-cell > code { overflow: hidden; color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-copy-cell .ui-icon { flex: 0 0 auto; width: 15px; height: 15px; color: #94a3b8; opacity: 0; transition: opacity .14s ease, color .14s ease; }
.fbo-copy-cell:hover .ui-icon,
.fbo-copy-cell:focus-visible .ui-icon { color: #2563eb; opacity: 1; }
.fbo-copy-cell:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; border-radius: 4px; }
.fbo-copy-cell.is-copied { color: #166534; }
.fbo-copy-cell.is-copied .ui-icon { color: #16a34a; opacity: 1; }
.fbo-progress-done { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; color: #166534; font-size: 12px; }
.fbo-progress-done .ui-icon { width: 14px; height: 14px; }
.fbo-progress-toggle {
  display: block;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}
.fbo-progress-toggle:hover { text-decoration: underline; }
.fbo-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f8fbff;
}
.fbo-progress-summary > span { display: grid; gap: 2px; }
.fbo-progress-summary em { color: var(--muted); font-size: 12px; font-style: normal; }

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

.fbo-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(15, 23, 42, .045);
}

.fbo-runs {
  display: grid;
  gap: 8px;
}

.fbo-run {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.fbo-run:hover {
  border-color: var(--accent);
}

.fbo-run span:last-child {
  color: var(--accent);
  font-weight: 800;
}

.fbo-run code {
  overflow-wrap: anywhere;
}

.fbo-history-card {
  width: min(1480px, 100%);
  display: grid;
  gap: 14px;
}

.fbo-history-table {
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fbo-history-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(130px, .7fr) minmax(80px, .35fr) minmax(160px, .9fr) minmax(160px, .9fr) minmax(150px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.fbo-history-row:last-child { border-bottom: 0; }
.fbo-history-row strong { overflow-wrap: anywhere; }
.fbo-history-reason { display: block; margin-top: 5px; color: #991b1b; font-style: normal; }
.fbo-run-navigation { align-items: center; }
.fbo-run-navigation span { margin-right: auto; color: var(--muted); font-size: 13px; }

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

.user-admin-check {
  min-height: 42px;
  align-items: center;
  padding-bottom: 2px;
}

.password-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(22, 163, 74, .20);
  background: rgba(22, 163, 74, .08);
  border-radius: 8px;
}

.password-result div {
  display: grid;
  gap: 2px;
}

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

.password-result code {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .08);
  font-size: 14px;
  white-space: nowrap;
}

.users-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.users-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(130px, .55fr) minmax(120px, .55fr) minmax(160px, .7fr) minmax(360px, 1.5fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .62);
  border-bottom: 1px solid var(--line);
}

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

.users-head {
  background: rgba(15, 23, 42, .045);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.users-row strong,
.users-row em {
  display: block;
}

.users-row em {
  margin-top: 2px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.manager-card-settings {
  display: grid;
  gap: 14px;
}

.assignment-controls {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(180px, .8fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
}

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

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 9px;
  background: #fff;
  color: #1f2937;
  font-weight: 800;
  cursor: pointer;
}

.file-button input {
  display: none;
}

.assignment-layout {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(360px, 1.15fr);
  gap: 12px;
}

.assignment-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.assignment-title {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.assignment-list {
  display: grid;
  gap: 7px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.assignment-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.assignment-row.assignment-missing {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(255, 245, 245, .82);
}

.assignment-row img,
.assignment-image-placeholder,
.assignment-thumb {
  width: 44px;
  height: 54px;
  border-radius: 7px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.18);
}

.assignment-row strong,
.assignment-row span,
.assignment-row em {
  display: block;
  min-width: 0;
}

.candidate-check {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 107, 44, 0.32);
  border-radius: 8px;
  background: rgba(255, 107, 44, 0.08);
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.candidate-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.candidate-check.disabled {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.10);
  color: #667085;
  cursor: default;
}

.assignment-row strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-row em {
  margin-top: 2px;
  color: #b45309;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.bidder-panel {
  display: grid;
  gap: 14px;
}

.bidder-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  gap: 12px;
  align-items: start;
}

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

.bidder-form label:nth-child(1),
.bidder-form label:nth-child(2),
.bidder-form-actions {
  grid-column: 1 / -1;
}

.bidder-rules,
.bidder-actions-list {
  display: grid;
  gap: 8px;
}

.bidder-row,
.bidder-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
}

.bidder-row strong,
.bidder-action-row strong,
.bidder-row span,
.bidder-action-row span,
.bidder-row em,
.bidder-action-row em {
  display: block;
  min-width: 0;
}

.bidder-row strong,
.bidder-action-row strong {
  color: #1f2937;
  font-size: 13px;
}

.bidder-row span,
.bidder-action-row span {
  color: var(--muted);
  font-size: 12px;
}

.bidder-row em,
.bidder-action-row em {
  margin-top: 3px;
  color: #475467;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.bidder-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bidder-testbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px));
  gap: 10px;
  align-items: end;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-subtitle, .muted {
  color: var(--muted);
}

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

.metric {
  border-radius: 8px;
  padding: 10px 12px;
}

.compact-metric {
  min-width: 92px;
  display: grid;
  gap: 2px;
  box-shadow: none;
}

.compact-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.compact-metric strong {
  font-size: 20px;
}

.compact-metric.attention strong {
  color: var(--danger);
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
}

.content-grid,
.main-only {
  min-width: 0;
}

.panel {
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}

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

.workbar {
  position: sticky;
  top: 96px;
  z-index: 110;
  display: grid;
  gap: 10px;
}

.workbar-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(150px, .75fr) minmax(150px, .7fr) minmax(180px, .85fr);
  gap: 10px;
  align-items: end;
}

.workbar-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-check {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 10px;
}

.chip-row, .toolbar, .toggle-row, .inline-form, .table-controls, .table-head, .table-row, .account-group-row, .row-card, .row-meta, .gallery-row, .merge-section-head {
  display: flex;
  gap: 10px;
}

.inline-form {
  flex-wrap: wrap;
}

.inline-form > label {
  flex: 1 1 220px;
}

.inline-toggle-wrap {
  display: flex;
  align-items: end;
  flex: 1 1 360px;
}

.toolbar, .table-controls, .merge-section-head {
  align-items: center;
  justify-content: space-between;
}

.toggle-row { align-items: center; flex-wrap: wrap; }
.chip-row { flex-wrap: wrap; }

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

.button {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--surface-strong);
  cursor: pointer;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.button:hover,
.date-range-button:hover,
.calendar-preset:hover,
.merge-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.button:focus-visible,
input:focus,
select:focus,
.date-range-button:focus-visible,
.calendar-day:focus-visible,
.merge-card:focus-visible {
  outline: 2px solid rgba(255, 107, 44, 0.42);
  outline-offset: 2px;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), #ff8a33);
  color: #fff;
  box-shadow: none;
}

.button.ghost {
  background: rgba(255,255,255,.55);
}

.button.danger {
  background: rgba(220, 38, 38, .10);
  color: #991b1b;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .20);
}

.button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.button.full { width: 100%; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}

select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.08));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%,
    calc(100% - 32px) 50%;
  background-size: 5px 5px, 5px 5px, 1px 20px;
  background-repeat: no-repeat;
}

input:hover,
select:hover {
  border-color: rgba(255, 107, 44, 0.34);
  background-color: #fff;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

label.field-error input {
  border-color: rgba(220, 38, 38, .42);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .10);
}

label.field-error small {
  color: var(--danger);
}

.table {
  border-radius: 8px;
  overflow: visible;
  isolation: isolate;
  min-width: 340px;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-scroll {
  position: relative;
  max-height: calc(100vh - 162px);
  overflow: auto;
  padding: 0 0 8px;
}

.table-head, .table-row, .account-group-row {
  align-items: stretch;
  border-top: 1px solid var(--line);
  width: max-content;
}

.table-head {
  position: sticky;
  top: 0;
  z-index: 95;
  background: #fff;
  font-weight: 700;
  color: #475467;
  box-shadow: 0 1px 0 var(--line), 0 8px 18px rgba(15, 23, 42, 0.04);
}

.table-row {
  background: #fff;
  transition: background .14s ease;
}

.table-row > div {
  background: #fff;
  transition: background .14s ease, box-shadow .14s ease;
}

.table-row:hover {
  background: #fff6ed;
}

.table-row:hover > div {
  background-color: #fff6ed;
  box-shadow: inset 0 1px 0 rgba(255, 107, 44, 0.12), inset 0 -1px 0 rgba(255, 107, 44, 0.12);
}

.table-row:hover .sticky-col {
  background-color: #fff0e5;
  box-shadow: 1px 0 0 rgba(255, 107, 44, 0.18), inset 0 1px 0 rgba(255, 107, 44, 0.12), inset 0 -1px 0 rgba(255, 107, 44, 0.12);
}

.table-row:hover .sheet-day,
.table-row:hover .day-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 107, 44, 0.22);
}

.current-day-head {
  display: grid;
  gap: 2px;
  color: #111827;
}

.current-day-head em {
  font-size: 11px;
  font-style: normal;
  color: var(--accent-dark);
  font-weight: 800;
}

.table-head > div, .table-row > div, .account-group-row > div {
  padding: 10px 12px;
}

.col-product { width: 380px; min-width: 380px; }
.col-day { width: 286px; }

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 40;
  background: #fff;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.06);
}

.sticky-product { left: 0; }

.table-head .sticky-col {
  background: #fff;
  z-index: 90;
}

.account-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

.account-inline strong { color: #25324a; font-size: 13px; }
.account-inline em { color: #667085; font-style: normal; }
.account-inline .account-freshness { margin-left: auto; color: #17803d; text-align: right; }
.account-inline .account-freshness.stale { color: #a2410e; }

.mobile-list {
  display: none;
}

.row-card { align-items: flex-start; gap: 11px; }
.product-table-row.expanded .sticky-col,
.size-table-row-flat .sticky-col {
  background: #fbfdff;
}

.size-table-row-flat > div {
  background: #fbfdff;
}

.size-left-cell {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-content: start;
  min-height: 92px;
}

.size-left-cell strong {
  color: #1f2937;
  font-size: 15px;
}

.size-left-cell em {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.size-turnover {
  grid-column: 2;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2457a6;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.size-turnover b { font-weight: 900; }
.size-turnover.stale { background: #fff1df; color: #9a4a08; }
.size-turnover.zero,
.size-turnover.muted { background: #eef2f6; color: #667085; }

.row-expand-button,
.row-expand-spacer {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.row-expand-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-weight: 900;
  cursor: pointer;
}

.row-expand-button.open {
  border-color: rgba(255, 107, 44, 0.34);
  color: var(--accent-dark);
  background: rgba(255, 107, 44, 0.08);
}
.row-card > div {
  min-width: 0;
}
.row-card img,
.row-thumb,
.merge-thumb,
.product-image-placeholder {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
  background: rgba(148, 163, 184, 0.18);
}

.row-product-visual,
.mobile-product-visual {
  display: grid;
  flex: 0 0 82px;
  width: 82px;
  gap: 6px;
  justify-items: stretch;
}

.row-image-link {
  display: block;
  width: max-content;
  color: inherit;
  text-decoration: none;
}

.stock-price-action {
  display: grid;
  gap: 1px;
  width: 82px;
  min-height: 36px;
  padding: 5px 6px;
  border: 1px solid #cfe1fb;
  border-radius: 7px;
  background: #f5f9ff;
  color: #1d4ed8;
  cursor: pointer;
  text-align: left;
}

.stock-price-action:hover {
  border-color: #93b9f5;
  background: #eaf2ff;
}

.stock-price-action strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-price-action span {
  color: #64748b;
  font-size: 9px;
  line-height: 1.15;
}

.row-size-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.row-size-action .ui-icon { width: 14px; height: 14px; }
.row-size-action:hover span { text-decoration: underline; text-underline-offset: 2px; }

.product-image-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.row-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.row-title-link {
  color: var(--text);
  text-decoration: none;
}

.row-title-link:hover {
  color: #2457a6;
  text-decoration: underline;
}

.sidebar-brand,
.nav-item,
.home-shortcut,
.home-actions .button {
  text-decoration: none;
}

.row-meta {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.row-badges {
  margin-top: 8px;
}

.product-signals { margin-top: 5px; }
.product-signals a {
  font-weight: 700;
  text-decoration: none;
}

.size-button {
  margin-top: 8px;
  width: fit-content;
  border: 1px solid rgba(36, 87, 166, 0.22);
  border-radius: 7px;
  background: rgba(36, 87, 166, 0.08);
  color: #2457a6;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-menu-button.active {
  box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.42);
  background: rgba(255, 107, 44, 0.08);
}

.filter-popover {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
}

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

.mini-button {
  padding: 7px 10px;
}

.ad-summary {
  color: #2457a6;
  font-weight: 800;
}

.ad-summary-empty {
  color: #98a2b3;
  font-weight: 700;
}

.ad-campaign-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.ad-inactive-toggle {
  justify-self: start;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ad-inactive-group { display: grid; gap: 5px; }

.ad-campaign {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  align-items: center;
  padding: 6px 7px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.035);
  color: #344054;
  text-decoration: none;
  font-size: 11px;
}

.ad-campaign.active {
  background: rgba(22, 163, 74, 0.09);
}

.ad-campaign.inactive {
  color: #667085;
}

.ad-status {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  font-weight: 900;
}

.ad-campaign.active .ad-status {
  color: #166534;
  background: rgba(22, 163, 74, 0.17);
}

.ad-spend {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,.72);
}

.ad-spend-head,
.ad-spend-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 6px;
}

.ad-spend-values > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: center;
}

.ad-spend em,
.ad-spend b,
.ad-spend small {
  font-style: normal;
  text-align: center;
}

.ad-spend em {
  color: #667085;
  font-size: 10px;
  font-weight: 800;
}

.ad-spend-values b { color: #172554; font-size: 11px; }
.ad-spend-values small { color: #667085; font-size: 9px; line-height: 1.25; }
.ad-metrics-stale { color: #9a6700 !important; text-align: left !important; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(15,23,42,.06);
}

.badge.warn { background: rgba(245, 158, 11, 0.16); color: #9a6700; }
.badge.good { background: rgba(22, 163, 74, 0.16); color: #166534; }
.badge.danger { background: rgba(220, 38, 38, 0.14); color: #991b1b; }

.day-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.day-card strong { font-size: 14px; }
.summary-lines {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #46505f;
}

.summary-warehouse {
  display: grid;
  gap: 3px;
}

.summary-warehouse strong {
  font-size: 13px;
  font-weight: 700;
}

.summary-totals {
  padding-top: 6px;
  border-top: 1px dashed rgba(15, 23, 42, 0.14);
  font-weight: 700;
}

.sheet-day {
  display: grid;
  gap: 4px;
  align-self: start;
  min-height: 0;
  padding: 8px 10px 10px;
  border-radius: 4px;
  background: #fffefb;
  border: 1px solid rgba(118, 92, 54, 0.12);
  box-shadow: none;
}

.sheet-day.state-central-low {
  background: linear-gradient(180deg, rgba(255,244,232,.95), rgba(255,255,255,.88));
  border-color: rgba(245, 158, 11, 0.28);
}

.sheet-day.state-central-zero {
  background: linear-gradient(180deg, rgba(255,240,228,.96), rgba(255,251,247,.92));
  border-color: rgba(234, 88, 12, 0.35);
}

.sheet-day.state-card-zero {
  background: linear-gradient(180deg, rgba(255,236,235,.98), rgba(255,247,246,.94));
  border-color: rgba(220, 38, 38, 0.30);
}

.sheet-line {
  font-size: 12.5px;
  line-height: 1.26;
}

.orders-line {
  color: #23824b;
  font-weight: 700;
}

.movement-line,
.muted-line {
  color: #667085;
}

.movement-separator { color: #cbd5e1; }
.returns-in-transit small { display: block; color: #94a3b8; font-size: 9px; line-height: 1.2; }

.sheet-divider {
  color: #a49b90;
  font-size: 11px;
  letter-spacing: .35px;
}

.region-block {
  display: grid;
  gap: 2px;
  margin-top: 5px;
}

.region-title {
  color: #305ea8;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.region-title-alert {
  color: #c25122;
}

.warehouse-line {
  color: #1f2937;
  padding-left: 2px;
  overflow-wrap: anywhere;
}

.size-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 10px;
  color: #4b5563;
  font-size: 12px;
}

.size-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 4px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.size-summary span {
  border-radius: 6px;
  background: rgba(36, 87, 166, 0.08);
  color: #2457a6;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 800;
}

.size-stock-details {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(118, 92, 54, 0.20);
}

.size-stock-title {
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.size-stock-row {
  display: grid;
  gap: 5px;
  padding: 7px 0 0;
  border-top: 1px dotted rgba(118, 92, 54, 0.18);
  background: transparent;
}

.size-stock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.size-stock-head strong {
  color: #344054;
  font-size: 12.5px;
}

.size-stock-head span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.size-region-block {
  display: grid;
  gap: 2px;
  margin-top: 3px;
}

.warehouse-line-alert {
  color: #c25122;
  font-weight: 700;
}

.fbs-line,
.fbs-total-alert {
  color: #b42318;
  font-weight: 700;
}

.total-line {
  margin-top: 2px;
  font-weight: 800;
}

.event-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.event-chip,
.warehouse-event {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.event-chip {
  padding: 6px 9px;
}

.warehouse-event {
  margin-left: 6px;
  padding: 4px 7px;
}

.chip-supply,
.warehouse-event.supply {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.chip-return,
.warehouse-event.return {
  background: rgba(180, 83, 9, 0.14);
  color: #b45309;
}

.chip-ambiguous,
.warehouse-event.ambiguous {
  background: rgba(107, 114, 128, 0.14);
  color: #4b5563;
}

.chip-zero {
  background: rgba(220, 38, 38, 0.14);
  color: #b42318;
}

.sheet-spacer {
  height: 2px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.55);
}

.list-item small { color: var(--muted); display: block; }

.switch {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  position: relative;
  border: 0;
  background: rgba(148,163,184,.45);
  cursor: pointer;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}

.switch.on {
  background: rgba(255,107,44,.7);
}

.switch.on::after {
  transform: translateX(18px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15,23,42,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card, .auth-card {
  border-radius: 8px;
  width: min(1100px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}

.password-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.password-input input {
  min-width: 0;
}

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

.modal-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

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

.gallery-row {
  flex-wrap: wrap;
}

.merge-thumb {
  width: 92px;
  height: 120px;
}

.merge-group {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.05);
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.helper {
  font-size: 12px;
  color: var(--muted);
}

.date-range-control {
  position: relative;
  flex: 1 1 400px;
  z-index: 1;
}

.date-range-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 107, 44, 0.55);
  border-radius: 4px;
  background: #fff;
  color: #111827;
  padding: 10px 13px;
  font: inherit;
  cursor: pointer;
}

.date-range-button.active {
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.14);
}

.calendar-mark {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--accent-dark);
  color: var(--accent-dark);
  font-size: 0;
  position: relative;
}

.calendar-mark::before,
.calendar-mark::after {
  content: "";
  position: absolute;
  background: var(--accent-dark);
}

.calendar-mark::before {
  width: 10px;
  height: 2px;
  top: 4px;
}

.calendar-mark::after {
  width: 2px;
  height: 10px;
  left: 5px;
  top: 6px;
  box-shadow: 5px 0 0 var(--accent-dark);
}

.calendar-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 112px 20px 24px;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(3px);
}

.calendar-popover {
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100vh - 136px);
  overflow: auto;
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid #d7d2df;
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.22);
  padding: 16px;
}

.calendar-head,
.calendar-body {
  display: grid;
  gap: 14px;
}

.calendar-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--line);
}

.calendar-head strong {
  display: block;
  font-size: 18px;
}

.calendar-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-body {
  grid-template-columns: minmax(0, 1fr) 190px;
}

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

.calendar-month-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 16px;
  padding: 0 2px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays span {
  padding: 6px 0;
  text-align: center;
  font-size: 12px;
  color: #4b5563;
}

.calendar-weekdays span:nth-last-child(-n + 2) {
  color: #ff6b2c;
}

.calendar-day {
  min-width: 0;
  height: 38px;
  border: 1px solid #d8d8e2;
  background: #fff;
  color: #111827;
  font: inherit;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.calendar-day:hover {
  background: #fff6ed;
  border-color: #ffb089;
  color: #9a3412;
}

.calendar-day.empty-day {
  border-color: transparent;
  pointer-events: none;
}

.calendar-day.selected {
  background: #eef0ff;
  border-color: #c8d1ff;
}

.calendar-day.edge {
  background: #ffede3;
  border-color: #ff9f73;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.32);
}

.calendar-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.calendar-preset {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.calendar-preset:hover {
  border-color: rgba(255, 107, 44, 0.42);
  background: #fff6ed;
}

.date-readonly,
.date-input {
  background: #f8f8fb;
  color: #111827;
  font-weight: 700;
}

.notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 420;
  width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.notice-success {
  border-color: rgba(22, 163, 74, 0.22);
  color: #166534;
}

.notice-error {
  border-color: rgba(220, 38, 38, 0.24);
  color: #991b1b;
}

.merge-picker {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

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

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

.filter-title {
  font-size: 16px;
  font-weight: 800;
}

.advanced-filter {
  display: grid;
  gap: 10px;
}

.advanced-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.76);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}

.advanced-filter-toggle span {
  font-weight: 800;
}

.advanced-filter-toggle strong {
  color: #2457a6;
  font-size: 13px;
}

.advanced-filter-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,250,246,.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.filter-group-label {
  margin-bottom: 8px;
  font-weight: 800;
}

.selected-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-filter-summary span {
  border-radius: 7px;
  background: rgba(36, 87, 166, 0.08);
  color: #2457a6;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.merge-selected-summary {
  margin-top: 14px;
}

.merge-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.merge-search:focus-within {
  border-color: rgba(255, 107, 44, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.10);
}

.merge-search span {
  color: #667085;
  font-size: 18px;
}

.merge-search input {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 10px 0;
}

.merge-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.merge-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.merge-card.active {
  border-color: var(--accent);
  background: rgba(255, 107, 44, 0.05);
  box-shadow: 0 8px 20px rgba(255, 107, 44, 0.14);
}

.merge-card img,
.merge-card-image,
.merge-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #98a2b3;
  font-size: 26px;
}

.merge-image-grid {
  width: 72px;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  overflow: hidden;
  border-radius: 6px;
}

.merge-image-grid.count-1 {
  display: block;
}

.merge-image-grid img,
.merge-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.merge-card-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.merge-card-copy strong,
.merge-card-copy em {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.merge-card-copy strong {
  -webkit-line-clamp: 2;
  color: #111827;
  font-size: 13px;
  line-height: 1.3;
}

.merge-card-copy em {
  -webkit-line-clamp: 1;
  color: #667085;
  font-size: 11px;
  font-style: normal;
}

.merge-card > b {
  align-self: start;
  border-radius: 999px;
  background: #eef4ff;
  color: #2457a6;
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 11px;
}

.mini-empty { padding: 16px; }

.size-modal { width: min(720px, 100%); }

.merge-modal { width: min(760px, 100%); }

.api-modal { width: min(900px, 100%); }

.api-account-list {
  display: grid;
  gap: 12px;
}

.api-add-form {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(230px, 1.3fr) auto;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(22, 163, 74, .28);
  border-radius: 8px;
  background: rgba(240, 253, 244, .72);
}

.api-add-title {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}

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

.api-account-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.3fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.62);
}

.api-account-info {
  display: grid;
  gap: 5px;
}

.api-account-info strong {
  font-size: 15px;
}

.api-account-info span {
  font-size: 12px;
  font-weight: 700;
}

.api-access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.token-access-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #334155;
}

.token-access-summary strong,
.token-access-summary span,
.token-access-summary em {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-style: normal;
}

.token-access-summary strong { background: #dbeafe; color: #1d4ed8; }
.token-access-summary span { background: #dcfce7; color: #166534; }
.token-access-summary em { background: #f1f5f9; color: #475569; }

.api-access,
.api-access-pending {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.api-access-ok { background: #dcfce7; color: #166534; }
.api-access-missing { background: #fee2e2; color: #b91c1c; }
.api-access-unknown,
.api-access-pending { background: #f1f5f9; color: #475569; }

.token-ok { color: #047857; }

.token-empty { color: #b45309; }

.token-error { color: #b91c1c; }

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

.seller-session {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(280px, 1.35fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.seller-session.connected { border-color: #bbf7d0; background: #f7fdf9; }
.seller-session.expired { border-color: #fed7aa; background: #fffaf5; }
.seller-session-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seller-session-head > div { display: grid; gap: 2px; }
.seller-session-head strong { color: #172554; font-size: 13px; }
.seller-session-head span:not(.badge),
.seller-session small { color: #64748b; font-size: 11px; line-height: 1.4; }
.seller-login-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px; }
.seller-session-meta { display: grid; gap: 3px; color: #475569; font-size: 11px; }
.seller-session-meta em { color: #b45309; font-style: normal; }
.seller-session-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

@media (max-width: 900px) {
  .seller-session { grid-template-columns: 1fr; }
  .seller-session-actions { justify-content: flex-start; }
}

.wb-tags-list {
  display: grid;
  gap: 8px;
}

.wb-tag-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, .6fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.wb-tag-row:last-child { border-bottom: 0; }

.wb-tag-row div {
  display: grid;
  gap: 3px;
}

.wb-tag-row span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
}

.modal-actions {
  position: sticky;
  bottom: -22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px -22px -22px;
  padding: 14px 22px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}

.size-table {
  display: grid;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.size-table-head,
.size-table-row {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, minmax(0, .8fr));
}

.real-size-table .size-table-head,
.real-size-table .size-table-row {
  grid-template-columns: .7fr .7fr .7fr .7fr .7fr .7fr minmax(180px, 1.8fr);
}

.size-table-head {
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.size-table-head span,
.size-table-row span,
.size-table-row strong {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.size-table-row:last-child span,
.size-table-row:last-child strong {
  border-bottom: 0;
}

.empty {
  padding: 34px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr; }
  .workbar-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bidder-grid {
    grid-template-columns: 1fr;
  }
  .user-create-form,
  .fbo-upload-form,
  .fbo-summary,
  .fbo-problems-head,
  .fbo-problem-row,
  .fbo-write-row,
  .fbo-row,
  .fbo-run,
  .users-row {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .fbo-table { min-width: 0; }
  .user-actions {
    justify-content: flex-start;
  }
  .calendar-popover {
    width: min(720px, calc(100vw - 32px));
  }
  .calendar-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    background: #f5f7fb;
  }

  .shell {
    padding: 8px;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-bottom: 8px;
    padding: 9px;
    border-radius: 10px;
  }

  .slim-topbar {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 17px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .sync-status {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 4px 6px;
    font-size: 11px;
  }

  .sync-status em {
    grid-column: 2;
  }

  .sync-status strong,
  .sync-status em {
    white-space: normal;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    justify-content: stretch;
  }

  .section-actions {
    grid-template-columns: 1fr 1fr;
  }

  .section-select-label {
    grid-column: span 2;
  }

  .bidder-form,
  .bidder-testbar,
  .bidder-row,
  .bidder-action-row {
    grid-template-columns: 1fr;
  }

  .bidder-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .compact-metric {
    min-width: 0;
    padding: 7px 9px;
  }

  .compact-metric strong {
    font-size: 18px;
  }

  .topbar-actions .button {
    width: 100%;
    padding: 9px 10px;
  }

  .workbar {
    position: static;
    padding: 10px;
    border-radius: 10px;
  }

  .workbar-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .assignment-controls,
  .assignment-layout {
    grid-template-columns: 1fr;
  }

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

  .assignment-row .button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .workbar-main label:nth-of-type(2),
  .workbar-main label:nth-of-type(3) {
    display: none;
  }

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

  .workbar-secondary > .button,
  .inline-check {
    width: 100%;
  }

  .inline-check {
    justify-content: flex-start;
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--line);
  }

  .date-range-button,
  input,
  select,
  .button {
    min-height: 42px;
  }

  .panel {
    margin-bottom: 8px;
  }

  .table-panel {
    display: none;
  }

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

  .mobile-account {
    display: grid;
    gap: 8px;
  }

  .mobile-account-head {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  }

  .mobile-account-head strong {
    font-size: 13px;
  }

  .mobile-account-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
  }

  .mobile-product {
    display: grid;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  }

  .mobile-product-head {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    min-width: 0;
  }

  .mobile-product-head img,
  .mobile-thumb {
    width: 54px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
    background: rgba(148, 163, 184, 0.18);
  }

  .mobile-product-visual {
    flex-basis: 78px;
    width: 78px;
  }

  .mobile-product-visual .stock-price-action { width: 78px; }

  .mobile-product-head > div {
    min-width: 0;
  }

  .mobile-article {
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mobile-actions .size-button {
    margin-top: 0;
  }

  .mobile-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-day {
    flex: 0 0 280px;
    scroll-snap-align: start;
    display: grid;
    gap: 5px;
    padding: 9px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
  }

  .mobile-day.current {
    background: #fff2e8;
    border-color: rgba(255, 107, 44, 0.34);
  }

  .mobile-sizes {
    display: grid;
    gap: 8px;
  }

  .mobile-size-block {
    display: grid;
    gap: 7px;
    padding: 8px;
    border-radius: 8px;
    background: #f8fbff;
    border: 1px solid rgba(36, 87, 166, 0.10);
  }

  .mobile-size-title {
    position: sticky;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-width: 48px;
    padding: 4px 8px;
    border-radius: 7px;
    background: #fff;
    color: #1f2937;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  }

  .mobile-size-title .size-turnover {
    grid-column: auto;
    padding: 2px 6px;
  }

  .mobile-size-day {
    background: #fbfdff;
  }

  .mobile-day-date {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
  }

  .mobile-day-date strong,
  .mobile-day-orders {
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-day-date span {
    color: var(--accent-dark);
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-day-line {
    color: #46505f;
    font-size: 11px;
  }

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

  .row-title {
    font-size: 13px;
    line-height: 1.15;
  }

  .row-meta,
  .summary-lines,
  .sheet-line { font-size: 11px; }

  .row-badges {
    gap: 5px;
    margin-top: 6px;
  }

  .badge,
  .size-button,
  .event-chip,
  .warehouse-event {
    font-size: 10px;
    padding: 4px 6px;
  }

  .day-card,
  .sheet-day {
    padding: 8px;
    gap: 5px;
  }

  .toggle-row { align-items: flex-start; }
  .calendar-layer {
    align-items: stretch;
    padding: 10px;
  }

  .calendar-popover {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .calendar-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .calendar-months { grid-template-columns: 1fr; }

  .calendar-day {
    height: 34px;
    font-size: 13px;
  }

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

  .calendar-side label {
    grid-column: span 2;
  }

  .modal {
    padding: 8px;
  }

  .modal-card,
  .auth-card {
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .merge-modal,
  .size-modal,
  .api-modal {
    width: 100%;
  }

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

  .api-account-card {
    grid-template-columns: 1fr;
  }

  .api-add-form {
    grid-template-columns: 1fr;
  }

  .wb-tag-row {
    grid-template-columns: 1fr;
  }

  .api-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .merge-card {
    grid-template-columns: 64px minmax(0, 1fr);
    width: 100%;
    min-height: 80px;
    height: auto;
  }

  .merge-sections {
    grid-template-columns: 1fr;
    max-height: 58vh;
  }

  .merge-card > b {
    grid-column: 2;
    justify-self: start;
  }

  .modal-actions {
    margin: 14px -14px -14px;
    padding: 12px 14px;
  }

  .notice {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }

  .table-controls {
    align-items: flex-start;
    flex-direction: column;
  }
  .table-controls > .chip-row,
  .merge-actions {
    width: 100%;
  }
  .merge-filter-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.bulk-prices-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.bulk-price-builder, .bulk-price-results, .bulk-runs { width: 100%; min-width: 0; padding: 18px; }
.bulk-price-head, .bulk-results-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bulk-price-head h2, .bulk-results-head h2 { margin: 0; font-size: 18px; }
.bulk-price-head p, .bulk-results-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.bulk-mode-tabs { display: flex; padding: 3px; border-radius: 10px; background: #f1f5f9; }
.bulk-mode-tabs button { padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: #64748b; cursor: pointer; font-weight: 700; }
.bulk-mode-tabs button.active { background: #fff; color: #6d28d9; box-shadow: 0 1px 4px rgb(15 23 42 / 12%); }
.bulk-price-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.bulk-price-fields label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.bulk-price-fields input, .bulk-price-fields select { width: 100%; min-width: 0; }
.bulk-results-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bulk-table-wrap { margin-top: 14px; overflow: auto; max-height: 68vh; border: 1px solid var(--line); border-radius: 12px; }
.bulk-price-table { width: 100%; min-width: 1160px; border-collapse: collapse; font-size: 12px; }
.bulk-price-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.bulk-price-table th, .bulk-price-table td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.bulk-price-table td:nth-child(2) { min-width: 240px; white-space: normal; }
.bulk-price-table td:nth-child(2) strong, .bulk-price-table td:nth-child(2) span, .bulk-price-table td:nth-child(7) small { display: block; }
.bulk-price-table td:nth-child(2) span, .bulk-price-table td:nth-child(7) small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.bulk-product-link, .bulk-applied-table a { color:inherit; text-decoration:none; }
.bulk-product-link:hover strong, .bulk-applied-table a:hover strong { color:#6d28d9; text-decoration:underline; }
.bulk-positive { color: #15803d; font-weight: 800; }
.bulk-run-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.bulk-run-summary .button { margin-left: auto; }
.bulk-applied-wrap { margin-top:12px; overflow:auto; border:1px solid var(--line); border-radius:11px; }
.bulk-applied-table { width:100%; min-width:1050px; border-collapse:collapse; font-size:12px; }
.bulk-applied-table th,.bulk-applied-table td { padding:10px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }
.bulk-applied-table th { background:#f8fafc; color:var(--muted); font-size:10px; text-transform:uppercase; }
.bulk-applied-table td:first-child { min-width:240px; white-space:normal; }
.bulk-applied-table td:first-child strong,.bulk-applied-table td:first-child small { display:block; }
.bulk-applied-table td:first-child small { margin-top:3px; color:var(--muted); }
.bulk-applied-table tr.is-error td { color:#991b1b; }
.bulk-empty { display: grid; gap: 4px; padding: 28px; color: var(--muted); text-align: center; }
.bulk-empty strong { color: var(--text); }

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

@media (max-width: 720px) {
  .bulk-price-head, .bulk-results-head { display: grid; }
  .bulk-mode-tabs { width: 100%; }
  .bulk-mode-tabs button { flex: 1; }
  .bulk-price-fields { grid-template-columns: minmax(0, 1fr); }
  .bulk-results-head > div:last-child, .bulk-results-head .button { width: 100%; }
  .bulk-results-head .button { flex: 1; }
  .bulk-run-summary .button { width: 100%; margin-left: 0; }
}

/* Unit economics keeps forecast assumptions separate from closed WB report facts. */
.economics-workspace { display:grid; min-width:0; max-width:100%; gap:12px; }
.economics-status { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; }
.economics-status > div { display:flex; align-items:center; gap:10px; min-width:0; }
.economics-status > div > span:last-child { display:grid; gap:2px; min-width:0; }
.economics-status strong { color:#1e293b; font-size:13px; }
.economics-status em { overflow:hidden; max-width:900px; color:#64748b; font-size:11px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.economics-status .button { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.economics-status .ui-icon { width:16px; height:16px; }
.economics-tabs { display:flex; gap:4px; padding:4px; border:1px solid #dfe6ef; border-radius:8px; background:#fff; width:max-content; max-width:100%; }
.economics-tabs button { min-height:36px; padding:0 14px; border:0; border-radius:6px; background:transparent; color:#64748b; font-weight:800; cursor:pointer; }
.economics-tabs button:hover { color:#1e3a8a; background:#f8fafc; }
.economics-tabs button.active { color:#fff; background:#2563eb; box-shadow:0 1px 2px rgba(15,23,42,.12); }
.economics-filters { display:grid; min-width:0; max-width:100%; box-sizing:border-box; grid-template-columns:minmax(210px,1.25fr) minmax(130px,.65fr) minmax(150px,.75fr) 132px 132px auto; gap:10px; align-items:end; padding:14px 16px; }
.economics-filters label { display:grid; gap:5px; color:#475569; font-size:11px; font-weight:800; }
.economics-filters input,.economics-filters select { min-width:0; min-height:40px; }
.economics-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.economics-cards article { display:grid; gap:5px; min-height:105px; padding:16px; border:1px solid #dfe6ef; border-radius:8px; background:#fff; box-shadow:0 6px 18px rgba(15,23,42,.035); }
.economics-cards span { color:#64748b; font-size:11px; font-weight:750; }
.economics-cards strong { color:#172554; font-size:23px; line-height:1.1; }
.economics-cards strong.negative { color:#b91c1c; }
.economics-cards strong.warning { color:#b45309; }
.economics-cards em { align-self:end; color:#94a3b8; font-size:11px; font-style:normal; }
.economics-completeness { display:flex; align-items:center; gap:12px; padding:12px 14px; border-color:#fed7aa; background:#fff7ed; color:#9a3412; }
.economics-completeness span { flex:1; font-size:12px; }
.economics-completeness a { color:#9a3412; font-size:12px; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.economics-source-note { display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border-color:#bfdbfe; background:#eff6ff; }
.economics-source-note strong { color:#1e40af; font-size:12px; white-space:nowrap; }
.economics-source-note span { color:#475569; font-size:11px; line-height:1.45; }
.economics-shared { display:grid; grid-template-columns:auto minmax(220px,1fr); gap:4px 14px; padding:13px 16px; border-color:#fed7aa; background:#fffaf5; }
.economics-shared strong { color:#9a3412; font-size:12px; }
.economics-shared span { color:#64748b; font-size:11px; }
.economics-shared em { grid-column:2; color:#7c2d12; font-size:11px; font-style:normal; }
.economics-table { min-width:0; max-width:100%; overflow-x:auto; overflow-y:hidden; }
.economics-table-head,.economics-row { display:grid; grid-template-columns:minmax(360px,1.5fr) minmax(125px,.42fr) minmax(125px,.45fr) minmax(135px,.48fr) minmax(145px,.5fr) 38px; gap:12px; align-items:center; }
.economics-table-head { min-height:42px; padding:0 16px; border-bottom:1px solid #e2e8f0; color:#64748b; background:#f8fafc; font-size:11px; font-weight:850; }
.economics-row { min-height:94px; padding:11px 16px; border-bottom:1px solid #edf1f5; }
.economics-row:last-child { border-bottom:0; }
.economics-row:hover { background:#fbfdff; }
.economics-row.negative { box-shadow:inset 3px 0 #ef4444; }
.economics-product { display:grid; grid-template-columns:52px minmax(0,1fr); gap:11px; align-items:center; min-width:0; }
.economics-image { width:52px; height:66px; border-radius:6px; object-fit:cover; }
.product-image-placeholder.economics-image { width:52px; height:66px; }
.economics-product > span { display:grid; gap:3px; min-width:0; }
.economics-product a { overflow:hidden; color:#1e293b; font-size:12px; font-weight:850; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }
.economics-product a:hover { color:#1d4ed8; text-decoration:underline; }
.economics-product em,.economics-product small { overflow:hidden; color:#64748b; font-size:10px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.economics-product > span > div { display:flex; flex-wrap:wrap; gap:4px; margin-top:2px; }
.economics-product .manager-chip,.economics-warning { padding:3px 6px; border-radius:5px; background:#dcfce7; color:#166534; font-size:9px; font-weight:800; }
.economics-product .manager-chip.missing,.economics-warning { background:#fef3c7; color:#92400e; }
.economics-value,.economics-profit { display:grid; gap:3px; }
.economics-value em,.economics-profit em { color:#64748b; font-size:10px; font-style:normal; }
.economics-value strong,.economics-profit strong { color:#1e293b; font-size:14px; }
.economics-value small,.economics-profit small { color:#94a3b8; font-size:10px; }
.economics-profit.positive strong { color:#047857; }
.economics-profit.negative strong { color:#b91c1c; }
.economics-profit.incomplete strong { color:#b45309; }
.economics-expand { width:34px; height:34px; }
.economics-breakdown { grid-column:1 / -1; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin:2px 0 5px; padding:12px; border:1px solid #dbeafe; border-radius:7px; background:#f8fbff; }
.economics-breakdown.actual { grid-template-columns:repeat(6,minmax(0,1fr)); border-color:#e2e8f0; background:#f8fafc; }
.economics-breakdown span { display:grid; gap:3px; min-width:0; }
.economics-breakdown em { color:#64748b; font-size:9px; font-style:normal; }
.economics-breakdown strong { color:#1e293b; font-size:11px; }
.economics-breakdown p { grid-column:1 / -1; margin:3px 0 0; padding-top:8px; border-top:1px solid #dbe4ef; color:#64748b; font-size:10px; line-height:1.45; }
.economics-settings { overflow:hidden; }
.economics-settings-head { display:flex; align-items:end; justify-content:space-between; gap:20px; padding:18px; border-bottom:1px solid #e2e8f0; }
.economics-settings-head h2 { margin:0 0 4px; color:#1e293b; font-size:18px; }
.economics-settings-head p { margin:0; color:#64748b; font-size:11px; }
.economics-settings-head label { display:grid; gap:5px; width:min(280px,100%); color:#475569; font-size:11px; font-weight:800; }
.economics-settings form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; }
.economics-settings fieldset { display:grid; align-content:start; gap:11px; min-width:0; margin:0; padding:18px; border:0; border-right:1px solid #e2e8f0; }
.economics-settings fieldset:last-of-type { border-right:0; }
.economics-settings legend { padding:0 0 7px; color:#172554; font-size:12px; font-weight:850; }
.economics-settings fieldset > label { display:grid; gap:5px; color:#475569; font-size:10px; font-weight:750; }
.economics-settings fieldset > label > span { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; }
.economics-settings input,.economics-settings select { min-height:38px; min-width:0; }
.economics-settings fieldset em { color:#94a3b8; font-size:9px; font-style:normal; white-space:nowrap; }
.economics-settings-actions { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 18px; border-top:1px solid #e2e8f0; background:#f8fafc; }
.economics-settings-actions span { color:#64748b; font-size:10px; }

@media (max-width: 1450px) {
  .economics-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .economics-table { overflow-x:auto; }
  .economics-table-head,.economics-row { min-width:1100px; }
  .economics-settings form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .economics-settings fieldset:nth-of-type(2) { border-right:0; }
  .economics-settings fieldset:nth-of-type(-n+2) { border-bottom:1px solid #e2e8f0; }
}

@media (max-width: 720px) {
  .economics-status { align-items:stretch; flex-direction:column; }
  .economics-status em { white-space:normal; }
  .economics-status .button { justify-content:center; width:100%; }
  .economics-tabs { display:grid; grid-template-columns:1fr; width:100%; }
  .economics-filters,.economics-cards { grid-template-columns:1fr; }
  .economics-completeness { align-items:flex-start; flex-direction:column; }
  .economics-table { overflow:visible; }
  .economics-table-head { display:none; }
  .economics-row { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:14px; }
  .economics-product { grid-column:1 / -1; }
  .economics-profit { padding:8px; border-radius:6px; background:#f8fafc; }
  .economics-expand { justify-self:end; }
  .economics-breakdown,.economics-breakdown.actual { grid-column:1 / -1; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .economics-settings-head { align-items:stretch; flex-direction:column; }
  .economics-settings-head label { width:100%; }
  .economics-settings form { grid-template-columns:1fr; }
  .economics-settings fieldset { border-right:0; border-bottom:1px solid #e2e8f0; }
  .economics-settings-actions { align-items:stretch; flex-direction:column; }
  .economics-shared { grid-template-columns:1fr; }
  .economics-shared em { grid-column:1; }
}

/* Focused operational layout */
.app-frame { grid-template-columns: 236px minmax(0, 1fr); transition: grid-template-columns .18s ease; }
.app-frame.sidebar-is-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.app-sidebar { gap: 22px; padding: 18px 12px 14px; transition: padding .18s ease; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; }
.sidebar-brand { flex: 1; min-width: 0; padding: 0 6px; border: 0; background: transparent; color: #fff; text-align: left; cursor: pointer; }
.sidebar-brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.sidebar-collapse { flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: rgba(255,255,255,.06); color: #dbeafe; cursor: pointer; font: inherit; }
.sidebar-collapse:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.nav-glyph { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 5px; color: #bfdbfe; font-size: 11px; font-weight: 900; }
.nav-item.active .nav-glyph { background: rgba(96,165,250,.18); color: #fff; }
.sidebar-footer { grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 0 8px; padding: 10px; }
.user-avatar { display: grid; grid-row: span 2; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 12px; font-weight: 900; }
.sidebar-user-copy { display: grid; min-width: 0; gap: 2px; }
.sidebar-user-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { grid-column: 2; margin: 5px 0 0; }
.app-sidebar.collapsed { align-items: center; padding-inline: 12px; }
.app-sidebar.collapsed .sidebar-brand-row { width: 100%; justify-content: center; }
.app-sidebar.collapsed .sidebar-brand { flex: 0 0 32px; padding: 0; }
.app-sidebar.collapsed .sidebar-brand strong,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .sidebar-user-copy,
.app-sidebar.collapsed .sidebar-logout { display: none; }
.app-sidebar.collapsed .sidebar-collapse { position: absolute; top: 57px; transform: rotate(180deg); z-index: 2; }
.app-sidebar.collapsed .app-navigation { width: 100%; }
.app-sidebar.collapsed .nav-item { justify-content: center; padding: 0; }
.app-sidebar.collapsed .sidebar-footer { display: flex; padding: 7px; }
.app-sidebar.collapsed .user-avatar { margin: 0; }

.app-workspace { max-width: 1800px; padding: 30px clamp(18px, 3vw, 42px) 48px; }
.app-header { padding-bottom: 20px; }
.app-header h1 { font-size: 30px; }
.section-kicker { color: #2563eb; letter-spacing: .04em; }
.stock-status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 14px; }
.stock-status-line .sync-status { width: auto; min-width: 0; margin: 0; border: 1px solid var(--app-border); border-radius: 7px; background: #fff; }
.stock-status-line .sync-status em { max-width: min(44vw, 420px); }
.filters-primary { grid-template-columns: 210px minmax(150px, .7fr) minmax(240px, 1.15fr) auto; }
.filters-primary .stock-search-field { min-width: 0; }
.filters-primary .date-range-button { min-width: 0; font-variant-numeric: tabular-nums; }
.filter-popover { width: min(330px, calc(100vw - 40px)); max-height: 410px; padding: 10px; overflow: hidden; border-radius: 8px; box-shadow: 0 18px 50px rgba(15,23,42,.18); }
.filter-popover-head { padding: 2px 2px 9px; border-bottom: 1px solid #e7edf5; }
.filter-popover .chip-row { display: grid; grid-template-columns: 1fr; gap: 3px; max-height: 330px; margin-top: 8px; overflow-y: auto; padding-right: 2px; }
.filter-popover .chip-row .button { justify-content: flex-start; width: 100%; min-height: 34px; padding: 7px 9px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.filter-menu-button { border-color: #d7e1ef; background: #fff; }
.filter-menu-button.active { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }

.home-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.home-metric { display: grid; gap: 6px; min-height: 112px; padding: 16px; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.035); }
.home-metric span { color: #64748b; font-size: 12px; font-weight: 800; }
.home-metric strong { color: #14213d; font-size: 25px; font-variant-numeric: tabular-nums; }
.home-metric em { color: #64748b; font-size: 12px; font-style: normal; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 14px; }
.home-grid .section-panel { margin: 0; }
.home-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.home-card-title h2 { margin: 0; color: #172554; font-size: 18px; }
.home-card-title p { margin: 5px 0 0; color: #64748b; font-size: 13px; }
.status-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #94a3b8; }
.status-dot.ok { background: #16a34a; }.status-dot.running { background: #2563eb; }.status-dot.error { background: #dc2626; }
.home-status-card { display: grid; gap: 16px; min-height: 220px; }
.home-status-title { color: #172554; font-size: 22px; line-height: 1.25; }
.home-status-card > p { margin: -8px 0 0; color: #64748b; }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.home-shortcuts { display: grid; gap: 7px; }
.home-shortcut { display: grid; grid-template-columns: 38px 1fr; gap: 1px 10px; align-items: center; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #e7edf5; background: transparent; text-align: left; cursor: pointer; }
.home-shortcut:last-child { border-bottom: 0; }
.home-shortcut:hover strong { color: #2563eb; }
.home-shortcut > span { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: #eff6ff; color: #1d4ed8; font-size: 10px; font-weight: 900; }
.home-shortcut strong { color: #172554; font-size: 13px; }.home-shortcut em { color: #64748b; font-size: 12px; font-style: normal; }

.support-launcher { position: fixed; right: 22px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px 0 10px; border: 1px solid #cbd5e1; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.18); color: #172554; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }
.support-launcher span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 20px; font-weight: 400; line-height: 1; }
.support-launcher em { font-style: normal; }.support-launcher:hover { border-color: #2563eb; color: #1d4ed8; }

.feedback-inbox { overflow: hidden; border: 1px solid var(--app-border); border-radius: 8px; }
.feedback-inbox-title { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--app-border); background: #f8fafc; color: #172554; }
.feedback-inbox-title span { color: #64748b; font-size: 13px; font-weight: 800; }
.feedback-ticket-list { display: grid; }
.feedback-ticket { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-bottom: 1px solid #e7edf5; background: #fff; text-align: left; cursor: pointer; }
.feedback-ticket:hover { background: #f8fbff; }.feedback-ticket:last-child { border-bottom: 0; }
.feedback-ticket-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e0ecff; color: #1d4ed8; font-size: 12px; font-weight: 900; }
.feedback-ticket-copy { display: grid; min-width: 0; gap: 3px; }.feedback-ticket-copy strong { color: #172554; font-size: 13px; }.feedback-ticket-copy em { overflow: hidden; color: #64748b; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.feedback-ticket-meta { display: grid; justify-items: end; gap: 4px; }.feedback-ticket-meta em { color: #94a3b8; font-size: 11px; font-style: normal; }
.feedback-archive { border-top: 1px solid var(--app-border); }.feedback-archive summary { padding: 12px 14px; color: #475569; cursor: pointer; font-size: 13px; font-weight: 800; }.feedback-archive[open] summary { border-bottom: 1px solid var(--app-border); }
.feedback-thread-card { width: min(680px, 100%); }.feedback-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.feedback-thread-head > div { display: flex; align-items: center; gap: 9px; }.feedback-thread-head > div > div { display: grid; gap: 3px; }.feedback-thread-head strong { color: #172554; }.feedback-thread-head em { color: #64748b; font-size: 12px; font-style: normal; }
.feedback-message-bubble { margin-top: 18px; padding: 13px 14px; border-radius: 8px 8px 8px 2px; background: #f1f5f9; color: #1e293b; line-height: 1.5; white-space: pre-wrap; }
.feedback-thread-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }.feedback-thread-footer .feedback-actions { margin: 0; }

@media (max-width: 1020px) {
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: 1fr; }
  .filters-primary { grid-template-columns: 190px minmax(150px, .8fr) minmax(210px, 1fr); }
  .filters-primary > .button { justify-self: start; }
}

@media (max-width: 720px) {
  .app-frame, .app-frame.sidebar-is-collapsed { display: block; }
  .app-sidebar, .app-sidebar.collapsed { position: sticky; top: 0; z-index: 40; width: 100%; height: auto; min-height: 58px; padding: 8px 12px; flex-direction: row; align-items: center; background: #14213d; }
  .sidebar-brand-row { flex: 0 0 auto; }.sidebar-brand { width: auto; }.sidebar-collapse { display: none; }.app-sidebar.collapsed .sidebar-brand { flex: 1; }
  .app-sidebar.collapsed .sidebar-brand strong, .app-sidebar.collapsed .nav-label { display: inline; }.app-sidebar.collapsed .nav-item { justify-content: flex-start; padding: 0 10px; }
  .app-navigation { display: flex; flex: 1; gap: 2px; overflow-x: auto; }.nav-item { flex: 0 0 auto; min-height: 36px; }.nav-glyph { display: none; }.sidebar-footer { display: none !important; }
  .app-workspace { padding: 20px 14px 72px; }.app-header h1 { font-size: 25px; }
  .stock-status-line { align-items: stretch; flex-direction: column; }.stock-status-line .sync-status { width: 100%; }.stock-status-line .sync-status em { max-width: 100%; }.filters-primary { grid-template-columns: 1fr; }.filters-primary > .button { justify-self: stretch; }
  .home-metrics { grid-template-columns: 1fr 1fr; }.home-metric { min-height: 94px; }.home-metric strong { font-size: 21px; }
  .feedback-ticket { grid-template-columns: 30px minmax(0,1fr); }.feedback-ticket-meta { display: none; }.feedback-thread-footer { align-items: flex-start; flex-direction: column; }.support-launcher { right: 14px; bottom: 14px; }.support-launcher em { display: none; }.support-launcher { width: 46px; justify-content: center; padding: 0; }
}

@media (max-width: 440px) {
  .metrics { grid-template-columns: 1fr; }

  .workbar-secondary,
  .topbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .workbar-secondary #apply-filters {
    grid-column: span 2;
  }
}

/* Keep the newest workspace rules last: this file also contains legacy MVP styles. */
.app-frame { grid-template-columns: 236px minmax(0, 1fr); }
.app-frame.sidebar-is-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.app-sidebar { padding: 18px 12px 14px; gap: 22px; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0 6px; border: 0; background: transparent; color: #fff; cursor: pointer; }
.sidebar-brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.sidebar-collapse { flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: rgba(255,255,255,.06); color: #dbeafe; cursor: pointer; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.nav-glyph { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 5px; color: #bfdbfe; font-size: 11px; font-weight: 900; }
.sidebar-footer { grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 0 8px; padding: 10px; }
.user-avatar { display: grid; grid-row: span 2; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 12px; font-weight: 900; }
.sidebar-user-copy { display: grid; min-width: 0; gap: 2px; }.sidebar-user-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.sidebar-logout { grid-column: 2; margin: 5px 0 0; }
.app-sidebar.collapsed { align-items: center; padding-inline: 12px; }.app-sidebar.collapsed .sidebar-brand-row { width: 100%; justify-content: center; }.app-sidebar.collapsed .sidebar-brand { flex: 0 0 32px; padding: 0; }.app-sidebar.collapsed .sidebar-brand strong,.app-sidebar.collapsed .nav-label,.app-sidebar.collapsed .sidebar-user-copy,.app-sidebar.collapsed .sidebar-logout { display: none; }.app-sidebar.collapsed .sidebar-collapse { position: absolute; top: 57px; transform: rotate(180deg); z-index: 2; }.app-sidebar.collapsed .app-navigation { width: 100%; }.app-sidebar.collapsed .nav-item { justify-content: center; padding: 0; }.app-sidebar.collapsed .sidebar-footer { display: flex; padding: 7px; }
.app-workspace { max-width: 1800px; padding: 30px clamp(18px,3vw,42px) 48px; }.app-header { padding-bottom: 20px; }.app-header h1 { font-size: 30px; }
.stock-status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 14px; }.stock-status-line .sync-status { width: auto; min-width: 0; margin: 0; border: 1px solid var(--app-border); border-radius: 7px; background: #fff; }.stock-status-line .sync-status em { max-width: min(44vw,420px); }
.filters-primary { grid-template-columns: 210px minmax(150px,.7fr) minmax(240px,1.15fr) auto; }.filters-primary .stock-search-field { min-width: 0; }.filter-popover { width: min(330px,calc(100vw - 40px)); max-height: 410px; padding: 10px; overflow: hidden; border-radius: 8px; box-shadow: 0 18px 50px rgba(15,23,42,.18); }.filter-popover .chip-row { display: grid; grid-template-columns: 1fr; gap: 3px; max-height: 330px; margin-top: 8px; overflow-y: auto; padding-right: 2px; }.filter-popover .chip-row .button { justify-content: flex-start; width: 100%; min-height: 34px; padding: 7px 9px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.home-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }.home-metric { display: grid; gap: 6px; min-height: 112px; padding: 16px; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.035); }.home-metric span { color: #64748b; font-size: 12px; font-weight: 800; }.home-metric strong { color: #14213d; font-size: 25px; font-variant-numeric: tabular-nums; }.home-metric em { color: #64748b; font-size: 12px; font-style: normal; }.home-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 14px; }.home-grid .section-panel { margin: 0; }
.support-launcher { position: fixed; right: 22px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px 0 10px; border: 1px solid #cbd5e1; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.18); color: #172554; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }.support-launcher span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 20px; font-weight: 400; line-height: 1; }.support-launcher em { font-style: normal; }
.feedback-inbox { overflow: hidden; border: 1px solid var(--app-border); border-radius: 8px; }.feedback-inbox-title { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--app-border); background: #f8fafc; color: #172554; }.feedback-ticket-list { display: grid; }.feedback-ticket { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-bottom: 1px solid #e7edf5; background: #fff; text-align: left; cursor: pointer; }.feedback-ticket:hover { background: #f8fbff; }.feedback-ticket-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e0ecff; color: #1d4ed8; font-size: 12px; font-weight: 900; }.feedback-ticket-copy { display: grid; min-width: 0; gap: 3px; }.feedback-ticket-copy strong { color: #172554; font-size: 13px; }.feedback-ticket-copy em { overflow: hidden; color: #64748b; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }.feedback-ticket-meta { display: grid; justify-items: end; gap: 4px; }.feedback-ticket-meta em { color: #94a3b8; font-size: 11px; font-style: normal; }.feedback-archive { border-top: 1px solid var(--app-border); }.feedback-archive summary { padding: 12px 14px; color: #475569; cursor: pointer; font-size: 13px; font-weight: 800; }.feedback-thread-card { width: min(680px,100%); }.feedback-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.feedback-thread-head > div { display: flex; align-items: center; gap: 9px; }.feedback-thread-head > div > div { display: grid; gap: 3px; }.feedback-thread-head em { color: #64748b; font-size: 12px; font-style: normal; }.feedback-message-bubble { margin-top: 18px; padding: 13px 14px; border-radius: 8px 8px 8px 2px; background: #f1f5f9; color: #1e293b; line-height: 1.5; white-space: pre-wrap; }.feedback-thread-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }.feedback-thread-footer .feedback-actions { margin: 0; }

@media (max-width: 1020px) { .home-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.home-grid { grid-template-columns: 1fr; }.filters-primary { grid-template-columns: 190px minmax(150px,.8fr) minmax(210px,1fr); } }
@media (max-width: 720px) { .app-frame,.app-frame.sidebar-is-collapsed { display: block; }.app-sidebar,.app-sidebar.collapsed { position: sticky; top: 0; z-index: 40; width: 100%; height: auto; min-height: 58px; padding: 8px 12px; flex-direction: row; align-items: center; background: #14213d; }.sidebar-brand-row { flex: 0 0 auto; }.sidebar-collapse { display: none; }.app-sidebar.collapsed .sidebar-brand { flex: 1; }.app-sidebar.collapsed .sidebar-brand strong,.app-sidebar.collapsed .nav-label { display: inline; }.app-sidebar.collapsed .nav-item { justify-content: flex-start; padding: 0 10px; }.app-navigation { display: flex; flex: 1; gap: 2px; overflow-x: auto; }.nav-item { flex: 0 0 auto; min-height: 36px; }.nav-glyph { display: none; }.sidebar-footer { display: none !important; }.app-workspace { padding: 20px 14px 72px; }.stock-status-line { align-items: stretch; flex-direction: column; }.stock-status-line .sync-status { width: 100%; }.stock-status-line .sync-status em { max-width: 100%; }.filters-primary { grid-template-columns: 1fr; }.filters-primary > .button { justify-self: stretch; }.home-metrics { grid-template-columns: 1fr 1fr; }.home-metric { min-height: 94px; }.home-metric strong { font-size: 21px; }.feedback-ticket { grid-template-columns: 30px minmax(0,1fr); }.feedback-ticket-meta { display: none; }.feedback-thread-footer { align-items: flex-start; flex-direction: column; }.support-launcher { right: 14px; bottom: 14px; width: 46px; justify-content: center; padding: 0; }.support-launcher em { display: none; } }

/* Application workspace redesign */
:root {
  --app-navy: #14213d;
  --app-navy-soft: #1e3158;
  --app-blue: #2563eb;
  --app-blue-soft: #eff6ff;
  --app-surface: #ffffff;
  --app-muted: #64748b;
  --app-border: #dbe3ef;
}

body {
  background: #f4f7fb;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: #f4f7fb;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 16px 18px;
  color: #dbeafe;
  background: var(--app-navy);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 8px;
  color: #fff;
  font-size: 20px;
}

.sidebar-brand span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2563eb;
  font-size: 14px;
  font-weight: 900;
}

.sidebar-brand strong { font-weight: 800; }

.app-navigation {
  display: grid;
  gap: 5px;
}

.nav-item {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active { background: var(--app-navy-soft); color: #fff; box-shadow: inset 3px 0 0 #60a5fa; }

.sidebar-footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(191, 219, 254, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.sidebar-footer strong { color: #fff; font-size: 13px; overflow-wrap: anywhere; }
.sidebar-footer span { color: #93c5fd; font-size: 12px; }
.sidebar-logout {
  width: max-content;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.sidebar-logout:hover { color: #fff; text-decoration: underline; }

.app-workspace {
  min-width: 0;
  padding: 28px 32px 44px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 24px;
}

.section-kicker { color: var(--app-blue); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.app-header h1 { margin: 4px 0 5px; font-size: 28px; line-height: 1.1; letter-spacing: 0; }
.app-header p { margin: 0; color: var(--app-muted); font-size: 14px; }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.header-actions .sync-status {
  max-width: 420px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: #fff;
}

.header-actions .sync-status em { max-width: 185px; }
.section-workspace { display: grid; gap: 16px; }

.overview-metrics,
.accounts-intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.overview-metric,
.accounts-intro article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 126px;
  padding: 17px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.overview-metric span,
.accounts-intro span { color: var(--app-muted); font-size: 13px; font-weight: 700; }
.overview-metric strong,
.accounts-intro strong { color: #172554; font-size: 25px; line-height: 1.15; }
.overview-metric em,
.accounts-intro em { color: #64748b; font-size: 12px; font-style: normal; }

.filters-panel {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.filters-primary {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, .8fr) minmax(135px, .65fr) minmax(170px, .8fr) auto;
  gap: 10px;
  align-items: end;
}

.filters-primary label,
.wb-tag-link label { display: grid; gap: 5px; color: #475569; font-size: 12px; font-weight: 800; }
.filters-primary .date-range-button { width: 100%; min-height: 42px; }
.filters-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 2px; }
.filters-panel .filter-popover { top: calc(100% - 8px); left: 16px; z-index: 30; }

.table-panel.panel,
.section-panel {
  padding: 18px;
  border-color: var(--app-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.table-panel.panel { margin: 0; }

.price-status { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 12px; padding:10px 12px 10px 16px; }
.price-status-copy { display:flex; align-items:center; gap:9px; min-width:0; }
.price-status-copy > span:last-child { display:grid; gap:2px; min-width:0; }
.price-status em { overflow:hidden; color:var(--muted); font-size:12px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.price-status-actions { display:flex; flex:0 0 auto; align-items:center; gap:8px; }
.price-status-actions > .button { display:flex; align-items:center; gap:7px; min-height:48px; padding:9px 13px; white-space:nowrap; }
.price-status-actions > .button .ui-icon { width:17px; height:17px; }
.price-location-button { display:flex; flex:0 0 auto; align-items:center; gap:9px; min-width:230px; min-height:48px; padding:7px 10px; border:1px solid #dbe3ef; border-radius:7px; background:#f8fafc; color:#172554; text-align:left; cursor:pointer; }
.price-location-button:hover { border-color:#93b4e7; background:#f4f8ff; }
.price-location-button:disabled { cursor:wait; opacity:.7; }
.price-location-button > .ui-icon:first-child { width:19px; height:19px; color:#2563eb; }
.price-location-button > .ui-icon:last-child { width:16px; height:16px; margin-left:auto; color:#64748b; }
.price-location-button span { display:grid; gap:1px; min-width:0; }
.price-location-button small { color:#64748b; font-size:10px; font-weight:750; text-transform:uppercase; }
.price-location-button strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.price-filters { display:grid; grid-template-columns:minmax(240px,1.6fr) repeat(4,minmax(135px,1fr)); gap:10px; align-items:end; margin-bottom:12px; }
.price-filters label { display:grid; gap:5px; color:#475569; font-size:12px; font-weight:800; }
.price-stock-mode-field { align-self:stretch; }
.price-stock-mode { display:grid; grid-template-columns:repeat(3,1fr); min-height:40px; padding:3px; border:1px solid #d8e0eb; border-radius:7px; background:#f8fafc; }
.price-stock-mode button { min-width:0; padding:0 10px; border:0; border-radius:5px; background:transparent; color:#64748b; font:inherit; font-size:12px; cursor:pointer; }
.price-stock-mode button:hover { color:#1d4ed8; background:#eff6ff; }
.price-stock-mode button.active { background:#fff; color:#1d4ed8; box-shadow:0 1px 3px rgba(15,23,42,.12); }
.price-summary { display:flex; align-items:baseline; gap:8px; margin:0 0 10px; color:var(--muted); font-size:13px; }
.price-summary strong { color:#172554; font-size:20px; }.price-summary .button { margin-left:auto; }
.price-table-wrap { min-width:0; padding:0; overflow-x:auto; overflow-y:visible; }.price-table-head,.price-row { display:grid; grid-template-columns:minmax(220px,1.35fr) minmax(100px,.66fr) minmax(105px,.7fr) minmax(120px,.8fr) minmax(340px,2fr); gap:10px; align-items:center; width:100%; min-width:955px; padding:12px 16px; }.price-table-head>*,.price-row>*{min-width:0}
.price-table-head { position:sticky; top:0; z-index:4; border-bottom:1px solid var(--line); background:#f8fafc; color:#475569; font-size:12px; font-weight:850; }
.price-row { border-bottom:1px solid var(--line); background:#fff; font-size:14px; transition:background .14s ease,box-shadow .14s ease; }.price-row:last-child{border-bottom:0}.price-row-open{cursor:pointer}.price-row-open:hover{position:relative;z-index:1;background:#f8fbff;box-shadow:inset 3px 0 #60a5fa}.price-row-open:focus-visible{position:relative;z-index:2;outline:2px solid #60a5fa;outline-offset:-2px;background:#f8fbff}.price-row-open a,.price-row-open button{cursor:pointer}.price-product { position:relative; z-index:2; display:flex; gap:10px; align-items:center; min-width:0; overflow:hidden; color:var(--text); }.price-product > span{display:grid;flex:1 1 0;width:0;min-width:0;overflow:hidden;gap:2px}.price-product strong,.price-product em,.price-product small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.price-product em,.price-product small{color:var(--muted);font-size:12px;font-style:normal}.price-product b{width:max-content;padding:3px 6px;border-radius:999px;background:#dcfce7;color:#166534;font-size:11px}.price-product-link{position:relative;z-index:3;display:block;width:100%;min-width:0;max-width:100%;min-height:18px;overflow:hidden;color:inherit;text-decoration:none;pointer-events:auto}.price-product-link strong{display:block}.price-product-link:hover strong{color:#2457a6;text-decoration:underline;text-underline-offset:2px}.price-copy-value{display:flex;align-items:center;gap:5px;width:max-content;max-width:100%;padding:1px 0;border:0;background:transparent;color:#64748b;cursor:copy;font:inherit;font-size:12px;text-align:left;user-select:text}.price-copy-value span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.price-copy-value .ui-icon{flex:0 0 auto;width:13px;height:13px;color:#94a3b8;opacity:0;transition:opacity .14s ease,color .14s ease}.price-copy-value:hover{color:#1d4ed8}.price-copy-value:hover .ui-icon,.price-copy-value:focus-visible .ui-icon{color:#2563eb;opacity:1}.price-copy-value:focus-visible{border-radius:3px;outline:2px solid #93c5fd;outline-offset:2px}.price-image{width:42px;height:54px}.price-value-group,.price-stock{display:grid;gap:3px;align-content:center;min-width:0;overflow:hidden}.price-value-group strong{color:#172554;font-size:15px}.price-value-group em,.price-value-group small,.price-stock em{overflow:hidden;color:#667085;font-size:11px;font-style:normal;line-height:1.35;text-overflow:ellipsis}.price-value-group.customer em{color:#1d4ed8;font-weight:800}.price-value-group.wallet strong{color:#047857}.price-value-group.wallet em{color:#047857;font-weight:800}.price-value-group .price-unavailable{color:#64748b;font-size:13px}.price-stock-history{position:relative;z-index:1;min-width:0;max-width:100%;overflow:hidden;cursor:default}.price-stock-rail{display:flex;gap:7px;width:100%;max-width:100%;padding:1px 1px 6px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scrollbar-gutter:stable;scroll-snap-type:x proximity}.price-stock-rail:focus-visible{border-radius:6px;outline:2px solid #93c5fd;outline-offset:1px}.price-stock-day{display:grid;grid-template-rows:auto auto minmax(0,1fr);flex:0 0 158px;min-height:116px;padding:8px;border:1px solid #e2e8f0;border-radius:7px;background:#fff;scroll-snap-align:start}.price-stock-day.current{border-color:#bfdbfe;background:#f8fbff}.price-stock-day header{display:flex;align-items:baseline;justify-content:space-between;gap:6px;padding-bottom:5px;border-bottom:1px solid #eef2f7}.price-stock-day header strong{color:#172554;font-size:12px}.price-stock-day header small{color:#f97316;font-size:9px;font-weight:800}.price-stock-totals{display:flex;align-items:center;gap:5px;padding:6px 0;color:#334155;font-size:10px}.price-stock-totals b{font-weight:850}.price-stock-totals span{color:#cbd5e1}.price-stock-lines{display:grid;align-content:start;gap:3px;max-height:66px;overflow-y:auto;scrollbar-width:thin}.price-stock-lines>span{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:4px;align-items:baseline;min-width:0;font-size:9px;line-height:1.25}.price-stock-lines em{padding:1px 3px;border-radius:3px;background:#eff6ff;color:#1d4ed8;font-size:8px;font-style:normal;font-weight:850}.price-stock-lines i{overflow:hidden;color:#64748b;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.price-stock-lines b{color:#1e293b;font-size:9px}.price-stock-lines>small,.price-stock-no-day,.price-stock-empty{color:#94a3b8;font-size:10px;line-height:1.35}.price-stock-no-day{align-self:center}.repricer-note{display:flex;justify-content:space-between;gap:20px;align-items:start;margin-top:12px}.repricer-note h2{margin:0 0 4px;font-size:18px}.repricer-note p{margin:0;color:var(--muted);max-width:760px}.repricer-note span{white-space:nowrap;padding:6px 9px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:12px;font-weight:800;}.price-edit-modal{width:min(720px,calc(100vw - 28px));max-height:min(860px,calc(100vh - 36px));overflow:auto}.price-edit-warning{margin:0 0 14px;padding:10px 12px;border:1px solid #fde68a;border-radius:7px;background:#fffbeb;color:#92400e;font-size:13px;line-height:1.45}.price-edit-form{display:grid;gap:12px}.price-edit-form label{display:grid;gap:6px;color:#475569;font-size:13px;font-weight:800}.price-edit-market{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 14px}.price-edit-market>span{display:grid;gap:3px;padding:11px 12px;border:1px solid #dbeafe;border-radius:7px;background:#f8fbff}.price-edit-market em{color:#64748b;font-size:11px;font-style:normal;font-weight:800;text-transform:uppercase}.price-edit-market strong{color:#172554;font-size:16px}.price-edit-market small{color:#64748b;font-size:11px}.price-edit-market>span:last-child{border-color:#bbf7d0;background:#f4fdf7}.price-edit-market>span:last-child strong{color:#047857}
.price-size-breakdown { display:grid; gap:3px; margin-top:5px; padding-top:5px; border-top:1px solid #e2e8f0; }
.price-size-breakdown > small { color:#94a3b8; font-size:9px; font-weight:800; letter-spacing:0; text-transform:uppercase; }
.price-size-breakdown > span { display:flex; align-items:baseline; justify-content:space-between; gap:7px; min-width:0; font-size:10px; line-height:1.25; }
.price-size-breakdown > span b { overflow:hidden; color:#64748b; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.price-size-breakdown > span em { flex:0 0 auto; color:#344054; font-size:10px; font-weight:850; white-space:nowrap; }
.price-value-group.wallet .price-size-breakdown > span em { color:#047857; }
.price-value-group strong .price-alternate { color:#64748b; font-size:13px; font-weight:750; white-space:nowrap; }
.price-value-group.wallet strong .price-alternate { color:#059669; }
@media (max-width: 1100px) { .price-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.price-table-head{display:none}.price-row{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;width:auto;min-width:0}.price-product{grid-column:1/-1}.price-stock-history{grid-column:1/-1}.repricer-note { flex-direction:column; } }
@media (max-width: 620px) { .price-filters { grid-template-columns:1fr; }.price-summary { align-items:flex-start; flex-wrap:wrap; }.price-summary .button { margin-left:0; }.price-row{grid-template-columns:1fr;padding:14px}.price-product,.price-stock-history{grid-column:auto}.price-stock-day{flex-basis:145px}.price-edit-market{grid-template-columns:1fr} }

.price-location-backdrop { align-items:center; padding:24px; }
.price-location-modal { display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(760px,calc(100vw - 32px)); height:min(760px,calc(100vh - 48px)); max-height:calc(100vh - 48px); padding:0; overflow:hidden; }
.price-location-modal .modal-head { padding:20px 22px 16px; border-bottom:1px solid var(--line); }
.price-location-modal .modal-head h2 { margin:0 0 4px; font-size:20px; }
.price-location-modal .modal-head p { margin:0; font-size:13px; }
.price-location-groups { display:grid; min-height:0; gap:20px; padding:18px 22px 22px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable; }
.price-location-groups section { display:grid; gap:9px; }
.price-location-groups h3 { margin:0; color:#64748b; font-size:11px; letter-spacing:0; text-transform:uppercase; }
.price-location-groups section > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.price-location-option { display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:8px; align-items:center; min-height:44px; padding:8px 10px; border:1px solid #e2e8f0; border-radius:7px; background:#fff; color:#1e293b; text-align:left; cursor:pointer; }
.price-location-option:hover { border-color:#93b4e7; background:#f8fbff; }
.price-location-option.active { border-color:#60a5fa; background:#eff6ff; }
.price-location-option > span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#eef2f7; color:#64748b; }
.price-location-option.active > span { background:#dbeafe; color:#1d4ed8; }
.price-location-option .ui-icon { width:15px; height:15px; }
.price-location-option strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.price-location-option em { display:flex; align-items:center; gap:3px; color:#166534; font-size:11px; font-style:normal; font-weight:800; }
.price-location-option em .ui-icon { width:13px; height:13px; }
.price-location-modal footer { padding:11px 22px; border-top:1px solid var(--line); background:#f8fafc; color:#64748b; font-size:12px; }
@media (max-width: 720px) {
  .price-status { align-items:stretch; flex-direction:column; }
  .price-status-actions { align-items:stretch; flex-direction:column; }
  .price-status-actions > .button { justify-content:center; }
  .price-location-button { width:100%; min-width:0; }
  .price-location-backdrop { align-items:flex-end; padding:0; }
  .price-location-modal { width:100%; height:92vh; max-height:92vh; border-radius:8px 8px 0 0; }
  .price-location-groups section > div { grid-template-columns:1fr; }
}

.stock-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  color: var(--app-muted);
  font-size: 13px;
}

.stock-pagination span { margin-right: 4px; }
.stock-pagination strong { min-width: 42px; color: #172554; text-align: center; font-size: 13px; }

.manager-workspace,
.api-workspace { margin: 0; }

.modal-head h2 { font-size: 21px; letter-spacing: 0; }
.modal-head p { max-width: 780px; color: var(--app-muted); }

.wb-tag-manager { display: grid; gap: 14px; }
.wb-tags-list { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--app-border); border-radius: 8px; }
.wb-tag-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, .9fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--app-border);
  background: #fff;
}
.wb-tag-row:last-child { border-bottom: 0; }
.wb-tag-name { display: grid; gap: 4px; min-width: 0; }
.wb-tag-name strong { color: #172554; font-size: 15px; }
.wb-tag-name span { overflow-wrap: anywhere; color: var(--app-muted); font-size: 13px; }
.wb-tag-link { display: grid; grid-template-columns: minmax(165px, 1fr) auto; gap: 10px; align-items: end; }
.wb-tag-link .badge { align-self: center; justify-self: start; }
.wb-tag-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; }
.wb-tag-owner { display: grid; gap: 4px; }
.wb-tag-owner span { color: #64748b; font-size: 12px; font-weight: 800; }
.wb-tag-owner strong { color: #172554; font-size: 14px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 7px; padding: 11px 13px; border-radius: 7px; background: #f8fafc; color: var(--app-muted); font-size: 13px; }
.service-tags strong { color: #475569; }

.api-workspace .api-modal { display: grid; gap: 16px; }
.api-add-form { border-color: #bfdbfe; background: #f8fbff; }
.api-account-card { border-color: var(--app-border); background: #fff; }

.feedback-form-card {
  width: min(720px, 100%);
  background: #fff;
}

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

.feedback-form > label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.feedback-form textarea {
  min-height: 132px;
  resize: vertical;
}

.feedback-composer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.feedback-composer:focus-within { border-color: #ff7a2f; box-shadow: 0 0 0 3px rgba(255, 122, 47, .12); }
.feedback-composer textarea { min-height: 132px; border: 0; border-radius: 0; outline: 0; box-shadow: none; }
.feedback-composer textarea:focus { border: 0; outline: 0; box-shadow: none; }
.feedback-composer-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 6px 10px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.feedback-composer-tools span { color: #64748b; font-size: 12px; font-weight: 700; }
.feedback-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.feedback-attach-button,
.feedback-preview-remove {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  cursor: pointer;
}
.feedback-attach-button:hover { border-color: #cbd5e1; background: #fff; color: #172554; }
.feedback-attach-button .ui-icon,
.feedback-preview-remove .ui-icon { width: 18px; height: 18px; }

.feedback-preview {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.feedback-preview img {
  display: block;
  width: 46px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
  background: #f1f5f9;
}

.feedback-preview-name { min-width: 0; overflow: hidden; color: #334155; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.feedback-preview-remove { color: #b91c1c; }
.feedback-preview-remove:hover { border-color: #fecaca; background: #fff1f2; }

.feedback-list {
  display: grid;
  gap: 12px;
}

.feedback-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
}

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

.feedback-card-head > div { display: grid; gap: 4px; }
.feedback-card-head strong { color: #172554; font-size: 15px; }
.feedback-card-head span:not(.badge) { color: #64748b; font-size: 12px; }
.feedback-message { margin: 0; white-space: pre-wrap; color: #1e293b; line-height: 1.5; }

.feedback-screenshot-link {
  display: grid;
  gap: 7px;
  width: min(520px, 100%);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.feedback-screenshot-link img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: #f8fafc;
}

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

.feedback-status-new { color: #92400e; background: #fef3c7; }
.feedback-status-in_progress { color: #1d4ed8; background: #dbeafe; }
.feedback-status-resolved { color: #166534; background: #dcfce7; }

.activity-list {
  display: grid;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  overflow: hidden;
}

.activity-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--app-border);
  background: #fff;
}

.activity-row:last-child { border-bottom: 0; }
.activity-marker { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #2563eb; }
.activity-row > div:last-child { display: grid; gap: 4px; }
.activity-row strong { color: #172554; font-size: 14px; }
.activity-row span { color: #334155; font-size: 13px; overflow-wrap: anywhere; }
.activity-row em { color: #64748b; font-size: 12px; font-style: normal; }

@media (max-width: 1180px) {
  .app-workspace { padding: 24px; }
  .filters-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-primary .button { width: max-content; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .app-frame { display: block; }
  .app-sidebar {
    position: static;
    height: auto;
    gap: 14px;
    padding: 14px 16px;
  }
  .sidebar-brand { padding: 0; }
  .app-navigation { display: flex; overflow-x: auto; padding-bottom: 2px; }
  .nav-item { flex: 0 0 auto; min-height: 36px; white-space: nowrap; }
  .sidebar-footer { display: none; }
  .app-workspace { padding: 20px 14px 28px; }
  .app-header { display: grid; gap: 14px; padding-bottom: 18px; }
  .app-header h1 { font-size: 25px; }
  .header-actions { justify-content: flex-start; }
  .header-actions .sync-status { width: 100%; max-width: none; }
  .header-actions .sync-status em { max-width: 60vw; }
  .overview-metrics,
  .accounts-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .overview-metric,
  .accounts-intro article { min-height: 108px; padding: 13px; }
  .overview-metric strong,
  .accounts-intro strong { font-size: 21px; }
  .filters-panel,
  .table-panel.panel,
  .section-panel { padding: 12px; }
  .filters-primary { grid-template-columns: 1fr; }
  .filters-primary .button { width: 100%; }
  .filters-secondary { align-items: stretch; }
  .filters-secondary .button { flex: 1 1 auto; }
  .stock-pagination { align-items: stretch; flex-wrap: wrap; justify-content: flex-start; }
  .stock-pagination span { flex: 1 0 100%; }
  .wb-tag-row { grid-template-columns: 1fr; gap: 12px; padding: 13px; }
  .wb-tag-link { grid-template-columns: 1fr; }
  .wb-tag-link .badge,
  .wb-tag-link .button { width: 100%; justify-content: center; }
  .wb-tag-actions { display: grid; grid-template-columns: 1fr; }
  .feedback-composer-tools span { font-size: 11px; }
  .feedback-card-head { align-items: stretch; flex-direction: column; }
  .feedback-card-head .badge { align-self: flex-start; }
}

@media (max-width: 440px) {
  .overview-metrics,
  .accounts-intro { grid-template-columns: 1fr; }
  .app-header p { font-size: 13px; }
  .header-actions .button { width: 100%; }
}

/* Compact stock controls and high-contrast stock risk states. */
.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.calendar-mark .ui-icon { width: 17px; height: 17px; }

.input-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #fff;
  color: #64748b;
}

.input-with-icon:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
}

.input-with-icon input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.input-with-icon input:focus { box-shadow: none; }

.sizes-toggle,
.filter-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.filter-menu { position: relative; }

.filter-menu-button .ui-icon {
  width: 16px;
  height: 16px;
  color: #64748b;
  transition: transform .16s ease;
}

.filter-menu-button.active .ui-icon { transform: rotate(180deg); color: #1d4ed8; }

.filters-panel .filter-menu .filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: min(304px, calc(100vw - 40px));
  max-height: 342px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.filters-panel .filter-popover .chip-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  max-height: 270px;
  margin-top: 8px;
  padding-right: 2px;
  overflow-y: auto;
}

.filters-panel .filter-popover .chip-row .button {
  justify-content: flex-start;
  min-height: 34px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
}

.icon-button .ui-icon { width: 16px; height: 16px; }

.sidebar-collapse {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 7px;
}

.sidebar-collapse .ui-icon { width: 16px; height: 16px; }
.nav-glyph .ui-icon { width: 18px; height: 18px; }

.app-frame.sidebar-is-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.app-sidebar.collapsed .sidebar-brand-row { flex-direction: column; justify-content: center; gap: 8px; }
.app-sidebar.collapsed .sidebar-collapse { position: static; top: auto; margin: 0; transform: none; }

.sheet-day.state-central-low {
  background: #fffefb;
  border-color: rgba(118, 92, 54, 0.12);
  box-shadow: none;
}

.sheet-day.state-central-zero {
  background: #fffefb;
  border-color: rgba(118, 92, 54, 0.12);
  box-shadow: none;
}

.sheet-day.state-card-zero {
  background: #fecaca;
  border-color: #dc2626;
  box-shadow: inset 0 0 0 1px rgba(153, 27, 27, .12), inset 4px 0 0 #b91c1c;
}

.sheet-day.state-card-zero .region-title,
.sheet-day.state-card-zero .warehouse-line,
.sheet-day.state-card-zero .total-line { color: #991b1b; }

.password-change-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #f6c453;
  border-radius: 8px;
  background: #fff9df;
  color: #7c4a03;
}

.password-change-banner span { flex: 1; font-size: 13px; }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; }
.profile-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.auth-loading { min-height: 180px; justify-content: center; align-items: center; }

.region-title-alert,
.warehouse-line-alert { color: #b91c1c; }

/* Warehouse measurements: one compact row per product, details stay inline. */
.measurement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
}
.measurement-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.measurement-sticky-header { position: sticky; top: 0; z-index: 80; padding: 8px 0 10px; background: var(--app-bg, #f4f7fb); box-shadow: 0 9px 13px -14px rgba(15,23,42,.42); }
.measurement-sync-note { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.measurement-sync-note .status-dot { margin-top: 5px; }
.measurement-sync-note div { display: grid; gap: 3px; }
.measurement-sync-note strong { color: #172554; font-size: 14px; }
.measurement-sync-note span:last-child { color: #64748b; font-size: 12px; }
.measurement-sync-note .measurement-sync-warning { color: #b45309; font-weight: 750; }
.measurement-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.measurement-metrics article { display: grid; gap: 5px; min-height: 102px; padding: 15px; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; }
.measurement-metrics span { color: #64748b; font-size: 12px; font-weight: 800; }
.measurement-metrics strong { color: #172554; font-size: 25px; font-variant-numeric: tabular-nums; }
.measurement-metrics em { color: #64748b; font-size: 12px; font-style: normal; }
.measurement-metrics .metric-risk strong { color: #b45309; }
.measurement-metrics .metric-warning strong { color: #b91c1c; }
.measurement-filters { display: grid; grid-template-columns: repeat(2, minmax(132px, .55fr)) minmax(250px, 1.25fr) repeat(4, minmax(135px, .68fr)); gap: 12px; margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; box-shadow: 0 5px 16px rgba(15,23,42,.04); }
.measurement-filters label { display: grid; gap: 6px; color: #475569; font-size: 12px; font-weight: 800; }
.measurement-list { overflow: visible; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; }
.measurement-head, .measurement-row { display: grid; grid-template-columns: minmax(260px, 1.65fr) minmax(135px, .8fr) minmax(150px, .85fr) minmax(150px, .85fr) minmax(175px, 1fr); gap: 14px; align-items: center; }
.measurement-head { position: static; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--app-border); background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.measurement-row { position: relative; min-height: 92px; padding: 13px 16px; border-bottom: 1px solid var(--app-border); }
.measurement-row:last-child { border-bottom: 0; }
.measurement-row > div:not(.measurement-product) { display: grid; gap: 5px; min-width: 0; }
.measurement-row > div strong { color: #1e293b; font-size: 13px; line-height: 1.35; }
.measurement-row > div span { color: #64748b; font-size: 12px; }
.measurement-product { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; }
.measurement-product > div { display: grid; gap: 3px; min-width: 0; }
.measurement-product strong { overflow: hidden; color: #172554; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.measurement-product strong a { color: #172554; text-decoration: none; }
.measurement-product strong a:hover { color: #1d4ed8; text-decoration: underline; }
.measurement-product span, .measurement-product em { overflow: hidden; color: #64748b; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.measurement-responsible { color: #166534 !important; font-weight: 800; }
.measurement-responsible.unassigned { color: #b45309 !important; }
.measurement-date { color: #52627a !important; font-size: 11px !important; }
.measurement-thumb { width: 50px; height: 58px; object-fit: cover; border: 1px solid #e2e8f0; border-radius: 6px; }
.product-image-placeholder.measurement-thumb { width: 50px; height: 58px; font-size: 10px; }
.measurement-photo-button, .measurement-history-button { display: inline-flex; align-items: center; gap: 5px; width: max-content; border: 0; padding: 0; color: #1d4ed8; background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.measurement-photo-button:hover, .measurement-history-button:hover { color: #1e40af; text-decoration: underline; }
.measurement-photo-button .ui-icon { width: 14px; height: 14px; }
.measurement-badge { display: inline-flex; align-items: center; width: max-content; max-width: 100%; min-height: 25px; padding: 4px 7px; border-radius: 6px; font-size: 12px; font-weight: 800; line-height: 1.2; }
.measurement-badge.overpayment { color: #9a3412; background: #ffedd5; }
.measurement-badge.underdeclared { color: #991b1b; background: #fee2e2; }
.measurement-badge.match { color: #166534; background: #dcfce7; }
.measurement-badge.unknown { color: #475569; background: #e2e8f0; }
.measurement-comparison em { color: #64748b; font-size: 11px; font-style: normal; }
.measurement-penalty { color: #991b1b !important; font-size: 12px !important; font-weight: 900; }
.measurement-penalty-summary { display: grid; gap: 3px; margin-top: 2px; color: #9f1239; font-size: 11px; font-weight: 800; }
.measurement-penalty-summary span { color: #9f1239 !important; font-size: 11px !important; }
.measurement-penalty-summary strong { color: #991b1b !important; font-size: 11px !important; }
.measurement-penalty-summary strong.reversed { color: #15803d !important; }
.measurement-economics { display: grid; gap: 3px; margin-top: 4px; padding-top: 6px; border-top: 1px dashed #cbd5e1; }
.measurement-economics strong { color: #0f766e !important; font-size: 12px !important; }
.measurement-economics span { color: #475569 !important; font-size: 11px !important; }
.measurement-economics em { color: #64748b !important; font-size: 11px !important; font-style: normal; }
.measurement-economics.muted strong { color: #64748b !important; }
.measurement-history-button { grid-column: 1 / -1; margin-top: -2px; }
.measurement-history-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 7px; }
.measurement-history-list article { display: grid; gap: 5px; padding: 11px 12px; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; }
.measurement-history-list span { color: #64748b; font-size: 11px; }
.measurement-history-list strong { color: #334155; font-size: 12px; }
.measurement-history-list em { color: #0f766e; font-size: 12px; font-style: normal; font-weight: 800; }
.measurement-card-history { display: grid; gap: 8px; }
.measurement-card-history article { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #dbe4ef; border-left: 3px solid #94a3b8; border-radius: 7px; background: #f8fafc; }
.measurement-card-history article.current { border-left-color: #2563eb; background: #eff6ff; }
.measurement-card-history span { color: #475569; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.measurement-card-history strong { color: #172554; font-size: 13px; }
.measurement-card-history em { color: #475569; font-size: 11px; font-style: normal; }
.measurement-card-history small { color: #64748b; font-size: 11px; line-height: 1.4; }
.measurement-detail-modal { width: min(940px, 100%); }
.measurement-detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.measurement-detail-summary > div,
.measurement-no-penalty { display: grid; gap: 5px; padding: 13px; border: 1px solid #dbe4ef; border-radius: 7px; background: #f8fafc; }
.measurement-detail-summary span { color: #64748b; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.measurement-detail-summary strong { color: #1e293b; font-size: 13px; line-height: 1.4; }
.measurement-detail-summary em { color: #64748b; font-size: 12px; font-style: normal; }
.measurement-economics-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.measurement-detail-section { margin-top: 20px; }
.measurement-detail-section h3 { margin: 0; color: #172554; font-size: 15px; }
.measurement-detail-section > p { margin: 5px 0 11px; color: #64748b; font-size: 12px; line-height: 1.45; }
.measurement-no-penalty strong { color: #166534; font-size: 13px; }
.measurement-no-penalty span { color: #64748b; font-size: 12px; }
.measurement-penalty-list { display: grid; gap: 10px; }
.measurement-penalty-card { display: grid; gap: 12px; padding: 13px; border: 1px solid #dbe4ef; border-left: 4px solid #94a3b8; border-radius: 7px; background: #fff; }
.measurement-penalty-card.charged { border-left-color: #dc2626; }
.measurement-penalty-card.partial { border-left-color: #d97706; }
.measurement-penalty-card.reversed { border-left-color: #16a34a; }
.measurement-penalty-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.measurement-penalty-card header > strong { color: #334155; font-size: 13px; text-align: right; }
.measurement-penalty-state { display: inline-flex; width: max-content; padding: 4px 7px; border-radius: 5px; font-size: 12px; font-weight: 900; }
.measurement-penalty-state.charged { color: #991b1b; background: #fee2e2; }
.measurement-penalty-state.partial { color: #92400e; background: #fef3c7; }
.measurement-penalty-state.reversed { color: #166534; background: #dcfce7; }
.measurement-penalty-state.neutral { color: #475569; background: #e2e8f0; }
.measurement-penalty-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.measurement-penalty-card dl div { padding: 9px 10px; border-radius: 6px; background: #f8fafc; }
.measurement-penalty-card dt { color: #64748b; font-size: 11px; font-weight: 700; }
.measurement-penalty-card dd { margin: 4px 0 0; color: #1e293b; font-size: 13px; font-weight: 800; line-height: 1.35; }
.measurement-penalty-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; color: #64748b; font-size: 12px; }
.measurement-penalty-dimensions strong { color: #334155; }
.measurement-guide-modal { width: min(760px, 100%); }
.measurement-guide-list { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style-position: inside; }
.measurement-guide-list li { padding: 12px; border: 1px solid #dbe4ef; border-radius: 7px; background: #f8fafc; color: #172554; }
.measurement-guide-list strong { display: block; margin: 0 0 4px 22px; font-size: 14px; }
.measurement-guide-list span { display: block; margin-left: 22px; color: #64748b; font-size: 13px; line-height: 1.45; }
.measurement-history-modal-list { margin-top: 6px; }
.measurement-photos-modal { width: min(1040px, 100%); }
.measurement-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.measurement-photo-grid a { display: block; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; }
.measurement-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }

/* Measurements are an operational workspace: compact comparison first, details on demand. */
.measurement-toolbar { margin-bottom: 10px; border-color: #dbe4ef; box-shadow: 0 6px 18px rgba(15, 23, 42, .035); }
.measurement-filters { margin-bottom: 10px; box-shadow: none; }
.measurement-list { overflow: hidden; border-color: #dbe4ef; box-shadow: 0 8px 26px rgba(15, 23, 42, .04); }
.measurement-head,
.measurement-row { grid-template-columns: minmax(270px, 1.05fr) minmax(355px, 1.32fr) minmax(225px, .84fr) 108px; gap: 18px; }
.measurement-sticky-header .measurement-head { position: static; margin-top: 10px; min-height: 48px; padding: 0 18px; border: 1px solid #dbe4ef; border-radius: 8px; background: #f8fafc; box-shadow: 0 5px 15px rgba(15,23,42,.05); color: #516078; letter-spacing: .02em; text-transform: none; }
.measurement-row { min-height: 118px; padding: 14px 18px; cursor: pointer; transition: background .16s ease, box-shadow .16s ease; }
.measurement-row:hover { background: #fbfdff; box-shadow: inset 3px 0 0 #3b82f6; }
.measurement-row:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.measurement-row.overpayment { box-shadow: inset 3px 0 0 #f59e0b; }
.measurement-row.underdeclared { box-shadow: inset 3px 0 0 #ef4444; }
.measurement-row.match { box-shadow: inset 3px 0 0 #22c55e; }
.measurement-product { grid-template-columns: 54px minmax(0, 1fr); gap: 11px; }
.measurement-thumb { width: 54px; height: 64px; border-radius: 7px; background: #fff; }
.product-image-placeholder.measurement-thumb { width: 54px; height: 64px; }
.measurement-product > div { gap: 4px; }
.measurement-product strong { white-space: normal; font-size: 13px; line-height: 1.33; }
.measurement-product span,
.measurement-product em { white-space: nowrap; }
.measurement-responsible { display: inline-flex; width: max-content; max-width: 100%; padding: 3px 7px; border-radius: 5px; background: #dcfce7; color: #166534 !important; font-size: 11px !important; }
.measurement-responsible.unassigned { background: #fef3c7; color: #92400e !important; }
.measurement-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.measurement-dimension-card { display: grid; gap: 5px; min-height: 78px; padding: 10px 11px; border: 1px solid #e3eaf3; border-radius: 7px; background: #f8fafc; }
.measurement-dimension-card span { color: #64748b !important; font-size: 10px !important; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.measurement-dimension-card strong { color: #1e293b !important; font-size: 12px !important; }
.measurement-dimension-card em { color: #52627a !important; font-size: 13px !important; font-style: normal; font-weight: 850; }
.measurement-dimension-card.declared { background: #fffaf0; border-color: #fed7aa; }
.measurement-dimension-card.declared em { color: #b45309 !important; }
.measurement-dimension-card.actual { background: #f0fdf4; border-color: #bbf7d0; }
.measurement-dimension-card.actual em { color: #15803d !important; }
.measurement-comparison { align-content: center; gap: 8px !important; }
.measurement-comparison-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.measurement-badge { min-height: 24px; padding: 4px 7px; font-size: 11px; }
.measurement-economics { gap: 3px; margin: 0; padding: 8px 10px; border: 1px solid #a7f3d0; border-radius: 7px; background: #f0fdf4; }
.measurement-economics span { color: #166534 !important; font-size: 11px !important; font-weight: 800; }
.measurement-economics strong { display: flex; align-items: baseline; gap: 5px; color: #047857 !important; font-size: 19px !important; line-height: 1.1; }
.measurement-economics strong em { color: #527064 !important; font-size: 11px !important; font-style: normal; font-weight: 700; }
.measurement-economics.muted { border-color: #e2e8f0; background: #f8fafc; }
.measurement-economics.muted span { color: #64748b !important; }
.measurement-penalty { margin-top: -1px; }
.measurement-row-action { justify-items: start; align-content: center; gap: 7px !important; }
.measurement-row-action > span { color: #64748b !important; font-size: 11px !important; line-height: 1.35; }
.measurement-open-hint { color: #2563eb !important; font-weight: 800; }
.measurement-history-button { grid-column: auto; min-width: 78px; min-height: 32px; margin: 0; padding: 7px 10px; border: 1px solid #dbe4ef; border-radius: 6px; color: #1d4ed8; background: #fff; font-size: 12px; text-decoration: none; }
.measurement-history-button:hover { border-color: #93c5fd; background: #eff6ff; text-decoration: none; }
.measurement-photo-button { font-size: 11px; }
.measurement-detail-drawer { align-items: stretch; justify-content: flex-end; padding: 0; background: rgba(15, 23, 42, .32); }
.measurement-photos-layer { z-index: 340; }
.measurement-detail-drawer .measurement-detail-modal { width: min(640px, 100vw); max-height: 100vh; min-height: 100vh; padding: 22px; border: 0; border-radius: 8px 0 0 8px; box-shadow: -22px 0 48px rgba(15, 23, 42, .2); }
.measurement-drawer-title { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.measurement-drawer-title > div { min-width: 0; }
.measurement-drawer-title h2 { font-size: 18px; line-height: 1.28; }
.measurement-drawer-thumb { flex: 0 0 auto; width: 52px; height: 62px; object-fit: cover; border: 1px solid #e2e8f0; border-radius: 7px; }
.product-image-placeholder.measurement-drawer-thumb { width: 52px; height: 62px; }
.measurement-detail-modal .modal-head { margin-bottom: 15px; }
.measurement-detail-modal .icon-button { flex: 0 0 auto; }
.measurement-detail-summary { gap: 8px; }
.measurement-detail-summary > div { padding: 11px; }

@media (max-width: 1500px) {
  .measurement-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .measurement-filters .measurement-search-field { grid-column: span 2; }
}

@media (max-width: 1080px) {
  .measurement-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .measurement-filters .measurement-search-field { grid-column: 1 / -1; }
  .measurement-list { overflow-x: auto; }
  .measurement-head, .measurement-row { min-width: 1000px; }
}

@media (max-width: 720px) {
  .filter-menu { flex: 1 1 auto; }
  .password-change-banner { align-items: flex-start; flex-wrap: wrap; }
  .profile-form { grid-template-columns: 1fr; }
  .filter-menu-button { width: 100%; justify-content: space-between; }
  .filters-panel .filter-menu .filter-popover { width: min(304px, calc(100vw - 28px)); }
  .measurement-toolbar { align-items: stretch; flex-direction: column; }
  .measurement-toolbar-actions { width: 100%; }
  .measurement-toolbar .button { width: 100%; }
  .measurement-sticky-header { position: static; }
  .measurement-head { position: static; box-shadow: none; }
  .measurement-detail-summary,
  .measurement-economics-summary,
  .measurement-penalty-card dl,
  .measurement-penalty-dimensions { grid-template-columns: 1fr; }
  .measurement-penalty-card header { align-items: flex-start; flex-direction: column; }
  .measurement-penalty-card header > strong { text-align: left; }
  .measurement-filters { grid-template-columns: 1fr; padding: 12px; }
  .measurement-filters label:last-child { grid-column: auto; }
  .measurement-detail-drawer .measurement-detail-modal { width: 100vw; padding: 16px; border-radius: 0; }
  .measurement-dimensions { grid-template-columns: 1fr 1fr; }
}

/* Price editing is a focused confirmation dialog, not a second page overlay. */
.price-edit-backdrop {
  z-index: 360;
  padding: 18px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(4px);
}

.price-edit-modal {
  width: min(860px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  padding: 0;
  overflow: auto;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.price-edit-modal .modal-head {
  margin: 0;
  padding: 22px 24px 17px;
  border-bottom: 1px solid #e5eaf1;
}

.price-edit-modal .modal-head h2 {
  margin: 4px 0 5px;
  font-size: 22px;
}

.price-edit-modal .modal-head p {
  max-width: 460px;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-product-head { align-items:flex-start; min-width:0; }
.price-modal-product { display:flex; flex:1 1 auto; align-items:center; gap:13px; min-width:0; overflow:hidden; }
.price-modal-product > div { display:grid; flex:1 1 auto; width:0; min-width:0; overflow:hidden; gap:3px; }
.price-modal-product h2, .price-modal-product h2 a { display:block; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.price-modal-image { flex:0 0 auto; width:54px; height:68px; border-radius:6px; object-fit:cover; }
.price-modal-articles { display:flex; gap:10px; align-items:center; min-width:0; overflow:hidden; flex-wrap:wrap; }
.price-modal-articles .price-copy-value { color:#475569; font-size:11px; }
.price-modal-head-actions { display:flex; align-items:center; gap:8px; }
.price-modal-head-actions .button { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.price-modal-head-actions .ui-icon { width:15px; height:15px; }

.price-edit-eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.price-edit-current {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 24px 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #e2e8f0;
}

.price-edit-current > span {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  background: #f8fafc;
}

.price-edit-current em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.price-edit-current strong {
  color: #172554;
  font-size: 17px;
}

.price-edit-form {
  display: grid;
  gap: 16px;
  padding: 18px 24px 0;
}

.price-edit-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

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

.price-edit-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #f1f5f9;
}
.price-edit-methods.three { grid-template-columns:repeat(3,minmax(0,1fr)); }

.price-edit-methods button {
  min-height: 38px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.price-edit-methods button:hover { color: #1d4ed8; background: #e8f0ff; }
.price-edit-methods button.active { background: #fff; color: #1d4ed8; box-shadow: 0 1px 4px rgba(15,23,42,.14); }
.price-edit-form label > small { color:#64748b; font-size:11px; font-weight:600; line-height:1.4; }

.price-edit-form input,
.price-edit-form select {
  min-height: 44px;
  font-size: 15px;
}

.price-edit-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  align-items: stretch;
  overflow: hidden;
  padding: 14px 15px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.price-edit-result > span {
  display:grid;
  align-content:start;
  gap:4px;
  min-width:0;
  padding:2px 11px;
  border-left:1px solid #bfdbfe;
}

.price-edit-result > span:first-child { padding-left:0; border-left:0; }
.price-edit-result > span:last-of-type { padding-right:0; }

.price-edit-result em {
  color: #475569;
  font-size: 12px;
  font-style:normal;
  font-weight: 750;
}

.price-edit-result > span strong {
  color: #1d4ed8;
  font-size: 17px;
  white-space:nowrap;
}

.price-edit-result > span small {
  color:#64748b;
  font-size:10px;
}

.price-edit-result > small {
  grid-column: 1 / -1;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #bfdbfe;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}
.price-edit-result > b { grid-column:1 / -1; color:#047857; font-size:12px; }
.price-edit-result > b.negative { color:#b91c1c; }

.price-promotions {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.price-promotions-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.price-promotions-head > div { display: grid; gap: 2px; }
.price-promotions-head strong { color: #172554; font-size: 15px; }
.price-promotions-head span,
.price-promotions-head small { color: #64748b; font-size: 11px; }

.price-promotion {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, .75fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.price-promotion > div { display: grid; gap: 3px; min-width: 0; }
.price-promotion > div > strong { overflow: hidden; color: #1e293b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.price-promotion > div > span { color: #64748b; font-size: 11px; line-height: 1.35; }
.price-promotion-price strong { color: #047857 !important; font-size: 15px !important; }
.price-promotion-price b { color:#047857; font-size:11px; }
.price-promotion-price b.negative { color:#b91c1c; }
.price-promotion-action { justify-items: start; }
.price-promotion-action > b { padding: 4px 7px; border-radius: 999px; font-size: 11px; }
.status-participating { background: #dcfce7; color: #166534; }
.status-eligible { background: #fff7ed; color: #9a3412; }
.status-unknown { background: #f1f5f9; color: #475569; }
.status-not-eligible { background:#f1f5f9; color:#64748b; }
.status-automatic { background:#eef2ff; color:#4338ca; }
.price-promotion.auto { border-color:#e0e7ff; background:#fafaff; }
.price-promotion.auto .price-promotion-price strong { color:#4338ca !important; }
.price-promotion-group { display:grid; gap:7px; }
.price-promotion-group + .price-promotion-group { margin-top:4px; padding-top:10px; border-top:1px solid #e5eaf1; }
.price-promotion-group-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.price-promotion-group-head strong { color:#334155; font-size:12px; }
.price-promotion-group-head span { color:#64748b; font-size:11px; }
.promotion-confirm { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.promotion-confirm > span { grid-column: 1 / -1; color: #9a3412; font-size: 11px; font-weight: 800; }

.price-history { display:grid; gap:0; margin:0; padding:0 24px 4px; border-bottom:1px solid #e5eaf1; background:#f8fafc; }
.price-history-head { display:grid; gap:2px; padding:12px 0 8px; }
.price-history-head strong { color:#172554; font-size:13px; }
.price-history-head span { color:#64748b; font-size:11px; }
.price-history article { display:grid; grid-template-columns:10px minmax(0,1fr); gap:8px; padding:8px 0; border-top:1px solid #e5eaf1; }
.price-history article > div { display:grid; gap:2px; }
.price-history article strong { color:#1e293b; font-size:12px; }
.price-history article em,.price-history article small { color:#64748b; font-size:11px; font-style:normal; }
.price-history article.is-error strong,.price-history article.is-error small { color:#991b1b; }
.price-history-marker { width:8px; height:8px; margin-top:4px; border-radius:50%; background:#3b82f6; box-shadow:0 0 0 3px #dbeafe; }
.price-history-more { justify-self:start; margin:10px 0 14px; }
.price-profit { width:max-content; max-width:100%; padding:3px 5px; border-radius:5px; background:#ecfdf5; color:#047857; font-size:10px; }
.price-profit.negative { background:#fef2f2; color:#b91c1c; }

.price-cost-backdrop { z-index:370; padding:18px; background:rgba(15,23,42,.48); backdrop-filter:blur(4px); }
.price-cost-modal { width:min(560px,100%); padding:0; overflow:hidden; }
.price-cost-modal .modal-head { margin:0; padding:20px; border-bottom:1px solid #e5eaf1; }
.price-cost-modal .modal-head h2 { margin:0 0 4px; font-size:20px; }
.price-cost-modal .modal-head p { margin:0; color:#64748b; font-size:12px; line-height:1.45; }
.price-cost-body { display:grid; gap:12px; padding:20px; }
.price-cost-dropzone { display:flex; align-items:center; gap:12px; min-height:76px; padding:14px; border:1px dashed #93b4e7; border-radius:8px; background:#f8fbff; color:#1d4ed8; text-align:left; cursor:pointer; }
.price-cost-dropzone:hover { border-color:#2563eb; background:#eff6ff; }
.price-cost-dropzone > .ui-icon { width:24px; height:24px; }
.price-cost-dropzone span { display:grid; gap:3px; min-width:0; }
.price-cost-dropzone strong { overflow:hidden; color:#172554; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.price-cost-dropzone em { color:#64748b; font-size:11px; font-style:normal; }
.price-cost-help { display:grid; gap:5px; padding:12px; border-radius:7px; background:#f8fafc; color:#475569; font-size:12px; }
.price-cost-help strong { color:#172554; }
.price-cost-help small { margin-top:4px; color:#64748b; line-height:1.4; }
.price-cost-modal .modal-actions { display:flex; justify-content:flex-end; gap:8px; margin:0; padding:14px 20px; border-top:1px solid #e5eaf1; }
.price-promotions-loading,
.price-promotions-empty,
.price-promotions-error { padding: 12px; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 12px; }
.price-promotions-loading { display: flex; align-items: center; gap: 8px; }
.price-promotions-loading .ui-icon { width: 16px; height: 16px; animation: price-task-spin .8s linear infinite; }
.price-promotions-error { background: #fef2f2; color: #b91c1c; }
.price-auto-promotion-note { padding:9px 10px; border-radius:7px; background:#f8fafc; color:#64748b; font-size:11px; line-height:1.4; }

.price-edit-modal .modal-actions {
  position: sticky;
  bottom: 0;
  margin: 4px -24px 0;
  padding: 14px 24px;
  border-top: 1px solid #e5eaf1;
  background: rgba(255, 255, 255, .97);
}

.price-edit-modal .modal-actions .button {
  min-height: 42px;
}

.price-task-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.price-task-status.success { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.price-task-status.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.price-task-status > .ui-icon { width: 21px; height: 21px; }
.price-task-status > div { display: grid; gap: 2px; min-width: 0; }
.price-task-status strong { color: inherit; font-size: 13px; }
.price-task-status span { overflow: hidden; color: #64748b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.price-task-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: price-task-spin .8s linear infinite;
}

.price-row.is-updating { background:#f8fbff; }
.price-promotion-summary { display:grid; gap:4px; justify-items:start; }
.price-promo-state { display:inline-flex; align-items:center; gap:5px; width:max-content; max-width:100%; padding:4px 7px; border-radius:999px; font-size:11px; font-weight:800; line-height:1.2; }
.price-promo-state.participating { background:#dcfce7; color:#166534; }
.price-promo-state.eligible { background:#e0f2fe; color:#075985; }
.price-promo-state.none { background:#f1f5f9; color:#64748b; }
.price-promo-state.automatic { background:#eef2ff; color:#4338ca; }
.price-promo-state.unavailable { background:#fef2f2; color:#b91c1c; }
.price-promo-state.loading { background:#f8fafc; color:#475569; }
.price-promo-state.loading .ui-icon { width:12px; height:12px; animation:price-task-spin .8s linear infinite; }
.price-promo-note { max-width:150px; color:#64748b; font-size:10px; line-height:1.3; }
.price-inline-task {
  display:flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  margin-top:5px;
  padding:5px 7px;
  border:1px solid #bfdbfe;
  border-radius:6px;
  background:#eff6ff;
  color:#1d4ed8;
}
.price-inline-task .price-task-spinner { width:13px; height:13px; border-width:2px; }
.price-inline-task > .ui-icon { flex:0 0 auto; width:14px; height:14px; }
.price-inline-task b { overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.price-inline-task.success { border-color:#bbf7d0; background:#f0fdf4; color:#15803d; }
.price-inline-task.error { border-color:#fecaca; background:#fef2f2; color:#b91c1c; }

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

@media (max-width: 560px) {
  .price-edit-backdrop { align-items: flex-end; padding: 0; }
  .price-edit-modal { width: 100%; max-height: 92vh; border-radius: 10px 10px 0 0; }
  .price-edit-modal .modal-head { padding: 18px 16px 14px; }
  .price-edit-current { margin: 14px 16px 0; }
  .price-edit-current > span { padding: 10px; }
  .price-edit-form { padding: 16px 16px 0; }
  .price-edit-fields { grid-template-columns: 1fr; }
  .price-edit-methods, .price-edit-methods.three { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .price-edit-result { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .price-edit-result > span { padding:8px; border-left:1px solid #bfdbfe; border-top:1px solid #bfdbfe; }
  .price-edit-result > span:nth-child(-n+2) { border-top:0; }
  .price-edit-result > span:nth-child(odd) { padding-left:0; border-left:0; }
  .price-product-head { gap:10px; }
  .price-modal-head-actions .button span { display:none; }
  .price-history { padding-right:16px; padding-left:16px; }
  .price-edit-modal .modal-actions { margin-right: -16px; margin-left: -16px; padding: 12px 16px; }
  .price-promotion { grid-template-columns: 1fr; }
}

/* Cost prices are an internal directory, separate from operational WB prices. */
.costs-workspace { display:grid; gap:12px; }
.cost-status { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; }
.cost-status > div { display:flex; align-items:center; gap:10px; min-width:0; }
.cost-status > div > span:last-child { display:grid; gap:2px; }
.cost-status strong { color:#1e293b; font-size:13px; }
.cost-status em { color:#64748b; font-size:11px; font-style:normal; }
.cost-status .button { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.cost-status .ui-icon { width:16px; height:16px; }
.cost-filters { display:grid; grid-template-columns:minmax(260px,1.4fr) minmax(190px,.7fr) minmax(190px,.7fr) auto; gap:10px; align-items:end; padding:14px 16px; }
.cost-filters label { display:grid; gap:5px; color:#475569; font-size:11px; font-weight:800; }
.cost-filters input,
.cost-filters select { min-height:40px; }
.cost-summary { display:flex; align-items:baseline; gap:7px; padding:0 2px; color:#64748b; font-size:12px; }
.cost-summary strong { color:#172554; font-size:20px; }
.cost-table { overflow:hidden; }
.cost-table-head,
.cost-row { display:grid; grid-template-columns:minmax(340px,1.5fr) minmax(150px,.55fr) minmax(260px,.75fr) 150px; gap:16px; align-items:center; }
.cost-table-head { min-height:42px; padding:0 16px; border-bottom:1px solid #e2e8f0; color:#64748b; background:#f8fafc; font-size:11px; font-weight:850; }
.cost-row { min-height:76px; padding:10px 16px; border-bottom:1px solid #edf1f5; }
.cost-row:last-child { border-bottom:0; }
.cost-row:hover { background:#fbfdff; }
.cost-product { display:grid; grid-template-columns:44px minmax(0,1fr); gap:10px; align-items:center; min-width:0; }
.cost-image { width:44px; height:54px; border-radius:6px; object-fit:cover; }
.product-image-placeholder.cost-image { width:44px; height:54px; }
.cost-product > span { display:grid; gap:3px; min-width:0; }
.cost-product strong { overflow:hidden; color:#1e293b; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.cost-product .price-copy-value { width:max-content; max-width:100%; color:#64748b; font-size:10px; }
.cost-account { display:grid; gap:3px; }
.cost-account strong { color:#334155; font-size:12px; }
.cost-account em { color:#64748b; font-size:11px; font-style:normal; }
.cost-input { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.cost-input input { min-width:0; min-height:38px; }
.cost-input .button { min-height:38px; }
.cost-updated { color:#64748b; font-size:11px; }

@media (max-width: 1080px) {
  .cost-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cost-table { overflow-x:auto; }
  .cost-table-head,
  .cost-row { min-width:980px; }
}

@media (max-width: 640px) {
  .cost-status { align-items:stretch; flex-direction:column; }
  .cost-status .button { justify-content:center; width:100%; }
  .cost-filters { grid-template-columns:1fr; }
  .cost-table { overflow:visible; }
  .cost-table-head { display:none; }
  .cost-row {
    min-width:0;
    grid-template-columns:1fr;
    gap:10px;
    padding:14px;
  }
  .cost-account {
    grid-template-columns:auto minmax(0,1fr);
    align-items:baseline;
    gap:6px;
  }
  .cost-account::before { content:"Кабинет"; color:#64748b; font-size:10px; font-weight:800; text-transform:uppercase; }
  .cost-account em { grid-column:2; }
  .cost-input { grid-template-columns:minmax(0,1fr) auto; }
  .cost-updated::before { content:"Изменено: "; color:#94a3b8; }
  .cost-product .price-copy-value { width:100%; overflow:hidden; }
  .cost-product .price-copy-value span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

@media (max-width: 720px) {
  html,
  body { max-width:100%; overflow-x:hidden; }
  .app-sidebar,
  .app-sidebar.collapsed { box-sizing:border-box; overflow:hidden; }
  .app-navigation { min-width:0; max-width:100%; }
}

/* Final overrides for the wide price dialog and its mirrored stock table. */
.price-stock-day { flex-basis:190px; min-height:154px; }
.price-edit-modal { width:min(1500px,calc(100vw - 36px)); max-height:calc(100vh - 36px); }
@media (max-width:720px) {
  .price-edit-modal { width:100%; max-height:92vh; }
}
/* SPP experiment builder */
.spp-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; max-width: 100%; }
.spp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; min-width: 0; }
.spp-builder { display: grid; gap: 14px; min-width: 0; }
.spp-builder > .panel, .spp-product-picker label, .spp-strategy-grid, .spp-strategy-card { min-width: 0; max-width: 100%; }
.spp-builder .panel, .spp-detail { padding: 20px; }
.spp-section-title { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.spp-section-title > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 9px; background: #6d28d9; color: #fff; font-weight: 800; }
.spp-section-title h2, .spp-history-head h2, .spp-detail h2 { margin: 0; font-size: 18px; }
.spp-section-title p, .spp-detail-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.spp-product-picker { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); gap: 12px; }
.spp-product-picker .spp-section-title, .spp-product-picker .spp-current { grid-column: 1 / -1; }
.spp-product-picker label, .spp-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.spp-product-picker select, .spp-fields select, .spp-fields input, .spp-fields textarea { width: 100%; }
.spp-current { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.spp-current span { padding: 10px 12px; border-radius: 11px; background: #f6f4fb; color: var(--muted); font-size: 12px; }
.spp-current strong { display: block; margin-top: 3px; color: var(--text); font-size: 17px; }
.spp-open-wb { grid-column:1/-1; justify-self:start; font-size:12px; font-weight:800; }
.spp-strategy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.spp-strategy-card { width: 100%; min-height: 78px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.spp-strategy-card strong, .spp-strategy-card span { display: block; }
.spp-strategy-card span { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.spp-strategy-card:hover { border-color: #a78bfa; }
.spp-strategy-card.active { border-color: #7c3aed; box-shadow: inset 0 0 0 1px #7c3aed; background: #f7f3ff; }
.spp-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.spp-fields .spp-wide { grid-column: 1 / -1; }
.spp-fields textarea { resize: vertical; min-height: 76px; }
.spp-preview-metrics, .spp-metrics { display: grid; gap: 8px; }
.spp-metrics { grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); }
.spp-preview-metrics { grid-template-columns: repeat(4, 1fr); }
.spp-preview-metrics span, .spp-metrics > div { padding: 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: 12px; }
.spp-preview-metrics strong, .spp-metrics strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 16px; }
.spp-metrics small { display:block; color:var(--muted); font-size:10px; }
.spp-route { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 8px; scroll-snap-type: x proximity; }
.spp-route > span { flex: 0 0 auto; min-width: 116px; padding: 10px; border-radius: 10px; background: #f6f4fb; scroll-snap-align: start; }
.spp-route small, .spp-route strong, .spp-route em { display: block; }
.spp-route small { color: #7c3aed; font-weight: 800; }
.spp-route strong { margin-top: 4px; }
.spp-route em { margin-top: 3px; color: var(--muted); font-size: 10px; font-style: normal; }
.spp-route .spp-route-gap { display: grid; place-items: center; min-width: 150px; border: 1px dashed #a78bfa; background: #faf7ff; text-align: center; }
.spp-route .spp-route-gap strong { color: #7c3aed; font-size: 22px; }
.spp-add-target { align-self: end; min-height: 42px; }
.spp-targets { display: grid; grid-column: 1 / -1; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.spp-targets-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.spp-targets-head strong { font-size: 13px; }
.spp-targets-head span, .spp-target-hint { color: var(--muted); font-size: 11px; }
.spp-target-chip { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #ddd6fe; border-radius: 10px; background: #faf7ff; }
.spp-target-chip > span { display: grid; min-width: 0; gap: 2px; }
.spp-target-chip strong, .spp-target-chip em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spp-target-chip strong { font-size: 12px; }
.spp-target-chip em { color: var(--muted); font-size: 10px; font-style: normal; }
.spp-target-chip em a,.spp-wb-link,.spp-product-link { color:#6d28d9; text-decoration:none; }
.spp-target-chip em a:hover,.spp-wb-link:hover,.spp-product-link:hover { text-decoration:underline; }
.spp-target-chip button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: #ede9fe; color: #6d28d9; cursor: pointer; font-size: 18px; }
.spp-stage-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.spp-stage-list span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.spp-stage-list strong, .spp-stage-list em { display: block; font-size: 11px; }
.spp-stage-list em { color: var(--muted); font-style: normal; margin-top: 2px; }
.spp-start { width: 100%; margin-top: 4px; }
.spp-results { position: sticky; top: 16px; min-width: 0; }
.spp-history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.spp-history { display: grid; gap: 7px; max-height: 640px; overflow-y: auto; }
.spp-history-card { position:relative; display:grid; min-width:0; }
.spp-history-item { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.spp-history-wb { position:absolute; right:9px; bottom:8px; padding:3px 6px; border-radius:6px; background:#ede9fe; color:#6d28d9; font-size:10px; font-weight:800; text-decoration:none; }
.spp-history-item.active { border-color: #7c3aed; box-shadow: inset 0 0 0 1px #7c3aed; }
.spp-history-item em, .spp-history-item small { color: var(--muted); font-size: 11px; font-style: normal; }
.spp-status { display: inline-flex; width: fit-content; padding: 3px 7px; border-radius: 999px; background: #ede9fe; color: #6d28d9; font-size: 10px; font-weight: 800; }
.spp-status.completed { background: #dcfce7; color: #166534; }
.spp-status.error { background: #fee2e2; color: #b91c1c; }
.spp-status.cancelled { background: #f1f5f9; color: #475569; }
.spp-detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.spp-detail-head h2 { margin-top: 8px; }
.spp-progress { height: 7px; margin: 16px 0 12px; border-radius: 99px; overflow: hidden; background: #ede9fe; }
.spp-progress span { display: block; height: 100%; border-radius: inherit; background: #7c3aed; transition: width .25s ease; }
.spp-chart { margin-top: 16px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spp-chart svg { display: block; width: 100%; height: auto; max-height: 250px; overflow: visible; }
.spp-chart line { stroke: #d8d3e5; stroke-width: 1; }
.spp-chart text { fill: #776f84; font-size: 11px; }
.spp-chart-line { fill: none; stroke: #7c3aed; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.spp-chart circle { fill: #fff; stroke: #7c3aed; stroke-width: 3; }
.spp-chart-empty, .spp-history-empty { padding: 24px 12px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; }
.spp-points-wrap { margin-top: 14px; overflow-x: auto; }
.spp-points { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.spp-points th, .spp-points td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.spp-points th { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.spp-points tr.is-error td { color: #b91c1c; }
.spp-empty { display: grid; gap: 4px; color: var(--muted); }
.notice-inline { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f1f5f9; color: #475569; font-size: 12px; }
.notice-inline.error { background: #fee2e2; color: #991b1b; }

@media (max-width: 980px) {
  .spp-layout { grid-template-columns: minmax(0, 1fr); }
  .spp-results { position: static; order: -1; }
  .spp-history { display: flex; max-height: none; overflow-x: auto; }
  .spp-history-card { flex: 0 0 250px; }
  .spp-history-item { width:100%; }
}

@media (max-width: 720px) {
  .spp-builder .panel, .spp-detail { padding: 14px; }
  .spp-layout, .spp-builder { width: 100%; max-width: 100%; }
  .spp-product-picker, .spp-fields, .spp-current, .spp-preview-metrics, .spp-metrics { grid-template-columns: minmax(0, 1fr); }
  .spp-product-picker .spp-section-title, .spp-product-picker .spp-current, .spp-fields .spp-wide { grid-column: 1; }
  .spp-targets { grid-column: 1; }
  .spp-targets-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .spp-strategy-grid { grid-template-columns: minmax(0, 1fr); }
  .spp-detail-head { display: grid; }
  .spp-detail-head .button { width: 100%; }
}
