/* ── Fonts & Reset ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@200;300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── MXM Design Tokens ── */
:root {
  --ci-teal:        #226C6E;
  --ci-teal-dark:   #1B5658;
  --ci-teal-light:  #2A9A9D;
  --ci-olive:       #A7AE60;
  --ci-anzac:       #E09B40;
  --ci-rust:        #6C3C32;
  --ci-dark:        #2F313C;

  --bg-page:        #EDF3F3;
  --bg-alt:         #FCF7EF;
  --bg-teal:        #D2E1E2;
  --bg-white:       #FFFFFF;

  --text-primary:   #2F313C;
  --text-body:      #3D3F4A;
  --text-secondary: #6E7080;
  --text-muted:     #9EA0AC;

  --card-bg:        #FFFFFF;
  --border:         rgba(47,49,60,0.12);
  --divider:        rgba(47,49,60,0.08);

  --success:        #226C6E;
  --warn:           #E09B40;
  --danger:         #B83232;

  --r:   3px;
  --r2:  4px;
  --r3:  6px;

  --shadow-sm:  0 1px 3px rgba(47,49,60,0.07), 0 1px 2px rgba(47,49,60,0.05);
  --shadow:     0 4px 12px rgba(47,49,60,0.10), 0 1px 3px rgba(47,49,60,0.06);
  --shadow-lg:  0 12px 32px rgba(47,49,60,0.14), 0 4px 8px rgba(47,49,60,0.06);

  --font: 'Sora', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; background: var(--bg-page); }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
header {
  background: var(--ci-dark);
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon { font-size: 16px; color: var(--ci-teal-light); }
.logo-text  { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.logo-badge {
  background: var(--ci-teal);
  color: #fff;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.header-auth { display: flex; align-items: center; gap: 12px; }
.header-user { color: rgba(255,255,255,0.55); font-size: 13px; }

.btn-header-login {
  background: var(--ci-teal);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.btn-header-login:hover {
  background: var(--ci-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34,108,110,0.3);
}
.btn-header-logout {
  background: transparent;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 6px 14px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-header-logout:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.btn-primary {
  background: var(--ci-teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ci-teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(34,108,110,0.28);
}
.btn-primary:disabled {
  background: var(--bg-teal);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-ghost {
  background: transparent;
  color: var(--ci-teal);
  border: 1px solid var(--ci-teal);
}
.btn-ghost:hover {
  background: rgba(34,108,110,0.06);
}
.btn-secondary {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-teal);
  border-color: var(--ci-teal);
  color: var(--ci-teal);
}
.btn-sm  { padding: 7px 14px; font-size: 12px; }
.btn-lg  { padding: 13px 30px; font-size: 14px; }
.btn-xl  { padding: 14px 36px; font-size: 14px; font-weight: 700; letter-spacing: 0.2px; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 36px 24px;
  color: var(--text-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--divider);
  margin-top: 40px;
}
footer a { color: var(--ci-teal); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────
   LANDING PAGE
───────────────────────────────────────────── */
.landing-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* Hero text above the card */
.landing-hero {
  text-align: center;
  margin-bottom: 32px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ci-teal);
  display: block;
  margin-bottom: 14px;
}
.landing-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.landing-title .thin {
  font-weight: 200;
  font-style: italic;
  opacity: 0.5;
}
.landing-sub {
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto;
}

/* ── Main card ── */
.wiz-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Card sections ── */
.wiz-body     { padding: 28px 32px; }
.wiz-footer   { padding: 16px 32px; background: var(--bg-page); border-top: 1px solid var(--divider); display: flex; justify-content: space-between; align-items: center; }

/* ── Phase 1: URL input ── */
.url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 0;
}
.url-field-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-page);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 0 14px;
  transition: border-color 0.2s, background 0.2s;
}
.url-field-wrap:focus-within {
  border-color: var(--ci-teal);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(34,108,110,0.1);
}
.url-field-icon { font-size: 15px; opacity: 0.4; flex-shrink: 0; }
.url-field-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  padding: 12px 0;
  outline: none;
  min-width: 0;
}
.url-field-wrap input::placeholder { color: var(--text-muted); }

.country-sel {
  background: var(--bg-page);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  padding: 0 12px;
  min-height: 48px;
  min-width: 120px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.country-sel:focus { border-color: var(--ci-teal); }

/* ── Progress (loading) ── */
.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0 0;
}
.spin {
  width: 24px; height: 24px;
  border: 2px solid var(--bg-teal);
  border-top-color: var(--ci-teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-text strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.progress-text span   { font-size: 12px; color: var(--text-muted); }

/* ── Features pills ── */
.features-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.feat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}
.feat-pill .pill-icon { font-size: 13px; }

/* ─────────────────────────────────────────────
   PHASE 2 – KEYWORD CHIPS
───────────────────────────────────────────── */

/* Step label at top of card */
.card-step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--divider);
  background: var(--bg-page);
}
.step-dots { display: flex; gap: 5px; }
.step-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bg-teal);
}
.step-dot.active { background: var(--ci-teal); }
.step-text {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Brand meta inside card */
.card-brand-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}
.card-brand-meta h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.card-brand-meta span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

/* Chip container */
.chip-zone {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
  margin-bottom: 16px;
}

.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 10px 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  animation: chipIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
  cursor: default;
  box-shadow: 0 1px 2px rgba(47,49,60,0.06);
}
.kw-chip:hover { border-color: var(--ci-teal); }
.kw-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
  padding: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}
.kw-chip-remove:hover { background: rgba(184,50,50,0.1); color: var(--danger); }

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.85) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.chips-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}
.dot-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ci-teal);
  animation: dotPulse 1.1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes dotPulse {
  0%,100% { opacity: 0.25; transform: scale(0.75); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* Add keyword row */
.add-kw-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.add-kw-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  max-width: 320px;
}
.add-kw-row input:focus {
  border-color: var(--ci-teal);
  background: var(--bg-white);
}
.add-kw-row input::placeholder { color: var(--text-muted); }

/* ─────────────────────────────────────────────
   PHASE 3 – ANALYSE LÄUFT
───────────────────────────────────────────── */
.phase2-explainer {
  background: rgba(34,108,110,0.06);
  border: 1px solid rgba(34,108,110,0.15);
  border-radius: var(--r2);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.phase2-explainer-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}
.phase2-explainer-text strong {
  color: var(--ci-teal);
  font-weight: 600;
}

.phase3-explainer {
  background: rgba(34,108,110,0.06);
  border: 1px solid rgba(34,108,110,0.15);
  border-radius: var(--r2);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.phase3-explainer-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}
.phase3-explainer-text strong {
  color: var(--ci-teal);
  font-weight: 600;
}
.phase3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.phase3-col-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Prompt preview */
.prompt-scroll {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.prompt-scroll::-webkit-scrollbar { width: 3px; }
.prompt-scroll::-webkit-scrollbar-thumb { background: var(--bg-teal); border-radius: 2px; }

.prompt-item {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 9px 13px;
  font-size: 12.5px;
  color: var(--text-body);
  line-height: 1.5;
  font-weight: 300;
  animation: promptSlide 0.35s cubic-bezier(0.16,1,0.3,1) both;
}
.prompt-num {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ci-teal);
  opacity: 0.65;
  margin-right: 6px;
  font-weight: 500;
}
@keyframes promptSlide {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Keyword status list */
.kw-status-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.kw-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--divider);
  font-size: 12.5px;
}
.kw-status-row:last-child { border-bottom: none; }
.kw-status-row:nth-child(even) { background: rgba(237,243,243,0.5); }
.kw-s-label { flex: 1; color: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-s-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  white-space: nowrap;
}
.kw-s-pending  { background: var(--bg-page); color: var(--text-muted); }
.kw-s-queued   { background: rgba(224,155,64,0.12); color: var(--ci-anzac); }
.kw-s-running  { background: rgba(34,108,110,0.1); color: var(--ci-teal); }
.kw-s-done     { background: rgba(34,108,110,0.1); color: var(--ci-teal); }
.kw-s-error    { background: rgba(184,50,50,0.1); color: var(--danger); }

.phase3-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 4px;
}
.phase3-loader span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   KEYWORDS PAGE
───────────────────────────────────────────── */
.kw-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Page title row */
.kw-page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.kw-page-title h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.15;
}
.kw-page-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-teal);
  color: var(--ci-teal);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 2px;
  letter-spacing: 0.3px;
}
.kw-page-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  margin-bottom: 20px;
}
.stat-item {
  background: var(--bg-white);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.stat-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 300; }

/* Table card */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--divider);
}
.table-card-header h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.table-card-header .table-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 300;
  margin-top: 1px;
}

/* Add form inside table */
.table-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 24px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--divider);
}
.table-add-row input {
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 12px;
  background: var(--bg-white);
  color: var(--text-primary);
  outline: none;
  width: 280px;
  transition: border-color 0.2s;
}
.table-add-row input:focus { border-color: var(--ci-teal); }
.table-add-row input::placeholder { color: var(--text-muted); }

/* Table */
.kw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kw-table thead th {
  padding: 9px 16px;
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.kw-table thead th:first-child { padding-left: 24px; }
.kw-table thead th:last-child  { padding-right: 24px; }
.kw-table tbody tr { border-bottom: 1px solid var(--divider); transition: background 0.12s; }
.kw-table tbody tr:last-child { border-bottom: none; }
.kw-table tbody tr:hover { background: #F6FAFB; }
.kw-table td { padding: 13px 16px; vertical-align: middle; }
.kw-table td:first-child { padding-left: 24px; }
.kw-table td:last-child  { padding-right: 24px; }

/* Column widths */
.col-kw      { min-width: 180px; }
.col-rank    { width: 65px; }
.col-sov     { width: 155px; }
.col-ai      { width: 80px; }
.col-brands  { width: 110px; }
.col-actions { width: 160px; text-align: right; }

/* Keyword cell */
.kw-cell-link {
  text-decoration: none;
  display: block;
  border-radius: var(--r);
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background 0.12s;
}
.kw-cell-link:hover { background: rgba(34,108,110,0.06); }
.kw-cell-link:hover .kw-cell-text { color: var(--ci-teal); }
.kw-cell-text { font-weight: 600; color: var(--text-primary); font-size: 13px; line-height: 1.3; transition: color 0.12s; }
.kw-cell-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* Rank */
.rank-num { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-primary); }
.rank-dash { color: var(--text-muted); font-size: 16px; }

/* SoV bar */
.sov-row { display: flex; align-items: center; gap: 8px; }
.sov-track { flex: 1; height: 4px; background: var(--bg-teal); border-radius: 2px; overflow: hidden; }
.sov-fill  { height: 100%; border-radius: 2px; background: var(--ci-teal); transition: width 0.7s cubic-bezier(0.16,1,0.3,1); }
.sov-pct   { font-family: var(--mono); font-size: 11.5px; font-weight: 700; min-width: 36px; text-align: right; }
.sov-hi { color: var(--ci-teal); }
.sov-mid { color: var(--ci-anzac); }
.sov-lo { color: var(--text-muted); }

/* AI score pill */
.ai-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 2px;
  min-width: 46px;
}
.ai-pill.sov-hi  { background: rgba(34,108,110,0.1); color: var(--ci-teal); }
.ai-pill.sov-mid { background: rgba(224,155,64,0.12); color: var(--ci-anzac); }
.ai-pill.sov-lo  { background: var(--bg-page); color: var(--text-muted); }

/* Brand dots */
.brand-dots { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bdot {
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

/* Status badge in table */
.s-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}
.s-running { background: rgba(34,108,110,0.1); color: var(--ci-teal); }
.s-done    { background: rgba(34,108,110,0.1); color: var(--ci-teal); }
.s-error   { background: rgba(184,50,50,0.1); color: var(--danger); }

/* Action buttons */
.del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13.5px;
  padding: 4px 6px;
  border-radius: var(--r);
  transition: all 0.15s;
  margin-left: 4px;
}
.del-btn:hover { color: var(--danger); background: rgba(184,50,50,0.08); }

.checking-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.cell-dash { color: var(--text-muted); font-size: 14px; }

.row-empty td {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ─────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────── */
.login-wrap {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.login-card h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.login-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 24px;
  line-height: 1.6;
}
.oauth-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.oauth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-white);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  width: 100%;
}
.oauth-btn:hover { border-color: var(--ci-teal); background: var(--bg-page); }
.oauth-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.oauth-icon { width: 18px; height: 18px; font-size: 16px; text-align: center; flex-shrink: 0; }
.oauth-soon { margin-left: auto; font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--text-muted); background: var(--bg-page); padding: 2px 6px; border-radius: 2px; text-transform: uppercase; }
.login-or { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.login-or span { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--divider); }
.magic-form { display: flex; flex-direction: column; gap: 8px; }
.magic-form input {
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 13px;
  padding: 10px 13px;
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.magic-form input:focus { border-color: var(--ci-teal); background: var(--bg-white); }
.magic-form input::placeholder { color: var(--text-muted); }
.magic-ok {
  background: rgba(34,108,110,0.08);
  border: 1px solid rgba(34,108,110,0.2);
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ci-teal);
  line-height: 1.6;
}

/* Login: logo, alerts, footer */
.login-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.login-logo-icon { font-size: 20px; color: var(--ci-teal); }
.login-logo-text { font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.login-alert {
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
}
.login-alert--error {
  background: rgba(220,53,69,0.08);
  border: 1px solid rgba(220,53,69,0.25);
  color: #b91c2e;
}
.login-alert--success {
  background: rgba(34,108,110,0.08);
  border: 1px solid rgba(34,108,110,0.2);
  color: var(--ci-teal);
}
.login-footer-links {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.login-footer-links a { color: var(--text-muted); text-decoration: none; }
.login-footer-links a:hover { color: var(--ci-teal); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 680px) {
  .landing-wrap { padding: 36px 16px 60px; }
  .wiz-body { padding: 20px; }
  .wiz-footer { padding: 14px 20px; }
  .url-row { flex-direction: column; }
  .country-sel { min-width: unset; }
  .phase3-grid { grid-template-columns: 1fr; }
  .kw-page-wrap { padding: 20px 16px 60px; }
  .kw-page-top { flex-direction: column; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .kw-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
