* { box-sizing: border-box; }

:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --dark: #1a1d29;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --red: #e5484d;
  --red-dark: #c53d41;
  --blue: #1a73e8;
  --blue-dark: #1558b0;
  --border: #e5e7eb;
  --bg: #f8f9fb;
  --radius: 10px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  margin: 0;
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

.page { max-width: 1480px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal) 0%, #0b7a70 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
  flex-shrink: 0;
}
.brand-mark.small { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.brand-name span { color: var(--teal); }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.topnav a:hover { color: var(--dark); background: #f3f4f6; }

/* ---------- Hero ---------- */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 0 28px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  color: var(--teal-dark);
  background: var(--teal-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
h1 {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--dark);
  letter-spacing: -1px;
}
h1 .teal { color: var(--teal); }
.subtitle {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto 32px;
}

/* ---------- Tool card (scan / upload) ---------- */
.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.06);
  text-align: left;
  overflow: hidden;
}
.tool-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--border);
}
.tool-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tool-tab:hover { color: var(--dark); }
.tool-tab.active {
  background: #fff;
  color: var(--teal-dark);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.tool-pane { padding: 20px 20px 6px; }
.tool-pane[hidden] { display: none; }
.tool-hint { margin: 10px 2px 8px; font-size: 12.5px; color: #8a919c; }
.store-password { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid #f3d9a4; background: #fffaf0; border-radius: 10px; }
.store-password[hidden] { display: none; }
.store-password label { flex: 1 1 260px; font-size: 13px; font-weight: 500; color: #8a5a00; }
.store-password input { flex: 0 1 220px; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid #d5d9df; border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; }
.store-password input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14); }

.search-bar {
  display: flex;
  align-items: center;
  border: 1px solid #d5d9df;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14); }
.search-bar-icon { margin-left: 14px; color: #9aa1ac; flex-shrink: 0; }
.search-bar input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 14px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
}
.search-bar input[type="text"]::placeholder { color: #a3a9b3; }
.search-bar select {
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 12px;
  height: 48px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  outline: none;
}
.search-bar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 22px;
  border: none;
  background: var(--teal);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.search-bar button:hover:not(:disabled) { background: var(--teal-dark); }
.search-bar button:disabled { background: #b7bcc4; cursor: not-allowed; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px;
  border: 1.5px dashed #c9ced6;
  border-radius: 12px;
  background: #fbfcfd;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--teal); background: #f2fbf9; }
.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.dropzone-title { font-size: 14.5px; font-weight: 600; color: var(--dark); }
.dropzone-link { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.dropzone-sub { font-size: 12.5px; color: var(--text-muted); }
.dropzone-sub code { font-size: 12px; background: #f1f3f5; padding: 1px 5px; border-radius: 4px; }

.tool-footer { padding: 4px 16px 12px; }
.advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px;
}
.advanced-toggle:hover { color: var(--teal-dark); }
.advanced-toggle .chevron { transition: transform 0.2s; }
.advanced-toggle.open .chevron { transform: rotate(180deg); }
.advanced-panel {
  border-top: 1px solid var(--border);
  background: #fbfcfd;
  padding: 16px 20px 18px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.advanced-field { flex: 1; min-width: 170px; }
.advanced-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475467;
  margin-bottom: 6px;
}
.advanced-field .hint { font-weight: 400; color: #9aa1ac; font-size: 11px; }
.advanced-field input, .advanced-field select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.trust-row {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  font-size: 13px;
  color: #475467;
}
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--teal); }
.hero .panel { margin-top: 24px; }

/* ---------- Recent scans ---------- */
.recent-scans {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
}
.recent-scans[hidden] { display: none; }
.recent-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #f0f1f3; }
.recent-list li:first-child { border-top: none; }
.recent-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.recent-list .btn-remove { background: none; border: none; color: #9aa1ac; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.recent-list .btn-remove:hover { color: var(--red); }
@media (max-width: 560px) {
  .recent-meta { display: none; }
}

/* ---------- Progress panel ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 22px;
  text-align: left;
}
.status-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}
.progress-bar { background: #edeef1; border-radius: 999px; height: 6px; overflow: hidden; margin-bottom: 12px; }
.progress-fill { background: var(--teal); height: 100%; width: 0%; transition: width 0.3s; }
.scan-controls { display: flex; gap: 8px; margin-bottom: 12px; }
.scan-controls[hidden] { display: none; }
.btn.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.log-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none; border: none; color: #9aa1ac; font-family: inherit; font-size: 12px;
  cursor: pointer; padding: 0; margin-bottom: 8px;
}
.log-toggle .chevron { transition: transform 0.2s; }
#logBox {
  background: #14161f;
  color: #7de89a;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 11.5px;
  padding: 12px 14px;
  border-radius: 8px;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin: 0;
  line-height: 1.6;
}

/* ---------- Results layout: table (left) + category sidebar (right) ---------- */
.results-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
  margin-top: 8px;
}
.results-main { flex: 1; min-width: 0; }
.results-sidebar { width: 280px; flex-shrink: 0; position: sticky; top: 76px; }
.results-sidebar .panel { margin-bottom: 0; }

/* ---------- Category panel (sidebar) ---------- */
.category-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.category-actions { display: flex; gap: 12px; }
.linkBtn {
  background: none;
  border: none;
  color: var(--teal);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px;
  margin: 0;
  width: auto;
}
.linkBtn:hover { text-decoration: underline; }

.category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 460px;
  overflow-y: auto;
}
.category-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f6f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.category-chip input {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.category-chip .cat-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-chip .cat-count {
  color: var(--text-muted);
  font-weight: 400;
  flex-shrink: 0;
  font-size: 12px;
}
.category-chip.active {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal-dark);
}

.category-chip .cat-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--teal-dark);
  cursor: pointer;
  flex-shrink: 0;
}
.category-chip .cat-download:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.category-chip.done .cat-download { background: var(--teal); border-color: var(--teal); color: #fff; }
.category-chip.covered { opacity: 0.5; }
.category-chip.covered .cat-download { cursor: not-allowed; }
.download-all-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: -4px 0 10px;
  padding: 9px 10px;
}
.group-summary { margin: 0 0 12px; font-size: 11.5px; line-height: 1.5; color: var(--text-muted); }
.group-summary:empty { display: none; }

/* ---------- Collection grouping controls ---------- */
.group-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.group-controls label { font-size: 12px; font-weight: 600; color: #555; }
.group-controls select,
.group-controls input,
.group-controls textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  box-sizing: border-box;
}
.group-controls textarea { resize: vertical; }
.group-fields { display: flex; flex-direction: column; gap: 8px; }
.group-fields[hidden] { display: none; }
.group-hint { margin: 0; font-size: 11px; color: var(--text-muted); }
.group-apply {
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.group-apply:hover:not(:disabled) { background: var(--teal-dark); }
.group-apply:disabled { background: #b7bcc4; cursor: not-allowed; }

/* ---------- Results card: toolbar + table + footer ---------- */
.results-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.results-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.count-badge {
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.btn {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #f5f6f8; }
.btn-ghost-danger { color: var(--red); }
.btn-ghost-danger:hover { background: #fdf2f2; border-color: #f5c2c3; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover:not(:disabled) { background: var(--teal-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn:disabled { background: #c7cad0; cursor: not-allowed; }

.status-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.status-select select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.search-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: #9aa1ac;
  width: 280px;
}
.search-filter-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12); }
.search-filter-wrap input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  min-width: 0;
}

/* ---------- Product table ---------- */
.table-wrap { background: #fff; }
/* Scrolls in both directions; the header row and first three columns stay pinned. */
.table-scroll {
  max-height: calc(100vh - 250px);
  min-height: 320px;
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: #b9bec7 #f3f4f6;
}
.table-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.table-scroll::-webkit-scrollbar-track { background: #f3f4f6; }
.table-scroll::-webkit-scrollbar-thumb { background: #c3c8d0; border-radius: 6px; border: 3px solid #f3f4f6; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #9aa1ac; }
.table-scroll::-webkit-scrollbar-corner { background: #f3f4f6; }

.product-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: fixed;
}
.product-table th,
.product-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f3;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
}
.product-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fb;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}
.product-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Column widths (table-layout: fixed reads them from the header row). */
.col-check { width: 44px; }
.col-img { width: 60px; }
.col-title { width: 340px; }
.col-status { width: 110px; }
.col-price { width: 130px; }
.col-compare { width: 110px; }
.col-stock { width: 80px; }
.col-options { width: 240px; }
.col-variants { width: 90px; }
.col-sku { width: 200px; }
.col-collections { width: 220px; }
.col-category { width: 170px; }
.col-tags { width: 220px; }
.col-vendor { width: 170px; }
.col-images { width: 80px; }

/* Pinned first three columns. */
.product-table .sticky-col { position: sticky; z-index: 1; }
.product-table thead .sticky-col { z-index: 3; }
.product-table .sticky-col:nth-child(1) { left: 0; }
.product-table .sticky-col:nth-child(2) { left: 44px; }
.product-table .sticky-col:nth-child(3) { left: 104px; box-shadow: 1px 0 0 var(--border), 6px 0 8px -6px rgba(16, 24, 40, 0.12); }

.product-table tbody tr:hover td { background: #f7fbfa; }
.product-table tbody tr.is-selected td { background: #f7fcfb; }
.product-table tbody tr.is-selected:hover td { background: #eef8f6; }
.product-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--teal);
  vertical-align: middle;
}
.product-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  background: #f0f1f3;
  border: 1px solid #eef0f3;
  display: block;
}

.title-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.title-text { min-width: 0; }
.title-main {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-sub {
  font-size: 11.5px;
  color: #9aa1ac;
  overflow: hidden;
  text-overflow: ellipsis;
}
.expand-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, background 0.15s;
}
.expand-btn:hover { background: #f3f4f6; color: var(--text); }
.expand-btn.open { transform: rotate(90deg); }
.expand-spacer { width: 22px; flex-shrink: 0; }

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-published { background: #e7f6ec; color: #16794a; }
.badge-draft { background: #f1f2f4; color: #5b616e; }
.muted { color: #b0b5bd; }
.price-was { color: #9aa1ac; text-decoration: line-through; }
.stock-out { color: var(--red); font-weight: 600; }
.chip-list { display: flex; gap: 4px; overflow: hidden; }
.chip {
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475467;
  font-size: 12px;
}

/* Variation rows under an expanded product. */
.product-table tr.variant-row td { background: #fbfcfd; font-size: 12.5px; color: #475467; }
.product-table tr.variant-row:hover td { background: #f3f7f6; }
.variant-label { padding-left: 30px; display: flex; align-items: center; gap: 6px; }
.variant-label::before { content: "↳"; color: #b0b5bd; }

.table-empty td { text-align: center; color: var(--text-muted); padding: 48px 12px; }

.table-footer {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #f8f9fb;
  font-size: 12.5px;
  color: var(--text-muted);
}
.table-footer b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.download-link { margin-left: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .results-layout { flex-direction: column; align-items: stretch; }
  .results-main { width: 100%; }
  .results-sidebar { width: 100%; position: static; }
  .category-list {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: 160px;
  }
  .category-chip { width: auto; }
}

@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .search-filter-wrap { width: 100%; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .col-title { width: 220px; }
}

/* ---------- Profile menu (top-right corner) ---------- */
.profile-menu { position: relative; z-index: 30; }
.profile-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #52525b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.profile-toggle:hover { color: #18181b; border-color: #a1a1aa; }

.profile-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  width: 260px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  padding: 16px;
}
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-name { font-weight: 600; font-size: 13.5px; color: var(--dark); }
.profile-email { font-size: 12px; color: var(--text-muted); word-break: break-all; }

.profile-info-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.profile-info-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.profile-info-label { color: var(--text-muted); }
.profile-info-value { color: var(--dark); font-weight: 500; text-align: right; }

/* ---------- Marketing sections ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 72px 0 8px; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin: 0;
  color: var(--dark);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step h3, .feature-card h3 { font-size: 15.5px; font-weight: 600; margin: 0 0 6px; color: var(--dark); }
.step p, .feature-card p { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); margin: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.feature-card:hover {
  border-color: #b8e6df;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  transform: translateY(-2px);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-list details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 18px;
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 28px 16px 0;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--dark);
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-muted);
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }

.site-footer { margin-top: 72px; border-top: 1px solid var(--border); background: #fff; }
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--dark); }
.footer-version { font-weight: 500; color: var(--text-muted); }
.footer-note { margin: 0; flex: 1; }
.footer-link { color: var(--teal-dark); margin-left: 6px; }
.footer-email { color: var(--teal-dark); font-weight: 600; text-decoration: none; }
.footer-email:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .profile-menu { margin-left: auto; }
  h1 { font-size: 30px; }
  .hero { padding-top: 36px; }
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-bar-icon { display: none; }
  .search-bar select { border-left: none; border-top: 1px solid var(--border); }
  .search-bar button { justify-content: center; }
}

/* ---------- Website only: Chrome extension calls to action ---------- */
.chrome-btn { margin-left: 4px; }
.btn.is-soon { background: var(--teal-light); color: var(--teal-dark); cursor: default; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 10px; }
.extension-cta {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px;
}
.extension-cta h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; margin: 0 0 10px; color: var(--dark); }
.extension-cta-text > p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; }
.extension-points { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.extension-points li { position: relative; padding-left: 26px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.extension-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 700; }
.extension-points strong { color: var(--dark); font-weight: 600; }
.extension-compare { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.compare-row { display: grid; grid-template-columns: 1fr 84px 84px; align-items: center; border-top: 1px solid var(--border); }
.compare-row:first-child { border-top: none; }
.compare-row span { padding: 12px 14px; }
.compare-row span + span { text-align: center; color: var(--teal-dark); font-weight: 700; }
.compare-head { background: var(--bg); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.compare-head span + span { color: var(--dark); }
@media (max-width: 900px) {
  .extension-cta { grid-template-columns: 1fr; padding: 28px 20px; gap: 28px; }
}
@media (max-width: 760px) {
  .chrome-btn { margin-left: auto; }
}
@media (max-width: 420px) {
  .chrome-btn [data-chrome-label] { display: none; }
  .compare-row { grid-template-columns: 1fr 66px 82px; }
  .compare-row span { padding: 10px 8px; }
}

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1060px; margin: 0 auto; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; }
.price-card.featured { border: 2px solid var(--teal); box-shadow: 0 12px 32px rgba(13, 148, 136, 0.12); }
.price-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--dark); }
.price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.price-amount { font-size: 36px; font-weight: 700; letter-spacing: -1px; color: var(--dark); }
.price-period { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.price-note { margin: 6px 0 18px; font-size: 13.5px; color: var(--text-muted); }
.price-features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-features li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.price-features svg { flex-shrink: 0; margin-top: 3px; color: var(--teal); }
.price-features strong { font-weight: 600; }
.price-cta { justify-content: center; width: 100%; }
.price-cta[disabled] { background: #f3f4f6; border-color: var(--border); color: var(--text-muted); }
.price-badge { position: absolute; top: -12px; left: 24px; background: var(--teal); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.price-badge.soon { background: var(--dark); }
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; gap: 26px; }
}

/* ---------- Plan in the account menu ---------- */
.profile-plan { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.plan-pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #f3f4f6; color: var(--text); }
.plan-pill.paid { background: var(--teal-light); color: var(--teal-dark); }
.plan-action { justify-content: center; width: 100%; }
.plan-link { background: none; border: none; padding: 0; font-family: inherit; font-size: 12px; color: var(--teal-dark); cursor: pointer; text-align: left; }
.plan-link:hover { text-decoration: underline; }
.plan-link[hidden] { display: none; }

/* ---------- Upgrade dialog ---------- */
.upgrade-dialog { border: none; border-radius: 16px; padding: 0; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(16, 24, 40, 0.25); }
.upgrade-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.upgrade-dialog form { padding: 26px; }
.upgrade-dialog h3 { margin: 0 0 10px; font-size: 18px; color: var(--dark); }
.upgrade-dialog p { margin: 0 0 22px; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.upgrade-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Redirect file button (results sidebar) ---------- */
.redirects-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; margin: 0 0 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--teal-dark); cursor: pointer; }
.redirects-btn:hover { border-color: var(--teal); background: #f2fbf9; }
.redirects-hint { margin: 0 0 12px; }
.redirects-hint a { color: var(--teal-dark); }

/* ---------- Pre-import check ---------- */
.precheck { border-top: 1px solid var(--border); }
.precheck[hidden] { display: none; }
.precheck-summary { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #f8fafc; border: none; font-family: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.precheck-summary:disabled { cursor: default; }
.precheck.ok .precheck-summary { background: #f0fdf9; }
.precheck.has-errors .precheck-summary { background: #fef2f2; }
.precheck.has-warnings .precheck-summary { background: #fffaf0; }
.precheck-icon { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--teal); flex-shrink: 0; }
.precheck.has-errors .precheck-icon { background: var(--red); }
.precheck.has-warnings .precheck-icon { background: #d97706; }
.precheck-text { flex: 1; font-weight: 500; }
.precheck-more { font-size: 12.5px; font-weight: 600; color: var(--teal-dark); }
.precheck-details { list-style: none; margin: 0; padding: 4px 16px 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; }
.precheck-details[hidden] { display: none; }
.precheck-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding-top: 10px; border-top: 1px solid #f1f2f4; }
.precheck-item:first-child { border-top: none; }
.precheck-level { grid-row: span 3; align-self: start; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 7px; border-radius: 6px; margin-top: 2px; }
.precheck-level.error { background: #fee2e2; color: #b42318; }
.precheck-level.warn { background: #fef3c7; color: #92400e; }
.precheck-level.info { background: #e0f2fe; color: #075985; }
.precheck-item strong { font-size: 13px; color: var(--dark); }
.precheck-item p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.precheck-item .precheck-products { color: var(--text); }

/* ---------- Collections guide ---------- */
.redirects-btn[hidden] { display: none; }
.guide-dialog { max-width: 560px; }
.guide-dialog p { margin-bottom: 14px; }
.guide-steps { margin: 0 0 16px; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.guide-steps li { margin-bottom: 4px; }
.guide-tags { border: 1px solid var(--border); border-radius: 10px; max-height: 240px; overflow: auto; margin-bottom: 12px; }
.guide-tag { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 13.5px; }
.guide-tag:first-child { border-top: none; }
.guide-tag-name { flex: 1; font-weight: 600; color: var(--dark); word-break: break-word; }
.guide-tag-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.guide-copy { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 3px 9px; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--teal-dark); cursor: pointer; }
.guide-copy:hover { border-color: var(--teal); }
.guide-note { font-size: 12.5px !important; margin-bottom: 18px !important; }
.guide-note:empty { display: none; }
