/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0f0f13;
  color: #e2e8f0;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* ── CSS VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --c-primary: #6366f1;
  --c-primary-dark: #4f46e5;
  --c-accent: #f59e0b;
  --c-surface: #18181f;
  --c-surface2: #222230;
  --c-border: rgba(255,255,255,.08);
  --c-text: #e2e8f0;
  --c-muted: #94a3b8;
  --c-success: #10b981;
  --c-error: #ef4444;
  --radius: .75rem;
  --radius-sm: .375rem;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
}

/* ── TYPOGRAPHY ────────────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--c-muted); }

.gradient-text {
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LAYOUT ────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
  cursor: pointer; border: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn--primary   { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); transform: translateY(-1px); }
.btn--outline   { background: transparent; border: 1px solid var(--c-border); color: var(--c-text); }
.btn--outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn--ghost     { background: transparent; color: var(--c-muted); }
.btn--ghost:hover { color: var(--c-text); }
.btn--danger    { background: var(--c-error); color: #fff; }
.btn--danger:hover { opacity: .9; }
.btn--sm        { padding: .375rem .75rem; font-size: .8rem; }
.btn--lg        { padding: .875rem 2rem; font-size: 1.05rem; }
.btn--full      { width: 100%; justify-content: center; }
.btn:disabled   { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── FORMS ─────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1rem; }
.field label {
  font-size: .8rem; font-weight: 500; color: var(--c-text);
  display: flex; justify-content: space-between; align-items: center;
}
.field input, .field textarea, .field select {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: .625rem .875rem;
  color: var(--c-text);
  font-size: .9rem;
  transition: border-color .2s;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.field textarea { resize: vertical; min-height: 100px; }
.field select option { background: var(--c-surface2); }

/* ── ALERTS ────────────────────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1rem;
}
.alert--error   { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert--success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.alert--info    { background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3); color: #a5b4fc; }
.hidden { display: none !important; }

/* ── AUTH ──────────────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(ellipse at 60% 0%, rgba(99,102,241,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 10% 100%, rgba(245,158,11,.08) 0%, transparent 50%),
              var(--c-surface);
}
.auth-card {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--c-text);
}
.auth-card h1 { font-size: 1.75rem; margin-bottom: .25rem; }
.auth-sub  { color: var(--c-muted); margin-bottom: 1.5rem; font-size: .9rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--c-muted); }
.auth-footer a { color: var(--c-primary); }
.link-sm   { font-size: .8rem; color: var(--c-primary); font-weight: 400; }

.logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  border-radius: .4rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; color: #fff;
  flex-shrink: 0;
}

/* ── LANDING ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,19,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  padding: .875rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; }
.header-nav { display: flex; align-items: center; gap: 2rem; }
.header-nav a { font-size: .9rem; color: var(--c-muted); transition: color .2s; }
.header-nav a:hover { color: var(--c-text); }

.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% -20%, rgba(99,102,241,.25) 0%, transparent 60%);
}
.hero-badge {
  display: inline-block;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  color: #a5b4fc;
  padding: .375rem 1rem; border-radius: 999px;
  font-size: .8rem; font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero-title { margin-bottom: 1.25rem; }
.hero-sub { max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; color: var(--c-muted); }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-proof { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.hero-proof span { font-size: .825rem; color: var(--c-muted); }

.section  { padding: 5rem 0; }
.section--alt { background: var(--c-surface); }
.section--dark { background: var(--c-primary-dark); }
.section-label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--c-primary); font-weight: 600; margin-bottom: .75rem;
}
.section-title { margin-bottom: 1rem; }
.section-sub { color: var(--c-muted); font-size: 1.05rem; margin-bottom: 3rem; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.5rem; margin-top: 3rem; }
.step-card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 2rem;
}
.step-num { font-size: 2.5rem; font-weight: 800; color: var(--c-primary); opacity: .4; margin-bottom: .75rem; }
.step-card h3 { margin-bottom: .5rem; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.5rem; margin-top: 3rem; }
.feat-card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.75rem;
  transition: border-color .2s, transform .2s;
}
.feat-card:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.feat-icon { font-size: 2rem; margin-bottom: .75rem; }
.feat-card h4 { margin-bottom: .375rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.5rem; margin-top: 3rem; }
.pricing-card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 2rem;
  position: relative;
}
.pricing-card--featured {
  border-color: var(--c-primary);
  background: rgba(99,102,241,.08);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--c-primary); color: #fff;
  font-size: .75rem; font-weight: 600; padding: .25rem .875rem;
  border-radius: 999px; white-space: nowrap;
}
.plan-name { font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: .5rem; }
.plan-price { margin-bottom: 1.5rem; }
.price-amount { font-size: 3rem; font-weight: 800; color: var(--c-text); }
.price-period { font-size: 1rem; color: var(--c-muted); }
.plan-features { list-style: none; margin-bottom: 2rem; }
.plan-features li { padding: .375rem 0; font-size: .9rem; color: var(--c-muted); border-bottom: 1px solid var(--c-border); }
.plan-features li:last-child { border-bottom: none; }
.plan-features li:not(:has(✗)) { color: var(--c-text); }

.site-footer { background: var(--c-surface); border-top: 1px solid var(--c-border); padding: 2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .875rem; color: var(--c-muted); }

/* ── DASHBOARD NAV ──────────────────────────────────────────────────────────── */
.dash-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,19,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  padding: .75rem 2rem;
  display: flex; align-items: center; gap: 2rem;
}
.dash-nav__logo a { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.dash-nav__links { display: flex; align-items: center; gap: .25rem; flex: 1; }
.dash-nav__links a {
  padding: .5rem .875rem; border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--c-muted); transition: all .15s;
}
.dash-nav__links a:hover, .dash-nav__links a.active {
  background: rgba(99,102,241,.12); color: var(--c-text);
}
.dash-nav__links a.active { color: var(--c-primary); }
.dash-nav__user { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.dash-nav__user span { font-size: .875rem; color: var(--c-muted); }

/* ── DASHBOARD ──────────────────────────────────────────────────────────────── */
.dash-main { padding: 2rem; max-width: 1200px; margin: 0 auto; }
.dash-header { margin-bottom: 2rem; }
.dash-header h1 { font-size: 1.75rem; margin-bottom: .25rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.5rem;
}
.stat-card__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: .5rem; }
.stat-card__value { font-size: 2rem; font-weight: 700; }
.stat-card__sub   { font-size: .8rem; color: var(--c-muted); margin-top: .25rem; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.dash-card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.5rem;
}
.dash-card__title { font-weight: 600; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }

/* ── GENERIC CARD / TABLE ───────────────────────────────────────────────────── */
.card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.5rem;
}
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th { text-align: left; padding: .625rem 1rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); border-bottom: 1px solid var(--c-border); }
tbody td { padding: .875rem 1rem; border-bottom: 1px solid var(--c-border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* ── BADGE ─────────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 500; }
.badge--green  { background: rgba(16,185,129,.15); color: #6ee7b7; }
.badge--yellow { background: rgba(245,158,11,.15); color: #fcd34d; }
.badge--red    { background: rgba(239,68,68,.15);  color: #fca5a5; }
.badge--blue   { background: rgba(99,102,241,.15); color: #a5b4fc; }

/* ── PAGE TITLE BAR ─────────────────────────────────────────────────────────── */
.page-title { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.page-title h1 { font-size: 1.5rem; }

/* ── MODAL ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 2rem;
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow);
}
.modal__title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; }

/* ── TABS ───────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--c-border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .625rem 1rem; border: none; background: none;
  color: var(--c-muted); font-size: .875rem; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.tab-btn.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-nav { padding: .75rem 1rem; }
  .dash-nav__links { display: none; }
  .dash-main { padding: 1rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 1rem; }
}
