/* ── DESIGN TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #080c18;
  --bg2:         #0c1120;
  --bg3:         #111828;
  --card:        rgba(255,255,255,0.04);
  --card-hover:  rgba(255,255,255,0.07);
  --card-border: rgba(255,255,255,0.08);
  --blue:        #0066ff;
  --blue-dark:   #0044cc;
  --blue-glow:   rgba(0,102,255,0.25);
  --cyan:        #00c8ff;
  --green:       #00d084;
  --red:         #ff4757;
  --yellow:      #ffc107;
  --text:        #e8edf5;
  --text2:       #8892a4;
  --text3:       #4a526a;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --shadow-blue: 0 8px 32px rgba(0,102,255,0.3);
}

/* ── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Inter',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; overflow-x:hidden; }
a { color:var(--blue); text-decoration:none; }
img, svg { display:block; }

/* ── TYPOGRAPHY ────────────────────────────────────────────────────────────── */
.gradient-text {
  background:linear-gradient(135deg, #fff 0%, var(--cyan) 50%, var(--blue) 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}

/* ── SCROLLBAR ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--bg3); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.15); }

/* ── NAVBAR ────────────────────────────────────────────────────────────────── */
nav {
  position:fixed; top:0; left:0; right:0; z-index:200;
  height:60px; display:flex; align-items:center; justify-content:space-between;
  padding:0 2rem;
  background:rgba(8,12,24,0.8);
  backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,255,255,0.06);
  transition:background .3s;
}
.nav-logo { display:flex; align-items:center; gap:10px; font-weight:700; font-size:1.05rem; color:var(--text); }
.nav-logo .logo-mark { width:30px; height:30px; background:linear-gradient(135deg,var(--blue),var(--cyan)); border-radius:8px; display:flex; align-items:center; justify-content:center; }
.nav-logo .logo-mark svg { width:17px; height:17px; fill:#fff; }
.nav-links { display:flex; gap:2rem; }
.nav-links a { color:var(--text2); font-size:0.88rem; transition:color .2s; }
.nav-links a:hover { color:var(--text); }
.btn {
  padding:.5rem 1.2rem; border-radius:8px; font-size:.88rem; font-weight:600;
  cursor:pointer; border:none; font-family:inherit; transition:all .2s; display:inline-flex; align-items:center; gap:6px;
}
.btn-primary { background:linear-gradient(135deg,var(--blue),#0055dd); color:#fff; }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 6px 20px var(--blue-glow); }
.btn-ghost { background:rgba(255,255,255,0.06); color:var(--text2); border:1px solid var(--card-border); }
.btn-ghost:hover { background:rgba(255,255,255,0.1); color:var(--text); }
.btn-danger { background:rgba(255,71,87,.15); color:var(--red); border:1px solid rgba(255,71,87,.2); }
.btn-danger:hover { background:rgba(255,71,87,.25); }

/* ── HERO ──────────────────────────────────────────────────────────────────── */
.hero {
  position:relative; min-height:100vh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:0 2rem; padding-top:60px; overflow:hidden;
}
#hero-canvas { position:absolute; inset:0; width:100%; height:100%; z-index:0; opacity:.7; }
.hero-glow { position:absolute; top:20%; left:50%; transform:translateX(-50%); width:600px; height:600px; background:radial-gradient(circle, rgba(0,102,255,.15) 0%, transparent 70%); pointer-events:none; z-index:1; }
.hero-content { position:relative; z-index:2; max-width:780px; }
.hero-badge {
  display:inline-flex; align-items:center; gap:8px; padding:.4rem 1rem;
  background:rgba(0,102,255,.1); border:1px solid rgba(0,102,255,.2);
  border-radius:100px; font-size:.8rem; color:var(--cyan); font-weight:500;
  margin-bottom:2rem; animation:fadeUp .8s ease both;
}
.hero-badge span { width:6px; height:6px; border-radius:50%; background:var(--cyan); animation:pulse 2s infinite; }
.hero h1 { font-size:clamp(2.5rem,6vw,4rem); font-weight:800; line-height:1.1; margin-bottom:1.5rem; animation:fadeUp .8s .1s ease both; }
.hero p { font-size:1.15rem; color:var(--text2); max-width:560px; margin:0 auto 2.5rem; line-height:1.7; animation:fadeUp .8s .2s ease both; }
.hero-actions { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; animation:fadeUp .8s .3s ease both; }
.hero-scroll { position:absolute; bottom:2rem; left:50%; transform:translateX(-50%); z-index:2; animation:bounce 2s infinite; color:var(--text3); font-size:.8rem; display:flex; flex-direction:column; align-items:center; gap:6px; }
.hero-scroll svg { width:20px; height:20px; fill:currentColor; }

/* Download buttons */
.dl-btn {
  display:inline-flex; align-items:center; gap:10px;
  padding:.85rem 1.8rem; border-radius:10px; font-size:.95rem; font-weight:600;
  cursor:pointer; border:none; font-family:inherit; transition:all .25s;
  position:relative; overflow:hidden;
}
.dl-btn::before { content:''; position:absolute; inset:0; background:rgba(255,255,255,.06); opacity:0; transition:opacity .2s; }
.dl-btn:hover::before { opacity:1; }
.dl-btn:hover { transform:translateY(-3px); }
.dl-btn svg { width:20px; height:20px; fill:currentColor; flex-shrink:0; }
.dl-btn.win { background:linear-gradient(135deg,var(--blue),#0055dd); color:#fff; box-shadow:0 4px 20px var(--blue-glow); }
.dl-btn.win:hover { box-shadow:0 8px 30px var(--blue-glow); }
.dl-btn.mac { background:rgba(255,255,255,.07); color:var(--text); border:1px solid var(--card-border); }
.dl-btn.mac:hover { box-shadow:0 6px 20px rgba(0,0,0,.3); }

/* ── SECTIONS ──────────────────────────────────────────────────────────────── */
section { padding:6rem 2rem; }
.section-inner { max-width:1100px; margin:0 auto; }
.section-tag { display:inline-block; padding:.25rem .8rem; background:rgba(0,102,255,.1); border:1px solid rgba(0,102,255,.2); border-radius:100px; font-size:.75rem; color:var(--blue); font-weight:600; letter-spacing:.5px; text-transform:uppercase; margin-bottom:1rem; }
.section-title { font-size:clamp(1.8rem,4vw,2.5rem); font-weight:700; margin-bottom:1rem; }
.section-sub { color:var(--text2); font-size:1rem; max-width:500px; line-height:1.7; }

/* Features */
.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1.5rem; margin-top:3rem; }
.feature-card {
  background:var(--card); border:1px solid var(--card-border); border-radius:var(--radius-lg);
  padding:1.8rem; transition:all .3s; position:relative; overflow:hidden;
}
.feature-card::before { content:''; position:absolute; inset:0; background:linear-gradient(135deg,rgba(0,102,255,.05),transparent); opacity:0; transition:opacity .3s; }
.feature-card:hover { transform:translateY(-4px); border-color:rgba(0,102,255,.2); box-shadow:0 12px 40px rgba(0,0,0,.4); }
.feature-card:hover::before { opacity:1; }
.feature-icon { width:44px; height:44px; background:linear-gradient(135deg,rgba(0,102,255,.2),rgba(0,200,255,.1)); border:1px solid rgba(0,102,255,.2); border-radius:10px; display:flex; align-items:center; justify-content:center; margin-bottom:1.2rem; font-size:1.3rem; }
.feature-card h3 { font-size:1rem; font-weight:600; margin-bottom:.5rem; }
.feature-card p { color:var(--text2); font-size:.875rem; line-height:1.65; }

/* Stats bar */
.stats-bar { background:var(--card); border:1px solid var(--card-border); border-radius:var(--radius-lg); padding:2rem 3rem; display:flex; justify-content:space-around; flex-wrap:wrap; gap:2rem; }
.stat-item { text-align:center; }
.stat-num { font-size:2.5rem; font-weight:800; }
.stat-label { color:var(--text2); font-size:.85rem; margin-top:4px; }

/* Steps */
.steps { display:flex; flex-direction:column; gap:1.5rem; max-width:680px; }
.step { display:flex; gap:1.5rem; align-items:flex-start; }
.step-num { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,var(--blue),var(--cyan)); color:#fff; font-weight:700; font-size:.9rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.step-content h4 { font-size:1rem; font-weight:600; margin-bottom:.3rem; }
.step-content p { color:var(--text2); font-size:.88rem; line-height:1.6; }

/* ── DIVIDER ───────────────────────────────────────────────────────────────── */
.divider { height:1px; background:linear-gradient(90deg,transparent,var(--card-border),transparent); margin:0 auto; max-width:1100px; }

/* ── FOOTER ────────────────────────────────────────────────────────────────── */
footer { text-align:center; padding:3rem 2rem; color:var(--text3); font-size:.85rem; border-top:1px solid var(--card-border); }
footer a { color:var(--text2); }

/* ── SCROLL ANIMATIONS ─────────────────────────────────────────────────────── */
.reveal { opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay:.1s; }
.reveal-delay-2 { transition-delay:.2s; }
.reveal-delay-3 { transition-delay:.3s; }

/* ── KEYFRAMES ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(6px);} }
@keyframes glow { 0%,100%{box-shadow:0 0 20px var(--blue-glow);} 50%{box-shadow:0 0 40px var(--blue-glow), 0 0 80px rgba(0,102,255,.15);} }
@keyframes shimmer { 0%{background-position:-200% center;} 100%{background-position:200% center;} }
@keyframes spin { to{transform:rotate(360deg);} }

/* ══ DASHBOARD ═════════════════════════════════════════════════════════════ */

.dash-root { display:flex; height:100vh; overflow:hidden; }

/* Sidebar */
.sidebar {
  width:240px; flex-shrink:0;
  background:var(--bg2); border-right:1px solid var(--card-border);
  display:flex; flex-direction:column;
  transition:width .3s;
}
.sidebar-header { height:60px; display:flex; align-items:center; gap:10px; padding:0 1.2rem; border-bottom:1px solid var(--card-border); }
.sidebar-header .logo-mark { width:28px; height:28px; background:linear-gradient(135deg,var(--blue),var(--cyan)); border-radius:7px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sidebar-header .logo-mark svg { width:15px; height:15px; fill:#fff; }
.sidebar-header span { font-weight:700; font-size:.95rem; white-space:nowrap; }
.sidebar-nav { flex:1; padding:1rem .8rem; overflow-y:auto; }
.nav-group-title { font-size:.7rem; text-transform:uppercase; letter-spacing:1px; color:var(--text3); padding:.3rem .6rem; margin-bottom:.3rem; margin-top:.8rem; }
.nav-item {
  display:flex; align-items:center; gap:10px; padding:.6rem .8rem; border-radius:8px;
  color:var(--text2); font-size:.875rem; cursor:pointer; transition:all .2s; margin-bottom:2px;
  user-select:none; border:1px solid transparent;
}
.nav-item:hover { background:rgba(255,255,255,.05); color:var(--text); }
.nav-item.active { background:rgba(0,102,255,.12); color:var(--blue); border-color:rgba(0,102,255,.15); }
.nav-item svg { width:17px; height:17px; fill:currentColor; flex-shrink:0; }
.nav-badge { margin-left:auto; background:var(--blue); color:#fff; font-size:.7rem; font-weight:700; padding:1px 7px; border-radius:100px; min-width:20px; text-align:center; }
.nav-item-home { border-bottom:1px solid var(--card-border); margin-bottom:.6rem; padding-bottom:.8rem; color:var(--text2); }
.nav-item-home:hover { color:var(--blue); background:rgba(0,102,255,.06); }
.sidebar-footer { padding:1rem; border-top:1px solid var(--card-border); }
.user-info { display:flex; align-items:center; gap:10px; padding:.6rem .8rem; border-radius:8px; }
.user-avatar { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,var(--blue),var(--cyan)); display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; flex-shrink:0; }
.user-name { font-size:.82rem; font-weight:600; }
.user-email { font-size:.72rem; color:var(--text2); }

/* Main content */
.main { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.topbar { height:60px; border-bottom:1px solid var(--card-border); display:flex; align-items:center; justify-content:space-between; padding:0 1.5rem; flex-shrink:0; background:var(--bg2); }
.topbar-title { font-size:1rem; font-weight:600; }
.topbar-right { display:flex; align-items:center; gap:.8rem; }
.content-area { flex:1; overflow-y:auto; padding:1.5rem; }

/* Stats cards */
.stats-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.stat-card {
  background:var(--card); border:1px solid var(--card-border); border-radius:var(--radius-lg);
  padding:1.3rem 1.5rem; position:relative; overflow:hidden; transition:all .3s;
}
.stat-card::before { content:''; position:absolute; inset:0; background:linear-gradient(135deg,rgba(255,255,255,.03),transparent); }
.stat-card:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.3); }
.stat-card .s-val { font-size:1.9rem; font-weight:800; line-height:1; }
.stat-card .s-label { font-size:.78rem; color:var(--text2); margin-top:.4rem; }
.stat-card .s-icon { position:absolute; right:1rem; top:50%; transform:translateY(-50%); opacity:.12; }
.stat-card .s-icon svg { width:44px; height:44px; fill:currentColor; }
.c-blue  .s-val { color:var(--blue); }  .c-blue  .s-icon { color:var(--blue); }
.c-green .s-val { color:var(--green); } .c-green .s-icon { color:var(--green); }
.c-cyan  .s-val { color:var(--cyan); }  .c-cyan  .s-icon { color:var(--cyan); }
.c-text  .s-val { color:var(--text); }  .c-text  .s-icon { color:var(--text); }

/* Section header */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.section-header h2 { font-size:.95rem; font-weight:600; }
.search-bar { display:flex; align-items:center; gap:.6rem; }
.search-input { background:var(--card); border:1px solid var(--card-border); border-radius:8px; padding:.4rem .8rem; color:var(--text); font-size:.82rem; font-family:inherit; outline:none; width:200px; transition:border-color .2s; }
.search-input:focus { border-color:var(--blue); }

/* Table */
.table-card { background:var(--card); border:1px solid var(--card-border); border-radius:var(--radius-lg); overflow:hidden; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th { padding:.7rem 1rem; text-align:left; font-size:.72rem; color:var(--text2); font-weight:600; text-transform:uppercase; letter-spacing:.5px; background:rgba(255,255,255,.02); white-space:nowrap; }
td { padding:.75rem 1rem; font-size:.85rem; border-top:1px solid rgba(255,255,255,.04); vertical-align:middle; }
tr:hover td { background:rgba(255,255,255,.02); }
.empty-row td { text-align:center; padding:3rem; color:var(--text2); }

/* Badges */
.badge { display:inline-flex; align-items:center; gap:5px; padding:.2rem .7rem; border-radius:100px; font-size:.75rem; font-weight:600; white-space:nowrap; }
.badge-green { background:rgba(0,208,132,.12); color:var(--green); }
.badge-red   { background:rgba(255,71,87,.12);  color:var(--red); }
.badge-blue  { background:rgba(0,102,255,.12);  color:var(--blue); }
.badge-gray  { background:rgba(255,255,255,.06); color:var(--text2); }
.dot { width:6px; height:6px; border-radius:50%; background:currentColor; }
.dot-pulse { animation:pulse 2s infinite; }

/* Action buttons in table */
.act-btn { background:transparent; border:1px solid var(--card-border); border-radius:6px; padding:.3rem .6rem; font-size:.75rem; color:var(--text2); cursor:pointer; font-family:inherit; transition:all .2s; }
.act-btn:hover { background:rgba(255,255,255,.06); color:var(--text); }
.act-btn.danger:hover { background:rgba(255,71,87,.12); color:var(--red); border-color:rgba(255,71,87,.2); }

/* Inline edit */
.inline-edit { background:transparent; border:none; border-bottom:1px solid var(--card-border); color:var(--text); font-size:.85rem; font-family:inherit; outline:none; padding:2px 4px; width:120px; }
.inline-edit:focus { border-bottom-color:var(--blue); }

/* Toast */
.toast-wrap { position:fixed; bottom:1.5rem; right:1.5rem; z-index:9999; display:flex; flex-direction:column; gap:.5rem; }
.toast { background:var(--bg3); border:1px solid var(--card-border); border-radius:10px; padding:.7rem 1.2rem; font-size:.85rem; display:flex; align-items:center; gap:.6rem; animation:fadeUp .3s ease; box-shadow:var(--shadow); }
.toast.success { border-color:rgba(0,208,132,.3); color:var(--green); }
.toast.error   { border-color:rgba(255,71,87,.3); color:var(--red); }
.toast.info    { border-color:rgba(0,102,255,.3); color:var(--blue); }

/* Modal */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.7); backdrop-filter:blur(6px); z-index:500; display:flex; align-items:center; justify-content:center; animation:fadeIn .2s ease; }
.modal { background:var(--bg3); border:1px solid var(--card-border); border-radius:var(--radius-lg); padding:2rem; width:100%; max-width:440px; box-shadow:var(--shadow); animation:fadeUp .25s ease; }
.modal h3 { font-size:1.1rem; margin-bottom:1.5rem; }
.form-group { margin-bottom:1rem; }
.form-label { display:block; font-size:.78rem; color:var(--text2); margin-bottom:.4rem; }
.form-input { width:100%; background:rgba(255,255,255,.05); border:1px solid var(--card-border); border-radius:8px; padding:.65rem .9rem; color:var(--text); font-size:.9rem; font-family:inherit; outline:none; transition:border-color .2s; }
.form-input:focus { border-color:var(--blue); }
.modal-actions { display:flex; gap:.8rem; justify-content:flex-end; margin-top:1.5rem; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

/* Audit log */
.audit-entry { display:flex; gap:1rem; padding:.65rem 0; border-bottom:1px solid rgba(255,255,255,.04); font-size:.82rem; }
.audit-time { color:var(--text3); flex-shrink:0; width:130px; font-variant-numeric:tabular-nums; }
.audit-type { flex-shrink:0; }
.audit-details { color:var(--text2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Files drop zone */
.dl-drop-zone { border:2px dashed var(--card-border); border-radius:10px; padding:2rem; text-align:center; cursor:pointer; transition:border-color .2s,background .2s; }
.dl-drop-zone:hover, .dl-drop-zone.drag-over { border-color:var(--blue); background:rgba(0,102,255,.05); }

/* Tabs (inside sections) */
.tab-bar { display:flex; gap:.3rem; margin-bottom:1.2rem; background:var(--card); padding:.3rem; border-radius:10px; border:1px solid var(--card-border); width:fit-content; }
.tab-btn { padding:.4rem 1rem; border-radius:7px; font-size:.82rem; font-weight:500; cursor:pointer; color:var(--text2); border:none; background:transparent; font-family:inherit; transition:all .2s; }
.tab-btn.active { background:rgba(0,102,255,.15); color:var(--blue); }
.tab-btn:hover:not(.active) { background:rgba(255,255,255,.05); color:var(--text); }

/* ── MOBILE RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Navbar */
  nav { padding:0 1.2rem; }
  .nav-links { display:none; }

  /* Hero */
  .hero { padding:0 1.2rem; padding-top:60px; }
  .hero h1 { font-size:2rem; }
  .hero p { font-size:1rem; }
  .hero-actions { flex-direction:column; align-items:center; gap:.8rem; }
  .dl-btn { width:100%; max-width:280px; justify-content:center; }
  .hero-glow { width:300px; height:300px; }

  /* Stats bar */
  .stats-bar { padding:1.2rem; gap:1.2rem; }
  .stat-num { font-size:1.8rem; }

  /* Sections */
  section { padding:3rem 1.2rem; }
  .section-inner[style*="grid"] { grid-template-columns:1fr !important; gap:2rem !important; }
  .features-grid { grid-template-columns:1fr; }

  /* Steps */
  .steps { max-width:100%; }

  /* Dashboard sidebar */
  .dash-root { flex-direction:column; }
  .sidebar { width:100%; height:auto; flex-shrink:0; border-right:none; border-bottom:1px solid var(--card-border); }
  .sidebar-nav { display:flex; flex-direction:row; padding:.6rem .8rem; overflow-x:auto; gap:.3rem; }
  .nav-group-title { display:none; }
  .nav-item { white-space:nowrap; flex-shrink:0; margin-bottom:0; }
  .sidebar-footer { display:none; }
  .main { height:calc(100vh - 110px); }
  .content-area { padding:1rem; }

  /* Stats row */
  .stats-row { grid-template-columns:repeat(2,1fr); }

  /* Tables */
  .table-wrap { font-size:.78rem; }
  th, td { padding:.5rem .6rem; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns:1fr; }
  .hero h1 { font-size:1.7rem; }
  .section-header { flex-direction:column; align-items:flex-start; gap:.6rem; }
  .search-bar { width:100%; }
  .search-input { width:100%; }
}
