/* ============================
   DESIGN TOKENS
============================ */
:root {
  --white: #ffffff;
  --off-white: #f8f9fb;
  --gray-50: #f4f6f9;
  --gray-100: #e8ecf2;
  --gray-200: #d1d9e6;
  --gray-400: #8896ab;
  --gray-600: #4a5568;
  --gray-800: #1e2a3a;
  --gray-900: #0f172a;

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  --teal-50: #f0fdfa;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;

  --green-50: #f0fdf4;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;

  --rose-400: #fb7185;
  --rose-500: #f43f5e;

  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0d9488 100%);
  --gradient-soft: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
  --gradient-hero: linear-gradient(160deg, #f8faff 0%, #f0fdf8 50%, #fafffe 100%);

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.10), 0 4px 12px rgba(15,23,42,0.06);
  --shadow-xl: 0 24px 64px rgba(15,23,42,0.12), 0 8px 24px rgba(15,23,42,0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'Instrument Serif', serif;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 68px;
}

/* Dark mode */
[data-theme="dark"] {
  --white: #0f172a;
  --off-white: #131e2f;
  --gray-50: #1a2540;
  --gray-100: #1e2d45;
  --gray-200: #263452;
  --gray-400: #64748b;
  --gray-600: #94a3b8;
  --gray-800: #cbd5e1;
  --gray-900: #f1f5f9;

  --blue-50: #172554;
  --blue-100: #1e3a5f;
  --teal-50: #0d2d2a;
  --green-50: #052e16;

  --gradient-soft: linear-gradient(135deg, #172554 0%, #0d2d2a 100%);
  --gradient-hero: linear-gradient(160deg, #0f172a 0%, #0d2016 50%, #0a1a2e 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.2);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.45), 0 8px 24px rgba(0,0,0,0.2);
}

/* ============================
   RESET & BASE
============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================
   UTILITY
============================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-600); background: var(--blue-50);
  padding: 5px 12px; border-radius: 100px; margin-bottom: 16px;
}
[data-theme="dark"] .section-tag { color: var(--blue-400); background: var(--blue-100); }
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; line-height: 1.15;
  color: var(--gray-900); margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.section-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.section-subtitle {
  font-size: 17px; color: var(--gray-600); max-width: 520px; line-height: 1.65;
}

/* ============================
   NAVBAR
============================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition);
}
[data-theme="dark"] .navbar {
  background: rgba(15,23,42,0.9);
  border-bottom-color: var(--gray-200);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--gray-900);
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.logo-mark { color: var(--blue-600); }
[data-theme="dark"] .logo-mark { color: var(--blue-400); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--gray-600);
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--gray-900); background: var(--gray-50); }
[data-theme="dark"] .nav-links a:hover { background: var(--gray-100); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-theme {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--gray-50); border: 1px solid var(--gray-100);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all var(--transition); color: var(--gray-600);
}
.btn-theme:hover { background: var(--gray-100); border-color: var(--gray-200); }
.btn-nav {
  font-size: 13px; font-weight: 600; padding: 8px 18px;
  border-radius: var(--radius-sm); cursor: pointer; border: none;
  background: var(--gradient-primary); color: white;
  transition: all var(--transition); letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-nav:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.35); }

.nav-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--gray-50); border: 1px solid var(--gray-100);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-menu-btn span {
  display: block; width: 18px; height: 2px;
  background: var(--gray-600); border-radius: 2px; transition: all var(--transition);
}

/* ============================
   HERO
============================ */
.hero {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex; align-items: center;
  padding-top: var(--nav-height);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 40%, rgba(37,99,235,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 20% 70%, rgba(13,148,136,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  padding: 80px 0;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: 100px; padding: 6px 14px 6px 8px;
  font-size: 13px; font-weight: 500; color: var(--gray-600);
  margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.9; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.03em;
  color: var(--gray-900); margin-bottom: 20px;
}
.hero-title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--blue-600);
}
[data-theme="dark"] .hero-title em { color: var(--blue-400); }
.hero-sub {
  font-size: 18px; color: var(--gray-600); line-height: 1.65;
  margin-bottom: 36px; max-width: 440px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-md);
  background: var(--gradient-primary); color: white;
  font-size: 15px; font-weight: 600; border: none; cursor: pointer;
  transition: all var(--transition); letter-spacing: -0.01em;
  box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(37,99,235,0.4); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-md);
  background: var(--white); color: var(--gray-800);
  font-size: 15px; font-weight: 600; border: 1.5px solid var(--gray-200);
  cursor: pointer; transition: all var(--transition); letter-spacing: -0.01em;
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--blue-400); color: var(--blue-600); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-stats {
  display: flex; gap: 32px; margin-top: 44px;
  padding-top: 32px; border-top: 1px solid var(--gray-100);
}
.stat-item {}
.stat-val {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--gray-900);
  line-height: 1;
}
.stat-label { font-size: 13px; color: var(--gray-400); margin-top: 4px; font-weight: 500; }

/* Hero Visual */
.hero-visual { position: relative; }
.hero-card-main {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xl);
  position: relative; z-index: 2;
}
.hcard-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.hcard-title { font-size: 14px; font-weight: 600; color: var(--gray-600); }
.hcard-badge {
  font-size: 11px; font-weight: 600; color: var(--green-600);
  background: var(--green-50); padding: 3px 9px; border-radius: 100px;
}
.hcard-amount {
  font-size: 38px; font-weight: 700; letter-spacing: -0.04em;
  color: var(--gray-900); margin-bottom: 6px;
}
.hcard-sub { font-size: 13px; color: var(--gray-400); margin-bottom: 24px; }
.mini-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 60px; margin-bottom: 20px;
}
.bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: var(--blue-100); position: relative; overflow: hidden;
  transition: all var(--transition);
}
.bar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient-primary); border-radius: inherit;
}
.bar.active::after { opacity: 1; }
.bar:not(.active)::after { opacity: 0.3; }
.bar:hover::after { opacity: 0.7; }
[data-theme="dark"] .bar { background: var(--gray-200); }

.hcard-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--gray-50);
}
[data-theme="dark"] .hcard-row { border-top-color: var(--gray-100); }
.hcard-row-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hcard-row-val { font-size: 13px; font-weight: 600; color: var(--gray-900); }

.float-card {
  position: absolute; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: var(--radius-lg);
  padding: 14px 18px; box-shadow: var(--shadow-lg);
  animation: floatY 3s ease-in-out infinite alternate;
}
.float-card-1 {
  top: -24px; right: -24px;
  animation-delay: 0s;
}
.float-card-2 {
  bottom: -24px; left: -24px;
  animation-delay: 1.5s;
}
@keyframes floatY {
  from { transform: translateY(0px); }
  to { transform: translateY(-10px); }
}
.fc-label { font-size: 11px; font-weight: 600; color: var(--gray-400); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.fc-val { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.fc-val.green { color: var(--green-500); }
.fc-val.blue { color: var(--blue-600); }

/* ============================
   CALCULATORS
============================ */
.calc-section { background: var(--off-white); }
.calc-header { text-align: center; margin-bottom: 56px; }
.calc-header .section-subtitle { margin: 0 auto; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.calc-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  position: relative; overflow: hidden;
}
.calc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-primary); opacity: 0; transition: opacity var(--transition);
}
.calc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gray-200); }
.calc-card:hover::before { opacity: 1; }
.calc-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
}
.calc-card:nth-child(1) .calc-icon { background: #eff6ff; }
.calc-card:nth-child(2) .calc-icon { background: #f0fdfa; }
.calc-card:nth-child(3) .calc-icon { background: #f0fdf4; }
.calc-card:nth-child(4) .calc-icon { background: #fffbeb; }
.calc-card:nth-child(5) .calc-icon { background: #fff1f2; }
.calc-card:nth-child(6) .calc-icon { background: #faf5ff; }
[data-theme="dark"] .calc-card .calc-icon { opacity: 0.85; filter: brightness(0.7); }
.calc-name { font-size: 16px; font-weight: 600; color: var(--gray-900); margin-bottom: 8px; letter-spacing: -0.01em; }
.calc-desc { font-size: 13.5px; color: var(--gray-400); line-height: 1.55; margin-bottom: 22px; }
.btn-calc {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--blue-600);
  background: var(--blue-50); padding: 8px 14px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; transition: all var(--transition);
}
.btn-calc:hover { background: var(--blue-100); gap: 10px; }
[data-theme="dark"] .btn-calc { background: var(--blue-100); color: var(--blue-400); }

/* ============================
   BUDGET RULE
============================ */
.budget-section {}
.budget-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.budget-visual { position: relative; }
.pie-wrapper {
  width: 280px; height: 280px; position: relative; margin: 0 auto;
}
.pie-circle {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    #3b82f6 0% 50%,
    #14b8a6 50% 80%,
    #22c55e 80% 100%
  );
  box-shadow: var(--shadow-xl);
  position: relative;
}
.pie-inner {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  background: var(--white); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.pie-inner-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; }
.pie-inner-val { font-size: 22px; font-weight: 700; color: var(--gray-900); letter-spacing: -0.03em; }

.pie-legend {
  display: flex; flex-direction: column; gap: 14px; margin-top: 32px;
}
.legend-item {
  display: flex; align-items: center; gap: 12px;
}
.legend-color {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.legend-text {}
.legend-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.legend-sub { font-size: 12px; color: var(--gray-400); }

.budget-cards { display: flex; flex-direction: column; gap: 18px; }
.budget-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 22px 24px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.budget-card:hover { box-shadow: var(--shadow-md); transform: translateX(6px); }
.bc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bc-info { display: flex; align-items: center; gap: 12px; }
.bc-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.bc-title { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.bc-sub { font-size: 12px; color: var(--gray-400); }
.bc-pct { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.progress-bar {
  height: 8px; background: var(--gray-100); border-radius: 100px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 100px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
   TIPS
============================ */
.tips-section { background: var(--off-white); }
.tips-header { text-align: center; margin-bottom: 56px; }
.tips-header .section-subtitle { margin: 0 auto; }
.tips-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.tip-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl); padding: 28px 24px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  position: relative; overflow: hidden;
}
.tip-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  transition: all var(--transition);
}
.tip-card:nth-child(1)::after { background: var(--blue-500); }
.tip-card:nth-child(2)::after { background: var(--teal-500); }
.tip-card:nth-child(3)::after { background: var(--green-500); }
.tip-card:nth-child(4)::after { background: var(--amber-500); }
.tip-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tip-icon { font-size: 32px; margin-bottom: 16px; }
.tip-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px;
}
.tip-card:nth-child(1) .tip-tag { color: var(--blue-500); }
.tip-card:nth-child(2) .tip-tag { color: var(--teal-600); }
.tip-card:nth-child(3) .tip-tag { color: var(--green-600); }
.tip-card:nth-child(4) .tip-tag { color: var(--amber-500); }
.tip-title { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; letter-spacing: -0.01em; }
.tip-text { font-size: 13.5px; color: var(--gray-400); line-height: 1.6; }
.tip-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.tip-list li {
  font-size: 13px; color: var(--gray-600);
  display: flex; align-items: flex-start; gap: 7px;
}
.tip-list li::before { content: '→'; color: var(--gray-400); font-size: 11px; margin-top: 2px; flex-shrink: 0; }

/* ============================
   DASHBOARD
============================ */
.dashboard-section {}
.dash-header { text-align: center; margin-bottom: 56px; }
.dash-header .section-subtitle { margin: 0 auto; }
.dash-wrapper {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-2xl); overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.dash-topbar {
  background: var(--gray-900); padding: 14px 24px;
  display: flex; align-items: center; gap: 8px;
}
[data-theme="dark"] .dash-topbar { background: var(--gray-200); }
.dot-btn { width: 12px; height: 12px; border-radius: 50%; }
.dash-title-bar {
  flex: 1; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 500;
}
.dash-body { padding: 28px; }
.dash-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}
.dash-nav-title { font-size: 18px; font-weight: 700; color: var(--gray-900); letter-spacing: -0.02em; }
.dash-nav-date { font-size: 13px; color: var(--gray-400); }
.dash-tabs { display: flex; gap: 4px; }
.dash-tab {
  font-size: 12px; font-weight: 500; padding: 5px 12px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--gray-400);
  transition: all var(--transition);
}
.dash-tab.active { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }
[data-theme="dark"] .dash-tab.active { background: var(--blue-100); color: var(--blue-400); }

.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 18px;
}
.kpi-label { font-size: 12px; font-weight: 600; color: var(--gray-400); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-val { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; color: var(--gray-900); margin-bottom: 4px; }
.kpi-change { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.kpi-change.up { color: var(--green-500); }
.kpi-change.down { color: var(--rose-500); }

.dash-main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.dash-chart-card {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 20px;
}
.dash-chart-title { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; letter-spacing: -0.01em; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-bottom: 4px; }
.chart-bar-group { display: flex; gap: 3px; align-items: flex-end; flex: 1; }
.chart-bar { width: 100%; border-radius: 3px 3px 0 0; }
.chart-bar.income { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.chart-bar.expense { background: linear-gradient(180deg, #fb7185, #f43f5e); }
.chart-bar.savings { background: linear-gradient(180deg, #4ade80, #22c55e); }
.chart-labels { display: flex; gap: 8px; margin-top: 8px; }
.chart-label { flex: 1; text-align: center; font-size: 10px; color: var(--gray-400); font-weight: 500; }

.dash-pie-card {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 20px;
}
.mini-pie-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.mini-pie {
  width: 110px; height: 110px; border-radius: 50%;
  background: conic-gradient(#3b82f6 0% 45%, #f43f5e 45% 72%, #22c55e 72% 88%, #fbbf24 88% 100%);
  box-shadow: var(--shadow-md); position: relative;
}
.mini-pie-hole {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 48px; height: 48px;
  background: var(--gray-50); border-radius: 50%;
}
.pie-items { display: flex; flex-direction: column; gap: 8px; }
.pie-item { display: flex; align-items: center; justify-content: space-between; }
.pie-item-left { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--gray-600); }
.pie-item-dot { width: 8px; height: 8px; border-radius: 2px; }
.pie-item-pct { font-size: 12px; font-weight: 700; color: var(--gray-800); }

.dash-recent { margin-top: 20px; }
.dash-recent-title { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 14px; }
.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.recent-item:hover { background: var(--gray-50); }
.ri-left { display: flex; align-items: center; gap: 12px; }
.ri-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.ri-name { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.ri-cat { font-size: 11px; color: var(--gray-400); }
.ri-amount { font-size: 13px; font-weight: 700; }
.ri-amount.debit { color: var(--rose-500); }
.ri-amount.credit { color: var(--green-500); }

/* ============================
   FOOTER
============================ */
footer {
  background: var(--gray-900); color: rgba(255,255,255,0.6);
  padding: 64px 0 0;
}
[data-theme="dark"] footer { background: var(--gray-50); border-top: 1px solid var(--gray-100); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
[data-theme="dark"] .footer-grid { border-bottom-color: var(--gray-100); }
.footer-brand {}
.footer-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.footer-logo-text { font-size: 20px; font-weight: 700; color: white; letter-spacing: -0.03em; }
[data-theme="dark"] .footer-logo-text { color: var(--gray-900); }
.footer-desc { font-size: 14px; line-height: 1.65; max-width: 280px; margin-bottom: 24px; }
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all var(--transition); cursor: pointer;
}
.social-link:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
[data-theme="dark"] .social-link { background: var(--gray-100); border-color: var(--gray-200); }
.footer-col-title { font-size: 13px; font-weight: 700; color: white; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 20px; }
[data-theme="dark"] .footer-col-title { color: var(--gray-900); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; transition: color var(--transition); }
.footer-links a:hover { color: white; }
[data-theme="dark"] .footer-links a { color: var(--gray-600); }
[data-theme="dark"] .footer-links a:hover { color: var(--gray-900); }
.newsletter-label { font-size: 13px; margin-bottom: 12px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-input {
  flex: 1; padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: white; font-size: 13px; font-family: var(--font-sans);
  transition: all var(--transition); outline: none;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-input:focus { border-color: var(--blue-400); background: rgba(255,255,255,0.12); }
[data-theme="dark"] .newsletter-input { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-900); }
.newsletter-btn {
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--gradient-primary); color: white;
  font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  transition: all var(--transition);
}
.newsletter-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: 13px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 13px; transition: color var(--transition); }
.footer-bottom-links a:hover { color: white; }
[data-theme="dark"] .footer-bottom-links a { color: var(--gray-600); }
[data-theme="dark"] .footer-bottom-links a:hover { color: var(--gray-900); }

/* ============================
   CALCULATORS PAGE
============================ */
.calc-tools-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  padding-top: calc(var(--nav-height) + 32px);
  padding-bottom: 72px;
}

.tools-header {
  text-align: center;
  margin-bottom: 36px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.tool-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.tool-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.tool-form {
  display: grid;
  gap: 10px;
}

.tool-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
}

.tool-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-900);
  font-family: var(--font-sans);
  font-size: 14px;
}

.tool-form input:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tool-result {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
}

[data-theme="dark"] .tool-form input {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

[data-theme="dark"] .tool-result {
  background: var(--gray-100);
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 1024px) {
  .calc-grid { grid-template-columns: repeat(2, 1fr); }
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
  .budget-grid { gap: 48px; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-links, .btn-nav { display: none; }
  .nav-menu-btn { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 20px; }
  .calc-grid { grid-template-columns: 1fr; }
  .budget-grid { grid-template-columns: 1fr; }
  .pie-wrapper { width: 220px; height: 220px; }
  .tips-grid { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-main-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .tool-card { padding: 18px; }
  .calc-tools-page { padding-top: calc(var(--nav-height) + 24px); }
}

/* ============================
   SCROLL ANIMATIONS
============================ */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
