/* PokeVibes QuickLister design system (visual redesign, Checkpoint 8).
 * Deep navy shell, white content cards, golden yellow primary actions.
 * Centralized tokens and reusable components: .card, .btn, .field, .ficon,
 * .tab, .dest-pill, .item-card, .badge, .chip, .pricing-panel, .meter.
 * No frameworks, no webfonts: a strong system font stack only. */

:root {
  /* Brand palette */
  --navy-950: #020c26;
  --navy-900: #04122e;
  --navy-800: #06183d;
  --navy-700: #0a2456;
  --navy-600: #123064;
  --blue: #2563eb;
  --blue-bright: #2e8cff;
  --gold: #ffc400;
  --gold-2: #ffd94d;
  --gold-deep: #e0a800;
  --gold-text: #131f3d;

  /* Light content surfaces */
  --surface: #ffffff;
  --surface-2: #f2f5fb;
  --surface-3: #e8eef8;
  --ink: #0b1b3a;
  --ink-2: #54678a;
  --line: #d5e0f0;
  --line-strong: #b9cbe8;

  /* Semantic */
  --danger: #b3261e;
  --danger-bg: #fdf0ef;
  --ok: #177245;
  --ok-bg: #e5f5ec;
  --warn-text: #7a5200;
  --warn-bg: #fff3cd;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-card: 0 10px 26px rgba(1, 6, 20, 0.35);
  --shadow-btn: 0 1px 2px rgba(6, 24, 61, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  background: linear-gradient(180deg, var(--navy-950) 0, var(--navy-800) 340px, var(--navy-900) 100%);
  background-attachment: fixed;
  background-color: var(--navy-900);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  padding-bottom: 32px;
  overflow-x: hidden;
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-800));
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 26 1 55 5 T 100 3 V10 Z' fill='%23ffc400'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: 0.95; pointer-events: none;
}
.brand-wrap { min-width: 0; }
.brand-logo {
  display: block; height: 52px; width: auto; max-width: 62vw;
  border-radius: 6px;
}
.brand-slogan {
  margin-top: 5px;
  color: var(--gold);
  font-size: 12.5px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase;
  white-space: nowrap;
}
.net {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 6px;
  font-size: 13px; font-weight: 700; color: #eaf1ff;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  max-width: 44vw;
}
.net::before {
  content: ""; flex: 0 0 auto;
  width: 9px; height: 9px; border-radius: 50%;
  background: #8fa8cf;
}
.net.ok::before { background: #2ee66b; }
.net.off { color: #ffb3ae; border-color: rgba(255, 122, 122, 0.55); }
.net.off::before { background: #ff6b6b; }

/* ---------- Layout and cards ---------- */
.view { padding: 4px 14px 14px; max-width: 880px; margin: 0 auto; }
.card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  margin-bottom: 14px;
}
/* Section title band for cards whose heading is a direct child */
.card > h2 {
  margin: -18px -16px 14px;
  padding: 13px 16px 12px;
  background: linear-gradient(90deg, var(--navy-800), var(--navy-600));
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 3px solid var(--gold);
  font-size: 19px;
}
.card > h3 { color: var(--navy-800); margin: 16px 0 6px; font-size: 16.5px; }
.row > h2 { color: var(--navy-800); margin: 0; }
h1 { font-size: 24px; margin: 4px 0 8px; color: var(--navy-800); }
h2 { font-size: 20px; margin: 4px 0 10px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.strong { font-weight: 700; }
.error { color: var(--danger); white-space: pre-line; }

/* ---------- Navigation ---------- */
.tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 12px 0 14px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  min-height: 62px; min-width: 0;
  padding: 8px 2px 7px;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-700));
  color: #dce7fa;
  border: 1px solid #2a4a86; border-radius: 14px;
  font-family: var(--font);
  font-size: clamp(10.5px, 2.9vw, 13px); font-weight: 700; cursor: pointer;
}
.tab svg { width: 23px; height: 23px; flex: 0 0 auto; }
.tab span { line-height: 1.1; white-space: nowrap; }
.tab.active {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--gold-text);
  border-color: var(--gold-deep);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.35);
}

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span {
  display: flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 650; color: var(--ink);
  margin-bottom: 6px;
}
.ficon {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-800));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.ficon svg { width: 19px; height: 19px; }
.field input, .field select, .field textarea,
select, input[type="text"], input[type="number"] {
  width: 100%;
  background: #f7faff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 16.5px; font-family: var(--font);
  min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus,
select:focus, input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 0;
}
select { width: auto; }
.field select, .field input, .field textarea { width: 100%; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important;
}
input[type="checkbox"].big-check { width: 26px; height: 26px; min-height: 0; accent-color: var(--gold-deep); flex: 0 0 auto; }
/* Checkbox fields: box sits beside its label instead of dropping below it */
.field:has(> input.big-check) { display: flex; align-items: flex-start; gap: 10px; }
.field:has(> input.big-check) > span { flex: 1 1 auto; margin-bottom: 0; }
.field:has(> input.big-check) > input.big-check { margin-top: 4px; }

/* Destination pill buttons (Setup) */
.dest-pills { display: flex; gap: 8px; }
.dest-pill {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; padding: 10px 6px;
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 15.5px; font-weight: 700; cursor: pointer;
}
.dest-pill::before {
  content: ""; flex: 0 0 auto;
  width: 19px; height: 19px; border-radius: 6px;
  border: 2px solid var(--line-strong); background: #fff;
}
.dest-pill.on {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: var(--gold-deep); color: var(--gold-text);
  box-shadow: 0 3px 9px rgba(255, 180, 0, 0.3);
}
.dest-pill.on::before {
  content: "\2713"; color: #fff; background: var(--navy-700);
  border-color: var(--navy-700);
  font-size: 12.5px; font-weight: 900; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: #fff;
  color: var(--navy-800);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-btn);
  padding: 11px 16px;
  font-size: 16px; font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
}
.btn.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--gold-text);
  border-color: var(--gold-deep);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.35);
}
.btn.danger { color: var(--danger); border-color: #efb7b3; background: var(--danger-bg); }
.btn.big { width: 100%; padding: 15px; font-size: 18px; }
.btn.huge { width: 100%; padding: 22px; font-size: 21px; font-weight: 800; margin: 10px 0; }
.btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.file-btn { margin-top: 10px; display: block; }

/* ---------- Rows and lists ---------- */
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: 8px; margin: 8px 0; }
.row.wrap { flex-wrap: wrap; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
}
.item-head { display: flex; gap: 10px; }
.item-head img {
  width: 64px; height: 90px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--line); background: #0a1633;
}
.item-title { font-weight: 750; color: var(--ink); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-3); color: #33507e;
  margin-right: 5px;
}
.badge.warn { color: var(--warn-text); border-color: #ecd28a; background: var(--warn-bg); }
.badge.bad { color: var(--danger); border-color: #efb7b3; background: var(--danger-bg); }
.badge.good { color: var(--ok); border-color: #a9dfc0; background: var(--ok-bg); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip {
  border: 1.5px solid var(--line); background: #fff;
  color: var(--ink); border-radius: 999px;
  padding: 9px 13px; font-size: 14px; font-weight: 650; cursor: pointer;
  min-height: 44px; font-family: var(--font);
}
.chip.on {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--gold-text); border-color: var(--gold-deep);
}
.chip-label { font-size: 13px; color: var(--ink-2); font-weight: 700; width: 100%; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 .field { margin-bottom: 6px; }

/* ---------- Capture ---------- */
.cap-number { font-size: 15px; color: var(--ink-2); }
.cap-number span { color: var(--navy-800); font-weight: 800; font-size: 20px; }
.cap-stage { font-size: 30px; font-weight: 900; margin: 2px 0 8px; color: var(--navy-800); }
.cap-preview-row { display: flex; gap: 10px; }
.cap-preview-row figure { flex: 1; margin: 0; min-width: 0; }
.cap-preview-row img {
  width: 100%; aspect-ratio: 5 / 7; object-fit: cover;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px;
}
.cap-preview-row figcaption { font-size: 13px; color: var(--ink-2); text-align: center; margin-top: 4px; }
.pace { text-align: right; }

/* ---------- Market Intelligence pricing panel ---------- */
.pricing-panel {
  margin-top: 8px;
  background: #eef3fd;
  border: 1px solid #cfddf6;
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 10px 12px;
}
.pricing-panel:empty { display: none; }
.pv-market-price { font-size: 19px; font-weight: 800; color: var(--navy-800); }
.pv-range { color: var(--ink-2); }
.pv-suggested {
  background: #fff8e1;
  border: 1px solid #f0d488;
  border-radius: 10px;
  padding: 7px 10px;
}
.pv-note { color: var(--ink-2); }

/* Inventory market totals band */
#inv-market-total {
  background: linear-gradient(90deg, var(--navy-800), var(--navy-600));
  color: #fff;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15.5px; font-weight: 650;
  margin-bottom: 10px;
}

/* ---------- Meters ---------- */
.meter { background: var(--surface-3); border: 1px solid var(--line); border-radius: 999px; height: 16px; overflow: hidden; }
.meter-fill { height: 100%; width: 0%; background: #2fbf71; }
.meter-fill.warn { background: var(--gold); }
.meter-fill.stop { background: #e05252; }
.meter-label { font-size: 14px; font-weight: 650; margin: 10px 0 5px; color: var(--ink); }

/* ---------- Auth ---------- */
.auth-card { max-width: 460px; margin: 26px auto; text-align: left; }
.auth-logo { display: block; width: 100%; max-width: 330px; height: auto; margin: 2px auto 4px; }
.auth-slogan {
  text-align: center; margin: 0 0 12px;
  color: var(--navy-700); font-weight: 800; font-size: 15px; letter-spacing: 0.03em;
}
.auth-card h1 { text-align: center; }
.auth-card .muted { text-align: center; }

/* ---------- More tab footer ---------- */
.more-foot { text-align: center; padding: 10px 0 4px; }
.more-badge { width: 92px; height: 92px; border-radius: 50%; box-shadow: var(--shadow-card); }
.more-slogan { margin-top: 8px; color: #fff; font-weight: 800; font-size: 16px; }
.more-foot .muted { color: #9db2d5; }

.foot { text-align: center; padding: 10px; color: #9db2d5; }

/* ---------- Quick Start video ---------- */
.quickstart-btn { display: inline-flex; align-items: center; gap: 8px; }
.quickstart-btn svg { width: 18px; height: 18px; flex: none; }
.qs-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(2, 12, 38, 0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.qs-overlay[hidden] { display: none; }
.qs-panel {
  width: min(430px, 100%);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow-card);
}
.qs-head {
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; font-size: 17px; margin-bottom: 10px;
}
.qs-close { min-height: 38px; padding: 6px 14px; }
.qs-panel video {
  display: block; width: 100%; max-height: 72vh;
  border-radius: 12px; background: #000;
}

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  .brand-logo { height: 60px; }
  .tab { font-size: 13.5px; min-height: 66px; }
  .card { padding: 20px 20px; }
  .card > h2 { margin: -20px -20px 14px; padding: 14px 20px 13px; }
}
