:root {
  --ink: #0B1220;
  --panel: #141F35;
  --panel-2: #1B2942;
  --teal: #14C8B4;
  --amber: #F5A623;
  --paper: #F6F7FB;
  --graphite: #3C4658;
  --mist: #93A0B4;
  --line: rgba(255,255,255,0.08);
  --radius: 10px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--graphite);
  background: var(--paper);
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; color: #101828; letter-spacing: -0.01em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn-primary { background: var(--teal); color: #05221D; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,200,180,.35); }
.btn-amber { background: var(--amber); color: #241300; }
.btn-amber:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(245,166,35,.35); }
.btn-ghost { background: transparent; border-color: var(--line); color: #fff; }
.btn-outline { background: transparent; border-color: #D8DDE7; color: var(--graphite); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,18,32,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--mist); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; padding: 88px 0 64px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.08; color: #fff; }
.hero p.lead { color: var(--mist); font-size: 17px; max-width: 480px; margin: 18px 0 30px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 26px; }
.hero-note { font-size: 13px; color: var(--mist); }

/* Signature element: pipeline strip */
.pipeline { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.pipeline-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.pipeline-node { text-align: center; flex: 1; }
.pipeline-node .icon {
  width: 46px; height: 46px; border-radius: 12px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 20px;
}
.pipeline-node span { display: block; font-size: 11px; color: var(--mist); font-family: var(--font-mono); }
.pipeline-arrow { color: var(--teal); font-size: 18px; opacity: .8; }
.pipeline-platforms { display: flex; justify-content: space-between; gap: 10px; padding-top: 18px; border-top: 1px dashed var(--line); }
.pipeline-platforms .p-icon {
  flex: 1; text-align: center; font-size: 12px; color: var(--mist);
  padding: 10px 4px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line);
}
.pipeline-platforms .p-icon b { display: block; font-size: 17px; margin-bottom: 4px; color: #fff; }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-head { max-width: 620px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: 32px; }
.section-head p { color: var(--mist-dark, #5B667A); font-size: 16px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: #fff; border: 1px solid #E7EAF1; border-radius: var(--radius);
  padding: 26px; transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 12px 28px rgba(16,24,40,.08); transform: translateY(-2px); }
.card .icon { width: 42px; height: 42px; border-radius: 10px; background: #EAFBF8; color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.card h3 { font-size: 17px; }
.card p { font-size: 14px; color: #5B667A; margin: 0; }

.dark-section { background: var(--ink); color: #fff; }
.dark-section .section-head p { color: var(--mist); }

.steps { counter-reset: step; }
.step { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid #E7EAF1; }
.step:last-child { border-bottom: none; }
.step .num {
  counter-increment: step; font-family: var(--font-mono); font-size: 13px; color: var(--teal);
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--teal);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step .num::before { content: counter(step, decimal-leading-zero); }
.step h4 { margin: 0 0 4px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: #5B667A; }

/* ---------- Pricing ---------- */
.pricing-toggle { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 40px; font-size: 14px; font-family: var(--font-mono); }
.switch { position: relative; width: 46px; height: 24px; background: #E7EAF1; border-radius: 999px; cursor: pointer; border: none; }
.switch::after { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { background: var(--teal); }
.switch.on::after { left: 25px; }
.plan-card { background: #fff; border: 1px solid #E7EAF1; border-radius: 14px; padding: 30px; position: relative; }
.plan-card.featured { border-color: var(--teal); box-shadow: 0 16px 40px rgba(20,200,180,.16); }
.plan-badge { position: absolute; top: -12px; right: 24px; background: var(--teal); color: #05221D; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; font-family: var(--font-mono); }
.plan-price { font-family: var(--font-display); font-size: 38px; margin: 14px 0 4px; }
.plan-price span { font-size: 14px; color: #5B667A; font-family: var(--font-body); }
.plan-features { list-style: none; padding: 0; margin: 22px 0; font-size: 14px; }
.plan-features li { padding: 7px 0; display: flex; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--teal); font-weight: 700; }

footer { background: var(--ink); color: var(--mist); padding: 48px 0 28px; font-size: 14px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer a { color: var(--mist); text-decoration: none; }
footer a:hover { color: #fff; }
.foot-links { display: flex; gap: 20px; }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; text-align: center; font-size: 12px; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); padding: 24px; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; }
.auth-card p.sub { font-size: 14px; color: #5B667A; margin-top: -8px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #101828; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid #D8DDE7; font-size: 14px; font-family: var(--font-body);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.form-error { background: #FEF1F1; color: #B42318; border: 1px solid #FCA5A5; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.form-success { background: #ECFDF5; color: #027A48; border: 1px solid #A6F4C5; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.auth-alt { text-align: center; font-size: 13px; margin-top: 18px; color: #5B667A; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #93A0B4; font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #E7EAF1; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border-radius: 8px; border: 1px solid #D8DDE7; background: #fff; font-size: 14px; font-weight: 600; text-decoration: none; color: #101828; }
.oauth-btn:hover { border-color: var(--teal); }

/* ---------- App shell (dashboard/admin) ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app-sidebar { background: var(--ink); color: #fff; padding: 22px 16px; }
.app-sidebar .logo { margin-bottom: 30px; padding-left: 8px; }
.app-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--mist); text-decoration: none; font-size: 14px; margin-bottom: 2px; }
.app-nav a:hover { background: var(--panel); color: #fff; }
.app-nav a.active { background: var(--teal); color: #05221D; font-weight: 600; }
.app-nav .group-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #566179; margin: 18px 0 8px 12px; }
.app-main { background: var(--paper); }
.app-topbar { background: #fff; border-bottom: 1px solid #E7EAF1; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; }
.app-content { padding: 28px; }
.app-topbar h2 { font-size: 18px; margin: 0; }

.stat-card { background: #fff; border: 1px solid #E7EAF1; border-radius: 12px; padding: 20px; }
.stat-card .val { font-family: var(--font-display); font-size: 28px; }
.stat-card .lbl { font-size: 13px; color: #5B667A; }

table.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
table.data-table th, table.data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #EEF0F4; font-size: 14px; }
table.data-table th { background: #F9FAFC; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #5B667A; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; font-family: var(--font-mono); }
.badge-green { background: #ECFDF5; color: #027A48; }
.badge-amber { background: #FFFAEB; color: #B54708; }
.badge-red { background: #FEF1F1; color: #B42318; }
.badge-gray { background: #F2F4F7; color: #475467; }

.platform-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid #D8DDE7; font-size: 13px; margin: 0 8px 8px 0; background: #fff; }
.platform-chip.connected { border-color: var(--teal); background: #EAFBF8; color: #05221D; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
}
