:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #111c33;
  --panel-soft: #16243e;
  --text: #e5edf8;
  --muted: #93a4b8;
  --border: rgba(148, 163, 184, 0.18);
  --accent: #60a5fa;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --unknown: #94a3b8;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 36%), var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 30px 34px 20px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.14em;
}

h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; margin-top: 6px; }
h2 { font-size: 18px; }
.muted { color: var(--muted); margin-top: 8px; font-size: 14px; }

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

input, select, button {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  padding: 10px 12px;
  min-height: 42px;
}

.actions input { width: 320px; max-width: 60vw; }
button {
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  font-weight: 800;
}
button.secondary { background: rgba(148, 163, 184, 0.12); }
button:disabled { opacity: 0.6; cursor: wait; }

main { padding: 24px 34px 46px; }
.status-bar {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.card, .panel {
  background: linear-gradient(180deg, rgba(17, 28, 51, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.card { padding: 16px; }
.card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.card .value { font-size: 28px; font-weight: 900; margin-top: 8px; }
.card .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

.panel { padding: 18px; margin-top: 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}
.panel-head.split { align-items: center; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.filters input { width: 270px; }

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: rgba(148, 163, 184, 0.08); font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; }
td { font-size: 14px; }
tr:last-child td { border-bottom: none; }

.product-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  padding: 4px;
}
.product-title { font-weight: 800; }
.product-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
a { color: #93c5fd; text-decoration: none; font-weight: 800; }

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}
.badge.good { color: var(--good); border-color: rgba(34, 197, 94, 0.25); background: rgba(34, 197, 94, 0.08); }
.badge.bad { color: var(--bad); border-color: rgba(239, 68, 68, 0.25); background: rgba(239, 68, 68, 0.08); }
.badge.warn { color: var(--warn); border-color: rgba(245, 158, 11, 0.25); background: rgba(245, 158, 11, 0.08); }
.badge.unknown { color: var(--unknown); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.event-list { display: flex; flex-direction: column; gap: 10px; }
.event {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 14px;
  padding: 12px;
}
.event .title { font-weight: 800; }
.event .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.event .change {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.breakdowns {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}
.breakdown {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.5);
}
.breakdown h3 { margin: 0 0 10px; font-size: 14px; }
.kv { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); padding: 5px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.08); }
.kv:last-child { border-bottom: none; }
.kv strong { color: var(--text); }

@media (max-width: 1200px) {
  .grid.cards { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .breakdowns { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 800px) {
  .topbar { flex-direction: column; padding: 22px; }
  main { padding: 20px; }
  .grid.cards, .two-col, .breakdowns { grid-template-columns: 1fr; }
  .panel-head.split { flex-direction: column; align-items: stretch; }
  .filters { justify-content: flex-start; }
  .actions input, .filters input { width: 100%; max-width: none; }
}

.raw-panel .filters button,
.raw-panel .filters select {
  min-height: 40px;
}

.raw-help {
  margin-bottom: 12px;
}

.raw-json {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
  overflow: auto;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.86);
}

.scan-live-panel {
  margin-bottom: 18px;
}

.scan-progress-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.progress-bar {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.82);
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.scan-current {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
  padding: 12px;
}

.scan-current .kv strong {
  text-align: right;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .scan-progress-grid { grid-template-columns: 1fr; }
}
.button-link {
  display:inline-flex;
  align-items:center;
  min-height:42px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(148, 163, 184, 0.12);
  color:var(--text);
  font-weight:800;
}
.toggle-btn { padding:6px 9px; min-height:32px; font-size:12px; border-radius:10px; }
.detail-grid { display:grid; grid-template-columns: 340px 1fr; gap:18px; }
.detail-img { width:100%; max-height:340px; object-fit:contain; background:white; border-radius:18px; padding:12px; }
.catalogue-title { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.catalogue-score { font-size:28px; font-weight:900; }
.small-actions { display:flex; gap:8px; flex-wrap:wrap; }
@media (max-width: 900px) { .detail-grid { grid-template-columns:1fr; } }


/* v11 admin catalogue polish */
.details-cell { white-space: nowrap; text-align: left; }
.details-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.22);
}
.action-cell { width: 118px; text-align: left; }
.aligned-action {
  width: 86px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.products-table table { min-width: 1120px; }
.customer-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.hero-card {
  padding: 24px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(37, 99, 235, 0.15)), rgba(17, 28, 51, 0.96);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 30px; margin-bottom: 8px; }
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.drop-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 28, 51, 0.98), rgba(15, 23, 42, 0.98));
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drop-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: white;
  border-radius: 16px;
  padding: 10px;
}
.drop-title { font-size: 16px; font-weight: 900; line-height: 1.25; }
.drop-meta { color: var(--muted); font-size: 13px; }
.drop-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.drop-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.55);
}
.drop-stat span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; }
.drop-stat strong { display: block; font-size: 18px; margin-top: 3px; }
.customer-actions { display:flex; gap:10px; margin-top:auto; align-items:center; justify-content:space-between; }
.customer-actions a { min-height: 38px; display:inline-flex; align-items:center; }
@media (max-width: 900px) { .customer-hero { grid-template-columns:1fr; } }


/* v12 LootWatcher brand + customer dashboard layout */
:root {
  --brand-deep-navy: #071B34;
  --brand-midnight-blue: #0E2E57;
  --brand-signal-orange: #FF6A00;
  --brand-teal: #18B7A0;
  --brand-soft-gray: #F3F4F6;
  --bg: #071B34;
  --panel: #0E2E57;
  --panel-soft: #123A67;
  --text: #F3F4F6;
  --muted: #AFC2D6;
  --border: rgba(243, 244, 246, 0.14);
  --accent: #FF6A00;
  --good: #18B7A0;
  --warn: #FFB020;
  --bad: #ef4444;
  --unknown: #AFC2D6;
}

body {
  font-family: "Exo 2", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 106, 0, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(24, 183, 160, 0.12), transparent 30%),
    var(--brand-deep-navy);
}

.topbar {
  background: linear-gradient(135deg, rgba(7, 27, 52, 0.96), rgba(14, 46, 87, 0.92));
}

.brand-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 220px;
  max-width: 38vw;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  background: rgba(243,244,246,0.98);
  border: 1px solid rgba(243,244,246,0.28);
  border-radius: 16px;
  padding: 8px 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.brand-heading-text { min-width: 0; }

.eyebrow {
  color: var(--brand-teal);
}

button {
  background: linear-gradient(135deg, var(--brand-signal-orange), #ff8b32);
}

button.secondary, .button-link {
  background: rgba(243,244,246,0.08);
  border-color: rgba(243,244,246,0.18);
}

a {
  color: #8ed8ff;
}

.badge.good {
  color: var(--brand-teal);
  border-color: rgba(24,183,160,0.35);
  background: rgba(24,183,160,0.10);
}

.badge.warn {
  color: #ffb020;
  border-color: rgba(255,106,0,0.35);
  background: rgba(255,106,0,0.10);
}

.progress-fill {
  background: linear-gradient(135deg, var(--brand-signal-orange), var(--brand-teal));
}

.hero-card {
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.18), rgba(24, 183, 160, 0.12)), rgba(14, 46, 87, 0.92);
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(300px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.drop-card {
  min-height: 520px;
  border-radius: 24px;
  padding: 18px;
  gap: 14px;
  background: linear-gradient(180deg, rgba(14, 46, 87, 0.98), rgba(7, 27, 52, 0.98));
  border: 1px solid rgba(243,244,246,0.16);
}

.drop-card img {
  height: 230px;
  border-radius: 18px;
  padding: 12px;
}

.drop-title {
  font-size: 18px;
  line-height: 1.2;
}

.drop-meta {
  font-size: 13px;
}

.drop-stat {
  min-height: 82px;
  border-radius: 14px;
}

.drop-stat strong {
  font-size: 19px;
}

.customer-actions a {
  color: #8ed8ff;
  font-size: 15px;
}

.customer-panel {
  max-width: 100%;
}

.customer-panel .panel-head.split {
  align-items: center;
}

.customer-panel .filters input {
  width: 320px;
}

.placeholder-logo {
  width: 100%;
  height: 230px;
  object-fit: contain;
  background: var(--brand-soft-gray);
  border-radius: 18px;
  padding: 14px;
}

@media (max-width: 1500px) {
  .customer-grid { grid-template-columns: repeat(3, minmax(300px, 1fr)); }
}

@media (max-width: 1100px) {
  .customer-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
  .brand-heading { align-items: flex-start; }
  .brand-logo { width: 180px; height: 58px; }
}

@media (max-width: 720px) {
  .customer-grid { grid-template-columns: 1fr; }
  .brand-heading { flex-direction: column; }
  .brand-logo { width: 100%; max-width: 340px; }
  .drop-card { min-height: auto; }
}

/* Keep exactly four columns on larger desktop screens. */
@media (min-width: 1501px) {
  .customer-grid { grid-template-columns: repeat(4, minmax(300px, 1fr)); }
}

/* v12 admin table button alignment */
.action-cell {
  text-align: center;
  width: 110px;
}
.aligned-action {
  width: 92px;
  margin: 0 auto;
}
.details-cell {
  width: 82px;
}

.api-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(24,183,160,0.52);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--brand-teal);
  background: rgba(24,183,160,0.08);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.api-pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 0 0 5px rgba(24,183,160,0.12);
}

/* v13 website-style masthead and customer layout
   The logo is shown directly in the sticky header: no card, no border, no padding wrapper. */
.site-masthead {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 142px;
  padding: 12px 34px;
  background: linear-gradient(180deg, rgba(243,244,246,0.98), rgba(243,244,246,0.94));
  border-bottom: 1px solid rgba(7,27,52,0.12);
  box-shadow: 0 12px 34px rgba(7,27,52,0.18);
  backdrop-filter: blur(12px);
}
.site-masthead.compact {
  min-height: 116px;
}
.masthead-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex: 0 1 auto;
  min-width: 240px;
}
.masthead-logo {
  display: block;
  width: min(540px, 42vw);
  max-height: 118px;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.site-masthead.compact .masthead-logo {
  width: min(420px, 35vw);
  max-height: 92px;
}
.masthead-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-pill,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(7,27,52,0.14);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255,255,255,0.72);
  color: var(--brand-deep-navy);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(7,27,52,0.08);
  cursor: pointer;
}
.nav-button {
  font-family: inherit;
}
.nav-pill:hover,
.nav-pill.active {
  color: white;
  background: linear-gradient(135deg, var(--brand-signal-orange), #ff8b32);
  border-color: rgba(255,106,0,0.35);
}
.site-main {
  padding-top: 28px;
}
.public-site .site-main {
  padding-inline: clamp(18px, 2.6vw, 42px);
}
.public-hero-v13,
.page-intro-v13 {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.62fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
}
.public-hero-v13 {
  min-height: 280px;
}
.hero-copy-v13,
.page-intro-v13,
.hero-kpis-v13 {
  border: 1px solid rgba(243,244,246,0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,106,0,0.22), transparent 32%),
    linear-gradient(135deg, rgba(14,46,87,0.98), rgba(7,27,52,0.98));
  box-shadow: var(--shadow);
}
.hero-copy-v13 {
  padding: clamp(24px, 3vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy-v13 h1 {
  max-width: 980px;
  margin: 10px 0 0;
  font-size: clamp(32px, 4.2vw, 68px);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero-copy-v13 p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.55;
}
.hero-kpis-v13 {
  padding: 22px;
  display: grid;
  gap: 14px;
  align-content: center;
}
.hero-kpi {
  border: 1px solid rgba(243,244,246,0.14);
  border-radius: 20px;
  padding: 18px;
  background: rgba(7,27,52,0.52);
}
.hero-kpi span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.hero-kpi strong {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  font-size: 20px;
}
.hero-kpi .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 0 0 7px rgba(24,183,160,0.14);
}
.page-intro-v13 {
  padding: 24px;
  grid-template-columns: minmax(360px,1fr) auto;
  align-items: center;
  min-height: 132px;
}
.intro-actions-v13,
.scan-actions-v13 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.scan-actions-v13 input {
  width: min(420px, 48vw);
  background: rgba(255,255,255,0.06);
}
.public-status {
  margin-top: 6px;
}
.public-drops-panel {
  border-radius: 28px;
  padding: clamp(18px, 2.2vw, 28px);
}
.public-panel-head h2 {
  font-size: clamp(24px, 2vw, 34px);
}
.public-filters input {
  width: min(360px, 24vw);
}
.public-drop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 1.6vw, 28px);
}
.public-drop-grid .drop-card {
  min-height: 560px;
  padding: 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 0%, rgba(24,183,160,0.13), transparent 30%),
    linear-gradient(180deg, rgba(14,46,87,0.98), rgba(7,27,52,0.99));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.public-drop-grid .drop-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,106,0,0.38);
  box-shadow: 0 22px 60px rgba(0,0,0,0.34);
}
.public-drop-grid .drop-card img {
  height: 250px;
  border-radius: 22px;
}
.public-drop-grid .drop-title {
  font-size: 19px;
}
.public-drop-grid .customer-actions a {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--brand-signal-orange), #ff8b32);
  box-shadow: 0 10px 26px rgba(255,106,0,0.2);
}
.public-drop-grid .customer-actions a:hover {
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-signal-orange));
}
/* Remove the older boxed logo treatment everywhere v13 masthead is used. */
.site-masthead .brand-logo,
.site-masthead .masthead-logo {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
@media (max-width: 1500px) {
  .public-drop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .masthead-logo { width: min(460px, 40vw); }
}
@media (max-width: 1120px) {
  .site-masthead,
  .site-masthead.compact {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 12px 22px 14px;
  }
  .masthead-logo { width: min(520px, 86vw); max-height: 104px; }
  .site-masthead.compact .masthead-logo { width: min(420px, 84vw); max-height: 86px; }
  .masthead-nav { justify-content: flex-start; }
  .public-hero-v13,
  .page-intro-v13 { grid-template-columns: 1fr; }
  .public-drop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-filters input { width: 100%; }
}
@media (max-width: 720px) {
  .nav-pill, .nav-button { min-height: 38px; padding: 8px 11px; font-size: 13px; }
  .hero-copy-v13 h1 { font-size: 34px; }
  .public-drop-grid { grid-template-columns: 1fr; }
  .public-drop-grid .drop-card { min-height: auto; }
  .public-drop-grid .drop-card img { height: 220px; }
  .scan-actions-v13 input { width: 100%; }
}

/* v14 clean retail-style header refresh
   Uses a compact icon + wordmark lockup and a two-row sticky ecommerce nav. */
:root {
  --lw-deep: #071B34;
  --lw-mid: #0E2E57;
  --lw-orange: #FF6A00;
  --lw-teal: #18B7A0;
  --lw-gray: #F3F4F6;
}

body.public-site,
body.admin-site {
  padding-top: 0;
}

.clean-site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(255,255,255,0.98);
  color: var(--lw-deep);
  border-bottom: 1px solid rgba(7,27,52,0.14);
  box-shadow: 0 8px 24px rgba(7,27,52,0.10);
  backdrop-filter: blur(12px);
}

.clean-header-main {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(320px, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 54px);
  padding: 10px clamp(18px, 3.2vw, 64px);
}

.admin-header .clean-header-main {
  grid-template-columns: minmax(240px, 330px) 1fr auto;
}

.clean-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  line-height: 1;
}

.clean-logo-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.clean-logo-wordmark {
  width: 218px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.clean-header-title {
  color: var(--lw-deep);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.clean-search {
  display: grid;
  grid-template-columns: 1fr 56px;
  width: min(680px, 100%);
  justify-self: center;
  border: 1px solid rgba(7,27,52,0.14);
  border-radius: 0;
  background: var(--lw-gray);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.clean-search input {
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--lw-deep);
  font-size: 16px;
  padding: 0 18px;
  outline: none;
}

.clean-search input::placeholder { color: rgba(7,27,52,0.58); }

.clean-search button {
  min-height: 52px;
  border: 0;
  border-left: 1px solid rgba(7,27,52,0.14);
  border-radius: 0;
  background: #6b7280;
  color: white;
  font-size: 30px;
  line-height: 1;
  box-shadow: none;
}

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

.clean-api-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(24,183,160,0.50);
  color: var(--lw-teal);
  background: rgba(24,183,160,0.07);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.clean-api-pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lw-teal);
  box-shadow: 0 0 0 5px rgba(24,183,160,0.12);
}

.clean-category-nav {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 86px);
  padding: 0 clamp(18px, 3vw, 64px);
  border-top: 1px solid rgba(7,27,52,0.10);
  background: #fff;
  overflow-x: auto;
}

.clean-category-nav a,
.clean-category-nav button {
  position: relative;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--lw-deep);
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.clean-category-nav a::after,
.clean-category-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: transparent;
  transition: background 0.15s ease;
}

.clean-category-nav a:hover::after,
.clean-category-nav button:hover::after,
.clean-category-nav a.active::after {
  background: var(--lw-orange);
}

.clean-category-nav a.active {
  color: var(--lw-orange);
}

.site-main { padding-top: 22px; }
.public-site .site-main { padding-inline: clamp(18px, 2.6vw, 46px); }

/* Make the public page less like an admin panel and more like a retail landing page. */
.public-hero-v13 {
  min-height: 220px;
  grid-template-columns: minmax(460px, 1fr) minmax(300px, 0.48fr);
}
.hero-copy-v13,
.hero-kpis-v13 { border-radius: 22px; }
.hero-copy-v13 h1 {
  font-size: clamp(34px, 3.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero-copy-v13 p { font-size: 16px; }
.public-status { border-radius: 12px; }
.public-drops-panel { border-radius: 22px; }
.public-drop-grid,
.customer-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.public-drop-grid .drop-card,
.drop-card { border-radius: 22px; }
.public-drop-grid .drop-card img { height: 248px; }

@media (max-width: 1500px) {
  .public-drop-grid,
  .customer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clean-header-main { grid-template-columns: minmax(220px, 310px) minmax(280px, 1fr) auto; }
  .clean-logo-wordmark { width: 198px; }
}

@media (max-width: 1120px) {
  .clean-header-main,
  .admin-header .clean-header-main {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: start;
  }
  .clean-search { justify-self: stretch; width: 100%; }
  .clean-header-actions { justify-content: flex-start; }
  .clean-category-nav { justify-content: flex-start; gap: 28px; }
  .public-hero-v13 { grid-template-columns: 1fr; }
  .public-drop-grid,
  .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .clean-header-main { padding: 10px 16px; }
  .clean-logo-icon { width: 44px; height: 44px; }
  .clean-logo-wordmark { width: 176px; height: 48px; }
  .clean-category-nav { min-height: 44px; padding-inline: 16px; gap: 24px; }
  .clean-category-nav a,
  .clean-category-nav button { min-height: 44px; font-size: 13px; }
  .public-drop-grid,
  .customer-grid { grid-template-columns: 1fr; }
}

/* v15 Scanner Control Centre */
.scanner-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
}
.scanner-control-card,
.scanner-model-card {
  border: 1px solid var(--border);
  background: rgba(7, 27, 52, 0.62);
  border-radius: 18px;
  padding: 16px;
}
.scanner-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.scanner-card-head h3 {
  margin: 0;
  font-size: 17px;
}
.scanner-kv-grid,
.scanner-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}
.scanner-kv-grid .kv,
.scanner-model-card {
  background: rgba(14, 46, 87, 0.38);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px;
}
.scanner-kv-grid .kv span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.scanner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.scanner-actions input {
  min-width: 145px;
  flex: 1;
}
.scan-error-inline {
  margin-top: 12px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ff6a00, #ff8b3d);
  color: white;
  font-weight: 900;
}
@media (max-width: 900px) {
  .scanner-card-grid,
  .scanner-model-grid,
  .scanner-kv-grid { grid-template-columns: 1fr; }
}


/* v16 header brand lockup refresh */
.clean-header-main {
  grid-template-columns: minmax(230px, 300px) minmax(320px, 1fr) auto;
}
.admin-header .clean-header-main {
  grid-template-columns: minmax(230px, 300px) 1fr auto;
}
.clean-logo-link.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  line-height: 1;
}
.brand-lockup .brand-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-lockup .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  min-width: 0;
}
.brand-lockup .brand-main,
.brand-lockup .brand-sub {
  font-family: "Exo 2", "Inter", "Segoe UI", sans-serif;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}
.brand-lockup .brand-main {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-lockup .brand-sub {
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0.01em;
}
.brand-lockup .loot { color: var(--lw-orange); }
.brand-lockup .drop { color: var(--lw-teal); }
.brand-lockup .watcher { color: var(--lw-deep); }
.clean-logo-icon,
.clean-logo-wordmark {
  display: none !important;
}
@media (max-width: 1500px) {
  .clean-header-main {
    grid-template-columns: minmax(220px, 285px) minmax(280px, 1fr) auto;
  }
  .brand-lockup .brand-main { font-size: 28px; }
  .brand-lockup .brand-sub { font-size: 14px; }
}
@media (max-width: 1120px) {
  .clean-header-main,
  .admin-header .clean-header-main {
    grid-template-columns: 1fr;
  }
  .clean-logo-link.brand-lockup {
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .brand-lockup .brand-icon {
    width: 42px;
    height: 42px;
  }
  .brand-lockup .brand-main { font-size: 24px; }
  .brand-lockup .brand-sub { font-size: 13px; margin-top: 3px; }
}


/* v17 product detail release-date spotlight */
.release-spotlight {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(243,244,246,0.16);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 106, 0, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(14,46,87,0.96), rgba(7,27,52,0.96));
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
}
.release-spotlight.warn {
  border-color: rgba(255,106,0,0.38);
}
.release-spotlight.good {
  border-color: rgba(24,183,160,0.35);
}
.release-spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.release-label {
  color: var(--brand-teal, #18B7A0);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 12px;
}
.release-date-large {
  color: var(--text, #F3F4F6);
  font-family: "Exo 2", "Inter", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.release-countdown {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255,106,0,0.13);
  color: #ffd2b2;
  font-size: 15px;
  font-weight: 900;
}
.release-spotlight.good .release-countdown {
  background: rgba(24,183,160,0.12);
  color: #b5fff3;
}
.release-countdown::before {
  content: "⏱";
  font-size: 15px;
}
.detail-summary-grid .breakdown {
  min-height: 128px;
}
@media (max-width: 760px) {
  .release-spotlight-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .release-date-large {
    font-size: 30px;
  }
}

/* v18 mobile-friendly responsive polish
   Goal: phone-first public/admin usability without changing desktop layout. */
@media (max-width: 860px) {
  html { scroll-padding-top: 118px; }

  body {
    background:
      linear-gradient(180deg, rgba(243,244,246,0.98), rgba(243,244,246,0.96) 0, rgba(7,27,52,1) 220px),
      var(--brand-deep-navy, #071B34);
  }

  .clean-site-header {
    position: sticky;
    top: 0;
    z-index: 500;
  }

  .clean-header-main,
  .admin-header .clean-header-main {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand status"
      "search search";
    gap: 8px 12px;
    align-items: center;
    min-height: auto;
    padding: 8px 12px 10px;
  }

  .clean-logo-link.brand-lockup {
    grid-area: brand;
    gap: 9px;
    max-width: 100%;
  }

  .brand-lockup .brand-icon {
    width: 40px;
    height: 40px;
  }

  .brand-lockup .brand-main {
    font-size: 22px;
    letter-spacing: -0.03em;
  }

  .brand-lockup .brand-sub {
    font-size: 12px;
    margin-top: 3px;
  }

  .clean-header-title {
    grid-area: status;
    justify-self: end;
    max-width: 42vw;
    font-size: 11px;
    line-height: 1.15;
    text-align: right;
    color: rgba(7,27,52,0.68);
  }

  .clean-header-actions {
    grid-area: status;
    justify-self: end;
  }

  .clean-api-pill {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .clean-api-pill .dot {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 0 3px rgba(24,183,160,0.12);
  }

  .clean-search {
    grid-area: search;
    width: 100%;
    justify-self: stretch;
    grid-template-columns: 1fr 46px;
    border-radius: 12px;
  }

  .clean-search input {
    min-height: 42px;
    font-size: 14px;
    padding: 0 12px;
  }

  .clean-search button {
    min-height: 42px;
    font-size: 22px;
  }

  .clean-category-nav {
    min-height: 42px;
    justify-content: flex-start;
    gap: 18px;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .clean-category-nav::-webkit-scrollbar { display: none; }

  .clean-category-nav a,
  .clean-category-nav button {
    min-height: 42px;
    font-size: 12px;
    flex: 0 0 auto;
  }

  .site-main,
  main,
  .public-site .site-main {
    padding: 12px 12px 30px;
  }

  .public-hero-v13,
  .page-intro-v13,
  .customer-hero,
  .detail-grid,
  .two-col,
  .scan-progress-grid,
  .scanner-card-grid,
  .scanner-model-grid,
  .scanner-kv-grid,
  .breakdowns,
  .grid.cards {
    grid-template-columns: 1fr !important;
  }

  .public-hero-v13 {
    min-height: auto;
    gap: 12px;
    margin-bottom: 12px;
  }

  .hero-copy-v13,
  .hero-kpis-v13,
  .page-intro-v13,
  .panel,
  .card {
    border-radius: 18px;
  }

  .hero-copy-v13 {
    padding: 18px;
  }

  .hero-copy-v13 h1,
  .page-intro-v13 h1,
  h1 {
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .hero-copy-v13 p,
  .muted {
    font-size: 13px;
    line-height: 1.45;
  }

  .hero-kpis-v13 {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .hero-kpi {
    padding: 12px;
    border-radius: 14px;
  }

  .hero-kpi strong { font-size: 15px; }

  .status-bar {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 12px;
  }

  .panel {
    padding: 14px;
    margin-top: 12px;
  }

  .panel-head,
  .panel-head.split,
  .public-panel-head,
  .scanner-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filters,
  .public-filters,
  .actions,
  .scan-actions-v13,
  .intro-actions-v13,
  .scanner-actions,
  .small-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    justify-content: stretch;
  }

  input, select, button, .button-link, .nav-pill, .nav-button {
    width: 100%;
    min-height: 42px;
    font-size: 14px;
  }

  .filters input,
  .public-filters input,
  .customer-panel .filters input,
  .scan-actions-v13 input,
  .actions input {
    width: 100% !important;
    max-width: none;
  }

  .public-drop-grid,
  .customer-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .drop-card,
  .public-drop-grid .drop-card {
    min-height: auto;
    padding: 14px;
    border-radius: 18px;
    gap: 10px;
  }

  .drop-card img,
  .public-drop-grid .drop-card img,
  .placeholder-logo {
    height: 180px;
    border-radius: 14px;
    padding: 10px;
  }

  .drop-title,
  .public-drop-grid .drop-title {
    font-size: 16px;
    line-height: 1.25;
  }

  .drop-meta { font-size: 12px; }

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

  .drop-stat {
    min-height: 68px;
    padding: 9px;
    border-radius: 12px;
  }

  .drop-stat span { font-size: 10px; }
  .drop-stat strong { font-size: 15px; }

  .customer-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .customer-actions a,
  .public-drop-grid .customer-actions a {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .detail-img {
    max-height: 260px;
    border-radius: 16px;
  }

  .release-spotlight {
    padding: 16px;
    border-radius: 18px;
  }

  .release-date-large {
    font-size: 34px;
    line-height: 1.05;
  }

  .release-countdown {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 10px;
  }

  .catalogue-title {
    align-items: flex-start;
  }

  .catalogue-title h2,
  h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .table-wrap {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 760px;
  }

  th, td {
    padding: 9px 10px;
    font-size: 13px;
  }

  .product-img {
    width: 48px;
    height: 48px;
  }

  .raw-json {
    min-height: 240px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .clean-header-main,
  .admin-header .clean-header-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "status"
      "search";
  }

  .clean-header-title,
  .clean-header-actions {
    justify-self: start;
    max-width: 100%;
  }

  .clean-api-pill { display: none; }

  .brand-lockup .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-lockup .brand-main { font-size: 21px; }
  .brand-lockup .brand-sub { font-size: 12px; }

  .hero-copy-v13 h1,
  .page-intro-v13 h1,
  h1 {
    font-size: 25px;
  }

  .drop-stats {
    grid-template-columns: 1fr;
  }

  .drop-card img,
  .public-drop-grid .drop-card img,
  .placeholder-logo {
    height: 160px;
  }

  .release-date-large {
    font-size: 30px;
  }
}

/* v19 mobile header cleanup
   Hide the API Connected pill on mobile and let the public header use the space for brand/search only. */
@media (max-width: 860px) {
  .clean-header-actions,
  .clean-api-pill {
    display: none !important;
  }

  body.public-site .clean-header-main {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "brand"
      "search" !important;
  }

  body.public-site .clean-logo-link.brand-lockup {
    justify-self: start;
    max-width: 100%;
  }
}
