/* ============================================================
   Project Linda — Global Stylesheet (Dark Mode)
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --bg-base:       #08080f;
  --bg-surface:    #11111c;
  --bg-card:       #16162a;
  --bg-input:      #1c1c30;
  --border:        #2a2a45;
  --border-active: #4f46e5;

  --text-primary:  #e8e8f0;
  --text-secondary:#9898b8;
  --text-muted:    #5a5a7a;

  --accent-1:      #6366f1;
  --accent-2:      #8b5cf6;
  --accent-3:      #06b6d4;
  --accent-grad:   linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-glow:   0 0 30px rgba(99, 102, 241, 0.35);

  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #06b6d4;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.45);
  --shadow-float:  0 8px 40px rgba(0,0,0,0.6);

  --font-sans:     'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --transition:    0.2s ease;
  --nav-h:         72px;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-1); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p  { color: var(--text-secondary); }

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ───────────────────────────────────────────────── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section--sm{ padding: 64px 0; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8,8,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; align-items: center;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px;
}
.nav__logo {
  font-size: 1.4rem; font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -0.5px;
}
.nav__links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav__links a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; transition: color var(--transition); }
.nav__links a:hover, .nav__links a.active { color: var(--text-primary); }
.nav__actions { display: flex; gap: 12px; align-items: center; }
.nav__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav__hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-md);
  font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none;
  transition: all var(--transition); white-space: nowrap;
}
.btn--primary { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 15px rgba(99,102,241,0.4); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.55); color: #fff; }
.btn--outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn--outline:hover { border-color: var(--accent-1); color: var(--accent-1); }
.btn--ghost { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--bg-input); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { opacity: 0.88; }
.btn--lg { padding: 14px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 7px 16px; font-size: 0.875rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 24px;
}
.card:hover { border-color: var(--border-active); box-shadow: var(--accent-glow); }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.form-label .required { color: var(--danger); }
.form-control {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.95rem; padding: 11px 14px; width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-sans);
}
.form-control:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
.form-control::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }

/* ── Drop zone (file upload) ──────────────────────────────── */
.upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }

.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  min-height: 160px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
  overflow: hidden;
}
.drop-zone:hover, .drop-zone--filled { border-color: var(--accent-1); background: rgba(99,102,241,0.05); }
.drop-zone__input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-zone__label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 20px; cursor: pointer;
  font-size: 0.9rem; color: var(--text-secondary); pointer-events: none;
}
.drop-zone__label span:first-child { font-size: 2rem; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 80px); padding-bottom: 80px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero__eyebrow {
  display: inline-block; background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3); color: var(--accent-1);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
}
.hero__title { margin-bottom: 20px; }
.hero__subtitle { font-size: 1.2rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto 40px; }
.hero__actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ── Features ─────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; transition: all var(--transition);
}
.feature-card:hover { border-color: var(--accent-1); transform: translateY(-4px); box-shadow: var(--accent-glow); }
.feature-card__icon {
  width: 52px; height: 52px; background: rgba(99,102,241,0.12); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 18px;
}
.feature-card__title { margin-bottom: 8px; }
.feature-card__body  { font-size: 0.9rem; }

/* ── Pricing ──────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px; position: relative;
  transition: all var(--transition);
}
.pricing-card--featured { border-color: var(--accent-1); box-shadow: var(--accent-glow); }
.pricing-card__badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent-grad); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 4px 16px; border-radius: 100px; letter-spacing: 0.5px;
}
.pricing-card__name  { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-card__price {
  font-size: 3rem; font-weight: 800; margin-bottom: 4px;
  background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.pricing-card__period   { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }
.pricing-card__features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.pricing-card__features li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text-secondary); }
.pricing-card__features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Stats bar ────────────────────────────────────────────── */
.stats-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.stats-bar__item { background: var(--bg-card); padding: 28px 24px; text-align: center; }
.stats-bar__value {
  font-size: 2.5rem; font-weight: 800;
  background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: block;
}
.stats-bar__label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ── Alert ────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 0.9rem; border: 1px solid transparent; margin-bottom: 16px;
}
.alert--success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: var(--success); }
.alert--error   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: var(--danger); }
.alert--info    { background: rgba(6,182,212,0.1);   border-color: rgba(6,182,212,0.3);  color: var(--info); }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px; border: 3px solid rgba(99,102,241,0.2);
  border-top-color: var(--accent-1); border-radius: 50%;
  animation: spin 0.8s linear infinite; display: inline-block;
}
.spinner--sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress bar ─────────────────────────────────────────── */
.progress-log { margin-top: 20px; }
.progress-bar {
  height: 8px; background: var(--bg-input); border-radius: 100px; overflow: hidden; margin-bottom: 12px;
}
.progress-bar__fill { height: 100%; background: var(--accent-grad); border-radius: 100px; transition: width 0.4s ease; }
.progress-log__text {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  max-height: 120px; overflow-y: auto; white-space: pre-wrap;
}

/* ── Section headings ─────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { margin-top: 12px; font-size: 1.05rem; }

/* ── Account layout ───────────────────────────────────────── */
.account-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 28px;
  padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px;
  min-height: 100vh; align-items: start;
}
.account-sidebar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  position: sticky; top: calc(var(--nav-h) + 20px);
}
.account-sidebar__avatar {
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; color: #fff; margin: 0 auto 16px;
}
.account-sidebar__name  { text-align: center; font-weight: 700; margin-bottom: 4px; }
.account-sidebar__email { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
.account-sidebar__nav   { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.account-sidebar__nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
}
.account-sidebar__nav a:hover, .account-sidebar__nav a.active {
  background: rgba(99,102,241,0.12); color: var(--accent-1);
}

/* ── Stat cards ───────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.stat-card__value {
  font-size: 2rem; font-weight: 800;
  background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-card__label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Appeal output ────────────────────────────────────────── */
.appeal-output {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.8;
  color: var(--text-secondary); white-space: pre-wrap;
  max-height: 600px; overflow-y: auto;
}
.appeal-output::-webkit-scrollbar { width: 6px; }
.appeal-output::-webkit-scrollbar-track { background: transparent; }
.appeal-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.appeal-page { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px; max-width: 860px; margin: 0 auto; }
.appeal-header { text-align: center; margin-bottom: 40px; }
.appeal-header__sub { font-size: 1.05rem; color: var(--text-muted); margin-top: 10px; }
.appeal-form-card { padding: 36px; }

/* ── Badge ────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.badge--success { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge--warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge--info    { background: rgba(6,182,212,0.15);  color: var(--info); }

/* ── Table ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid rgba(42,42,69,0.5); }
tbody tr:hover { background: var(--bg-surface); }
tbody tr:last-child td { border-bottom: none; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 36px; width: 100%; max-width: 760px; max-height: 85vh;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  box-shadow: var(--shadow-float);
}
.modal-close {
  position: absolute; top: 16px; right: 20px; background: none; border: none;
  font-size: 1.6rem; color: var(--text-muted); cursor: pointer; line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; padding-top: calc(var(--nav-h) + 24px);
  background: var(--bg-base); position: relative;
}
.auth-page::before {
  content: ''; position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 48px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-float); position: relative; z-index: 1;
}
.auth-card__logo {
  text-align: center; font-size: 1.6rem; font-weight: 800;
  background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.auth-card__subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.auth-card__form    { display: flex; flex-direction: column; gap: 18px; }
.auth-card__footer  { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-muted); }

/* ── Divider ──────────────────────────────────────────────── */
.divider { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 0.8rem; color: var(--text-muted); }

/* ── Footer ───────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 80px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer__brand p { font-size: 0.875rem; color: var(--text-muted); margin-top: 10px; max-width: 280px; }
.footer__col h4  { font-size: 0.875rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer__col ul  { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__col ul li a { font-size: 0.875rem; color: var(--text-muted); transition: color var(--transition); }
.footer__col ul li a:hover { color: var(--text-primary); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); padding-top: 24px;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links, .nav__actions { display: none; }
  .nav__hamburger { display: flex; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-surface); border-bottom: 1px solid var(--border);
    padding: 20px 24px; gap: 16px;
  }
  .nav__actions.open { display: flex; flex-direction: column; padding: 16px 24px; background: var(--bg-surface); }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .form-row    { grid-template-columns: 1fr; }
  .upload-row  { grid-template-columns: 1fr; }
  .footer__grid{ grid-template-columns: 1fr 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .pricing-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .auth-card    { padding: 32px 24px; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats-grid   { grid-template-columns: 1fr; }
}
