:root {
  --navy-950: #062b36;
  --navy-900: #073846;
  --navy-800: #0b4c5b;
  --teal-700: #007a76;
  --teal-600: #00958e;
  --teal-500: #12bbb1;
  --teal-100: #dff7f4;
  --gold: #c89545;
  --gold-soft: #fff5df;
  --page: #f5f7f7;
  --panel: #ffffff;
  --panel-soft: #f8faf9;
  --line: #e5ebe9;
  --line-strong: #cad8d5;
  --text: #10202a;
  --muted: #64717c;
  --faint: #9aa6ae;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #f59e0b;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --excel: #217346;
  --shadow-xs: 0 1px 2px rgba(6, 43, 54, .05);
  --shadow-sm: 0 8px 22px rgba(6, 43, 54, .07);
  --shadow-md: 0 18px 44px rgba(6, 43, 54, .11);
  --shadow-premium: 0 24px 70px rgba(6, 43, 54, .14);
  --font-body: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 1120px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(18, 187, 177, .10), transparent 31%),
    linear-gradient(180deg, #fbfcfb 0%, var(--page) 38%, #eef4f2 100%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  padding: 24px 16px 22px;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(255,255,255,.08), rgba(255,255,255,0) 32%),
    linear-gradient(180deg, rgba(18,187,177,.22), rgba(18,187,177,0) 42%),
    linear-gradient(180deg, #073d4a 0%, #052934 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.10), 18px 0 40px rgba(6,43,54,.08);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy-950);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.brand-logo {
  width: 122px;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 12px 26px rgba(0,0,0,.18), inset 0 0 0 1px rgba(6,43,54,.04);
}

.brand strong { display: block; font-size: 17px; line-height: 1.15; }
.brand span, .side-label { color: rgba(255,255,255,.66); font-size: 12px; }

.country-select {
  width: 100%;
  min-height: 44px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 24px rgba(0,0,0,.12);
}

.country-select:focus { border-color: rgba(18,187,177,.95); box-shadow: 0 0 0 3px rgba(18,187,177,.22), 0 12px 24px rgba(0,0,0,.12); }

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

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  color: rgba(255,255,255,.78);
  background: transparent;
  text-align: left;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.8);
  font-size: 11px;
  font-weight: 800;
}

.nav-item.active, .nav-item:hover {
  background: linear-gradient(135deg, rgba(18,187,177,.98), rgba(0,149,142,.98));
  color: #fff;
  box-shadow: 0 12px 24px rgba(0,149,142,.24), inset 0 1px 0 rgba(255,255,255,.18);
}
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { background: rgba(255,255,255,.2); color: #fff; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 14px;
  color: rgba(255,255,255,.62);
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.sidebar-foot strong { color: #fff; font-size: 14px; }

.main {
  margin-left: 264px;
  min-height: 100vh;
  padding: 26px 28px 30px;
}

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

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

h1 { margin: 0; font-size: 27px; line-height: 1.12; letter-spacing: 0; }
h2 { margin: 0; font-size: 19px; letter-spacing: 0; }
h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: 0; }
p { margin: 4px 0 0; color: var(--muted); }

.actions, .toolbar, .table-footer, .lower-actions, .form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-head .actions {
  align-items: flex-end;
  flex-wrap: nowrap;
}

.page-head .actions .field {
  gap: 4px;
}

.page-head .actions input,
.page-head .actions .btn,
.page-head .actions .icon-btn {
  height: 40px;
}

.page-head .actions .btn,
.page-head .actions .icon-btn {
  margin-bottom: 0;
}

.field, .search, .form-row label, .schedule-form label {
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 5px;
  font-weight: 600;
}

input, select, textarea {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(6,43,54,.02);
}

select option {
  color: var(--text);
  background: #fff;
}

.country-select option {
  color: var(--text);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(0,175,170,.16);
}

.compact input { min-width: 150px; }
.compact select { min-width: 128px; }
.search input { width: 320px; }
.dashboard-product-field select { width: min(620px, 48vw); }
.product-select-field select { width: min(560px, 46vw); }
.product-search { align-items: end; }

.btn, .icon-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 38px;
  padding: 9px 13px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.btn.primary {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #fff;
  box-shadow: 0 12px 24px rgba(0,149,142,.22);
}
.btn.primary:hover { background: linear-gradient(135deg, #19c7bd, var(--teal-600)); }
.btn.secondary, .btn.ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn.secondary:hover, .btn.ghost:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.btn.dark { background: var(--navy-900); color: #fff; }
.btn.danger { background: #fff; color: var(--red); border-color: #f3b8b8; }
.icon-btn { width: 38px; background: #fff; border-color: var(--line); color: var(--muted); }

.excel-dot, .red-dot, .purple-dot, .black-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
}

.excel-dot { background: var(--excel); }
.red-dot { background: var(--red); }
.purple-dot { background: var(--purple); }
.black-dot { background: var(--text); }
.best-dot { color: var(--amber); margin-right: 5px; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal-500), var(--gold));
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
  color: var(--navy-950);
  font-variant-numeric: tabular-nums;
}

.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.table-shell {
  position: relative;
  height: calc(100vh - 360px);
  min-height: 410px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-premium);
}

table { width: 100%; border-collapse: separate; border-spacing: 0; }

th, td {
  border-bottom: 1px solid var(--line);
  padding: 7px 7px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: #fff;
  font-size: 10px;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
}

td {
  background: #fff;
  height: 46px;
  font-size: 12px;
}

tbody tr:nth-child(even) td { background: #fbfcfb; }
tbody tr:hover td { background: #f0faf8; }

.c-ean { min-width: 118px; }
.c-product { min-width: 260px; max-width: 260px; }
.c-pvc { min-width: 74px; }
.c-floor { min-width: 74px; }

.ean-link {
  color: var(--teal-600);
  font-weight: 800;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

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

.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  line-height: 1.2;
  font-weight: 650;
}

.num, .price-cell { font-variant-numeric: tabular-nums; text-align: right; }
.price-cell { min-width: 92px; max-width: 104px; text-align: center; white-space: nowrap; }
.price-value { font-weight: 800; }
.price-link {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}
.price-link:hover { text-decoration: underline; }
.old-price {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  margin-top: 2px;
  text-decoration: line-through;
}
.under-floor .price-value { color: var(--red); }
.under-floor .price-link { color: var(--red); }
.under-floor { background: #fff8f8 !important; }
.best-compliant .price-value { color: var(--purple); }
.best-compliant .price-link { color: var(--purple); }
.best-compliant { background: #fbf9ff !important; }
.up { color: var(--green); font-weight: 900; }
.down { color: var(--red); font-weight: 900; }
.equal { color: var(--faint); font-weight: 900; }
.seller { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }

.loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  background: rgba(255,255,255,.76);
  color: var(--navy-900);
  font-weight: 800;
}

.loading.show { display: grid; }
.empty { padding: 34px; color: var(--muted); text-align: center; }
.hidden { display: none !important; }

.table-footer {
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
}

.pager { display: flex; align-items: center; gap: 10px; }
.lower-actions { margin-top: 12px; }

.product-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 16px;
}

.product-card, .chart-card, .form-block, .schedule-form, .email-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.product-card { padding: 18px; }

.product-image {
  aspect-ratio: 1 / 1;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--navy-900);
  background:
    linear-gradient(160deg, rgba(0,175,170,.18), rgba(255,255,255,.25)),
    #f7fbfb;
  font-weight: 900;
  font-size: 30px;
  margin-bottom: 16px;
  overflow: hidden;
}

.product-image.has-image { background: #fff; }
.product-image img {
  max-width: 92%;
  max-height: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.product-card h2 { color: var(--navy-900); line-height: 1.22; }
.product-card dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin: 16px 0; }
.product-card dt { color: var(--muted); }
.product-card dd { margin: 0; font-weight: 700; }

.chart-card { padding: 14px; min-width: 0; box-shadow: var(--shadow-md); }
.chart-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.legend-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  padding: 6px 9px;
  font-size: 12px;
}
.legend-line { width: 18px; height: 3px; display: inline-block; margin-right: 6px; vertical-align: middle; }
.chart-wrap { height: 460px; position: relative; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; display: block; }
.chart-note { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; padding-top: 8px; }

.email-list { display: grid; gap: 10px; }
.email-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.email-card strong { font-size: 16px; color: var(--navy-900); }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: var(--teal-100);
  color: var(--navy-900);
  font-weight: 800;
}

.schedule-form { padding: 16px; display: grid; gap: 14px; }
.form-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.form-block { padding: 14px; }
textarea { width: 100%; resize: vertical; }
.counter { text-align: right; color: var(--muted); font-size: 12px; margin-top: 5px; }
.schedule-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.compact-row { grid-template-columns: minmax(240px, 1fr) auto; align-items: end; }
.section-title.slim { margin-bottom: 8px; }
.section-title.slim h3 { margin: 0; }
.product-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
}
.selected-products {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.selected-product {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fbfb);
}
.selected-product strong,
.preview-table .product-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-product small { color: var(--muted); font-weight: 700; }
.order-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--teal-100);
  color: var(--navy-900);
  font-weight: 900;
}
.row-tools { display: flex; gap: 4px; }
.row-tools button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy-900);
  font-weight: 900;
  cursor: pointer;
}
.row-tools button:hover { border-color: var(--teal); color: var(--teal); }
.email-preview {
  display: grid;
  gap: 8px;
}
.site-picker-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.schedule-site-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.schedule-site-option {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 7px !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--navy-900) !important;
  font-weight: 800 !important;
}
.schedule-site-option input { margin: 0; padding: 0; box-shadow: none; }
.preview-shell {
  height: auto;
  max-height: 460px;
  min-height: 180px;
  box-shadow: var(--shadow-sm);
}
.preview-table { min-width: 980px; }
.preview-table th { position: sticky; }
.preview-table .muted { color: var(--muted); font-weight: 600; }
.email-preview-legend {
  margin: 0;
  box-shadow: none;
  border-radius: 10px;
}
.c-order { min-width: 54px; }
.report-email-preview {
  background: #f3f4f6;
  padding: 18px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.report-email-card {
  width: 100%;
  min-width: 980px;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dbe2ea;
  color: #1f2937;
  font-family: Arial, Helvetica, sans-serif;
}
.report-email-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 10px;
  border-bottom: 1px solid #e5e7eb;
}
.report-email-head img {
  width: 141px;
  height: 35px;
  object-fit: contain;
}
.report-email-title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  color: #111827;
}
.report-email-sites {
  font-size: 13px;
  line-height: 20px;
  color: #6b7280;
  padding-top: 6px;
}
.report-email-date {
  font-size: 12px;
  line-height: 18px;
  color: #9ca3af;
  padding-top: 6px;
}
.report-email-intro {
  padding: 18px 24px 8px;
  font-size: 14px;
  line-height: 22px;
  color: #374151;
}
.report-email-legend {
  padding: 0 24px 12px;
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}
.legend-red { color: #dc2626; font-weight: 700; }
.legend-purple { color: #7c3aed; font-weight: 700; }
.report-table-scroll {
  padding: 8px 24px 16px;
  overflow-x: auto;
}
.report-price-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 980px;
  border-spacing: 0;
}
.report-price-table thead td {
  background-color: #1f2937;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 8px;
  border: 1px solid #d1d5db;
  text-align: center;
  position: static;
  text-transform: none;
  box-shadow: none;
}
.report-price-table td {
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  height: auto;
  background: transparent;
}
.report-price-table tbody tr:nth-child(even) { background-color: #f9fafb; }
.report-price-table .center { text-align: center; }
.report-price-table a {
  color: inherit !important;
  text-decoration: none !important;
  background: none !important;
  font-weight: inherit;
}
.report-price-table a:hover { text-decoration: underline !important; }
.report-under-floor { color: #dc2626; }
.report-best-compliant { color: #7c3aed; }
.report-old-price {
  display: block;
  color: #6b7280;
  font-size: 10px;
  line-height: 1.15;
  text-decoration: line-through;
  margin-top: 2px;
}
.report-seller {
  display: block;
  color: #6b7280;
  font-size: 10px;
  margin-top: 2px;
}
.form-actions { justify-content: flex-end; }

.scraping-product-field select { width: min(760px, 58vw); }
.scraping-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}
.scraping-config-panel { min-width: 0; }
.scraping-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-title h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 16px;
  line-height: 1.2;
}
.scraping-site-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.site-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy-900);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
}
.site-chip span { color: var(--muted); font-weight: 700; margin-left: 6px; }
.site-config-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 10px;
}
.site-config-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(150px, .8fr) 92px 74px 66px 112px;
  gap: 10px;
  align-items: end;
  background: #fff;
}
.site-config-card h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 14px;
  line-height: 1.2;
}
.site-config-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-config-card label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.site-config-card .switch-line {
  align-self: center;
  margin-bottom: 7px;
}
.site-config-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  padding-bottom: 11px;
}
.scraping-config-list { display: grid; gap: 12px; }
.scraping-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 12px;
}
.scraping-card-head, .scraping-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.scraping-card-head p, .scraping-card-foot span {
  color: var(--muted);
  font-size: 12px;
}
.scraping-card label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.switch-line {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 7px !important;
  color: var(--text) !important;
  white-space: nowrap;
}
.compact-empty { padding: 12px; }

@media (max-width: 1180px) {
  .site-config-card {
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) 90px;
  }
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 18px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow-md);
}
dialog::backdrop { background: rgba(16, 32, 42, .45); }
dialog form { display: grid; gap: 12px; }
.wide-dialog { width: min(760px, calc(100vw - 40px)); }
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.dialog-head h2 { margin: 0 0 4px; }
.order-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.product-order-list {
  display: grid;
  gap: 6px;
  max-height: min(560px, 62vh);
  overflow: auto;
  padding-right: 4px;
}
.order-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  cursor: pointer;
}
.order-row:hover, .order-row.selected {
  border-color: var(--teal);
  background: #ecfbf9;
}
.order-rank {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--navy-900);
  font-weight: 900;
}
.order-row strong, .order-row small { display: block; }
.order-row small { color: var(--muted); margin-top: 2px; }
.muted { color: var(--muted); }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  background: var(--navy-900);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 1180px) {
  body { min-width: 980px; }
  .sidebar { width: 230px; }
  .main { margin-left: 230px; padding: 18px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .product-select-field select { width: 520px; }
  .table-shell { height: 520px; }
}
