/* Finanzas Pro - Modern Financial Management Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Core Color Tokens */
  --bg-body: #080c14;
  --bg-surface: #0f1626;
  --bg-card: #151f36;
  --bg-card-hover: #1b2846;
  --bg-card-elevated: #1e2c4d;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(16, 185, 129, 0.3);

  /* Financial Accents */
  --emerald: #10b981;
  --emerald-light: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.2);

  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.2);

  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --blue-glow: rgba(59, 130, 246, 0.2);

  --rose: #f43f5e;
  --rose-light: #fb7185;
  --rose-glow: rgba(244, 63, 94, 0.2);

  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-glow: rgba(139, 92, 246, 0.2);

  --cyan: #06b6d4;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Fonts */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--emerald-glow);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 90px; /* Space for bottom nav on mobile */
  overflow-x: hidden;
}

/* Container */
.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 30px;
}

/* Top App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(15, 22, 38, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  position: sticky;
  top: 10px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

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

.brand-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--emerald-glow);
}

.brand-icon-wrapper svg {
  width: 26px;
  height: 26px;
  color: #ffffff;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--emerald-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-subtitle .dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status Pill */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.status-badge.sync-ok {
  color: var(--emerald-light);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.status-badge.sync-working {
  color: var(--gold-light);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

/* Quick Action Buttons */
.btn-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-quick-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-quick-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-quick-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-quick-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

/* Navigation Tabs (Top & Mobile Bottom) */
.nav-container {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-item {
  flex: 1;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: #ffffff;
  background: var(--bg-card-elevated);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-strong);
}

.nav-item.active svg {
  color: var(--emerald-light);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

/* Views Management */
.view-section {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Layout */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 20px;
  height: 20px;
}

/* Hero Balance Card */
.hero-card {
  background: linear-gradient(135deg, #0d1e38 0%, #0d2729 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  position: relative;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-balance-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--emerald-light);
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-balance-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.sub-balances-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.sub-balance-item {
  flex: 1;
  min-width: 130px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.sub-balance-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.sub-balance-amount {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Stat Box Component */
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-box.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-card) 100%);
}

.stat-box.highlight-gold {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-card) 100%);
}

.stat-box.highlight-blue {
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, var(--bg-card) 100%);
}

.stat-box.highlight-rose {
  border-color: rgba(244, 63, 94, 0.3);
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.06) 0%, var(--bg-card) 100%);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-footer {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Advisor Callout Box */
.advisor-card {
  background: linear-gradient(135deg, #181c38 0%, #111a2e 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 4px 20px var(--purple-glow);
}

.advisor-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.advisor-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advisor-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Smart Allocation Waterfall Preview */
.allocation-preview {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 14px 0;
}

.alloc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.alloc-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.alloc-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alloc-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-light);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-light);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.alloc-amount {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

/* Progress Bars */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.fill-emerald { background: linear-gradient(90deg, #059669, #10b981); }
.fill-gold { background: linear-gradient(90deg, #d97706, #f59e0b); }
.fill-blue { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.fill-rose { background: linear-gradient(90deg, #e11d48, #f43f5e); }
.fill-purple { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }

/* Sabbath / Saturday Rest Notice */
.sabbath-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--blue-light);
}

/* Transaction List & Table */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.tx-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  transform: translateX(2px);
}

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

.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tx-icon.income {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-light);
}

.tx-icon.expense {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-light);
}

.tx-icon.tithe {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
}

.tx-icon.savings {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-light);
}

.tx-icon.transfer {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-light);
}

.tx-details h5 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.tx-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tx-right {
  text-align: right;
}

.tx-amount {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

.tx-amount.pos { color: var(--emerald-light); }
.tx-amount.neg { color: var(--rose-light); }
.tx-amount.neutral { color: var(--gold-light); }

.tx-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s ease;
  margin-left: 8px;
}

.tx-delete-btn:hover {
  color: var(--rose-light);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.form-control-mono {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
}

select.form-control {
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--gold-glow);
}

.btn-gold:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--blue-glow);
}

.btn-blue:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--rose-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-block {
  width: 100%;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Fixed Payments Table / Grid */
.fixed-bills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.bill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.2s ease;
}

.bill-card.paid {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
}

.bill-card.pending {
  border-color: rgba(245, 158, 11, 0.3);
}

.bill-card.urgent {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.15);
}

.bill-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.bill-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.bill-due {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bill-amount {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  margin: 8px 0;
}

.bill-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 6px;
}

/* Charts & Visual Bars */
.chart-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

.weekly-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 160px;
  gap: 8px;
  padding: 10px 4px 0;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}

.bar-track {
  width: 100%;
  max-width: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px 6px 0 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bar-fill-income {
  width: 100%;
  background: linear-gradient(180deg, #10b981, #059669);
  border-radius: 6px 6px 0 0;
  transition: height 0.4s ease;
}

.bar-col.sabbath .bar-track {
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.3);
}

.bar-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bar-col.sabbath .bar-label {
  color: var(--blue-light);
}

/* Floating Action Button for Mobile */
.fab-btn {
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  box-shadow: 0 6px 20px var(--emerald-glow);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  transition: transform 0.2s ease;
}

.fab-btn:hover {
  transform: scale(1.08);
}

/* Projects & Sinking Funds Grid & Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-card) 100%);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

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

.project-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.project-title-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.project-title-box span {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.project-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 10px 0 4px;
}

.project-current-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
}

.project-target-val {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-daily-pace {
  font-size: 0.75rem;
  color: var(--emerald-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-project-action {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

/* Responsive Rules */
@media (max-width: 840px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-container {
    padding: 10px 10px 95px;
  }

  .grid-2, .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero-balance-value {
    font-size: 2rem;
  }

  .nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-bottom: 0;
    border-radius: 0;
    border-top: 1px solid var(--border-strong);
    background: rgba(15, 22, 38, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    padding: 8px 12px;
    justify-content: space-around;
  }

  .nav-item {
    min-width: unset;
    flex-direction: column;
    gap: 3px;
    padding: 6px 4px;
    font-size: 0.72rem;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .fab-btn {
    display: flex;
  }

  .app-header {
    padding: 10px 14px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .btn-quick span {
    display: none;
  }
}
