@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --primary:    #16ADAF;
  --primary-dk: #0e8f91;
  --secondary:  #A69E83;
  --dark:       #000000;
  --white:      #ffffff;
  --grey:       #f3f4f6;
  --grey-2:     #e5e7eb;
  --grey-3:     #d1d5db;
  --text:       #111111;
  --muted:      #6b7280;
  --danger:     #ef4444;
  --warn:       #f59e0b;
  --success:    #10b981;

  --sidebar-w:  220px;
  --topbar-h:   64px;
  --radius:     8px;
  --radius-sm:  4px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);

  --font: 'Montserrat', sans-serif;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--grey);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  padding: 0 0 20px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo-mark {
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .04em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  transition: all .15s;
}

.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--white);
}

.nav-item.active {
  background: var(--primary);
  color: var(--white);
}

.nav-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 16px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: auto;
}

.plan-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(22,173,175,.15);
  border: 1px solid rgba(22,173,175,.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.plan-icon { color: var(--primary); font-size: 16px; }
.plan-name { font-size: 12px; font-weight: 700; color: var(--white); }
.plan-sub  { font-size: 11px; color: rgba(255,255,255,.4); }

.sidebar-link {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  display: block;
  text-align: center;
  padding: 6px 0;
  transition: color .15s;
}
.sidebar-link:hover { color: var(--primary); }

/* ── Main ─────────────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--grey-2);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--grey);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color .15s;
}

.topbar-search:focus-within {
  border-color: var(--primary);
  background: var(--white);
}

.search-icon { color: var(--muted); font-size: 14px; }

.topbar-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
  padding: 10px 0;
}

.topbar-input::placeholder { color: var(--muted); }

.btn-analyze {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}

.btn-analyze:hover { background: var(--primary-dk); transform: translateY(-1px); }
.btn-analyze:active { transform: translateY(0); }

/* ── Views ────────────────────────────────────────────────────────────────── */
.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 60px;
  position: relative;
}

.view.active { display: block; }

/* ── View intro ───────────────────────────────────────────────────────────── */
.view-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-h) - 80px);
  text-align: center;
  padding: 40px 20px;
}

.view-intro-icon {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 20px;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.view-intro h2 {
  font-size: 32px;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: -.5px;
}

.view-intro p {
  font-size: 15px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.quick-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.qs-label { font-size: 12px; color: var(--muted); }

.qs-btn {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s;
}

.qs-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(22,173,175,.05);
}

/* ── Results header ───────────────────────────────────────────────────────── */
.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.results-topic {
  font-size: 26px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -.5px;
}

.results-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.results-tabs {
  display: flex;
  gap: 2px;
  background: var(--grey);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.rtab {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  transition: all .15s;
  white-space: nowrap;
}

.rtab:hover { color: var(--text); }
.rtab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow); }

.rtab-panel { display: none; }
.rtab-panel.active { display: block; }

/* ── Overview grid ────────────────────────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 260px 280px 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}
.card-link:hover { opacity: .7; }

/* Score card */
.card-score { grid-column: 1; }

.score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}

.score-number {
  font-size: 64px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -2px;
}

.score-denom {
  font-size: 18px;
  color: var(--muted);
  font-weight: 600;
}

.score-bar-track {
  height: 4px;
  background: var(--grey-2);
  border-radius: 2px;
  margin-bottom: 14px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .6s ease;
  width: 0%;
}

.score-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.score-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--grey-2);
  background: var(--grey);
  color: var(--text);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.niche-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid;
}

.status-growing  { border-color: var(--primary); color: var(--primary); background: rgba(22,173,175,.08); }
.status-stable   { border-color: var(--secondary); color: var(--secondary); background: rgba(166,158,131,.08); }
.status-saturated{ border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,.08); }
.status-emerging { border-color: var(--warn); color: var(--warn); background: rgba(245,158,11,.08); }

/* Radar */
.card-radar { grid-column: 2; }
.radar-wrap { position: relative; display: flex; justify-content: center; }

/* Signals */
.card-signals { grid-column: 3; }

.signals-list { display: flex; flex-direction: column; gap: 10px; }

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.signal-name { color: var(--text); font-weight: 500; }

.signal-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-bar-track {
  width: 80px;
  height: 3px;
  background: var(--grey-2);
  border-radius: 2px;
  overflow: hidden;
}

.signal-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.signal-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  min-width: 36px;
  text-align: right;
}

/* KW preview */
.card-kw-preview { grid-column: 1 / 3; }

.kw-preview-list { display: flex; flex-direction: column; gap: 8px; }

.kw-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey);
  font-size: 13px;
}

.kw-preview-row:last-child { border-bottom: none; }

.kw-preview-name { font-weight: 600; color: var(--text); }

.kw-preview-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kw-demand-bar {
  width: 60px;
  height: 4px;
  background: var(--grey-2);
  border-radius: 2px;
  overflow: hidden;
}

.kw-demand-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.kw-comp-num {
  font-size: 11px;
  color: var(--muted);
  min-width: 48px;
  text-align: right;
}

.opp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.opp-high   { background: rgba(22,173,175,.12); color: var(--primary); }
.opp-medium { background: rgba(166,158,131,.12); color: var(--secondary); }
.opp-low    { background: rgba(239,68,68,.08); color: var(--danger); }

/* Books preview */
.card-books-preview { grid-column: 3; grid-row: 2; }

.books-preview-list { display: flex; flex-direction: column; gap: 10px; }

.book-prev-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.book-prev-img {
  width: 32px;
  height: 44px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--grey);
  flex-shrink: 0;
}

.book-prev-placeholder {
  width: 32px;
  height: 44px;
  background: var(--grey);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--grey-3);
  flex-shrink: 0;
}

.book-prev-info { flex: 1; min-width: 0; }
.book-prev-title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-prev-author { font-size: 11px; color: var(--muted); }

.book-prev-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

/* Gap card */
.card-gap { grid-column: 1 / 3; }

.gap-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.gap-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gap-want  { color: var(--primary); }
.gap-dont  { color: var(--danger); }

.gap-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--text);
  padding: 5px 0;
  border-bottom: 1px solid var(--grey);
}

.gap-item:last-child { border-bottom: none; }

.gap-icon { flex-shrink: 0; font-size: 11px; margin-top: 2px; }
.gap-want .gap-icon { color: var(--primary); }
.gap-dont .gap-icon { color: var(--danger); }

.suggested-angle {
  background: linear-gradient(135deg, rgba(22,173,175,.08) 0%, rgba(22,173,175,.03) 100%);
  border: 1px solid rgba(22,173,175,.25);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.angle-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.angle-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.angle-desc { font-size: 13px; color: var(--muted); flex: 1; }

.angle-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.angle-score {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.angle-score-label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Skeleton ─────────────────────────────────────────────────────────────── */
.signal-skeleton {
  height: 20px;
  background: linear-gradient(90deg, var(--grey) 25%, var(--grey-2) 50%, var(--grey) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.4s ease-in-out infinite;
}

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

/* ── Loading overlay ──────────────────────────────────────────────────────── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(243,244,246,.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.loading-card {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  padding: 36px 40px;
  text-align: center;
  max-width: 340px;
  box-shadow: var(--shadow-md);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--grey-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 20px;
}

.loading-steps { text-align: left; }

.lstep {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--grey);
  transition: color .3s;
}

.lstep:last-child { border-bottom: none; }
.lstep.active { color: var(--primary); }
.lstep.done   { color: var(--success); }

.lstep-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}

.lstep.active .lstep-dot { background: var(--primary); border-color: var(--primary); animation: pulse .8s ease-in-out infinite; }
.lstep.done .lstep-dot   { background: var(--success); border-color: var(--success); }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.tab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-left { display: flex; align-items: center; gap: 10px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.toolbar-count {
  font-size: 13px;
  color: var(--muted);
}

.toolbar-select {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  outline: none;
  background: var(--white);
  transition: border-color .15s;
}

.toolbar-select:focus { border-color: var(--primary); }

.table-wrap {
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--white);
}

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

.data-table thead tr {
  background: var(--grey);
  border-bottom: 2px solid var(--grey-2);
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table th:hover { color: var(--primary); }
.data-table th.sorted { color: var(--primary); }

.sort-arrow { font-size: 10px; margin-left: 3px; opacity: .5; }
.data-table th.sorted .sort-arrow { opacity: 1; }

.data-table tbody tr {
  border-bottom: 1px solid var(--grey);
  cursor: pointer;
  transition: background .1s;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(22,173,175,.04); }
.data-table tbody tr.row-active { background: rgba(22,173,175,.08); }

.data-table td {
  padding: 11px 14px;
  vertical-align: middle;
}

/* Demand badge */
.demand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.demand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.demand-high   .demand-dot { background: var(--primary); }
.demand-medium .demand-dot { background: var(--secondary); }
.demand-low    .demand-dot { background: var(--grey-3); }
.demand-high   { color: var(--primary); }
.demand-medium { color: var(--secondary); }
.demand-low    { color: var(--muted); }

.vol-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

/* Type chip */
.type-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid;
}

.type-short  { background: rgba(22,173,175,.08); border-color: var(--primary); color: var(--primary); }
.type-long   { background: var(--grey); border-color: var(--grey-3); color: var(--muted); }
.type-phrase { background: rgba(166,158,131,.1); border-color: var(--secondary); color: var(--secondary); }

/* Row action button */
.row-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  transition: all .15s;
  white-space: nowrap;
}

.row-btn:hover { background: var(--primary); color: var(--white); }

/* ── Books grid ───────────────────────────────────────────────────────────── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.book-card {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

.book-img-wrap {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grey);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.book-img { max-height: 130px; max-width: 90px; object-fit: contain; }
.book-placeholder { font-size: 36px; opacity: .25; }

.book-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-author { font-size: 12px; color: var(--muted); }

.book-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.book-rating { color: var(--primary); font-weight: 700; font-size: 12px; }
.book-reviews { color: var(--muted); font-size: 11px; }

.book-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--primary);
  color: var(--white);
}

.book-asin-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  width: 100%;
  transition: all .15s;
}

.book-asin-btn:hover { background: var(--primary); color: var(--white); }

/* ── Gaps tab ─────────────────────────────────────────────────────────────── */
.gaps-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gaps-card {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  padding: 20px;
}

.gaps-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.gaps-list { list-style: none; }

.gaps-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.gaps-list li:last-child { border-bottom: none; }
.gaps-list li::before { content: '→'; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

/* ── Standalone views ─────────────────────────────────────────────────────── */
.view-header { margin-bottom: 24px; }

.view-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -.5px;
  margin-bottom: 4px;
}

.view-desc { font-size: 14px; color: var(--muted); }

.standalone-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  max-width: 640px;
}

.standalone-input {
  flex: 1;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  background: var(--white);
}

.standalone-input:focus { border-color: var(--primary); }

.asin-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── Validator ────────────────────────────────────────────────────────────── */
.validator-form { max-width: 700px; margin-bottom: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-hint { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }

.form-input {
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  background: var(--white);
  width: 100%;
  resize: vertical;
}

.form-input:focus { border-color: var(--primary); }
.form-textarea { min-height: 80px; }

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

/* Validator results */
.verdict-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 2px solid;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.verdict-GO     { border-color: var(--primary); background: rgba(22,173,175,.06); }
.verdict-REFINE { border-color: var(--warn);    background: rgba(245,158,11,.06); }
.verdict-DROP   { border-color: var(--danger);  background: rgba(239,68,68,.06); }

.verdict-label {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.verdict-text {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.verdict-GO .verdict-text     { color: var(--primary); }
.verdict-REFINE .verdict-text { color: var(--warn); }
.verdict-DROP .verdict-text   { color: var(--danger); }

.verdict-summary { font-size: 14px; color: var(--text); line-height: 1.65; flex: 1; max-width: 420px; }

.bv-scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  max-width: 700px;
}

.bv-score-card {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  padding: 16px;
}

.bv-score-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.bv-score-value {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}

.bv-detail-card {
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  max-width: 700px;
}

.bv-detail-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.bv-detail-content { font-size: 13px; color: var(--text); line-height: 1.75; }
.bv-detail-content strong { color: var(--primary); }
.bv-detail-p { margin-bottom: 8px; }

.bv-gap-list { list-style: none; }
.bv-gap-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--grey);
  font-size: 13px;
  color: var(--text);
}
.bv-gap-list li:last-child { border-bottom: none; }
.bv-gap-list li::before { content: '→'; color: var(--primary); flex-shrink: 0; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 11px 22px;
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-full { width: 100%; margin-top: 16px; }

.btn-outline {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 11px; }

/* ── Error / loading inline ───────────────────────────────────────────────── */
.error-box {
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #c00;
  margin-bottom: 14px;
  max-width: 640px;
}

.loading-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modal-in .25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon { font-size: 36px; color: var(--primary); margin-bottom: 14px; }
.modal-title { font-size: 22px; font-weight: 900; color: var(--dark); margin-bottom: 8px; }
.modal-sub { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }

.modal-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.mf {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--grey-2);
  border-radius: 100px;
  background: var(--grey);
  color: var(--text);
}

.modal-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-email-input {
  flex: 1;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  font-family: var(--font);
}

.modal-email-input:focus { border-color: var(--primary); }

.modal-privacy { font-size: 11px; color: var(--muted); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s;
}

.modal-close:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-gap { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .sidebar { width: 64px; }
  .logo-text, .nav-item span:not(.nav-icon), .sidebar-footer { display: none; }
  .main { margin-left: 64px; }
  .overview-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: 1fr 1fr; }
  .gaps-layout { grid-template-columns: 1fr; }
  .bv-scores-grid { grid-template-columns: 1fr; }
  .gap-columns { grid-template-columns: 1fr; }
  .modal-input-row { flex-direction: column; }
}
