/* ============================================================
   Nexora Shield Wealth — base.css
   Dark premium financial theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-root:     #060a1a;
  --bg-deep:     #0a0e27;
  --bg-card:     rgba(26, 31, 58, 0.7);
  --bg-card-solid: #1a1f3a;
  --bg-input:    rgba(255,255,255,0.05);
  --border:      rgba(255,255,255,0.08);
  --border-accent: rgba(0,212,170,0.3);

  --accent:      #00d4aa;
  --accent-2:    #4ade80;
  --accent-gold: #f5c842;
  --accent-red:  #ff4d6d;

  --text-primary:   #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted:     #4a5568;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(0,212,170,0.15);

  --font-main: 'Sora', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-w: 260px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-root);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }
img, svg { display: block; max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(0,212,170,0.3); border-radius: 99px; }

/* ── Background mesh ── */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0,212,170,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 100%, rgba(74,222,128,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(245,200,66,0.02) 0%, transparent 60%),
    var(--bg-root);
}
.bg-mesh::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Ccircle cx='1' cy='1' r='0.8' fill='rgba(255,255,255,0.015)'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gold-text {
  background: linear-gradient(135deg, var(--accent-gold), #e8a000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: none; outline: none; transition: all var(--transition);
  text-align: center; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00b894);
  color: #060a1a;
  box-shadow: 0 4px 20px rgba(0,212,170,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,212,170,0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(0,212,170,0.08); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--border-accent); }
.btn-ghost:hover { background: rgba(0,212,170,0.1); }
.btn-danger { background: rgba(255,77,109,0.15); color: var(--accent-red); border: 1px solid rgba(255,77,109,0.3); }
.btn-danger:hover { background: rgba(255,77,109,0.25); }
.btn-sm { padding: 8px 18px; font-size: 0.8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.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);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: rgba(0,212,170,0.2); }
.card-glow { box-shadow: var(--shadow-card), var(--shadow-glow); border-color: var(--border-accent); }
.card-solid { background: var(--bg-card-solid); backdrop-filter: none; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.05em; text-transform: uppercase; }
.form-control {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  padding: 12px 16px; font-size: 0.95rem; width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,170,0.15); }
.form-control.error { border-color: var(--accent-red); box-shadow: 0 0 0 3px rgba(255,77,109,0.15); }
.form-error { font-size: 0.8rem; color: var(--accent-red); }
.form-hint  { font-size: 0.8rem; color: var(--text-muted); }
.form-stack { display: flex; flex-direction: column; gap: 20px; }

select.form-control option { background: var(--bg-card-solid); }

/* ── Badge / Pill ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 99px; font-size: 0.75rem; font-weight: 600;
}
.badge-green  { background: rgba(74,222,128,0.15); color: var(--accent-2); border: 1px solid rgba(74,222,128,0.25); }
.badge-teal   { background: rgba(0,212,170,0.15); color: var(--accent); border: 1px solid rgba(0,212,170,0.25); }
.badge-gold   { background: rgba(245,200,66,0.15); color: var(--accent-gold); border: 1px solid rgba(245,200,66,0.25); }
.badge-red    { background: rgba(255,77,109,0.15); color: var(--accent-red); border: 1px solid rgba(255,77,109,0.25); }
.badge-muted  { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Stat card ── */
.stat-card { display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-mono); }
.stat-change { font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--accent-2); }
.stat-change.down { color: var(--accent-red); }

/* ── Navigation (Sidebar) ── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w); background: rgba(10,14,39,0.95);
  border-right: 1px solid var(--border); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; z-index: 100;
  transition: transform var(--transition);
}
.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-brand svg { width: 36px; height: 36px; flex-shrink: 0; }
.sidebar-brand-name { font-size: 1rem; font-weight: 800; line-height: 1.2; }
.sidebar-brand-name span { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); display: block; }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-section-label { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; padding: 12px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: var(--radius-md); color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition); border: 1px solid transparent; cursor: pointer;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); background: rgba(0,212,170,0.1); border-color: rgba(0,212,170,0.2); }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-link.active svg, .nav-link:hover svg { opacity: 1; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--border); }

/* ── Page layout (with sidebar) ── */
.app-layout { display: flex; min-height: 100vh; }
.main-content {
  margin-left: var(--sidebar-w); flex: 1;
  padding: 32px; max-width: 1400px;
  min-height: 100vh;
}
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; }
.page-header p { color: var(--text-secondary); margin-top: 4px; }
.page-header-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead { background: rgba(255,255,255,0.03); }
th { padding: 14px 18px; text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ── Alert / toast ── */
.alert { padding: 14px 18px; border-radius: var(--radius-md); font-size: 0.875rem; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.25); color: var(--accent-2); }
.alert-error   { background: rgba(255,77,109,0.1); border: 1px solid rgba(255,77,109,0.25); color: var(--accent-red); }
.alert-info    { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.25); color: var(--accent); }
.alert-warn    { background: rgba(245,200,66,0.1); border: 1px solid rgba(245,200,66,0.25); color: var(--accent-gold); }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.divider-text { text-align: center; color: var(--text-muted); font-size: 0.8rem; position: relative; margin: 24px 0; }
.divider-text::before, .divider-text::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* ── Progress bar ── */
.progress { height: 6px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width 0.5s ease; }

/* ── Step indicator ── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 40px; }
.step { display: flex; align-items: center; flex: 1; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0; transition: all var(--transition); position: relative; z-index: 1;
}
.step-dot.active { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,0.1); box-shadow: 0 0 20px rgba(0,212,170,0.3); }
.step-dot.done { border-color: var(--accent); background: var(--accent); color: #060a1a; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 -2px; }
.step-line.done { background: linear-gradient(90deg, var(--accent), rgba(0,212,170,0.3)); }

/* ── Toggle ── */
.toggle { position: relative; display: inline-flex; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.1);
  border-radius: 99px; cursor: pointer; transition: background var(--transition);
  border: 1px solid var(--border);
}
.toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted);
  transition: transform var(--transition), background var(--transition);
}
.toggle input:checked + .toggle-slider { background: rgba(0,212,170,0.2); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--accent); }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(0,212,170,0.2); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth layout ── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card); padding: 44px 40px;
  animation: fadeUp 0.5s ease;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-logo svg { width: 40px; height: 40px; }
.auth-logo-name { font-size: 1.05rem; font-weight: 800; }
.auth-logo-name small { color: var(--text-muted); font-weight: 400; font-size: 0.7rem; display: block; }
.auth-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 32px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--text-secondary); }

/* ── Landing / Hero ── */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 80px 40px; overflow: hidden; }
.hero-content { max-width: 680px; position: relative; z-index: 2; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.25); border-radius: 99px; font-size: 0.78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 24px; }
.hero h1 { margin-bottom: 20px; }
.hero p { font-size: 1.1rem; margin-bottom: 40px; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 580px; opacity: 0.5; pointer-events: none;
}
.hero-ring {
  border-radius: 50%; border: 1px solid rgba(0,212,170,0.15);
  position: absolute; animation: ringPulse 4s ease-in-out infinite;
}

/* ── Nav bar (landing) ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 18px 48px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
  background: transparent;
}
.topbar.scrolled { background: rgba(6,10,26,0.95); border-color: var(--border); backdrop-filter: blur(20px); }
.topbar-brand { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 800; }
.topbar-brand svg { width: 32px; height: 32px; }
.topbar-links { display: flex; align-items: center; gap: 32px; }
.topbar-links a { color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; transition: color var(--transition); }
.topbar-links a:hover { color: var(--text-primary); opacity: 1; }
.topbar-actions { display: flex; gap: 12px; }

/* ── Section layout ── */
.section { padding: 100px 40px; max-width: 1200px; margin: 0 auto; }
.section-label { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 12px; }
.section-heading { margin-bottom: 16px; }
.section-sub { color: var(--text-secondary); font-size: 1.05rem; max-width: 560px; margin-bottom: 60px; }

/* ── Feature grid ── */
.feature-card { padding: 32px; }
.feature-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.2); }
.feature-icon svg { width: 26px; height: 26px; color: var(--accent); }
.feature-card h3 { margin-bottom: 10px; }

/* ── Hamburger ── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }

/* ── Chart placeholder ── */
.chart-area { height: 200px; background: rgba(0,212,170,0.03); border: 1px dashed rgba(0,212,170,0.2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.85rem; position: relative; overflow: hidden; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 100%; padding: 24px 24px 0; width: 100%; }
.chart-bar { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, rgba(0,212,170,0.6) 0%, rgba(0,212,170,0.2) 100%); min-height: 10px; animation: growUp 0.6s ease both; }
@keyframes growUp { from { transform: scaleY(0); transform-origin: bottom; } }

/* ── Utility ── */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--accent-2); }
.text-red    { color: var(--accent-red); }
.text-gold   { color: var(--accent-gold); }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: var(--font-mono); }
.w-full      { width: 100%; }
.hidden      { display: none !important; }
.relative    { position: relative; }

/* ── Animations ── */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px); } }
@keyframes fadeIn   { from { opacity: 0; } }
@keyframes ringPulse { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.04); opacity: 0.8; } }
.animate-fadein { animation: fadeIn 0.5s ease; }
.animate-fadeup { animation: fadeUp 0.5s ease; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main-content { padding: 20px 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar { padding: 16px 20px; }
  .topbar-links { display: none; }
  .hero { padding: 100px 20px 60px; }
  .section { padding: 60px 20px; }
  .auth-card { padding: 32px 24px; }
  .hero-visual { display: none; }
}
