﻿/* ==========================================
   SMART EXPENSE TRACKER — style.css v2
   Dark + Vibrant Color Palette | Mobile-first
   ========================================== */

/* ---- DESIGN TOKENS ---- */
:root {
  /* Core brand */
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #EDE9FE;
  --secondary: #06D6A0;
  --secondary-dark: #059669;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --cyan: #06B6D4;
  --rose: #F43F5E;
  --indigo: #6366F1;

  /* Surfaces */
  --bg: #0F0F23;
  --bg2: #13132B;
  --surface: #1A1A38;
  --surface2: #22224A;
  --surface3: #2A2A56;
  --border: rgba(255, 255, 255, 0.1);
  --border2: rgba(255, 255, 255, 0.06);

  /* Text */
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  /* Shadows */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --glow-purple: 0 0 30px rgba(124, 58, 237, 0.25);
  --glow-green: 0 0 30px rgba(6, 214, 160, 0.2);
  --glow-amber: 0 0 30px rgba(245, 158, 11, 0.2);

  /* Shape */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Typography */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-hindi: 'Noto Sans Devanagari', 'Hind', sans-serif;

  /* Motion */
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ---- RESET ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
}

/* ---- GRADIENT TEXT ---- */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- CONTAINER ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- SECTION ---- */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-badge {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(124, 58, 237, 0.2);
  color: #A78BFA;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 800;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4F46E5);
  color: white;
  box-shadow: var(--glow-purple);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.07);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #0F172A;
  font-weight: 700;
  padding: 12px 20px;
  box-shadow: var(--glow-green);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(6, 214, 160, 0.4);
}

.btn-ghost {
  background: var(--surface2);
  color: var(--text-muted);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.btn-ghost:hover {
  background: var(--surface3);
  color: var(--text);
}

.btn-ghost.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ---- CARDS ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface2);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

/* =========================================
   NAVBAR
========================================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.nav-logo {
  font-size: 1.5rem;
}

.nav-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* =========================================
   HERO
========================================= */
.hero {
  background: linear-gradient(135deg, #0D0D1F 0%, #1A0A3E 40%, #0A1628 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 214, 160, 0.15) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  padding: 64px 20px 80px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 100px;
  color: #C4B5FD;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: white;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-tagline {
  font-family: var(--font-hindi);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 22px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tagline-sub {
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 1.4vw, 0.85rem);
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-shadow: none;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  max-width: 400px;
  margin: 0 auto;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 14px;
}

.hero-wave {
  line-height: 0;
  margin-top: -1px;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 55px;
}

/* =========================================
   FEATURES SECTION
========================================= */
.features-section {
  background: var(--bg2);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124, 58, 237, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =========================================
   TRACKER SECTION
========================================= */
.tracker-section {
  background: var(--bg);
}

.tracker-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

/* FORM */
.form-card {
  padding: 0;
}

.expense-form {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface2);
  transition: var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.input-wrapper .form-input {
  padding-left: 28px;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input option {
  background: var(--surface2);
  color: var(--text);
}

.select-wrapper {
  position: relative;
}

.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.form-select {
  padding-right: 36px;
  cursor: pointer;
}

/* ---- GROCERY PANEL ---- */
.grocery-panel {
  background: rgba(6, 214, 160, 0.05);
  border: 1px solid rgba(6, 214, 160, 0.2);
  border-radius: var(--radius);
  padding: 16px;
}

.grocery-header {
  margin-bottom: 14px;
}

.grocery-badge {
  display: inline-block;
  background: rgba(6, 214, 160, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(6, 214, 160, 0.3);
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.grocery-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.grocery-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.grocery-item-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: slideInRow 0.3s ease;
}

/* Top row: item select + price + remove button */
.grow-top-row {
  display: grid;
  grid-template-columns: 1fr 110px 36px;
  gap: 8px;
  align-items: center;
}

.grow-top-row .form-input,
.grocery-item-select {
  padding: 9px 12px;
  font-size: 0.85rem;
}

.grocery-item-select {
  padding-right: 28px;
}

/* Custom name input row (shown below when Other selected) */
.grocery-custom-wrap {
  display: none;
  width: 100%;
}

.grow-custom-input {
  width: 100%;
  font-size: 0.85rem !important;
  padding: 9px 12px !important;
  border-color: rgba(124, 58, 237, 0.4) !important;
  background: rgba(124, 58, 237, 0.08) !important;
}

.grow-custom-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}

.grow-custom-input::placeholder {
  color: rgba(167, 139, 250, 0.6);
}

.remove-grocery-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.remove-grocery-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}

.add-item-btn {
  width: 100%;
  justify-content: center;
  border-style: dashed;
  color: var(--secondary);
  border-color: rgba(6, 214, 160, 0.3);
  margin-top: 4px;
}

.add-item-btn:hover {
  background: rgba(6, 214, 160, 0.1);
  border-color: var(--secondary);
}

.grocery-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.grocery-total-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.grocery-total-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

/* ---- BREAKDOWN CHARTS SECTION ---- */
.breakdown-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.breakdown-header {
  margin-bottom: 24px;
  text-align: center;
}

.breakdown-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.breakdown-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.breakdown-chart-card {
  padding: 0;
}

.breakdown-total-badge {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 100px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* BUDGET SECTION */
.budget-section {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.budget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.budget-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.budget-input-row .input-wrapper {
  flex: 1;
}

.budget-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.progress-bar-track {
  height: 9px;
  background: var(--surface3);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-dark));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
  width: 0%;
}

.progress-bar-fill.warn {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.progress-bar-fill.danger {
  background: linear-gradient(90deg, var(--danger), #DC2626);
}

.budget-remaining {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
}

.budget-remaining.warn {
  color: var(--accent);
}

.budget-remaining.danger {
  color: var(--danger);
}

/* SUMMARY CARDS */
.summary-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.summary-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.summary-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.summary-total {
  border-left: 3px solid var(--rose);
}

.summary-top {
  border-left: 3px solid var(--accent);
}

.summary-avg {
  border-left: 3px solid var(--cyan);
}

/* TABLE */
.table-card {
  padding: 0;
}

.table-header {
  gap: 8px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.filter-select {
  border: none;
  outline: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.filter-select option {
  background: var(--surface2);
}

.table-responsive {
  overflow-x: auto;
}

.expense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
}

.expense-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.expense-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border2);
  vertical-align: middle;
  color: var(--text);
}

.expense-table tbody tr {
  transition: var(--transition-fast);
}

.expense-table tbody tr:hover {
  background: var(--surface2);
}

.expense-table tbody tr:last-child td {
  border-bottom: none;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 700;
}

.cat-badge.grocery {
  background: rgba(6, 214, 160, 0.15);
  color: #34D399;
  border: 1px solid rgba(6, 214, 160, 0.25);
}

.cat-badge.food {
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.cat-badge.transport {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.cat-badge.shopping {
  background: rgba(244, 63, 94, 0.15);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.cat-badge.rent {
  background: rgba(52, 211, 153, 0.15);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.cat-badge.entertainment {
  background: rgba(167, 139, 250, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.cat-badge.health {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.cat-badge.education {
  background: rgba(6, 182, 212, 0.15);
  color: #67E8F9;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.cat-badge.utilities {
  background: rgba(251, 191, 36, 0.15);
  color: #FDE68A;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.cat-badge.other {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.amount-cell {
  font-weight: 800;
  color: #FCA5A5;
  white-space: nowrap;
}

.delete-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-light);
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 56px 20px;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
}

.empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* =========================================
   ADVISOR SECTION
========================================= */
.advisor-section {
  background: linear-gradient(180deg, var(--bg2) 0%, #0D0B2A 100%);
}

.advisor-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* FATHER CARD */
.father-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--glow-purple);
  position: relative;
  overflow: hidden;
}

.father-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.father-avatar {
  font-size: 3rem;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(6, 214, 160, 0.15));
  border-radius: 50%;
  border: 2px solid rgba(124, 58, 237, 0.3);
}

.father-speech {
  flex: 1;
  position: relative;
  background: var(--surface2);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 18px 20px;
}

.father-speech::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 16px;
  border: 5px solid transparent;
  border-right-color: rgba(124, 58, 237, 0.2);
}

#fatherAdviceText {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
}

/* DAY COMPARE GRID */
.day-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.day-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.day-dbefore::before {
  background: rgba(148, 163, 184, 0.4);
}

.day-yesterday::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.day-today::before {
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.day-today {
  box-shadow: var(--glow-purple);
  border-color: rgba(124, 58, 237, 0.3);
}

.day-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.day-date {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.day-amount {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}

.highlight-amt {
  color: var(--primary) !important;
  filter: brightness(1.3);
}

.day-entries {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ANALYSIS GRID */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.analysis-card {
  padding: 0;
}

.analysis-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.no-data-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
}

.analysis-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  transition: var(--transition-fast);
}

.analysis-item:hover {
  background: var(--surface3);
}

.analysis-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.analysis-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.analysis-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.analysis-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.cause-item {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  gap: 4px;
}

.cause-item.danger {
  border-left-color: var(--danger);
}

.cause-item.warn {
  border-left-color: var(--accent);
}

.cause-item.ok {
  border-left-color: var(--secondary);
}

.cause-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.cause-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================
   INSIGHTS SECTION
========================================= */
.insights-section {
  background: var(--bg);
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.chart-card {
  padding: 0;
}

.chart-container {
  padding: 24px;
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-no-data {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
  pointer-events: none;
}

.chart-no-data span {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.chart-no-data p {
  font-size: 0.875rem;
  font-weight: 500;
}

/* =========================================
   FOUNDER SECTION
========================================= */
.founder-section {
  background: linear-gradient(185deg, var(--bg2) 0%, var(--bg) 100%);
}

.founder-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.founder-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.founder-content {
  position: relative;
  z-index: 1;
}

.founder-heading {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 12px 0 28px;
}

.founder-avatar-wrap {
  margin-bottom: 20px;
}

/* PASSPORT SIZE — small circular image */
.founder-avatar-ring {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.4);
}

.founder-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--surface);
}

.founder-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.founder-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  filter: brightness(1.4);
}

.founder-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto 22px;
}

.founder-socials {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* =========================================
   FOOTER
========================================= */
.footer {
  background: #070711;
  color: rgba(255, 255, 255, 0.4);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
}

.footer-tagline {
  font-family: var(--font-hindi);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-copy strong {
  color: rgba(255, 255, 255, 0.75);
}

.footer-note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.2);
}

/* =========================================
   TOAST
========================================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface3);
  color: white;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
  border: 1px solid var(--border);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: rgba(6, 214, 160, 0.9);
  color: #0F1F1A;
  border-color: var(--secondary);
}

.toast.danger {
  background: rgba(239, 68, 68, 0.9);
  border-color: var(--danger);
}

.toast.warn {
  background: rgba(245, 158, 11, 0.9);
  color: #1A1200;
  border-color: var(--accent);
}

/* =========================================
   ANIMATIONS
========================================= */
@keyframes slideInRow {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.new-row {
  animation: slideInRow 0.35s ease forwards;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* =========================================
   TABLET: 768px
========================================= */
@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .tracker-layout {
    grid-template-columns: 380px 1fr;
  }

  .analysis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   LAPTOP: 1024px
========================================= */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .tracker-layout {
    grid-template-columns: 420px 1fr;
  }
}

/* =========================================
   MOBILE TWEAKS
========================================= */
@media (max-width: 767px) {
  .section {
    padding: 56px 0;
  }

  .hero-content {
    padding: 44px 16px 60px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 13, 31, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .hamburger {
    display: flex;
  }

  .navbar {
    position: relative;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .day-compare-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }

  .hero-stats {
    padding: 16px 20px;
  }

  .founder-card {
    padding: 36px 20px;
  }

  .father-card {
    flex-direction: column;
    align-items: center;
  }

  .father-speech::before {
    display: none;
  }

  .grocery-item-row {
    grid-template-columns: 1fr 100px 34px;
  }

  .table-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1.4rem;
  }

  .grocery-item-row {
    grid-template-columns: 1fr 90px 34px;
  }
}

/* =========================================
   ANIMATED FATHER FACE
========================================= */

/* Container inside father-card */
.father-avatar-wrap {
  flex-shrink: 0;
  width: 165px;
  height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.father-face {
  width: 165px;
  height: 185px;
  filter: drop-shadow(0 4px 16px rgba(124, 58, 237, 0.3));
}

/* ---- BLINK animation ---- */
@keyframes blink {

  0%,
  90%,
  100% {
    ry: 0.5;
  }

  92%,
  98% {
    ry: 8;
  }
}

.eyelid-l {
  animation: blink 4s ease-in-out infinite;
  transform-origin: 44px 60px;
}

.eyelid-r {
  animation: blink 4s ease-in-out 0.08s infinite;
  transform-origin: 76px 60px;
}

/* ---- TALK animation (mouth open/close) ---- */
@keyframes talkOpen {

  0%,
  100% {
    ry: 0.5;
  }

  15%,
  45% {
    ry: 5;
  }

  30% {
    ry: 3;
  }

  60%,
  80% {
    ry: 4;
  }

  70% {
    ry: 1.5;
  }
}

@keyframes lipsMove {

  0%,
  100% {
    transform: translateY(0);
  }

  15%,
  45% {
    transform: translateY(2px);
  }

  30% {
    transform: translateY(1px);
  }

  60%,
  80% {
    transform: translateY(2px);
  }
}

@keyframes tongueFlash {

  0%,
  100% {
    opacity: 0;
  }

  20%,
  40% {
    opacity: 0.5;
  }

  30% {
    opacity: 0.2;
  }
}

.mouth-open {
  animation: talkOpen 2.2s ease-in-out infinite;
  transform-origin: 60px 94px;
}

.lip-lower {
  animation: lipsMove 2.2s ease-in-out infinite;
  transform-origin: 60px 95px;
}

.tongue {
  animation: tongueFlash 2.2s ease-in-out infinite;
}

/* ---- FATHER CARD (override / supplement if needed) ---- */
.father-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 214, 160, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.father-speech {
  flex: 1;
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
}

.father-speech::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 24px;
  border-width: 6px 12px 6px 0;
  border-style: solid;
  border-color: transparent rgba(124, 58, 237, 0.25) transparent transparent;
}

/* =========================================
   DAILY EXCEEDED BANNER
========================================= */
.daily-exceeded-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(244, 63, 94, 0.1));
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  animation: bannerPulse 2s ease-in-out infinite;
}

@keyframes bannerPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.12);
  }
}

.daily-exceeded-icon {
  font-size: 2rem;
  flex-shrink: 0;
  animation: shake 0.5s ease-in-out infinite alternate;
}

@keyframes shake {
  0% {
    transform: rotate(-8deg);
  }

  100% {
    transform: rotate(8deg);
  }
}

.daily-exceeded-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.daily-exceeded-text strong {
  color: #FCA5A5;
  font-size: 1rem;
  font-weight: 800;
}

.daily-exceeded-text span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  line-height: 1.5;
}
/* =========================================
   FOUNDER BIO — CREATIVE REDESIGN
========================================= */
.founder-bio-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 20px;
}

.founder-bio-para {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.8;
  text-align: center;
}

.founder-bio-line strong { color: #A78BFA; font-weight: 700; }
.founder-bio-line em    { color: var(--secondary); font-style: italic; }

.founder-bio-tagline {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  font-style: italic;
  text-align: center;
  border-top: 1px solid rgba(245,158,11,0.2);
  padding-top: 12px;
}

/* =========================================
   VISITOR COUNTER
========================================= */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 100px;
  padding: 6px 18px;
  margin-top: 12px;
  font-size: 0.82rem;
}

.visitor-icon { font-size: 1rem; }

.visitor-label {
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.visitor-count {
  font-weight: 800;
  font-size: 1rem;
  color: #A78BFA;
  min-width: 40px;
  text-align: right;
}

/* =========================================
   RESPONSIVE — COMPREHENSIVE OVERHAUL
   Mobile-first approach
========================================= */

/* --- XS: phones up to 480px --- */
@media (max-width: 480px) {
  :root { font-size: 14px; }

  .container { padding: 0 14px; }
  .section   { padding: 48px 0; }

  .navbar {
    padding: 14px 16px;
  }

  .hero-content { padding: 40px 14px 56px; }
  .hero-title   { font-size: 1.9rem; letter-spacing: -0.03em; }
  .hero-tagline { font-size: 1.25rem; flex-direction: column; gap: 4px; }
  .hero-tagline-sub { font-size: 0.7rem; text-align: center; }
  .hero-subtitle { font-size: 0.875rem; }

  .hero-buttons { flex-direction: column; align-items: center; gap: 10px; }
  .btn { width: 100%; max-width: 260px; justify-content: center; padding: 13px 20px; }

  .hero-stats { padding: 14px 16px; max-width: 100%; }
  .stat-num  { font-size: 1.2rem; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }
  .expense-form { padding: 16px; gap: 14px; }

  /* Grocery */
  .grow-top-row { grid-template-columns: 1fr 90px 34px; }
  .grocery-panel { padding: 12px; }

  /* Budget */
  .budget-input-row { flex-direction: column; gap: 8px; }
  .budget-input-row .btn { width: 100%; }

  /* Tables */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .expense-table th, .expense-table td { padding: 8px 10px; font-size: 0.78rem; white-space: nowrap; }

  /* Advisor */
  .father-card { flex-direction: column; align-items: center; gap: 16px; padding: 18px 14px; }
  .father-speech { font-size: 0.88rem; }
  .father-speech::before { display: none; }
  .father-avatar-wrap { width: 130px; height: 145px; }
  .father-face { width: 130px; height: 145px; }

  .day-compare-grid { grid-template-columns: 1fr; gap: 10px; }
  .analysis-grid    { grid-template-columns: 1fr; gap: 16px; }

  /* Charts */
  .charts-grid      { grid-template-columns: 1fr; }
  .breakdown-grid   { grid-template-columns: 1fr; }
  .chart-container  { min-height: 220px; }

  /* Founder */
  .founder-card  { padding: 28px 16px; }
  .founder-avatar-ring { width: 100px; height: 100px; }
  .founder-img   { width: 88px; height: 88px; }
  .founder-bio-line { font-size: 0.875rem; }

  /* Footer */
  .footer-inner { gap: 10px; }
  .visitor-counter { margin: 10px auto 0; }
}

/* --- SM: 481px to 767px --- */
@media (min-width: 481px) and (max-width: 767px) {
  .hero-title   { font-size: 2.2rem; }
  .hero-tagline { font-size: 1.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn          { max-width: 280px; }

  .form-row { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .day-compare-grid { grid-template-columns: repeat(2, 1fr); }
  .analysis-grid    { grid-template-columns: 1fr; }

  .father-card  { flex-direction: column; align-items: center; gap: 18px; }
  .father-speech::before { display: none; }

  .breakdown-grid { grid-template-columns: 1fr; }
  .tracker-layout { grid-template-columns: 1fr; }

  .grow-top-row { grid-template-columns: 1fr 100px 34px; }
}

/* --- MD: 768px to 1023px (Tablet) --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .navbar { padding: 16px 24px; }

  .features-grid  { grid-template-columns: repeat(2, 1fr); }
  .tracker-layout { grid-template-columns: 1fr; gap: 24px; }
  .summary-cards  { grid-template-columns: repeat(3, 1fr); }

  .charts-grid    { grid-template-columns: repeat(2, 1fr); }
  .breakdown-grid { grid-template-columns: repeat(2, 1fr); }
  .day-compare-grid { grid-template-columns: repeat(3, 1fr); }
  .analysis-grid  { grid-template-columns: repeat(2, 1fr); }

  .father-card    { gap: 20px; padding: 22px; }
  .father-avatar-wrap { width: 140px; height: 158px; }

  .form-row { grid-template-columns: 1fr 1fr; }
  .grow-top-row { grid-template-columns: 1fr 110px 36px; }

  .founder-content { max-width: 600px; }
}

/* --- LG: 1024px+ (Desktop) --- */
@media (min-width: 1024px) {
  .tracker-layout {
    grid-template-columns: 440px 1fr;
    align-items: start;
  }

  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .breakdown-grid { grid-template-columns: repeat(3, 1fr); }

  .father-card { flex-direction: row; align-items: flex-start; }
}

/* --- XL: 1280px+ --- */
@media (min-width: 1280px) {
  .tracker-layout { grid-template-columns: 480px 1fr; }
  .breakdown-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .btn            { min-height: 48px; }
  .form-input     { min-height: 44px; font-size: 16px; } /* 16px prevents iOS zoom */
  .filter-select  { min-height: 40px; }
  .remove-grocery-btn { width: 40px; height: 40px; }
  .nav-links a    { padding: 14px 16px; }
  .delete-btn     { width: 36px; height: 36px; }
}
