/* ============================================================
   WealthWise — Master Stylesheet
   Premium Financial OS Design System
   ============================================================ */

/* --- Google Fonts Import (Fallback) --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS VARIABLES — DESIGN TOKENS
   ============================================================ */
:root {
  --font-display: 'Clash Display', 'Space Grotesk', sans-serif;
  --font-body: 'Satoshi', 'Space Grotesk', system-ui, sans-serif;

  /* Dark Theme (Default) */
  --bg: #0b0d14;
  --bg-2: #111420;
  --card: #161926;
  --card-hover: #1c2033;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e8eaf2;
  --text-2: #8891a8;
  --text-3: #525c73;
  --accent: #6c63ff;
  --accent-glow: rgba(108,99,255,0.25);
  --success: #00d09c;
  --danger: #ff6b6b;
  --warning: #ffd93d;
  --info: #42adf5;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg: #f0f2f8;
  --bg-2: #e4e8f0;
  --card: #ffffff;
  --card-hover: #f8f9ff;
  --border: rgba(0,0,0,0.07);
  --border-hover: rgba(0,0,0,0.12);
  --text: #1a1d2e;
  --text-2: #4a5270;
  --text-3: #8891a8;
  --accent-glow: rgba(108,99,255,0.12);
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 6px 32px rgba(0,0,0,0.12);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text); }
img { max-width: 100%; }

/* ============================================================
   LAYOUT
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 900;
  backdrop-filter: blur(12px);
}

.page-content {
  padding: 28px 28px;
  flex: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), #9b8ff7);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 18px;
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 16px; display: block; }
.logo-tag { font-size: 10px; color: var(--text-2); letter-spacing: 0.5px; }

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.avatar-initials {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #9b8ff7);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: white;
}
.status-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--card);
}
.user-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.plan-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.plan-free { background: var(--text-3); color: var(--bg); }
.plan-basic { background: var(--info); color: white; }
.plan-pro { background: var(--accent); color: white; }
.plan-enterprise { background: linear-gradient(135deg, #ffd93d, #ff6b6b); color: white; }

.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 8px; }
.nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-3);
  padding: 12px 8px 6px;
  display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--card-hover); color: var(--text); }
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}
.badge-new {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent), #9b8ff7);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.financial-score-mini { }
.score-label { font-size: 11px; color: var(--text-2); margin-bottom: 6px; }
.score-bar-wrap {
  height: 4px; background: var(--border);
  border-radius: 2px; margin-bottom: 4px; overflow: hidden;
}
.score-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  transition: width 0.8s ease;
}
.score-value { font-size: 11px; color: var(--accent); font-weight: 600; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-2); padding: 8px; border-radius: 8px;
  transition: var(--transition); display: flex; align-items: center;
}
.sidebar-toggle:hover { background: var(--card-hover); color: var(--text); }

.page-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
}

.theme-toggle, .icon-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); position: relative;
}
.theme-toggle:hover, .icon-btn:hover {
  background: var(--card-hover); color: var(--text); border-color: var(--border-hover);
}
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: flex; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--card);
}

/* Notification Dropdown */
.notif-wrap { position: relative; }
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 340px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 9999;
  display: none;
}
.notif-dropdown.show { display: block; }
.notif-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
}
.mark-all-read { font-size: 12px; color: var(--accent); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition); cursor: pointer;
}
.notif-item:hover { background: var(--card-hover); }
.notif-item.unread { background: var(--accent-glow); }
.notif-footer {
  display: block; padding: 14px 20px;
  text-align: center; font-size: 13px;
  color: var(--accent); border-top: 1px solid var(--border);
}

/* User Dropdown */
.user-menu { position: relative; }
.user-menu-btn {
  background: none; border: none; cursor: pointer; padding: 0;
}
.avatar-sm { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.avatar-initials-sm {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #9b8ff7);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: white;
}
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 200px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 9999; display: none;
  padding: 8px;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px;
  transition: var(--transition);
}
.user-dropdown a:hover { background: var(--card-hover); color: var(--text); }
.user-dropdown svg { width: 14px; height: 14px; }
.user-dropdown hr { border-color: var(--border); margin: 4px 0; }

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.dashboard-grid { display: flex; flex-direction: column; gap: 24px; }

/* METRICS ROW */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: var(--transition);
}
.metric-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.metric-networth { grid-column: span 2; }
.metric-score { display: flex; flex-direction: column; align-items: center; }

.metric-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-2); margin-bottom: 8px; }
.metric-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 6px; line-height: 1; }
.metric-sub { font-size: 12px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; }
.metric-sub svg { width: 12px; height: 12px; }

/* Score Ring */
.score-ring-wrap { width: 80px; height: 80px; margin: 4px 0; }
.score-ring { width: 100%; height: 100%; }
.score-text { font-size: 18px; font-weight: 700; fill: var(--text); font-family: var(--font-display); }

/* CHART CARDS */
.charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}
.card-header-flex {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.card-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.card-title svg { width: 18px; height: 18px; }
.card-subtitle { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.chart-legend { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.expense-legend { display: flex; flex-direction: column; gap: 8px; }
.expense-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-name { color: var(--text-2); }
.legend-val { font-weight: 600; color: var(--text); }

/* RATIOS ROW */
.ratios-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.ratio-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  transition: var(--transition);
}
.ratio-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.ratio-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-glow); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.ratio-icon svg { width: 18px; height: 18px; }
.ratio-info { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.ratio-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-2); }
.ratio-value { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.ratio-benchmark { font-size: 11px; }
.ratio-benchmark.good { color: var(--success); }
.ratio-benchmark.warn { color: var(--warning); }
.ratio-benchmark.bad { color: var(--danger); }
.ratio-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.ratio-bar { height: 100%; border-radius: 2px; transition: width 0.8s ease; }

/* SPLIT ROWS */
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* INSIGHTS */
.insights-card, .accounts-card, .goals-card, .loans-card, .txns-card, .alerts-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}
.insights-list { display: flex; flex-direction: column; gap: 10px; }
.insight-item {
  display: flex; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}
.insight-success { background: rgba(0,208,156,0.06); border-color: var(--success); }
.insight-warning { background: rgba(255,217,61,0.06); border-color: var(--warning); }
.insight-danger { background: rgba(255,107,107,0.06); border-color: var(--danger); }
.insight-info { background: rgba(66,173,245,0.06); border-color: var(--info); }
.insight-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.insight-success .insight-icon { background: rgba(0,208,156,0.12); color: var(--success); }
.insight-warning .insight-icon { background: rgba(255,217,61,0.12); color: var(--warning); }
.insight-danger .insight-icon { background: rgba(255,107,107,0.12); color: var(--danger); }
.insight-info .insight-icon { background: rgba(66,173,245,0.12); color: var(--info); }
.insight-icon svg { width: 16px; height: 16px; }
.insight-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.insight-msg { font-size: 12px; color: var(--text-2); }

/* ACCOUNTS LIST */
.accounts-list { display: flex; flex-direction: column; gap: 8px; }
.account-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: var(--transition);
}
.account-item:hover { background: var(--card-hover); border-color: var(--border-hover); }
.account-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.account-icon svg { width: 16px; height: 16px; }
.account-name { font-size: 13px; font-weight: 600; }
.account-type { font-size: 11px; color: var(--text-2); }
.account-bal { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-left: auto; }

/* GOALS LIST */
.goals-list { display: flex; flex-direction: column; gap: 16px; }
.goal-item { }
.goal-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.goal-name { font-size: 13px; font-weight: 600; }
.goal-pct { font-size: 12px; font-weight: 700; color: var(--accent); }
.goal-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 5px; }
.goal-bar { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.goal-footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); }
.goal-days { color: var(--warning); }

/* LOANS */
.loan-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.loan-item:last-child { border: none; }
.loan-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.loan-name { font-size: 13px; font-weight: 600; }
.loan-emi { font-size: 12px; color: var(--text-2); }
.loan-stats { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.loan-outstanding { color: var(--danger); font-weight: 600; }
.loan-rate { color: var(--text-2); }
.loan-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 5px; }
.loan-bar { height: 100%; background: var(--success); border-radius: 2px; }
.loan-footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); }

/* TRANSACTIONS LIST */
.txns-list { display: flex; flex-direction: column; gap: 6px; }
.txn-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.txn-item:hover { background: var(--card-hover); }
.txn-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.txn-icon svg { width: 15px; height: 15px; }
.txn-desc { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-meta { font-size: 11px; color: var(--text-2); }
.txn-amount { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-left: auto; white-space: nowrap; }

/* ALERTS */
.alerts-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
}
.alert-info .alert-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.alert-due { font-size: 11px; }
.alert-amount { font-weight: 700; font-size: 14px; font-family: var(--font-display); white-space: nowrap; }
.alert-info { background: rgba(66,173,245,0.08); border-left: 3px solid var(--info); }
.alert-warning { background: rgba(255,217,61,0.08); border-left: 3px solid var(--warning); }
.alert-warning .alert-due { color: var(--warning); }
.alert-danger { background: rgba(255,107,107,0.08); border-left: 3px solid var(--danger); }
.alert-danger .alert-due { color: var(--danger); }

/* NETWORTH CHART */
.networth-chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { font-family: var(--font-body); font-weight: 500; border-radius: var(--radius-sm); transition: var(--transition); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9b8ff7);
  border: none; color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); color: white; }
.btn-ghost {
  background: none; border: 1px solid var(--border); color: var(--text-2);
}
.btn-ghost:hover { background: var(--card-hover); color: var(--text); }
.btn-success { background: var(--success); border: none; color: var(--bg); }
.btn-danger { background: var(--danger); border: none; color: white; }
.btn-link { font-size: 12px; color: var(--accent); font-weight: 600; }
.btn-link:hover { opacity: 0.8; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13.5px; font-family: var(--font-body);
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  background: var(--bg-2); border-color: var(--accent); color: var(--text);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text);
}
.modal-header { border-bottom-color: var(--border); padding: 20px 24px; }
.modal-title { font-family: var(--font-display); font-weight: 600; }
.btn-close { filter: invert(1); opacity: 0.5; }
.modal-body { padding: 24px; }

/* Transaction Type Tabs */
.txn-type-tabs {
  display: flex; gap: 4px; background: var(--bg);
  border-radius: var(--radius-sm); padding: 4px; margin-bottom: 8px;
}
.type-tab {
  flex: 1; padding: 8px; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: none; color: var(--text-2); transition: var(--transition);
}
.type-tab.active {
  background: var(--accent); color: white; font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ============================================================
   FAB BUTTON
   ============================================================ */
.fab-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 56px; height: 56px; border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #9b8ff7);
  border: none; color: white; cursor: pointer;
  box-shadow: 0 6px 25px var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.fab-btn:hover { transform: scale(1.1) rotate(90deg); box-shadow: 0 8px 30px var(--accent-glow); }
.fab-btn svg { width: 24px; height: 24px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--accent) !important; }
.text-muted { color: var(--text-2) !important; }

.empty-state-sm {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 24px; text-align: center; color: var(--text-2);
}
.empty-state-sm svg { width: 32px; height: 32px; opacity: 0.4; }
.empty-state-sm p { font-size: 13px; }

/* Table Styles */
.ww-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ww-table th {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-2);
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-2); text-align: left;
}
.ww-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.ww-table tr:hover td { background: var(--card-hover); }
.ww-table tr:last-child td { border-bottom: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Page Sections */
.page-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}

/* Badges */
.badge-success { background: rgba(0,208,156,0.12); color: var(--success); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-danger { background: rgba(255,107,107,0.12); color: var(--danger); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-warning { background: rgba(255,217,61,0.12); color: var(--warning); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-info { background: rgba(66,173,245,0.12); color: var(--info); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-accent { background: var(--accent-glow); color: var(--accent); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .charts-row { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: repeat(3, 1fr); }
  .metric-networth { grid-column: span 1; }
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .split-row { grid-template-columns: 1fr; }
  .ratios-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .page-content { padding: 16px; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 14px 16px; }
  .metric-value { font-size: 20px; }
  .ratios-row { grid-template-columns: 1fr 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .fab-btn { bottom: 16px; right: 16px; }
}

/* ============================================================
   LANDING PAGE STYLES
   ============================================================ */
.landing-body {
  background: var(--bg);
  overflow-x: hidden;
}

.landing-nav {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 999;
  backdrop-filter: blur(16px);
  background: rgba(11,13,20,0.8);
  border-bottom: 1px solid var(--border);
}

.hero-section {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,99,255,0.15) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-glow); border: 1px solid var(--accent);
  border-radius: 20px; padding: 6px 16px; font-size: 12px;
  font-weight: 600; color: var(--accent); margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700; line-height: 1.1; margin-bottom: 24px;
}

.hero-title .accent { color: var(--accent); }
.hero-sub { font-size: 18px; color: var(--text-2); max-width: 600px; margin: 0 auto 40px; line-height: 1.7; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.pricing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px; text-align: center;
  transition: var(--transition); position: relative;
}
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(108,99,255,0.08) 0%, var(--card) 100%);
  box-shadow: 0 0 60px var(--accent-glow);
}
.pricing-price { font-family: var(--font-display); font-size: 40px; font-weight: 700; }
.pricing-period { font-size: 13px; color: var(--text-2); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.auth-page {
  min-height: 100vh; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%; max-width: 440px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-sub { font-size: 14px; color: var(--text-2); text-align: center; margin-bottom: 32px; }

.alert-msg { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.3); color: var(--danger); }
.alert-success { background: rgba(0,208,156,0.1); border: 1px solid rgba(0,208,156,0.3); color: var(--success); }

/* ============================================================
   INSTALL PAGE
   ============================================================ */
.install-page {
  min-height: 100vh; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.install-card {
  max-width: 600px; width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 48px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px rgba(108,99,255,0.5); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-content > * { animation: fadeUp 0.4s ease both; }
.page-content > *:nth-child(2) { animation-delay: 0.05s; }
.page-content > *:nth-child(3) { animation-delay: 0.1s; }

.logo-icon { animation: pulse-glow 3s ease-in-out infinite; }
