/* ============================================================
   Lead Contact Info — Premium Dark Theme
   Adapted from SlackReach's clean, minimal design language.
   ============================================================ */

:root {
  --bg: #000000;
  --bg-alt: #060608;
  --panel: #0c0c10;
  --text: #eef1f6;
  --text-secondary: #c0c8d4;
  --muted: #6e7a8a;
  --accent: #5ec8ff;
  --accent-hover: #7ad4ff;
  --accent-weak: rgba(94, 200, 255, 0.10);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(94, 200, 255, 0.32);
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout ---- */
#app {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand-wrap {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-sub {
  display: none;
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 12px;
}
.nav-section {
  display: none;
}
.tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.tab:hover {
  background: transparent;
  color: var(--text-secondary);
}
.tab.active {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Settings at bottom */
.sidebar nav .tab[data-tab="settings"] {
  margin-top: auto;
}

/* ---- Content ---- */
.content {
  padding: 32px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.content h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}
.title-center { text-align: left; }
.content h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.step h2 { margin-bottom: 4px; }
.step .muted { margin-top: 2px; }

/* ---- Hub Pages (Scrapers / Enrichment) ---- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.hub-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  aspect-ratio: 1;
  transition: border-color var(--transition);
}
.hub-card:hover {
  border-color: var(--border-active);
}
.hub-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hub-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.hub-logo.white-bg {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
.hub-logo.white-bg img {
  object-fit: contain;
  padding: 4px;
}
.hub-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hub-logo-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.hub-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-align: center;
}
.hub-open {
  width: fit-content;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  align-self: center;
}

/* ---- History ---- */
.history-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.history-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.history-table-card {
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    var(--panel);
}
.history-empty {
  padding: 46px 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}
.history-empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.history-empty-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.history-table-wrap {
  overflow-x: auto;
}
#historyTable {
  width: 100%;
  border-collapse: collapse;
}
#historyTable thead th {
  padding: 16px 20px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
#historyTable tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}
#historyTable tbody tr:last-child td {
  border-bottom: none;
}
#historyTable tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.history-file-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-file-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.history-file-meta,
.history-created-cell {
  color: var(--muted);
  font-size: 13px;
}
.history-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(94, 200, 255, 0.16);
  background: rgba(94, 200, 255, 0.08);
  color: #b9e7ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.history-download-col,
.history-download-cell {
  text-align: right;
}
.history-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.history-download-btn:hover {
  border-color: var(--border-active);
  background: var(--accent-weak);
  color: var(--accent-hover);
}

/* ---- Cards ---- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  transition: border-color var(--transition);
}
.card:hover { border-color: rgba(255, 255, 255, 0.12); }
.step { display: flex; flex-direction: column; gap: 8px; }

/* ---- Inputs ---- */
input[type="file"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--transition);
}
input[type="number"],
input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-weak);
}

/* ---- Buttons ---- */
button {
  appearance: none;
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}
button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
button:active { opacity: 0.85; }
button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}
.small-btn {
  min-width: 0;
  width: auto;
  font-size: 13px;
  padding: 7px 14px;
  align-self: flex-start;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-outline.small-btn {
  min-width: 0;
  width: auto;
  font-size: 13px;
  padding: 7px 14px;
  align-self: flex-start;
}
.big { font-size: 14px; padding: 10px 20px; }

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

/* ---- Tags ---- */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag {
  background: var(--accent-weak);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.tag .x {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  padding: 0;
}
.tag .x:hover { color: var(--text); }
.tags-input textarea {
  flex: 1;
  min-width: 200px;
  min-height: 28px;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

/* ---- Progress ---- */
.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s ease; }
.progress-row { display: flex; justify-content: space-between; margin-bottom: 8px; gap: 8px; font-size: 14px; }
.log { margin-top: 8px; font-size: 12px; color: var(--muted); max-height: 120px; overflow-y: auto; }

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

/* ---- Tables ---- */
.table-wrap {
  overflow: auto;
  max-height: 50vh;
  border: 1px solid var(--border);
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
}

.phone-results-card {
  width: min(100%, 980px);
  margin-left: auto;
  margin-right: auto;
}
.phone-results-wrap {
  max-width: 920px;
  margin: 0 auto;
}
#pfResultsTable th,
#pfResultsTable td {
  padding: 9px 12px;
}
#pfResultsTable th:nth-child(4),
#pfResultsTable td:nth-child(4) {
  width: 72px;
}
#pfResultsTable th:nth-child(5),
#pfResultsTable td:nth-child(5) {
  width: 148px;
  white-space: nowrap;
}

#resultsCard .actions,
#efResultsCard .actions,
#cdfResultsCard .actions,
#wsResultsCard .actions { margin-bottom: 12px; }

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

/* ---- Map rows ---- */
.map-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.map-row label { width: 140px; color: var(--muted); font-size: 14px; }

/* ---- Toggles ---- */
.toggle { display: inline-flex; gap: 8px; }
.toggle { position: relative; z-index: 1000 !important; }
.center .toggle { margin: 0 auto; }
.center .switch { margin: 6px auto 0; }
.seg {
  position: relative;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  transition: all var(--transition);
}
.seg.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.seg-input { position: absolute; left: -9999px; visibility: hidden; }
.seg-input:checked + label.seg {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.switch input { width: 16px; height: 16px; }

/* ---- Credits Bar ---- */
#creditsBar {
  position: fixed;
  right: 20px;
  top: 14px;
  z-index: 2000;
  background: rgba(12, 12, 16, 0.9);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(12px);
}
#creditsBar #creditsValue { font-weight: 600; }

/* ---- Trial Overlay ---- */
#trialOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
#trialOverlay .box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: min(560px, 90vw);
  text-align: center;
}
.banner-title { font-weight: 600; font-size: 20px; margin-bottom: 8px; letter-spacing: -0.02em; }
.banner-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

/* ---- Plans / Pricing ---- */
.trial-banner { text-align: center; padding: 16px 20px; }
.trial-banner .trial-head { font-size: 16px; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em; }
.trial-banner .trial-sub { font-size: 14px; color: var(--text-secondary); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 28px;
  align-items: stretch;
  justify-content: center;
}
#plansGrid {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.plan-card {
  position: relative;
  padding: 0;
  width: 100%;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.plan-card.card { margin-bottom: 0; }
.plan-card .badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-card.popular {
  border-color: var(--accent);
}

.plan-name { font-weight: 600; font-size: 16px; text-align: left; letter-spacing: -0.01em; color: var(--text); }
.plan-price { font-weight: 700; font-size: 36px; margin-top: 4px; text-align: left; letter-spacing: -0.025em; line-height: 1; color: var(--text); }
.plan-price .per { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.plan-meta { margin-top: 8px; text-align: left; color: var(--muted); font-size: 13px; }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.feature-list .tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.feature-list .tick.no { opacity: 0.35; }
.feature-list li .muted-feature { color: var(--muted); text-decoration: line-through; }

.download-bar { margin-top: 12px; justify-content: flex-end; }

/* ---- Settings ---- */
#settings.tab-panel.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.settings-card { max-width: 480px; width: 100%; margin: 0 auto; }
.settings-table { width: 100%; border-collapse: collapse; }
.settings-table td {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.settings-table .label {
  color: var(--muted);
  font-size: 14px;
  width: 120px;
}
.settings-table .value {
  text-align: right;
  font-weight: 500;
  color: var(--text);
}
.settings-link-btn {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.settings-link-btn:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}
.settings-footer { margin-top: 32px; }
.settings-logout-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.settings-logout-btn:hover {
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

/* ---- Technology Lists ---- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  text-align: center;
  gap: 14px;
  aspect-ratio: 1;
  transition: border-color var(--transition);
}
.tech-card:hover { border-color: rgba(255, 255, 255, 0.22); }
.tech-card-head { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tech-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03) center / contain no-repeat;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
}
.tech-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.tech-stats { color: var(--muted); font-size: 13px; }
.tech-actions { display: flex; justify-content: center; width: 100%; }
.tech-download {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  min-width: 120px;
  transition: background var(--transition);
}
.tech-download:hover { background: var(--accent-hover); }

/* ---- Autofill ---- */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: min(480px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.modal-card .modal-title,
.modal-card .modal-body { text-align: center; }
.modal-card.tech-trial-modal { position: relative; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.modal-body { color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.modal-card .actions { justify-content: center !important; }

/* ---- API / Code blocks ---- */
.api-key-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.api-key-value {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px dashed var(--border);
  font-size: 13px;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}
.ne-result { font-size: 20px; font-weight: 700; }
.api-key-actions { display: flex; gap: 8px; }
.api-doc {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
  overflow-x: auto;
  font-size: 13px;
}
.api-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.api-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.api-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.api-card-title { font-weight: 600; font-size: 16px; }
.api-card-sub { font-size: 12px; color: var(--muted); }
.api-card-body { display: flex; flex-direction: column; gap: 10px; }
.api-stack { display: flex; flex-direction: column; gap: 16px; }
.api-card.tall { width: 100%; }
.api-line { font-size: 14px; line-height: 1.6; }
.url-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); }
.code-block {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}
.code-block .icon-btn { position: absolute; top: 10px; right: 10px; }
.curl-modal form { display: flex; flex-direction: column; gap: 10px; }
.curl-field { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.curl-field label { font-weight: 500; font-size: 13px; color: var(--text-secondary); }
.curl-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
}

/* ---- Specific layouts ---- */
.tutorial-layout { display: flex; flex-wrap: nowrap; gap: 28px; align-items: flex-start; justify-content: center; padding: 0; }
.tutorial-instructions { flex: 1 1 640px; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.tutorial-video { flex: 0 0 480px; max-width: 480px; display: flex; align-items: stretch; justify-content: flex-end; }
.tutorial-video-embed { border-radius: 12px; overflow: hidden; width: 100%; }

.crunchbase-layout { display: flex; flex-wrap: nowrap; gap: 28px; align-items: flex-start; justify-content: center; padding: 0; }
.crunchbase-instructions { flex: 1 1 640px; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.crunchbase-instructions .card { margin: 0; }
.crunchbase-video { flex: 0 0 480px; max-width: 480px; display: flex; align-items: stretch; justify-content: flex-end; }
.crunchbase-video-embed { border-radius: 12px; overflow: hidden; width: 100%; }

.phone-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.phone-instructions { flex: 1 1 520px; display: flex; flex-direction: column; gap: 14px; }
.phone-video { flex: 1 1 360px; max-width: 480px; display: flex; align-items: flex-start; justify-content: center; }
.phone-video-embed { width: 100%; border-radius: 12px; overflow: hidden; }
.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 14px;
}
.pf-cookie-actions { margin-top: 12px; }
.pf-upload-btn { width: auto; align-self: flex-start; padding: 8px 16px; }

.apollo-layout { display: flex; flex-wrap: nowrap; gap: 24px; align-items: flex-start; justify-content: space-between; padding: 0; }
.apollo-instructions { flex: 1 1 580px; max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.apollo-instructions .card { margin: 0; }
.apollo-aside { display: flex; flex-direction: column; gap: 14px; flex: 0 0 480px; max-width: 480px; width: 100%; align-self: flex-start; }
.apollo-paygo {
  flex: 0 0 480px;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  align-self: flex-start;
}
.apollo-paygo .big { width: 100%; }
.apollo-paygo .price { color: var(--text); font-weight: 600; }
.apollo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  width: fit-content;
}
.apollo-aside .tutorial-video-embed { width: 100%; min-height: 220px; }

.success-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: flex-start; }
.success-layout .method-column { display: flex; flex-direction: column; gap: 14px; }
.success-layout .method-title { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; color: var(--text); }
.success-layout .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.success-layout .form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.success-layout .form-grid .label-text { min-height: 52px; display: flex; align-items: flex-end; }
.success-layout textarea { width: 100%; }
.success-layout .table-wrap { max-height: 260px; overflow: auto; }

/* ---- Responsive ---- */
@media (min-width: 1200px) {
  .pricing-grid { grid-template-columns: repeat(3, minmax(280px, 1fr)); }
  .pricing-grid .plan-card:nth-child(4) { grid-column: 2; }
}

@media (max-width: 860px) {
  .hub-grid,
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .crunchbase-layout,
  .apollo-layout,
  .tutorial-layout { flex-direction: column; gap: 20px; }
  .crunchbase-instructions, .crunchbase-video,
  .apollo-instructions, .apollo-aside, .apollo-paygo,
  .tutorial-video, .tutorial-instructions {
    max-width: 100%;
    flex: 1 1 auto;
  }
  .phone-layout { flex-direction: column; }
  .phone-video { width: 100%; max-width: none; }
}

.aiark-preview-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}

.aiark-preview-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

.aiark-preview-table th,
.aiark-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.aiark-preview-table th {
  color: var(--muted-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aiark-preview-table tr:last-child td {
  border-bottom: 0;
}

.aiark-preview-table a {
  color: var(--accent);
}

@media (max-width: 980px) {
  #app {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 1200;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
  }
  .brand-wrap {
    padding: 14px 16px 12px;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 12px;
  }
  .tab {
    padding: 7px 12px;
    font-size: 13px;
  }
  .content {
    padding: 24px 16px;
  }
  #creditsBar {
    right: 12px;
    top: 72px;
  }
}

@media (max-width: 720px) {
  .hub-grid,
  .pricing-grid,
  .tech-grid,
  .success-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .content h1 { font-size: 22px; }
  .card { padding: 16px; }
  .settings-table .value { text-align: left; }
  .history-head {
    align-items: flex-start;
  }
  #historyTable thead th,
  #historyTable tbody td {
    padding: 14px;
  }
  .history-download-btn {
    min-width: 92px;
    padding: 8px 12px;
  }
}

@media (max-width: 900px) {
  .success-layout { grid-template-columns: 1fr; }
}
