@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Instrument+Sans:wght@400;500;600;700&display=swap");

:root {
  --paper: #f1f4ee;
  --paper-2: #ffffff;
  --paper-3: #e7ece5;
  --ink: #0e1c17;
  --ink-soft: #34443c;
  --muted: #68766e;
  --line: #d3dbd3;
  --line-strong: #b7c3b9;
  --blue: #1746d1;
  --blue-deep: #0f339e;
  --blue-soft: #e8edff;
  --red: #d92d20;
  --red-soft: #fde8e5;
  --green: #0b7a4b;
  --green-soft: #e3f5ec;
  --bonus: #d92d20;
  --bonus-soft: #fde8e5;
  --amber: #8a5a00;
  --amber-soft: #fff3d1;
  --shadow: 0 20px 60px -32px rgba(28, 32, 24, 0.35);
  --shadow-sm: 0 1px 2px rgba(28, 32, 24, 0.06), 0 8px 22px -16px rgba(28, 32, 24, 0.28);
  --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Instrument Sans", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Bricolage Grotesque", "Arial Narrow", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.page-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(10, 91, 220, 0.055), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(200, 64, 47, 0.05), transparent 30%),
    repeating-linear-gradient(0deg, rgba(24, 33, 26, 0.017) 0 1px, transparent 1px 4px);
}

a {
  color: var(--blue);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(241, 244, 238, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--blue);
  color: white;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: -0.5px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-word strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.brand-word span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}

.tab.is-active .tab-badge {
  background: rgba(255, 255, 255, 0.16);
  color: var(--paper-2);
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  background: var(--ink);
  color: var(--paper-2);
  box-shadow: var(--shadow-sm);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.pulse.is-live {
  background: var(--bonus);
  box-shadow: 0 0 0 3px var(--bonus-soft);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(213, 29, 63, 0.08);
  }
}

main {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - clamp(32px, 8vw, 96px)));
  margin: 0 auto;
  padding: 44px 0 80px;
}

.view {
  display: none;
  animation: rise 0.28s ease both;
}

.view.is-active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h1 {
  font-size: clamp(38px, 5vw, 62px);
}

h1 em {
  color: var(--blue);
  font-style: italic;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 21px;
}

.lede {
  max-width: 520px;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.lede.narrow {
  max-width: 560px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(18px, 2vw, 36px) 0 50px;
}

.search-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
}

.search-card::before {
  content: "";
  position: absolute;
  inset: 8px -8px -8px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  z-index: -1;
  opacity: 0.6;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: white;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-row input:focus,
.filter input:focus,
.filter select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: var(--blue-deep);
}

.btn-secondary {
  background: var(--paper-2);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: white;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--line-strong);
}

.btn-small {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-danger {
  background: var(--red-soft);
  border-color: #f0c4bc;
  color: var(--red);
}

.search-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

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

.select-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.select-inline select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-2);
  padding: 4px 6px;
  font-size: 12px;
  color: var(--ink);
}

.hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading.compact {
  align-items: center;
  margin-top: 28px;
}

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

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.quick-stats {
  display: flex;
  gap: 12px;
}

.quick-stat {
  min-width: 104px;
  padding: 12px 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quick-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}

.quick-stat span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 130px;
}

.filter.grow {
  flex: 1;
  min-width: 190px;
}

.filter span {
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.filter input,
.filter select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px 10px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}

.filter-check {
  flex-direction: row;
  min-width: auto;
  padding-bottom: 9px;
  font-size: 12px;
  color: var(--ink-soft);
}

.filter-check input {
  width: 15px;
  height: 15px;
}

.table-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(217, 210, 194, 0.65);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr.clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}

.data-table tbody tr.clickable:hover {
  background: rgba(230, 239, 255, 0.45);
}

.compare-table {
  table-layout: auto;
  min-width: 680px;
}

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

.table-card:has(.compare-table),
.table-card:has(.catalog-table),
.table-card:has(.list-table) {
  overflow-x: auto;
}

.catalog-table .col-product {
  width: 38%;
}

.catalog-table .col-cat {
  width: 16%;
}

.catalog-table .col-price {
  width: 13%;
}

.catalog-table .col-gap {
  width: 11%;
}

.catalog-table .col-conf {
  width: 9%;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 9px;
  background: white;
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 3px;
}

.thumb-fallback {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--paper-3);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
}

.product-text {
  min-width: 0;
}

.product-title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 480px;
}

.product-sub {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-sub .dot::before {
  content: "·";
  margin-right: 7px;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.32;
}

.price-main {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.price-main.is-bonus {
  color: var(--bonus);
}

.price-was {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
}

.promo-tag {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bonus-soft);
  color: var(--bonus);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-missing {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.gap {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.gap-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gap-badge.cheaper-nl {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.gap-badge.cheaper-be {
  background: var(--amber-soft);
  color: var(--amber);
}

.gap-badge.same {
  background: var(--paper-3);
  color: var(--muted);
}

.gap-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.confidence {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.confidence.low {
  color: var(--red);
  font-weight: 700;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 10.5px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(251, 249, 243, 0.5);
}

.empty h3 {
  margin-bottom: 8px;
}

.empty p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
}

.empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 22px;
  color: var(--blue);
  background: var(--paper-2);
}

.table-empty {
  border: 0;
  border-radius: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

.pagination button {
  min-width: 32px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-2);
  cursor: pointer;
}

.pagination button.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.alert-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.alert {
  padding: 10px 14px;
  border: 1px solid #edc3bb;
  border-radius: 9px;
  background: var(--red-soft);
  color: #8e2d20;
  font-size: 12.5px;
}

.alert strong {
  font-weight: 700;
}

.alert code {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(142, 45, 32, 0.18);
}

.matches-panel {
  margin: 0 0 18px;
  padding: 18px;
  background: var(--amber-soft);
  border: 1px solid #ecd7a8;
  border-radius: var(--radius);
}

.matches-head h3 {
  font-size: 18px;
}

.matches-head p {
  margin: 4px 0 14px;
  font-size: 12.5px;
  color: #6d551f;
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}

.match-card {
  padding: 12px;
  background: var(--paper-2);
  border: 1px solid #e4d3ad;
  border-radius: 10px;
}

.match-card .product-title {
  white-space: normal;
}

.match-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.match-conf {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-label {
  display: block;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card .stat-note {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.store-sync-panel {
  margin: 0 0 16px;
}

.store-sync-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.store-sync-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  background: var(--paper-2);
}

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

.store-sync-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
}

.store-sync-meta {
  font-size: 10.5px;
  color: var(--muted);
}

.store-sync-run {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.store-sync-run .meta {
  margin: 0;
}

.store-sync-empty {
  color: var(--muted);
  font-size: 11px;
}

.store-sync-button {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.store-sync-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.store-sync-button:disabled {
  opacity: 0.5;
  cursor: default;
}

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

.sync-progress {
  padding: 20px;
  margin-bottom: 22px;
  background: var(--ink);
  color: var(--paper-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.progress-head .eyebrow {
  color: #aab5a9;
}

.progress-head h3 {
  font-size: 24px;
}

.run-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.1);
  color: #c7d2c5;
}

.run-badge.running {
  background: rgba(213, 29, 63, 0.22);
  color: #ffb3c1;
}

.progress-bar {
  height: 6px;
  margin: 16px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7aa5ff, #c8d8ff);
  transition: width 0.4s ease;
}

.progress-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: #aab5a9;
}

.progress-message {
  margin: 10px 0 0;
  font-size: 13px;
  color: #e4e9e2;
}

.progress-warnings {
  margin-top: 8px;
  font-size: 11px;
  color: #f0c884;
}

.sync-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

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

.schedule-panel {
  padding-bottom: 16px;
}

.schedule-copy,
.schedule-note {
  margin: 14px 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px;
  padding: 8px 0;
  border-top: 1px solid rgba(217, 210, 194, 0.65);
  font-size: 11.5px;
}

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

.runs-table td {
  padding: 9px 14px;
  font-size: 12px;
}

.runs-table th {
  padding: 9px 14px;
  font-size: 9.5px;
}

.run-note {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.run-warning {
  color: var(--amber);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge.completed {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.running {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.status-badge.failed,
.status-badge.interrupted {
  background: var(--red-soft);
  color: var(--red);
}

.status-badge.cancelled {
  background: var(--paper-3);
  color: var(--muted);
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer-mono {
  font-family: var(--mono);
}

/* Lists */
.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.inline-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.inline-form .field-label {
  margin: 0;
}

.inline-form input {
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px 10px;
  outline: none;
}

.inline-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

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

.list-sidebar {
  position: sticky;
  top: 82px;
}

.list-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.list-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.list-nav-item:hover {
  background: var(--paper-3);
}

.list-nav-item.is-active {
  background: var(--blue-soft);
  border-color: #c8dcff;
  color: var(--blue-deep);
  font-weight: 600;
}

.list-nav-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.list-nav-empty {
  padding: 18px 12px;
  font-size: 12px;
  color: var(--muted);
}

.list-main {
  min-width: 0;
}

.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.list-head h2 {
  font-size: 32px;
}

.list-head-actions {
  display: flex;
  gap: 6px;
}

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

.list-stats .stat-card strong {
  font-size: 28px;
}

.list-coverage {
  margin: 0 0 14px;
}

.col-add {
  width: 48px;
}

.icon-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.icon-add:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.col-qty {
  width: 92px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:hover {
  border-color: var(--line-strong);
  background: var(--paper-3);
}

.qty-value {
  min-width: 20px;
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
}

.qty-remove {
  margin-left: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}

.qty-remove:hover {
  color: var(--red);
}

.line-total {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.list-table .product-title {
  max-width: 360px;
}

@media (max-width: 1050px) {
  .lists-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

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

@media (max-width: 780px) {
  .view-head .inline-form {
    width: 100%;
  }

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

  .lists-layout {
    grid-template-columns: 1fr;
  }

  .list-sidebar {
    position: static;
  }

  .list-nav {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
  }

  .list-nav-item {
    width: auto;
  }

  .list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .list-table {
    min-width: 760px;
  }

  .table-card:has(.list-table) {
    overflow-x: auto;
  }
}

.store-bar {
  position: sticky;
  top: 69px;
  z-index: 25;
  background: rgba(251, 249, 243, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.store-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1280px, calc(100% - clamp(32px, 8vw, 96px)));
  margin: 0 auto;
  padding: 9px 0;
}

.store-bar-label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.store-loading {
  font-size: 11px;
  color: var(--muted);
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
  opacity: 0.62;
}

.store-chip:hover {
  opacity: 1;
  border-color: var(--line-strong);
}

.store-chip.is-active {
  opacity: 1;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--store-color) 45%, var(--line));
  background: color-mix(in srgb, var(--store-color) 7%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--store-color) 18%, transparent);
}

.store-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--store-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--store-color) 15%, transparent);
}

.store-country {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.store-divider {
  width: 1px;
  height: 18px;
  flex-shrink: 0;
  margin: 0 3px;
  background: var(--line);
}

.store-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.link-button {
  border: 0;
  padding: 2px;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

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

.is-best {
  position: relative;
}

.best-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.offer-link {
  font-size: 10.5px;
  color: var(--blue);
  text-decoration: none;
}

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

@media (max-width: 780px) {
  .store-bar {
    top: 61px;
  }

  .store-bar-inner {
    width: calc(100% - 32px);
    padding: 7px 0;
  }

  .store-bar-label {
    display: none;
  }

  .store-bar-actions {
    display: none;
  }
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.auth-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.auth-button:hover {
  border-color: var(--line-strong);
  background: white;
}

.auth-user {
  font-size: 11px;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
  max-width: 820px;
  margin: 24px auto;
  padding: clamp(22px, 4vw, 34px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-copy h2 {
  font-size: 32px;
}

.login-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-form input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
  outline: none;
  margin-bottom: 6px;
}

.login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.login-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
}

@media (max-width: 780px) {
  .auth-slot {
    margin-left: auto;
  }

  .login-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(24, 33, 26, 0.42);
  backdrop-filter: blur(2px);
  animation: fade 0.2s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  width: min(620px, 94vw);
  padding: 30px clamp(20px, 3vw, 36px) 48px;
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px -30px rgba(24, 33, 26, 0.5);
  overflow-y: auto;
  transform: translateX(102%);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-2);
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.drawer-close:hover {
  color: var(--ink);
  background: white;
}

.drawer-product {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-right: 36px;
}

.drawer-product .thumb,
.drawer-product .thumb-fallback {
  width: 78px;
  height: 78px;
  border-radius: 12px;
}

.drawer-product h2 {
  font-size: 28px;
  line-height: 1.15;
}

.drawer-product .product-sub {
  margin-top: 6px;
  white-space: normal;
}

.drawer-section {
  margin-top: 28px;
}

.drawer-section h4 {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.side-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.side-price-card {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.side-price-card .country {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-price-card .big-price {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.side-price-card .was-price {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.side-price-card .bonus-label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--bonus);
  font-weight: 600;
}

.gap-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 13px;
}

.gap-banner.be {
  background: var(--amber-soft);
  color: var(--amber);
}

.gap-banner strong {
  font-family: var(--mono);
  font-size: 15px;
}

.chart-wrap {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--muted);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
}

.history-chart {
  display: block;
  width: 100%;
  height: auto;
}

.history-table {
  margin-top: 10px;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.history-table table {
  font-size: 11.5px;
}

.history-table th,
.history-table td {
  padding: 6px 10px;
}

.drawer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.drawer-meta strong {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink-soft);
  word-break: break-all;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

/* Toasts */
.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 44px));
}

.toast {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 12.5px;
  box-shadow: var(--shadow);
  animation: rise 0.2s ease both;
}

.toast.error {
  background: #7d271b;
  border-color: #5e1c13;
}

.toast.success {
  background: var(--green);
  border-color: #185a39;
}

/* Loading skeleton */
.skeleton-row td {
  padding: 14px 16px;
}

.skeleton {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--paper-3) 25%, #f7f3e9 50%, var(--paper-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }

  .lede {
    max-width: 660px;
  }

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

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

  .view-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sync-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px 16px;
  }

  .tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .tab {
    flex: 1;
  }

  .topbar-status {
    margin-left: auto;
  }

  main {
    width: calc(100% - 32px);
    padding-top: 26px;
  }

  h1 {
    font-size: 40px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-options {
    gap: 10px;
  }

  .hint {
    width: 100%;
    margin-left: 0;
  }

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

  .hero {
    padding-bottom: 32px;
  }

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

  .quick-stats {
    flex-wrap: wrap;
  }

  .compare-table,
  .catalog-table {
    min-width: 720px;
  }

  .table-card:has(.catalog-table),
  .table-card:has(.compare-table) {
    overflow-x: auto;
  }

  .drawer {
    width: 100%;
    top: 5vh;
    border-radius: 18px 18px 0 0;
    border-left: 0;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   2026 redesign — mobile-first shelf-label system
   ========================================================================== */

:root {
  --accent: #ddf44b;
  --accent-ink: #152008;
  --accent-soft: #f2fac0;
  --bg: #f1f4ee;
  --surface: #ffffff;
  --surface-2: #e7ece5;
  --shadow: 0 18px 46px -30px rgba(14, 28, 23, 0.38);
  --shadow-sm: 0 1px 0 rgba(14, 28, 23, 0.04), 0 10px 24px -22px rgba(14, 28, 23, 0.24);
  --display: "Bricolage Grotesque", "Arial Narrow", "Segoe UI", sans-serif;
  --sans: "Instrument Sans", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html {
  scroll-padding-top: 118px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
.brand-word strong,
.big-price,
.price-main,
.stat-card strong {
  font-family: var(--display);
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 0.94;
  font-weight: 750;
}

h2 {
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.2;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--blue);
  text-underline-offset: 2px;
}

code {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

.page-grain {
  display: none;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header ---------------------------------------------------------------- */

.topbar {
  min-height: 58px;
  gap: 10px;
  padding: 9px 16px;
  background: rgba(241, 244, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--accent);
  box-shadow: none;
  padding: 7px;
  display: block;
}

.brand-mark span,
.brand-mark::before,
.brand-mark::after {
  display: block;
  height: 5px;
  border-radius: 1px;
  background: var(--accent);
  content: "";
}

.brand-mark::before {
  width: 100%;
  margin-bottom: 4px;
  background: var(--accent);
}

.brand-mark span {
  width: 100%;
  background: #fff;
}

.brand-mark::after {
  width: 68%;
  margin-top: 4px;
  background: #fff;
}

.brand-word strong {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.055em;
}

.brand-word span {
  font-size: 9px;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.tabs {
  display: none;
}

.topbar-status {
  margin-left: auto;
  min-width: 0;
  max-width: 46vw;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
}

#sync-topline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--line-strong);
}

.pulse.is-live {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(11, 122, 75, 0.12);
}

.auth-slot {
  margin-left: 2px;
  flex: 0 0 auto;
}

.auth-button {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  padding: 6px 9px;
  min-height: 32px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.auth-button:hover {
  background: var(--accent);
  border-color: var(--ink);
}

.auth-user {
  display: none;
}

/* Mobile bottom navigation ---------------------------------------------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.bottom-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.bottom-tab svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-tab.is-active {
  color: var(--accent);
  background: rgba(221, 244, 75, 0.08);
}

.bottom-tab:focus-visible {
  outline-color: var(--accent);
}

.bottom-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  margin-left: 2px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 8.5px;
  line-height: 1;
}

/* Store bar ------------------------------------------------------------- */

.store-bar {
  top: 57px;
  background: rgba(241, 244, 238, 0.96);
  border-bottom: 1px solid var(--line);
}

.store-bar-inner {
  width: 100%;
  padding: 7px 16px;
  gap: 8px;
}

.store-bar-label {
  display: none;
}

.store-chips {
  gap: 5px;
  padding: 1px;
  scrollbar-width: none;
}

.store-chips::-webkit-scrollbar {
  display: none;
}

.store-chip {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 4px;
  border-color: var(--line);
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 650;
  opacity: 1;
  color: var(--muted);
}

.store-chip.is-active {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 -3px 0 var(--store-color);
}

.store-country {
  font-size: 8px;
  opacity: 0.7;
}

.store-dot {
  width: 6px;
  height: 6px;
}

.store-bar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.store-bar-actions .link-button {
  font-size: 10px;
  min-height: 28px;
}

/* Main, views, heroes --------------------------------------------------- */

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.view {
  display: none;
  padding: 20px 0 40px;
}

.view.is-active {
  display: block;
  animation: view-in 260ms ease-out both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.hero {
  display: grid;
  gap: 22px;
  padding: 4px 0 8px;
}

.hero-copy {
  max-width: 620px;
}

.hero-kicker {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  max-width: 9ch;
}

.hero .lede {
  max-width: 48ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--muted);
}

.lede.narrow {
  max-width: 53ch;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Search card as a price tag -------------------------------------------- */

.search-card {
  position: relative;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--accent);
}

.search-card::before {
  display: none;
}

.field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.search-row input,
.search-row .btn {
  min-height: 48px;
}

.search-row input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  padding: 0 12px;
  font-size: 16px;
  color: var(--ink);
  box-shadow: none;
}

.search-row input::placeholder {
  color: #8a978f;
}

.search-row input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
  outline: none;
}

.search-row .btn {
  padding: 0 16px;
  font-size: 13px;
}

.search-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin-top: 12px;
}

.search-options .hint {
  flex-basis: 100%;
  margin: 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  margin: 0;
}

.check:has(input:checked) {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--accent-ink);
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  background: #1a2e26;
}

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

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

.link-button {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

/* Section headings ------------------------------------------------------ */

.section-heading,
.view-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0 12px;
}

.section-heading h2,
.view-head h1 {
  margin: 0;
}

.section-heading .meta,
.view-head .meta {
  margin: 0;
}

.view-head .quick-stats {
  width: 100%;
}

.quick-stats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.quick-stats::-webkit-scrollbar {
  display: none;
}

.quick-stat {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.quick-stat strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.quick-stat span {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Filters --------------------------------------------------------------- */

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  align-items: end;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter.grow {
  grid-column: 1 / -1;
}

.filter span {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
}

.filter input,
.filter select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 7px 9px;
  font-size: 12px;
  color: var(--ink);
}

.filter input:focus,
.filter select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
  outline: none;
}

.filter-check {
  min-height: 38px;
  align-self: end;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 0 0 9px;
}

.filter-bar > .btn {
  grid-column: 1 / -1;
  width: 100%;
}

.filter-bar .check:has(input:checked) {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}

.matches-panel {
  margin: 12px 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--amber);
  border-radius: 6px;
}

/* Tables → mobile product cards ----------------------------------------- */

.table-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

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

.data-table {
  border-collapse: collapse;
}

.data-table thead {
  display: none;
}

.data-table tbody {
  display: block;
}

.data-table tr {
  position: relative;
  margin: 0 0 9px;
  padding: 12px 12px 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.data-table tr.clickable {
  cursor: pointer;
}

.data-table tr.clickable:hover {
  border-color: var(--line-strong);
}

.data-table td {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 4px 0;
  border: 0 !important;
  text-align: left;
  font-size: 12.5px;
  vertical-align: top;
}

.data-table td::before {
  content: attr(data-label);
  padding-top: 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.data-table td.col-product {
  display: block;
  padding: 0 32px 9px 0;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--line) !important;
}

.data-table td.col-product::before {
  display: none;
}

.data-table td.col-add {
  position: absolute;
  top: 10px;
  right: 10px;
  width: auto;
  padding: 0;
  display: block;
}

.data-table td.col-add::before {
  display: none;
}

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

.data-table .col-qty {
  width: auto;
}

.data-table .col-gap {
  width: auto;
}

.table-scroll {
  overflow: visible;
}

.table-empty {
  margin-top: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
}

.skeleton-row td {
  display: block;
}

.skeleton-row td:first-child {
  padding: 0;
}

/* Product cell ---------------------------------------------------------- */

.product-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.thumb,
.thumb-fallback {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  object-fit: contain;
}

.thumb-fallback {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 750;
  color: var(--muted);
}

.product-text {
  min-width: 0;
}

.product-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
}

.product-sub {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
}

.product-sub .dot {
  margin: 0 4px;
}

.tag {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  font-size: 9.5px;
  color: var(--muted);
}

/* Price tags ------------------------------------------------------------ */

.price-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 7px;
  min-width: 0;
}

.price-main {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.price-main.is-bonus {
  color: var(--bonus);
}

.price-stack.is-best .price-main {
  position: relative;
  padding: 1px 5px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 3px;
}

.best-flag {
  display: none;
}

.price-was {
  font-size: 10px;
  color: var(--muted);
  text-decoration: line-through;
}

.promo-tag {
  display: inline-block;
  max-width: 100%;
  padding: 1px 4px;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 2px;
  background: var(--bonus-soft);
  color: var(--bonus);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
}

.price-missing {
  color: var(--muted);
  font-size: 10.5px;
  font-style: italic;
  white-space: nowrap;
}

.offer-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--blue);
}

.line-total {
  flex-basis: 100%;
  font-size: 9.5px;
  color: var(--muted);
}

/* Gap pills ------------------------------------------------------------- */

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

.gap-badge {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: nowrap;
}

.gap-badge.cheaper-nl {
  background: var(--green-soft);
  color: var(--green);
}

.gap-badge.cheaper-be {
  background: var(--bonus-soft);
  color: var(--bonus);
}

.gap-badge.same {
  background: var(--surface-2);
  color: var(--muted);
}

.gap-value {
  font-size: 10.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.confidence {
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.confidence.low {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.icon-add {
  width: 30px;
  height: 30px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.icon-add:hover {
  background: var(--accent);
}

/* Alerts, empty states -------------------------------------------------- */

.alert,
.empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.alert {
  border-left: 4px solid var(--red);
  font-size: 12px;
}

.alert-stack {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
}

.empty {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 22px 16px;
  border-style: dashed;
}

.empty-icon {
  display: none;
}

.empty h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.empty p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.empty.table-empty {
  padding: 18px;
}

/* Stat cards ------------------------------------------------------------ */

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

.stat-card {
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
}

.stat-card .stat-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-note {
  font-size: 9.5px;
  color: var(--muted);
}

/* Panels ---------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: none;
  overflow: hidden;
}

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

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

.panel-head .meta {
  margin: 0;
  font-size: 10px;
}

/* Pagination ------------------------------------------------------------ */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 16px 0;
}

.pagination button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 11px;
  cursor: pointer;
}

.pagination button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.35;
}

/* Lists ----------------------------------------------------------------- */

.lists-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.inline-form {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.inline-form label {
  flex: 1;
  min-width: 0;
}

.inline-form input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
}

.inline-form .btn {
  flex: 0 0 auto;
}

.list-sidebar {
  position: static;
}

.list-nav {
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-height: none;
  gap: 5px;
  padding: 8px;
  scrollbar-width: none;
}

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

.list-nav-item {
  flex: 0 0 auto;
  width: auto;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.list-nav-item.is-active {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--accent-ink);
}

.list-sidebar .panel-head {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.list-head h2 {
  font-size: 28px;
}

.list-head-actions {
  display: flex;
  gap: 6px;
}

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

.list-stats .stat-card strong {
  font-size: 22px;
}

.list-coverage {
  margin: 8px 0 14px;
  font-size: 10.5px;
  color: var(--muted);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.qty-btn,
.qty-remove {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
}

.qty-value {
  min-width: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qty-remove {
  margin-left: 4px;
  color: var(--muted);
  font-size: 16px;
}

.login-card {
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 14px 0;
  padding: 18px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--accent);
}

.login-copy h2 {
  font-size: 28px;
}

.login-form input {
  min-height: 42px;
  border-radius: 4px;
}

/* Sync ------------------------------------------------------------------ */

.sync-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.sync-actions .btn {
  width: 100%;
  min-height: 38px;
}

.sync-actions .btn-primary {
  grid-column: 1 / -1;
}

.sync-actions #sync-cancel {
  grid-column: 1 / -1;
}

.sync-progress {
  padding: 14px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--accent);
}

.progress-head {
  align-items: flex-start;
}

.progress-head h3 {
  font-size: 18px;
}

.run-badge {
  border-radius: 3px;
  font-size: 9px;
  font-weight: 750;
}

.progress-bar {
  height: 9px;
  border-radius: 2px;
  background: var(--surface-2);
}

.progress-bar span {
  background: var(--ink);
}

.progress-meta {
  gap: 4px 10px;
  font-size: 10px;
}

.progress-message,
.progress-warnings {
  font-size: 10.5px;
}

.store-sync-panel {
  margin: 12px 0;
}

.store-sync-list {
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--line);
}

.store-sync-row {
  padding: 11px 13px;
  gap: 5px;
}

.store-sync-name {
  font-size: 12px;
}

.store-sync-run {
  font-size: 10px;
}

.store-sync-button {
  border-radius: 4px;
  min-height: 28px;
  padding: 4px 9px;
}

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

.runs-table {
  min-width: 0;
}

.runs-table td {
  grid-template-columns: 84px minmax(0, 1fr);
}

.schedule-panel {
  padding-bottom: 12px;
}

.schedule-copy,
.schedule-note {
  padding: 0 13px;
  font-size: 11px;
}

.schedule-row {
  margin: 0 13px;
  padding: 8px 0;
  font-size: 10.5px;
}

.status-badge {
  font-size: 8.5px;
  border-radius: 3px;
  padding: 1px 5px;
}

/* Footer ---------------------------------------------------------------- */

.footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(1180px, calc(100% - 32px));
  margin: 6px auto 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}

.footer p {
  margin: 0;
  max-width: 72ch;
}

.footer-mono {
  font-family: var(--sans);
  font-size: 9.5px;
}

/* Drawer ---------------------------------------------------------------- */

.drawer {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-height: 92dvh;
  padding: 22px 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0;
  border-top: 1.5px solid var(--ink);
  background: var(--surface);
  box-shadow: 0 -18px 50px -30px rgba(14, 28, 23, 0.5);
  transform: translateY(105%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
}

.drawer.is-open {
  transform: none;
}

.drawer::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 38px;
  height: 4px;
  margin-left: -19px;
  border-radius: 3px;
  background: var(--line);
}

.drawer-close {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.drawer-product {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-right: 34px;
}

.drawer-product .thumb,
.drawer-product .thumb-fallback {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

.drawer-product h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.drawer-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.drawer-section h4 {
  margin: 0 0 9px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

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

.side-price-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
}

.side-price-card .country {
  font-size: 9px;
}

.side-price-card .big-price {
  margin: 3px 0;
  font-size: 24px;
  font-weight: 750;
}

.side-price-card .was-price,
.side-price-card .bonus-label,
.side-price-card .meta {
  font-size: 9.5px;
}

.gap-banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
}

.gap-banner.be {
  background: var(--bonus-soft);
  color: var(--bonus);
}

.gap-banner strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.chart-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.history-chart {
  min-width: 520px;
}

.history-table {
  overflow-x: auto;
}

.drawer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 10px;
}

.drawer-meta strong {
  font-size: 11px;
  word-break: break-word;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.toasts {
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 12px;
  right: 12px;
  align-items: stretch;
}

.toast {
  border-radius: 5px;
  font-size: 12px;
}

/* Desktop --------------------------------------------------------------- */

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
    font-size: 15.5px;
  }

  .bottom-nav {
    display: none;
  }

  .topbar {
    min-height: 66px;
    padding: 12px clamp(22px, 4vw, 52px);
    gap: 24px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    padding: 8px;
  }

  .brand-word strong {
    font-size: 23px;
  }

  .tabs {
    display: flex;
    margin-left: auto;
  }

  .tab {
    min-height: 36px;
    padding: 7px 15px;
    border-radius: 5px;
    font-size: 12.5px;
  }

  .tab.is-active {
    background: var(--ink);
    color: var(--accent);
  }

  .topbar-status {
    max-width: none;
    margin-left: 4px;
    font-size: 11px;
  }

  .auth-user {
    display: inline;
  }

  .store-bar {
    top: 67px;
  }

  .store-bar-inner {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
    padding: 9px 0;
    gap: 12px;
  }

  .store-bar-label {
    display: block;
  }

  .store-bar-actions {
    display: flex;
  }

  .store-chip {
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
  }

  .store-chip.is-active {
    border-color: color-mix(in srgb, var(--store-color) 50%, var(--line));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--store-color) 20%, transparent);
    background: color-mix(in srgb, var(--store-color) 6%, white);
  }

  main {
    padding: 0 clamp(22px, 4vw, 52px);
  }

  .view {
    padding: 30px 0 58px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
    align-items: end;
    gap: 48px;
    padding: 26px 0 34px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 5.5vw, 5.2rem);
  }

  .hero .lede {
    font-size: 15.5px;
  }

  .search-card {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 7px 7px 0 var(--accent);
  }

  .search-row input,
  .search-row .btn {
    min-height: 52px;
  }

  .section-heading,
  .view-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 32px 0 16px;
  }

  .view-head .quick-stats {
    width: auto;
  }

  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 9px;
    padding: 14px;
  }

  .filter {
    flex: 0 0 150px;
  }

  .filter.grow {
    flex: 1 1 220px;
  }

  .filter-check {
    flex: 0 0 auto;
  }

  .filter-bar > .btn {
    margin-left: auto;
    width: auto;
  }

  /* Restore real tables on wide screens */
  .table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
  }

  .data-table {
    display: table;
    width: 100%;
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
  }

  .data-table thead {
    display: table-header-group;
  }

  .data-table tbody {
    display: table-row-group;
  }

  .data-table tr {
    display: table-row;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .data-table th {
    display: table-cell;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: left;
    white-space: nowrap;
  }

  .data-table td {
    display: table-cell;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line) !important;
    font-size: 12.5px;
    vertical-align: middle;
  }

  .data-table td::before {
    display: none;
  }

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

  .data-table tr.clickable:hover {
    background: #f7f9f5;
  }

  .data-table td.col-product {
    display: table-cell;
    padding: 10px 12px;
    margin: 0;
    border-bottom: 1px solid var(--line) !important;
  }

  .data-table td.col-add {
    position: static;
    display: table-cell;
    width: 46px;
    padding: 8px 10px;
  }

  .data-table td:empty {
    display: table-cell;
  }

  .product-cell {
    min-width: 210px;
  }

  .product-title {
    font-size: 12.5px;
  }

  .price-main {
    font-size: 16px;
  }

  .stat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card strong {
    font-size: 29px;
  }

  .lists-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 16px;
  }

  .list-sidebar {
    position: sticky;
    top: 126px;
  }

  .list-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    max-height: 60vh;
  }

  .list-nav-item {
    width: 100%;
  }

  .list-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .list-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .inline-form {
    width: auto;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .inline-form input {
    min-width: 210px;
  }

  .sync-actions {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    justify-content: flex-end;
  }

  .sync-actions .btn {
    width: auto;
  }

  .sync-actions .btn-primary,
  .sync-actions #sync-cancel {
    grid-column: auto;
  }

  .store-sync-list {
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  }

  .sync-columns {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .toasts {
    left: auto;
    right: 22px;
    bottom: 22px;
    width: 340px;
  }

  .drawer {
    inset: 0 0 0 auto;
    width: min(520px, 92vw);
    max-height: none;
    padding: 28px 24px;
    border-radius: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
    transform: translateX(105%);
  }

  .drawer.is-open {
    transform: none;
  }

  .drawer::before {
    display: none;
  }

  .drawer-close {
    top: 18px;
    right: 18px;
  }

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

  .footer {
    flex-direction: row;
    justify-content: space-between;
    width: min(1180px, calc(100% - 104px));
  }
}

@media (min-width: 1200px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 460px;
  }
}

/* Small tables inside the product drawer stay tabular at every width. */
.history-table .data-table {
  display: table;
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
}

.history-table .data-table thead {
  display: table-header-group;
}

.history-table .data-table tbody {
  display: table-row-group;
}

.history-table .data-table tr {
  display: table-row;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.history-table .data-table th {
  display: table-cell;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  text-align: left;
  color: var(--muted);
}

.history-table .data-table td {
  display: table-cell;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line) !important;
  font-size: 10.5px;
}

.history-table .data-table td::before {
  display: none;
}

/* Redesign fixes and small-screen table resets */
.compare-table,
.catalog-table,
.list-table,
.runs-table {
  min-width: 0;
}

.hero h1 {
  max-width: 14ch;
}

.sync-progress {
  color: var(--ink);
}

.progress-head .eyebrow {
  color: var(--muted);
}

.run-badge {
  font-family: var(--sans);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.run-badge.running {
  background: var(--bonus-soft);
  color: var(--bonus);
}

.progress-bar span {
  background: var(--ink);
}

.progress-meta {
  font-family: var(--sans);
  color: var(--muted);
}

.progress-message {
  color: var(--ink-soft);
}

.progress-warnings {
  color: var(--amber);
}

.side-price-card .big-price {
  font-family: var(--display);
  font-weight: 750;
}

.side-price-card .country {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

@media (min-width: 900px) {
  .compare-table,
  .catalog-table,
  .list-table {
    min-width: 680px;
  }

  .catalog-table {
    min-width: 920px;
  }
}

/* Loading and empty table rows should not inherit the mobile label gutter. */
.skeleton-row td::before,
.data-table td[colspan]::before {
  display: none;
}

.data-table td[colspan] {
  grid-template-columns: 1fr;
  min-height: 40px;
  align-items: center;
  color: var(--muted);
}

@media (min-width: 900px) {
  .data-table th {
    text-transform: none;
    letter-spacing: 0;
    font-size: 10px;
  }

  .data-table td[colspan] {
    display: table-cell;
  }
}

/* Mobile ergonomics */
.filter input,
.filter select,
.inline-form input,
.login-form input {
  font-size: 16px;
}

.icon-add {
  width: 36px;
  height: 36px;
}

.data-table td.col-product {
  padding-right: 42px;
}

.data-table td.col-add {
  top: 8px;
  right: 8px;
}

.qty-btn,
.qty-remove {
  min-width: 32px;
  min-height: 32px;
}

.footer {
  padding: 14px 0 0;
}

.runs-table {
  min-width: 0;
}

@media (min-width: 900px) {
  .runs-table {
    min-width: 820px;
  }

  .filter input,
  .filter select,
  .inline-form input,
  .login-form input {
    font-size: 12px;
  }

  .icon-add {
    width: 30px;
    height: 30px;
  }

  .data-table td.col-product {
    padding-right: 12px;
  }

  .data-table td.col-add {
    top: auto;
    right: auto;
  }
}

/* Compact mobile header and hero */
@media (max-width: 899px) {
  .topbar {
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 58px;
    padding: 10px 14px;
  }

  .brand {
    gap: 8px;
  }

  .brand-word span {
    display: none;
  }

  .brand-word strong {
    font-size: 19px;
  }

  .topbar-status {
    flex: 1;
    max-width: none;
    justify-content: flex-end;
    font-size: 10px;
  }

  #sync-topline {
    max-width: 108px;
  }

  .auth-slot {
    margin-left: 0;
  }

  .auth-button {
    padding: 6px 9px;
  }

  .store-bar {
    top: 57px;
  }

  .store-bar-actions {
    display: none;
  }

  .hero {
    gap: 14px;
    padding: 2px 0 4px;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 9.8vw, 2.9rem);
    max-width: 13ch;
  }

  .hero .lede {
    margin-top: 9px;
    font-size: 13.5px;
    line-height: 1.45;
  }

  .search-card {
    padding: 12px;
  }

  .search-options {
    margin-top: 9px;
  }

  .search-options .hint {
    display: none;
  }

  .search-row input {
    font-size: 16px;
  }

  .section-heading {
    margin: 20px 0 9px;
  }

  .view-head {
    margin: 4px 0 14px;
  }

  .view-head .lede.narrow {
    font-size: 13px;
  }

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

  .sync-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .sync-actions #sync-cancel {
    grid-column: 1 / -1;
  }

  .sync-actions .btn:disabled {
    opacity: 0.4;
  }
}

/* Product image fallback and desktop column widths */
.thumb-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
}

.thumb-wrap::before {
  content: attr(data-initial);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 750;
  color: var(--muted);
}

.thumb-wrap.thumb-loaded::before {
  display: none;
}

.thumb-wrap .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: #fff;
}

@media (min-width: 900px) {
  .compare-table .col-product {
    width: 34%;
    min-width: 300px;
  }

  .compare-table .col-price {
    width: 15%;
  }

  .compare-table .col-gap {
    width: 13%;
  }

  .compare-table .col-add {
    width: 48px;
  }

  .offer-link {
    white-space: nowrap;
  }

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

.drawer-product .thumb-wrap {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

.thumb-wrap .thumb {
  opacity: 0;
  transition: opacity 120ms ease;
}

.thumb-wrap.thumb-loaded .thumb {
  opacity: 1;
}

.promo-tag {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 899px) {
  .store-chips {
    padding-right: 22px;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
  }
}

@media (min-width: 900px) {
  .store-chips {
    padding-right: 0;
  }
}

.eyebrow,
.section-kicker,
.field-label,
.brand-word span,
.store-bar-label {
  text-transform: none;
  letter-spacing: 0.01em;
}

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

@media (min-width: 900px) {
  .compare-table .col-add,
  .catalog-table .col-add {
    width: 58px;
  }

  .data-table td.col-add {
    padding: 8px 14px 8px 4px;
    text-align: right;
  }
}

@media (min-width: 900px) {
  .compare-table {
    table-layout: fixed;
  }

  .compare-table .col-product {
    width: 32%;
    min-width: 0;
  }

  .compare-table .col-price {
    width: 15%;
  }

  .compare-table .col-gap {
    width: 13%;
  }

  .compare-table .col-add {
    width: 5%;
  }

  .catalog-table {
    table-layout: fixed;
  }

  .catalog-table .col-product {
    width: 26%;
    min-width: 0;
  }

  .catalog-table .col-cat {
    width: 12%;
  }

  .catalog-table .col-price {
    width: 12%;
  }

  .catalog-table .col-gap {
    width: 11%;
  }

  .catalog-table .col-conf {
    width: 7%;
  }

  .catalog-table .col-add {
    width: 4%;
  }
}

.product-title {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  .catalog-table .promo-tag {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
  }
}

.filter span,
.quick-stat span {
  text-transform: none;
  letter-spacing: 0.01em;
}

.filter-check {
  gap: 7px;
}

@media (max-width: 899px) {
  .quick-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .quick-stat {
    min-width: 0;
  }

  .quick-stat:nth-child(4) {
    grid-column: auto;
  }
}

.offer-link {
  white-space: nowrap;
}

.history-table .data-table {
  min-width: 460px;
}

.offer-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.offer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
}

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

.offer-store {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.offer-store strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.offer-store small {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--muted);
}

.offer-price {
  flex: 0 0 auto;
  text-align: right;
}

.offer-price .price-stack {
  justify-content: flex-end;
}

@media (max-width: 899px) {
  .history-table .data-table {
    display: block;
    min-width: 0;
  }

  .history-table .data-table thead {
    display: none;
  }

  .history-table .data-table tbody {
    display: block;
  }

  .history-table .data-table tr {
    display: block;
    margin: 0 0 7px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
  }

  .history-table .data-table td {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
    border: 0 !important;
    font-size: 10.5px;
  }

  .history-table .data-table td::before {
    content: attr(data-label);
    display: block;
    padding: 0;
    font-size: 9px;
    font-weight: 650;
    color: var(--muted);
  }
}

/* Admin-only sync affordances and role badge */
.admin-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.5;
  vertical-align: 1px;
}

.bottom-nav {
  display: flex;
}

.bottom-tab {
  flex: 1 1 0;
}

/* Search autocomplete */
.search-input-wrap {
  position: relative;
  min-width: 0;
}

.search-input-wrap input {
  width: 100%;
}

.suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(360px, 55vh);
  overflow-y: auto;
  padding: 5px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  box-shadow: 6px 6px 0 var(--accent), 0 18px 50px -24px rgba(14, 28, 23, 0.35);
}

.suggestion-head {
  padding: 7px 8px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.suggestion:hover,
.suggestion.is-active {
  background: var(--accent-soft);
}

.suggestion-mark {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.suggestion-text {
  min-width: 0;
  flex: 1;
}

.suggestion-main {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}

.suggestion-sub {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  color: var(--muted);
}

.suggestion-go {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.suggestion-empty {
  padding: 13px 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 899px) {
  .suggestions {
    max-height: 46vh;
    box-shadow: 4px 4px 0 var(--accent);
  }
}

.filter-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
}

.filter-actions .btn {
  flex: 1;
}

.filter-summary {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}

@media (min-width: 900px) {
  .filter-actions {
    margin-left: auto;
    grid-column: auto;
  }

  .filter-actions .btn {
    flex: 0 0 auto;
  }
}

@media (max-width: 899px) {
  .auth-slot {
    margin-left: auto;
  }
}

.search-card:has(.suggestions:not([hidden])) {
  z-index: 70;
}

/* ==========================================================================
   Dark theme — follows the operating system preference
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0d1512;
    --paper-2: #121d18;
    --paper-3: #1b2922;
    --bg: #0d1512;
    --surface: #121d18;
    --surface-2: #1b2922;
    --ink: #eef5ee;
    --ink-soft: #c3d0c6;
    --muted: #8e9f95;
    --line: #24332b;
    --line-strong: #3c4b41;
    --accent: #d9f24b;
    --accent-ink: #142008;
    --accent-soft: #263114;
    --blue: #8fb1ff;
    --blue-deep: #b6c9ff;
    --blue-soft: #17233a;
    --red: #ff8076;
    --red-soft: #351618;
    --green: #65e0a1;
    --green-soft: #10291d;
    --bonus: #ff8a7a;
    --bonus-soft: #351719;
    --amber: #f6c667;
    --amber-soft: #33260f;
    --shadow: 0 24px 70px -34px rgba(0, 0, 0, 0.8);
    --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 30px -24px rgba(0, 0, 0, 0.75);
  }

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

  body {
    background: var(--bg);
    color: var(--ink);
  }

  ::selection {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .topbar {
    background: rgba(13, 21, 18, 0.94);
    border-bottom-color: var(--line);
  }

  .store-bar {
    background: rgba(13, 21, 18, 0.96);
    border-bottom-color: var(--line);
  }

  .brand-mark {
    background: #070d0a;
    border: 1px solid #2e4035;
  }

  .tabs {
    background: var(--surface);
    border-color: var(--line);
  }

  .tab {
    color: var(--ink-soft);
  }

  .tab.is-active {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .bottom-nav {
    background: #070d0a;
    border-top-color: var(--line);
  }

  .bottom-tab {
    color: rgba(238, 245, 238, 0.55);
  }

  .bottom-tab.is-active {
    color: var(--accent);
    background: rgba(217, 242, 75, 0.08);
  }

  .search-card,
  .filter-bar,
  .inline-form,
  .stat-card,
  .panel,
  .table-card,
  .quick-stat,
  .empty,
  .matches-panel,
  .sync-progress,
  .login-card {
    background: var(--surface);
    border-color: var(--line);
  }

  .search-card {
    border-color: var(--line-strong);
    box-shadow: 6px 6px 0 var(--accent);
  }

  .search-row input,
  .filter input,
  .filter select,
  .inline-form input,
  .login-form input {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-strong);
  }

  .search-row input::placeholder,
  .filter input::placeholder,
  .inline-form input::placeholder {
    color: #75867c;
  }

  .search-row input:focus,
  .filter input:focus,
  .filter select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 242, 75, 0.18);
    outline: none;
  }

  .check {
    background: var(--bg);
    border-color: var(--line);
    color: var(--ink-soft);
  }

  .check:has(input:checked) {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }

  .btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  }

  .btn-primary:hover {
    background: #e6ff63;
  }

  .btn-secondary,
  .btn-ghost,
  .auth-button {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-strong);
  }

  .btn-secondary:hover,
  .btn-ghost:hover,
  .auth-button:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
  }

  .data-table thead th,
  .data-table th {
    background: var(--surface-2);
    border-bottom-color: var(--line);
    color: var(--muted);
  }

  .data-table td {
    border-bottom-color: var(--line) !important;
  }

  .data-table tbody tr,
  .data-table tr {
    background: var(--surface);
    border-color: var(--line);
  }

  .data-table tbody tr.clickable:hover,
  .data-table tr.clickable:hover {
    background: #16241d;
  }

  .data-table td.col-product {
    border-bottom-color: var(--line) !important;
  }

  .thumb,
  .thumb-wrap {
    background: #1a2620;
    border-color: var(--line);
  }

  .thumb-wrap .thumb {
    background: #fff;
  }

  .tag {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted);
  }

  .price-stack.is-best .price-main {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .price-main.is-bonus,
  .promo-tag {
    color: var(--bonus);
  }

  .promo-tag {
    background: var(--bonus-soft);
  }

  .gap-badge.cheaper-nl {
    background: var(--green-soft);
    color: var(--green);
  }

  .gap-badge.cheaper-be {
    background: var(--bonus-soft);
    color: var(--bonus);
  }

  .gap-badge.same {
    background: var(--surface-2);
    color: var(--muted);
  }

  .confidence {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted);
  }

  .confidence.low {
    border-color: var(--amber);
    background: var(--amber-soft);
    color: var(--amber);
  }

  .icon-add,
  .qty-btn,
  .qty-remove {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
  }

  .icon-add:hover {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
  }

  .pagination button {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
  }

  .pagination button.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }

  .drawer {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: -24px 0 70px -30px rgba(0, 0, 0, 0.8);
  }

  .drawer-close {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--line);
  }

  .side-price-card,
  .offer-list,
  .offer-row {
    background: var(--surface-2);
    border-color: var(--line);
  }

  .gap-banner {
    background: var(--green-soft);
    color: var(--green);
  }

  .gap-banner.be {
    background: var(--bonus-soft);
    color: var(--bonus);
  }

  .login-card {
    border-color: var(--line-strong);
  }

  .list-nav-item {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink-soft);
  }

  .list-nav-item.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }

  .list-sidebar,
  .list-main {
    color: var(--ink);
  }

  .toast {
    background: #1d2e25;
    color: #eaf5ec;
    border-color: var(--line);
  }

  .toast.error {
    background: #4a1d1c;
    border-color: #6b2a27;
    color: #ffe4e0;
  }

  .toast.success {
    background: #0d3b26;
    border-color: #17553a;
    color: #d9ffe9;
  }

  .skeleton {
    background: linear-gradient(90deg, #1b2922 25%, #24332b 50%, #1b2922 75%);
    background-size: 200% 100%;
  }

  .suggestions {
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: 6px 6px 0 var(--accent), 0 18px 50px -24px rgba(0, 0, 0, 0.8);
  }

  .suggestion:hover,
  .suggestion.is-active {
    background: var(--accent-soft);
  }

  .suggestion-mark {
    background: var(--bg);
    border-color: var(--line);
  }

  .footer {
    border-top-color: var(--line);
    color: var(--muted);
  }

  .admin-badge {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
  }

  .progress-head .eyebrow,
  .progress-message,
  .progress-meta,
  .progress-warnings {
    color: var(--ink-soft);
  }

  .progress-bar {
    background: var(--surface-2);
  }

  .progress-bar span {
    background: var(--accent);
  }

  .schedule-row code,
  code {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
  }
}

.view.is-active {
  position: relative;
  z-index: 2;
}

.footer {
  z-index: 0;
}
