/* Quickextract Prospector — Quickextract single dark theme
   (#121212 base, white CTAs, mint success, gold pack accents). */

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

:root {
  --bg: #121212;
  --surface: #1c1c1c;
  --surface-2: #252525;
  --text: #d1d1d1;
  --text-strong: #ffffff;
  --muted: #8e8e8e;
  --border: #2e2e2e;
  --border-strong: #3a3a3a;

  /* White CTA (matches Quickextract “Add to Chrome”) */
  --primary: #ffffff;
  --primary-hover: #e8e8e8;
  --primary-soft: rgba(255, 255, 255, 0.08);
  --primary-text: #ffffff;
  --primary-ring: rgba(255, 255, 255, 0.22);
  --primary-grad: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
  --primary-on: #000000; /* text/icons on white primary surfaces */

  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --green-text: #34d399;
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.16);
  --amber: #c6a052;
  --amber-soft: rgba(198, 160, 82, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.55);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --content-pad-y: clamp(16px, 3vw, 28px);
  --content-pad-x: clamp(16px, 3.5vw, 32px);
  --content-pad-bottom: clamp(40px, 6vw, 60px);
  --content-pad: var(--content-pad-y) var(--content-pad-x) var(--content-pad-bottom);
  --card-pad: clamp(14px, 2.5vw, 20px);

  /* Motion (non-color) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.15s;
  --dur: 0.28s;
  --dur-slow: 0.4s;
  --sidebar-w: 240px;
  --sidebar-rail: 64px;
  --topbar-h: 52px;

  --hero-grad: linear-gradient(120deg, #1a1a1a 0%, #252525 50%, #1c1c1c 100%);
  --purple-soft: rgba(124, 58, 237, 0.2);
  --purple: #a78bfa;
  --orange-soft: rgba(251, 191, 36, 0.16);
  --orange: #fbbf24;

  color-scheme: dark;
}

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

body {
  font: 13px/1.5 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.011em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { color: var(--text-strong); letter-spacing: -0.02em; }

.brand { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.brand span { color: var(--primary); }
.brand-logo { width: 24px; height: 24px; border-radius: var(--radius-sm); display: block; box-shadow: var(--shadow-sm); }

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill.on  { color: var(--green-text); border-color: rgba(52, 211, 153, 0.35); background: var(--green-soft); }
.pill.off { color: var(--muted); background: var(--surface-2); }

/* ---------- buttons ---------- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
button:hover { background: var(--surface-2); border-color: var(--border-strong); }
button:active { transform: translateY(1px) scale(0.98); }
button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary-ring); }
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-on);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.25);
}
button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-on);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 8px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}
button.primary:active { transform: translateY(0) scale(0.98); }
a.primary, a.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s, box-shadow .15s, border-color .15s;
}
a.primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--primary-on);
}
a.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-on); }
a.ghost-link {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
a.ghost-link:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
button.danger { color: var(--red); border-color: rgba(248, 113, 113, 0.35); background: var(--surface); }
button.danger:hover { background: var(--red-soft); }
button:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

/* ---------- status ---------- */
.status { min-height: 18px; font-size: 12px; color: var(--muted); margin: var(--space-2) 0; line-height: 1.5; }
.status.err { color: var(--red); }
.status.ok  { color: var(--green-text); }

/* ---------- table ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: min(60vh, 520px);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  z-index: 1;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: rgba(42, 42, 42, 0.9); }
tr:last-child td { border-bottom: none; }

.name-input {
  width: 100%;
  max-width: 120px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.name-input:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 2px var(--primary-ring); }
.name-input:disabled { background: var(--surface-2); color: var(--muted); }

.biz-name { font-weight: 600; color: var(--text-strong); }
.biz-meta, .contact-meta { color: var(--muted); font-size: 11px; margin-top: 1px; }

.email-found { color: var(--green-text); word-break: break-all; font-weight: 500; }
.email-none  { color: var(--amber); }
.email-wait  { color: var(--muted); font-style: italic; }
.saved-badge {
  color: var(--green-text);
  font-size: 11px;
  font-weight: 600;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-sm);
  padding: 1px 7px;
  white-space: nowrap;
}

.empty { padding: 30px 20px; text-align: center; color: var(--muted); line-height: 1.6; }

footer { padding: var(--space-2) 2px 0; font-size: 11px; color: var(--muted); }

/* ---------- forms ---------- */
label { display: block; margin-bottom: var(--space-3); font-weight: 500; font-size: 13px; color: var(--text); }
label input, label select,
.inline input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 400;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
label input:focus, label select:focus, .inline input:focus, textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
label small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; }
.inline { display: flex; gap: 7px; margin-top: 6px; }
.inline input { margin-top: 0; }
#org-row, #list-row { margin-top: var(--space-3); }
