:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #18202a; background:#f4f6f8; }
* { box-sizing:border-box; }
body { margin:0; }
header { background:#111827; color:white; padding:28px max(20px, calc((100vw - 1180px)/2)); }
header h1 { margin:0 0 4px; }
header p { margin:0; color:#cbd5e1; }
main { max-width:1180px; margin:24px auto; padding:0 18px 40px; }
.hero { background:linear-gradient(135deg,#ffffff,#e8eef7); border:1px solid #d9e0e8; border-radius:18px; padding:28px; margin-bottom:20px; }
.eyebrow { text-transform:uppercase; letter-spacing:.11em; font-size:.75rem; color:#64748b; }
.metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:18px; }
.metric-grid div { background:white; border:1px solid #dfe5eb; border-radius:12px; padding:14px; }
.metric-grid strong,.metric-grid span { display:block; }
.metric-grid span { color:#64748b; font-size:.85rem; margin-top:4px; }
.card { background:white; border:1px solid #dfe5eb; border-radius:16px; padding:22px; margin-bottom:20px; overflow:auto; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-grid.wide { grid-template-columns:repeat(3,1fr); }
label { display:flex; flex-direction:column; gap:5px; font-size:.9rem; color:#475569; }
label.check { flex-direction:row; align-items:center; margin-top:22px; }
input,select,button { font:inherit; }
input,select { padding:10px 11px; border:1px solid #cbd5e1; border-radius:9px; background:white; }
button,.button-link { border:0; border-radius:9px; padding:10px 13px; background:#2563eb; color:white; cursor:pointer; text-decoration:none; display:inline-block; }
button.danger { background:#b91c1c; padding:7px 10px; }
table { width:100%; border-collapse:collapse; min-width:720px; }
th,td { text-align:left; border-bottom:1px solid #e5e7eb; padding:11px 9px; vertical-align:middle; }
th { color:#475569; font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; }
.totals { display:flex; gap:20px; justify-content:flex-end; margin-top:15px; font-weight:600; }
.actions { display:flex; gap:8px; }
.muted { color:#64748b; }
@media(max-width:800px){ .two-col,.metric-grid,.form-grid,.form-grid.wide{grid-template-columns:1fr;} .totals{flex-direction:column;gap:4px;} }

.section-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.error{color:#b91c1c;font-size:.85rem;max-width:420px;display:block}

.details-box{margin-top:18px;border-top:1px solid #e5e7eb;padding-top:14px}
.details-box summary{cursor:pointer;font-weight:650;margin-bottom:14px}
.switch-line{flex-direction:row;align-items:center;gap:7px;margin:0}


.notice {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid #cbd5e1;
}
.notice.success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}
.retailer-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.retailer-logo-box {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  display: inline-grid !important;
  place-items: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #ffffff;
  padding: 5px !important;
  flex: 0 0 40px !important;
}
.retailer-logo {
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: contain !important;
  object-position: center !important;
  image-rendering: auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.retailer-logo-fallback {
  color: #64748b;
  font-weight: 700;
}
.status-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: capitalize;
}
.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.status-running {
  background: #dbeafe;
  color: #1d4ed8;
}
.status-completed {
  background: #dcfce7;
  color: #166534;
}
.status-failed {
  background: #fee2e2;
  color: #991b1b;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 7px;
  border: 2px solid #cbd5e1;
  border-top-color: #2563eb;
  border-radius: 50%;
  vertical-align: middle;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.comparison-chart {
  display: grid;
  gap: 12px;
}
.comparison-row {
  display: grid;
  grid-template-columns: minmax(210px, 280px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}
.comparison-row:last-child {
  border-bottom: 0;
}
.comparison-retailer {
  display: flex;
  align-items: center;
  gap: 11px;
}
.comparison-retailer strong,
.comparison-retailer span {
  display: block;
}
.comparison-retailer span {
  color: #64748b;
  font-size: .82rem;
  margin-top: 2px;
}
.comparison-bar-area {
  display: grid;
  grid-template-columns: 1fr minmax(190px, 280px);
  gap: 14px;
  align-items: center;
}
.comparison-track {
  height: 18px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.comparison-bar {
  height: 100%;
  border-radius: 999px;
}
.comparison-bar.complete {
  background: #2563eb;
}
.comparison-bar.partial {
  background: #94a3b8;
}
.comparison-value {
  text-align: right;
}
.comparison-value strong,
.comparison-value span {
  display: block;
}
.comparison-value span {
  color: #64748b;
  font-size: .8rem;
  margin-top: 2px;
}
.comparison-incomplete {
  opacity: .82;
}
@media (max-width: 850px) {
  .comparison-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .comparison-bar-area {
    grid-template-columns: 1fr;
  }
  .comparison-value {
    text-align: left;
  }
}

.retailer-logo-box img[src*="generic-store"] {
  opacity: .9;
}

.logo-source {
  margin-top: 5px;
  color: #166534;
  font-size: .78rem;
}
.logo-error {
  margin-top: 5px;
  color: #991b1b;
  font-size: .78rem;
  max-width: 520px;
}

.logo-source-link {
  display: inline-block;
  margin-left: 7px;
  font-size: .78rem;
}
.logo-checked {
  margin-top: 5px;
  color: #64748b;
  font-size: .75rem;
}
.inline-retry {
  display: inline-block;
  margin-top: 7px;
}
.secondary-button {
  background: #475569;
  padding: 6px 9px;
  font-size: .8rem;
}
.logo-error-details {
  margin-top: 7px;
  max-width: 430px;
}
.logo-error-details summary {
  cursor: pointer;
  color: #991b1b;
  font-size: .78rem;
}
.logo-error-details .logo-error {
  margin-top: 5px;
  max-height: 130px;
  overflow: auto;
  overflow-wrap: anywhere;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.page-heading h2 {
  margin: 4px 0 6px;
}
.page-heading p {
  margin: 0;
  color: #64748b;
  max-width: 760px;
}
.secondary-link {
  background: #475569;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .page-heading {
    flex-direction: column;
  }
}

.status-never {
  background: #e2e8f0;
  color: #475569;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.header-nav {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.header-nav a {
  color: #e2e8f0;
  text-decoration: none;
  border: 1px solid #475569;
  border-radius: 9px;
  padding: 8px 11px;
}
.header-nav a:hover {
  background: #1e293b;
}
.log-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.log-viewer {
  margin: 0;
  min-height: 360px;
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
  border-radius: 11px;
  background: #0f172a;
  color: #e2e8f0;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}


.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.page-clock {
  min-width: 220px;
  text-align: right;
  line-height: 1.2;
}
.page-clock span,
.page-clock time {
  display: block;
}
.page-clock span {
  font-size: .72rem;
  opacity: .75;
}
.page-clock time {
  margin-top: 3px;
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
@media (max-width: 720px) {
  .header-right {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .page-clock {
    min-width: 0;
    text-align: left;
  }
}


.status-needs_config,
.status-needs-configuration {
  background: rgba(214, 141, 0, .14);
  border-color: rgba(214, 141, 0, .35);
}
.status-retired {
  opacity: .75;
  background: rgba(120, 120, 120, .12);
  border-color: rgba(120, 120, 120, .3);
}


.status-access-blocked,
.status-blocked {
  background: rgba(170, 70, 50, .14);
  border-color: rgba(170, 70, 50, .35);
}

.filament-source-note { grid-column: 1 / -1; margin: 0; }

/* v1.6.17 pricing/deal helpers */
.opportunity-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border, #d7dce2);
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.06);
}
.opportunity-box h3 { margin-top: 0; }
.opportunity-box p:last-child { margin-bottom: 0; }
.compact-details { min-width: 180px; }
.compact-details summary { cursor: pointer; }

/* v1.6.20: a crawl was quarantined and the last-known-good catalogue remains active. */
.status-partial_protected {
  border-style: dashed;
  font-weight: 700;
}


/* v1.6.35 optional authentication */
.nav-form { margin: 0; display: inline; }
.nav-button {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
}
.nav-button:hover { background: #1e293b; }
.auth-badge {
  align-self: center;
  font-size: .78rem;
  color: #cbd5e1;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 5px 9px;
}
.login-page { min-height: 100vh; }
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card { width: min(440px, 100%); }
.login-card h1 { margin-bottom: .25rem; }
.login-card h2 { margin-top: 0; }
.login-note { margin-bottom: 0; }
.alert-error,
.alert-success,
.alert-warning {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid;
}
.alert-error { background: rgba(185, 28, 28, .08); border-color: rgba(185, 28, 28, .35); }
.alert-success { background: rgba(21, 128, 61, .08); border-color: rgba(21, 128, 61, .35); }
.alert-warning { background: rgba(180, 83, 9, .08); border-color: rgba(180, 83, 9, .35); }
.security-form textarea { width: 100%; resize: vertical; }
