/* ─── VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --red-400:   #f87171;
  --red-500:   #ef4444;
  --red-600:   #dc2626;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;
  --white:     #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
}

/* ─── RESET ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--green-700); }
input, select, button, textarea { font-family: inherit; font-size: 1rem; }

/* ─── NAVBAR ────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--green-100);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-brand {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.25rem; color: var(--green-700);
  text-decoration: none;
}
.nav-logo { font-size: 1.5rem; }
.nav-links { display: flex; gap: .25rem; }
.nav-links a {
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--gray-600, #4b5563);
  font-weight: 500;
  font-size: .9rem;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--green-50); color: var(--green-700); }
.nav-links a.active { background: var(--green-100); color: var(--green-700); font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 1rem; }
.nav-greeting { font-size: .9rem; color: var(--gray-500); }
.btn-logout {
  background: none; border: 1.5px solid var(--gray-200);
  color: var(--gray-500); padding: .35rem .8rem;
  border-radius: var(--radius-sm); font-size: .85rem; cursor: pointer;
  transition: all .15s;
}
.btn-logout:hover { border-color: var(--red-400); color: var(--red-500); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* ─── SPACE SWITCHER ────────────────────────────────────────────────────── */
.space-switcher { position: relative; }
.space-btn {
  display: flex; align-items: center; gap: .4rem;
  background: var(--gray-50); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: .4rem .75rem;
  font-size: .85rem; font-weight: 600; color: var(--gray-700);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.space-btn:hover { background: var(--green-50); border-color: var(--green-400); color: var(--green-700); }
.space-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.space-drop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 200px; z-index: 300; padding: .4rem;
}
.space-drop.open { display: block; }
.space-drop-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .75rem; border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--gray-700); cursor: pointer;
  text-decoration: none; width: 100%; background: none; border: none;
  transition: background .12s;
}
.space-drop-item:hover { background: var(--gray-50); color: var(--gray-900); }
.space-drop-item.active { background: var(--green-50); color: var(--green-700); font-weight: 600; }
.space-drop-divider { height: 1px; background: var(--gray-100); margin: .4rem 0; }
.space-drop-new { color: var(--green-600); font-weight: 600; }
.space-drop-new:hover { background: var(--green-50); }
.space-drop-new-top {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; padding: .45rem .75rem; border-radius: var(--radius-sm);
  background: var(--green-600); color: var(--white);
  font-size: .85rem; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.space-drop-new-top:hover { background: var(--green-700); }

.nav-mobile {
  display: none; flex-direction: column;
  background: var(--white); border-bottom: 2px solid var(--green-100);
  padding: 1rem 2rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: .6rem 0; color: var(--gray-700); font-weight: 500; border-bottom: 1px solid var(--gray-100); }

/* ─── MAIN CONTENT ──────────────────────────────────────────────────────── */
.main-content { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.25rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem; cursor: pointer;
  border: 2px solid transparent; transition: all .18s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-600); color: var(--white);
  border-color: var(--green-600);
}
.btn-primary:hover { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.btn-outline {
  background: transparent; color: var(--green-600);
  border-color: var(--green-600);
}
.btn-outline:hover { background: var(--green-50); }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  padding: .3rem; border-radius: 6px; transition: background .15s;
}
.btn-icon:hover { background: var(--gray-100); }
.btn-icon-sm {
  background: none; border: none; cursor: pointer; font-size: .95rem;
  padding: .25rem .4rem; border-radius: 6px; transition: background .15s;
  opacity: .6;
}
.btn-icon-sm:hover { background: var(--gray-100); opacity: 1; }

/* ─── FLASH MESSAGES ────────────────────────────────────────────────────── */
.flash-container { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.flash {
  padding: .85rem 1.25rem; border-radius: var(--radius-sm);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 500; font-size: .9rem;
}
.flash button { background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: .6; }
.flash-success { background: var(--green-100); color: var(--green-800); border-left: 4px solid var(--green-500); }
.flash-error   { background: #fef2f2; color: var(--red-600); border-left: 4px solid var(--red-500); }

/* ─── PAGE HEADER ───────────────────────────────────────────────────────── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap;
}
.page-header h1 { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); }
.page-sub { color: var(--gray-500); font-size: .95rem; margin-top: .2rem; }

/* ─── CARDS ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.5rem;
  border: 1px solid var(--gray-100);
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem;
}
.card-header h3 { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.link-green { font-size: .85rem; color: var(--green-600); font-weight: 500; }
.link-green:hover { color: var(--green-700); }

/* ─── KPI GRID ──────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  border-left: 4px solid;
}
.kpi-icon { font-size: 2rem; }
.kpi-label { display: block; font-size: .8rem; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-top: .15rem; }
.income-card  { border-left-color: var(--green-500); }
.expense-card { border-left-color: var(--red-500); }
.balance-card.positive { border-left-color: var(--green-600); }
.balance-card.negative { border-left-color: var(--red-600); }
.savings-card { border-left-color: #3b82f6; }

/* ─── CHARTS GRID ───────────────────────────────────────────────────────── */
.charts-grid {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 1rem; margin-bottom: 1.5rem;
}
.chart-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
}
.chart-card h3, .card h3 { font-size: 1rem; font-weight: 600; color: var(--gray-800); margin-bottom: 1rem; }
.empty-chart { text-align: center; color: var(--gray-400); padding: 2rem; font-size: .9rem; }

/* ─── BOTTOM GRID ───────────────────────────────────────────────────────── */
.bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ─── TRANSACTION LIST ──────────────────────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; gap: .75rem; }
.tx-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem; border-radius: var(--radius-sm); background: var(--gray-50);
  transition: background .12s;
}
.tx-item:hover { background: var(--green-50); }
.tx-icon { font-size: 1.5rem; width: 36px; text-align: center; }
.tx-info { flex: 1; }
.tx-desc { display: block; font-weight: 500; font-size: .9rem; color: var(--gray-800); }
.tx-date { display: block; font-size: .8rem; color: var(--gray-400); }
.tx-amount { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.tx-amount.income { color: var(--green-600); }
.tx-amount.expense { color: var(--red-500); }
.tx-amount.investment { color: #2563eb; }
.tx-amount.savings    { color: #0d9488; }

/* ─── GOALS LIST (dashboard) ────────────────────────────────────────────── */
.goals-list { display: flex; flex-direction: column; gap: 1.25rem; }
.goal-item { }
.goal-header { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 500; margin-bottom: .4rem; }
.goal-pct { color: var(--green-600); font-weight: 700; }
.goal-amounts { display: flex; justify-content: space-between; font-size: .78rem; color: var(--gray-400); margin-top: .3rem; }

/* ─── PROGRESS BAR ──────────────────────────────────────────────────────── */
.progress-bar {
  height: 8px; background: var(--gray-100); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green-400));
  border-radius: 99px; transition: width .4s ease;
}
.progress-fill.done { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-bar-lg { height: 12px; }

/* ─── GOALS GRID (goals page) ───────────────────────────────────────────── */
.goals-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.goal-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  display: flex; flex-direction: column; gap: 1rem;
}
.goal-card.completed { border-color: #fbbf24; box-shadow: 0 0 0 2px #fef3c7; }
.goal-card-header { display: flex; align-items: flex-start; gap: .75rem; }
.goal-card-icon { font-size: 2rem; }
.goal-card-title { flex: 1; }
.goal-card-title h3 { font-size: 1rem; font-weight: 600; }
.goal-deadline { font-size: .8rem; color: var(--gray-400); }
.goal-progress-section { }
.goal-pct-label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .5rem; color: var(--gray-600, #4b5563); }
.pct-value { font-weight: 700; color: var(--green-600); }
.pct-value.done { color: #f59e0b; }
.goal-amounts-big {
  display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; text-align: center;
}
.goal-amount-item { background: var(--gray-50); border-radius: var(--radius-sm); padding: .6rem; }
.goal-amount-label { display: block; font-size: .75rem; color: var(--gray-400); margin-bottom: .2rem; }
.goal-amount-value { font-size: .95rem; font-weight: 700; color: var(--gray-800); }
.goal-amount-value.green { color: var(--green-600); }
.goal-amount-value.red { color: var(--red-500); }
.goal-update-form { display: flex; gap: .5rem; }
.goal-update-form input { flex: 1; padding: .5rem .75rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); }
.goal-done-badge {
  text-align: center; background: #fef3c7; color: #92400e;
  border-radius: var(--radius-sm); padding: .6rem; font-weight: 600; font-size: .9rem;
}

/* ─── TABLE ─────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  text-align: left; padding: .75rem 1rem;
  background: var(--gray-50); color: var(--gray-500);
  font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 2px solid var(--gray-100);
}
.data-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--green-50); }
.text-right { text-align: right; }
.date-col { color: var(--gray-400); font-size: .85rem; }
.actions-col { white-space: nowrap; }

/* ─── BADGES ────────────────────────────────────────────────────────────── */
.cat-badge {
  background: var(--gray-100); color: var(--gray-700);
  padding: .25rem .6rem; border-radius: 99px; font-size: .8rem; white-space: nowrap;
}
.type-badge {
  padding: .25rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 600;
}
.type-badge.income { background: var(--green-100); color: var(--green-700); }
.type-badge.expense { background: #fef2f2; color: var(--red-600); }
.type-badge.investment { background: #dbeafe; color: #1d4ed8; }
.type-badge.savings    { background: #ccfbf1; color: #0f766e; }

/* ─── PAGINATION ────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding-top: 1.25rem; border-top: 1px solid var(--gray-100); margin-top: 1rem;
}
.page-btn {
  padding: .45rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--green-300, #86efac);
  color: var(--green-600); font-weight: 500; font-size: .9rem; transition: all .15s;
}
.page-btn:hover { background: var(--green-50); }
.page-info { color: var(--gray-400); font-size: .85rem; }

/* ─── FILTERS ───────────────────────────────────────────────────────────── */
.filter-card { margin-bottom: 1.25rem; }
.filter-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.filter-form .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ─── FORMS ─────────────────────────────────────────────────────────────── */
.form-card { max-width: 560px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-700); margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .65rem .9rem;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-800);
  transition: border-color .15s, box-shadow .15s;
  appearance: auto;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ─── TYPE SELECTOR ─────────────────────────────────────────────────────── */
.type-selector { display: flex; gap: .75rem; margin-bottom: 1.5rem; }
.type-option { flex: 1; }
.type-option input[type="radio"] { display: none; }
.type-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem; border-radius: var(--radius-sm); border: 2px solid var(--gray-200);
  cursor: pointer; font-weight: 600; font-size: .95rem; transition: all .15s;
  background: var(--gray-50); color: var(--gray-600, #4b5563);
}
.type-option input:checked + .income-btn { background: var(--green-100); border-color: var(--green-500); color: var(--green-700); }
.type-option input:checked + .expense-btn { background: #fef2f2; border-color: var(--red-500); color: var(--red-600); }
.income-btn:hover { background: var(--green-50); border-color: var(--green-400); }
.expense-btn:hover { background: #fff1f2; border-color: var(--red-400); }
.type-option input:checked + .investment-btn { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }
.type-option input:checked + .savings-btn    { background: #ccfbf1; border-color: #14b8a6; color: #0f766e; }
.investment-btn:hover { background: #eff6ff; border-color: #93c5fd; }
.savings-btn:hover    { background: #f0fdfa; border-color: #5eead4; }

/* ─── EMPTY STATES ──────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state-lg { padding: 4rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--gray-700); margin-bottom: .5rem; }
.empty-state p { color: var(--gray-400); margin-bottom: 1.25rem; }

/* ─── REPORTS ───────────────────────────────────────────────────────────── */
.cat-breakdown { display: flex; flex-direction: column; gap: .6rem; }
.cat-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--gray-50); }
.cat-row-left { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.cat-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cat-row-right { display: flex; align-items: center; gap: .75rem; }
.cat-amount { font-weight: 700; font-size: .9rem; }
.cat-amount.green { color: var(--green-600); }
.cat-amount.red { color: var(--red-500); }
.cat-pct { font-size: .8rem; color: var(--gray-400); min-width: 40px; text-align: right; }

/* ─── CATEGORIES PAGE ───────────────────────────────────────────────────── */
.cat-section-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.cat-section-title.income { color: var(--green-700); }
.cat-section-title.expense { color: var(--red-600); }
.cat-list { display: flex; flex-direction: column; gap: .5rem; }
.cat-item { display: flex; justify-content: space-between; align-items: center; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--gray-50); }
.cat-item:hover { background: var(--green-50); }
.cat-item-left { display: flex; align-items: center; gap: .6rem; }
.cat-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cat-item-icon { font-size: 1.1rem; }
.cat-item-name { font-size: .9rem; font-weight: 500; color: var(--gray-700); }
.text-muted { color: var(--gray-400); font-size: .9rem; padding: .5rem 0; }

/* ─── MODAL ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; width: 100%; max-width: 500px;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.15rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-400); line-height: 1; }
.modal-close:hover { color: var(--gray-700); }

/* ─── AUTH ──────────────────────────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(135deg, var(--green-50) 0%, var(--white) 60%, var(--green-100) 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.auth-container { width: 100%; max-width: 420px; padding: 1.5rem; }
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand .nav-brand { justify-content: center; font-size: 1.5rem; }
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2.5rem; box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}
.auth-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); text-align: center; }
.auth-sub { text-align: center; color: var(--gray-500); margin: .5rem 0 1.5rem; font-size: .9rem; }
.auth-form { margin-top: .5rem; }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--gray-500); }

/* ─── LANDING ───────────────────────────────────────────────────────────── */
.landing-body { background: var(--white); }
.landing-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 3rem; border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; background: var(--white); z-index: 100;
  box-shadow: var(--shadow-sm);
}
.landing-nav .btn { font-size: .9rem; }

.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; padding: 5rem 3rem 4rem;
  max-width: 1200px; margin: 0 auto;
}
.hero-badge {
  display: inline-block; background: var(--green-100); color: var(--green-700);
  padding: .4rem .9rem; border-radius: 99px; font-size: .85rem; font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.15; color: var(--gray-900); margin-bottom: 1.25rem; }
.hero-highlight {
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 1.05rem; color: var(--gray-500); margin-bottom: 2rem; line-height: 1.7; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero card */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-100);
  width: 100%; max-width: 360px;
}
.hero-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; font-size: .9rem; color: var(--gray-600, #4b5563); font-weight: 500; }
.badge-green { background: var(--green-100); color: var(--green-700); padding: .2rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; margin-bottom: 1.25rem; }
.hero-stat { background: var(--gray-50); border-radius: var(--radius-sm); padding: .85rem .5rem; text-align: center; }
.stat-label { display: block; font-size: .72rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.stat-value { display: block; font-size: .95rem; font-weight: 700; color: var(--gray-800); }
.stat-value.green { color: var(--green-600); }
.hero-progress-label { font-size: .8rem; color: var(--gray-500); margin-bottom: .5rem; }

/* Features */
.features { padding: 4rem 3rem; background: var(--gray-50); }
.features h2 { text-align: center; font-size: 2rem; font-weight: 700; color: var(--gray-900); margin-bottom: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 2.25rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; }
.feature-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.6; }

.landing-footer {
  text-align: center; padding: 2rem; color: var(--gray-400);
  font-size: .85rem; border-top: 1px solid var(--gray-100);
}

/* ─── COLORS UTILITY ────────────────────────────────────────────────────── */
.green { color: var(--green-600); }
.red { color: var(--red-500); }

/* ─── ALERTS PANEL (dashboard) ──────────────────────────────────────────── */
.alerts-panel {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid #fbbf24; box-shadow: 0 2px 12px rgba(251,191,36,.15);
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.alerts-panel-title {
  font-weight: 700; font-size: .95rem; color: #92400e; margin-bottom: 1rem;
}
.alerts-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.alert-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; border-radius: var(--radius-sm); gap: .75rem;
}
.alert-item.alert-overdue  { background: #fef2f2; border-left: 4px solid var(--red-500); }
.alert-item.alert-critical { background: #fff1f2; border-left: 4px solid #f43f5e; }
.alert-item.alert-warning  { background: #fff7ed; border-left: 4px solid #f97316; }
.alert-item.alert-info     { background: #eff6ff; border-left: 4px solid #3b82f6; }
.alert-item-left { display: flex; align-items: center; gap: .75rem; flex: 1; }
.alert-icon { font-size: 1.4rem; }
.alert-item-info { display: flex; flex-direction: column; }
.alert-item-name { font-weight: 600; font-size: .9rem; color: var(--gray-800); }
.alert-item-msg  { font-size: .82rem; color: var(--gray-600, #4b5563); margin-top: .15rem; }
.alert-item-amount { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.alert-item-amount.income  { color: var(--green-600); }
.alert-item-amount.expense { color: var(--red-500); }
.alerts-panel-link { font-size: .85rem; color: var(--green-600); font-weight: 500; }
.alerts-panel-link:hover { color: var(--green-700); }

/* ─── RECURRING PAGE ─────────────────────────────────────────────────────── */
.recurring-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.recurring-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem;
  transition: box-shadow .15s;
}
.recurring-card:hover { box-shadow: var(--shadow); }
.recurring-card.paused { opacity: .6; }
.recurring-card.alert-critical { border-color: #f43f5e; box-shadow: 0 0 0 2px #fff1f2; }
.recurring-card.alert-warning  { border-color: #f97316; box-shadow: 0 0 0 2px #fff7ed; }
.recurring-card.alert-overdue  { border-color: var(--red-500); box-shadow: 0 0 0 2px #fef2f2; }
.recurring-card-top { display: flex; align-items: center; gap: .75rem; }
.recurring-icon { font-size: 1.75rem; }
.recurring-info { flex: 1; }
.recurring-name { display: block; font-weight: 600; font-size: .95rem; color: var(--gray-800); }
.recurring-cat  { display: block; font-size: .8rem; color: var(--gray-400); }
.recurring-amount { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.recurring-amount.income  { color: var(--green-600); }
.recurring-amount.expense { color: var(--red-500); }
.recurring-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.freq-badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 99px;
  font-size: .78rem; font-weight: 600; background: var(--green-100); color: var(--green-700);
}
.recurring-end { font-size: .78rem; color: var(--gray-400); }
.recurring-next { font-size: .85rem; color: var(--gray-500); }
.recurring-paused-label { font-size: .85rem; color: var(--gray-400); font-style: italic; }
.recurring-actions { display: flex; align-items: center; gap: .5rem; padding-top: .25rem; border-top: 1px solid var(--gray-100); }
.btn-sm { padding: .35rem .75rem; font-size: .82rem; }

/* Alert banners inside recurring cards */
.alert-banner {
  border-radius: var(--radius-sm); padding: .65rem .9rem;
  font-size: .85rem; line-height: 1.5;
}
.alert-banner.overdue  { background: #fef2f2; color: #991b1b; }
.alert-banner.critical { background: #fff1f2; color: #9f1239; }
.alert-banner.warning  { background: #fff7ed; color: #9a3412; }
.alert-banner.info     { background: #eff6ff; color: #1e40af; }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; text-align: center; padding: 3rem 1.5rem; }
  .hero-btns { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .landing-nav { padding: 1rem 1.5rem; }
}
@media (max-width: 640px) {
  .navbar { padding: 0 1rem; }
  .nav-links { display: none; }
  .nav-user { display: none; }
  .nav-toggle { display: block; }
  .main-content { padding: 1.25rem 1rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 1.2rem; }
  .hero h1 { font-size: 2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .filter-form { flex-direction: column; }
  .goals-grid { grid-template-columns: 1fr; }
  .landing-nav { padding: 1rem; }
  .landing-nav .btn-outline { display: none; }
}
