/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg: #0a0a0a;
  --bg-card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(124,58,237,0.5);
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --text: #e1e4e8;
  --text-muted: #a1a1aa;
  --text-faint: #6b7280;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse at top, rgba(124,58,237,0.15) 0%, transparent 50%);
}

a { color: inherit; text-decoration: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

section { padding: 5rem 0; border-top: 1px solid var(--border); }
section.no-border { border-top: none; }

.text-center { text-align: center; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-token-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: none;
}
.nav-token-count.visible { display: block; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6, var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.btn-glow { box-shadow: 0 0 20px rgba(124,58,237,0.3); }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 0.875rem;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}
.btn-danger:hover { background: rgba(239,68,68,0.08); }

.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

.hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 8rem 0 5rem;
}

.hero-content {
  flex: 1.3;
  min-width: 0;
}

.hero-image {
  flex: 1.7;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.hero-screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 100px;
  padding: 0.3125rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-sub {
  display: block;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-faint);
  margin-top: 0.25rem;
  -webkit-text-fill-color: var(--text-faint);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
}

.hero-price {
  font-size: 0.875rem;
  color: var(--text-faint);
  font-weight: 500;
  margin-top: 0.5rem;
}

/* ── What is SGAI ─────────────────────────────────────────────────────────── */
.sgai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 3rem;
}

.sgai-explainer p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.75;
  font-size: 1rem;
}
.sgai-explainer p:last-child { margin-bottom: 0; }

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.comparison-table th {
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.comparison-table th.highlight-col {
  color: var(--primary-light);
  background: rgba(124,58,237,0.07);
}

.comparison-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-muted);
  vertical-align: middle;
}

.comparison-table td:first-child {
  font-weight: 500;
  color: var(--text);
  font-size: 0.8rem;
  text-align: left;
}

.comparison-table td.highlight-col {
  background: rgba(124,58,237,0.04);
  color: var(--text);
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(255,255,255,0.02); }
.comparison-footnotes { margin: 1rem 0 0; padding-left: 1.25rem; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; display: flex; flex-direction: column; gap: 0.25rem; }

.check { color: var(--green); font-weight: 700; }
.cross { color: var(--red); }
.partial { color: var(--orange); }
.tc { text-align: center; }

/* ── Pipeline ─────────────────────────────────────────────────────────────── */
.pipeline-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 3rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pipeline-node {
  flex: 1;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.pipeline-node:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.pipeline-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--text-faint);
  font-size: 1.25rem;
  flex-shrink: 0;
  align-self: center;
}

.pipeline-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.875rem;
  font-size: 1.25rem;
}

.icon-orange { background: rgba(245,158,11,0.12); }
.icon-blue   { background: rgba(96,165,250,0.12); }
.icon-purple { background: rgba(124,58,237,0.12); }
.icon-green  { background: rgba(34,197,94,0.12); }

.pipeline-node h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.375rem; }

.pipeline-node p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.875rem;
}

.pipeline-node .node-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  background: rgba(124,58,237,0.12);
  color: var(--primary-light);
  border: 1px solid rgba(124,58,237,0.2);
}

/* ── Feature / Service cards ──────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.feature-icon-wrapper {
  margin-bottom: 1rem;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.feature-title { font-size: 1rem; font-weight: 600; color: #ffffff; margin-bottom: 0.5rem; }

.feature-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.service-tag-row { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1rem; }

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  color: var(--text-faint);
  border: 1px solid var(--border);
}

.service-links { display: flex; gap: 1rem; }

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary-light);
  transition: gap 0.15s;
}
.service-link:hover { gap: 0.625rem; }

/* ── Why OSC ──────────────────────────────────────────────────────────────── */
.osc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.osc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.osc-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.osc-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(109,40,217,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.osc-card-title { font-size: 0.9375rem; font-weight: 600; color: #ffffff; margin-bottom: 0.4rem; }
.osc-card-body  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.55; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
#dashboard { display: none; }
#dashboard.visible { display: block; }

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h2 { font-size: 1.5rem; font-weight: 700; }

.create-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.create-form h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-field { flex: 1; min-width: 200px; }

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-field input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.form-field input::placeholder { color: var(--text-faint); }

/* ── Pipeline cards (dashboard) ───────────────────────────────────────────── */
.pipeline-cards { display: flex; flex-direction: column; gap: 1rem; }

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.pipeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pipeline-card-name { font-size: 1rem; font-weight: 600; }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: var(--green); }
.dot-orange { background: var(--orange); animation: pulse 1.5s infinite; }
.dot-red    { background: var(--red); }

.pipeline-urls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pipeline-url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  overflow: hidden;
}

.pipeline-url-label {
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 80px;
}

.pipeline-url-value {
  color: var(--primary-light);
  font-family: 'SF Mono', 'Fira Code', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
  font-size: 0.875rem;
}
.copy-btn:hover { color: var(--text); }

.command-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.7875rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: nowrap;
}

.pipeline-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ── Create job progress ───────────────────────────────────────────────────── */
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.job-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.job-card-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.job-step {
  font-size: 0.875rem;
  color: var(--text-muted, #888);
  margin-top: 0.375rem;
}

/* Pipeline step progress list */
.pipeline-steps {
  list-style: none;
  margin: 0.625rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pipeline-step {
  font-size: 0.875rem;
  color: var(--text-muted, #888);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pipeline-step > .check-icon {
  font-size: 0.75rem;
  color: #555;
  flex-shrink: 0;
}

.pipeline-step[data-status="running"] > .check-icon {
  color: #888;
}

.pipeline-step[data-status="running"] > .step-label {
  color: var(--text, #e2e8f0);
  font-weight: 500;
}

.pipeline-step[data-status="done"] > .check-icon {
  color: #4ade80;
}

.pipeline-step[data-status="done"] > .step-label {
  color: var(--text, #e2e8f0);
}

.step-substeps {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.125rem 1.25rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.step-substep {
  font-size: 0.8125rem;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.step-substep .check-icon {
  font-size: 0.7rem;
  color: #555;
  flex-shrink: 0;
}

.step-substep[data-status="done"] .check-icon {
  color: #4ade80;
}

.step-substep[data-status="done"] .substep-label {
  color: var(--text, #e2e8f0);
}

.job-error-msg {
  font-size: 0.875rem;
  color: #f87171;
  margin-top: 0.25rem;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(124,58,237,0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(124,58,237,0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.job-logs {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--text-faint);
  background: rgba(0,0,0,0.4);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Loading / empty states ────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state p { margin-bottom: 0.25rem; }
.empty-state .hint { font-size: 0.8125rem; color: var(--text-faint); }

/* ── Notification ──────────────────────────────────────────────────────────── */
.notif {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(30,30,30,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.125rem;
  font-size: 0.875rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 200;
  animation: slideUp 0.2s ease;
  max-width: 320px;
}

.notif.success { border-color: rgba(34,197,94,0.4); }
.notif.error   { border-color: rgba(239,68,68,0.4); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo { font-weight: 700; font-size: 0.9375rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.875rem; color: var(--text-faint); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8125rem; color: var(--text-faint); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .osc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-section { padding: 0 1.5rem; }
  .hero { flex-direction: column; padding: 3rem 0 2rem; gap: 2rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-actions { flex-wrap: wrap; }

  section { padding: 3.5rem 0; }
  .section-title { font-size: 1.75rem; }

  .sgai-grid { grid-template-columns: 1fr; gap: 2rem; }

  .pipeline-flow { flex-direction: column; }
  .pipeline-arrow { transform: rotate(90deg); align-self: center; padding: 0.25rem 0; }

  .features-grid { grid-template-columns: 1fr; }
  .osc-grid { grid-template-columns: 1fr 1fr; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-section { padding: 0 1rem; }
  .osc-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}

/* ── Dashboard (full-page) ────────────────────────────────────────────────── */
#signed-in { display: flex; height: 100vh; overflow: hidden; }
#signed-in[hidden] { display: none; }
#signed-out[hidden] { display: none; }

.app-layout { display: flex; width: 100%; height: 100%; }

.sidebar {
  width: 200px;
  background: #0f0f0f;
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-logo {
  padding: 1.5rem 1rem 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.05em;
}
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 0.5rem 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  cursor: default;
  transition: background 0.15s, color 0.15s;
}
.nav-item.active { color: #fff; background: rgba(255,255,255,0.05); border-left: 3px solid var(--primary); }
.nav-item-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-item-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item-link { text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.nav-item-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.token-count { font-size: 0.75rem; }

.main-content {
  flex: 1;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at top, rgba(124,58,237,0.12) 0%, transparent 50%),
    #0a0a0a;
  display: flex;
  justify-content: center;
}

.dashboard {
  width: 100%;
  max-width: 640px;
  padding: 3rem 1.5rem;
}

.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h2 { font-size: 1.75rem; font-weight: 600; color: #fff; }

/* Pipeline cards */
.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.site-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.site-info { display: flex; align-items: center; gap: 0.75rem; }
.site-name { font-weight: 600; color: #fff; font-size: 1rem; }
.site-status { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.site-actions { display: flex; gap: 0.5rem; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }

.pipeline-urls { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.pipeline-url-row { display: flex; align-items: center; gap: 0.5rem; background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; }
.pipeline-url-label { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; width: 40px; }
.pipeline-url-value { flex: 1; font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; }
.copy-btn { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.85rem; padding: 0.1rem 0.3rem; border-radius: 4px; }
.copy-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.pipeline-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pipeline-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.25rem; }
.pipeline-action-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.4rem 0.75rem; cursor: pointer; transition: all 0.15s; font-family: inherit; text-decoration: none; }
.pipeline-action-btn:hover { border-color: var(--primary-light); }
.pipeline-action-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.copy-icon { color: var(--text-faint); flex-shrink: 0; transition: color 0.15s; }
.pipeline-action-btn:hover .copy-icon { color: var(--primary-light); }
.copy-icon-check { color: var(--green); }

.btn-danger-ghost { background: none; border: 1px solid rgba(239,68,68,0.3); color: #f87171; padding: 0.4rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.8rem; transition: all 0.15s; }
.btn-danger-ghost:hover { background: rgba(239,68,68,0.1); border-color: #ef4444; }

.empty-state { color: var(--text-muted); font-size: 0.95rem; padding: 0.5rem 0 1.5rem; }

/* Create section */
.create-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.create-section h3 { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 0.5rem; }
.create-description { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.02em; }
.form-label-optional { font-weight: 400; opacity: 0.65; }
.form-label-row { display: flex; align-items: center; justify-content: space-between; }
.create-section .btn-primary { align-self: flex-start; }

.preset-dropdown { position: relative; }
.preset-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.15rem 0.5rem; font-size: 0.75rem; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.preset-btn:hover { border-color: var(--primary); color: #fff; }
.preset-list { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: #1e2130; border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 280px; z-index: 100; list-style: none; padding: 0.25rem 0; margin: 0; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.preset-list.open { display: block; }
.preset-list li { padding: 0.5rem 0.75rem; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; }
.preset-list li:hover { background: rgba(255,255,255,0.06); color: #fff; }
.create-section input { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; color: #fff; font-size: 0.9rem; font-family: inherit; outline: none; }
.create-section input:focus { border-color: var(--primary); }

.create-status { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-muted); }
.create-status-error { color: #f87171; }

.job-card { margin-bottom: 1rem; }

.dashboard-help { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.help-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Delete modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal-card { background: #1a1a1a; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 400px; width: 90%; }
.modal-title { font-size: 1.25rem; font-weight: 600; color: #fff; margin-bottom: 0.75rem; }
.modal-body { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.btn-danger { background: #dc2626; border: none; color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; font-weight: 500; }
.btn-danger:hover { background: #b91c1c; }

/* ── Pricing ───────────────────────────────────────────────────────────────── */
.pricing-section {
  padding: 4rem 0 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 720px; margin: 2rem auto 0; }
.pricing-grid-1 { grid-template-columns: 1fr; max-width: 480px; }
.pricing-grid-2 { max-width: 860px; }
.pricing-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 2rem; text-align: left; position: relative; display: flex; flex-direction: column; gap: 1rem; }
.pricing-card.featured { border-color: rgba(124,58,237,0.5); background: rgba(124,58,237,0.05); }
.featured-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg,#7c3aed,#6d28d9); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 12px; white-space: nowrap; }
.pricing-tier { font-size: 1.1rem; font-weight: 700; color: #fff; }
.pricing-tagline { font-size: 0.85rem; color: #6b7280; margin-top: 0.25rem; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.pricing-features li { font-size: 0.875rem; color: #a1a1aa; padding-left: 1.25rem; position: relative; }
.pricing-features li::before { content: "✓"; position: absolute; left: 0; color: #3fb950; font-weight: 700; }
.btn-block { width: 100%; text-align: center; justify-content: center; }
.recommended-plan { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1rem; margin-top: auto; }
.recommended-plan-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7280; margin-bottom: 0.6rem; }
.recommended-plan-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.recommended-plan-card-featured { border-color: rgba(124,58,237,0.3); background: rgba(124,58,237,0.05); }
.recommended-plan-header { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.recommended-plan-name { font-size: 0.875rem; font-weight: 700; color: #fff; }
.recommended-plan-price { font-size: 0.8rem; color: #a1a1aa; }
.recommended-plan-amount { font-size: 1.1rem; font-weight: 700; color: #fff; }
.recommended-plan-vat { font-size: 0.7rem; color: #6b7280; }
.recommended-plan-features { list-style: none; padding: 0; margin: 0.2rem 0 0; display: flex; flex-direction: column; gap: 0.2rem; }
.recommended-plan-features li { font-size: 0.78rem; color: #a1a1aa; padding-left: 1rem; position: relative; }
.recommended-plan-features li::before { content: "✓"; position: absolute; left: 0; color: #3fb950; font-weight: 700; }
.recommended-plan-extras { font-size: 0.72rem; color: #6b7280; margin-top: 0.25rem; line-height: 1.4; }
.cross-sell-banner { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem 1.5rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; font-size: 0.9rem; flex-wrap: wrap; margin-top: 0.75rem; }
.cross-sell-text { color: #6b7280; }
.cross-sell-link { color: #7c3aed; font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.cross-sell-link:hover { color: #8b5cf6; }

.tooltip-wrap { position: relative; display: inline-flex; align-items: center; margin-left: 6px; vertical-align: middle; }
.tooltip-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #9ca3af; font-size: 10px; font-weight: 700; cursor: default; font-style: normal; line-height: 1; }
.tooltip-icon:hover + .tooltip-body, .tooltip-wrap:hover .tooltip-body { opacity: 1; pointer-events: auto; }
.tooltip-body { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: #1f2937; border: 1px solid rgba(255,255,255,0.1); color: #d1d5db; font-size: 0.78rem; font-weight: 400; line-height: 1.5; padding: 0.5rem 0.75rem; border-radius: 6px; width: 260px; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; z-index: 100; white-space: normal; }
.tooltip-body::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2937; }
