/* ===== BASE & RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

:root {
  --theme-primary: #00E5A0;
  --theme-primary-2: #00C98B;
  --theme-primary-rgb: 0,229,160;
  --theme-secondary: #00D4FF;
  --theme-secondary-rgb: 0,212,255;
}

html[data-theme="blue"] {
  --theme-primary: #38bdf8;
  --theme-primary-2: #0ea5e9;
  --theme-primary-rgb: 56,189,248;
  --theme-secondary: #22d3ee;
  --theme-secondary-rgb: 34,211,238;
}

html[data-theme="pink"] {
  --theme-primary: #f472b6;
  --theme-primary-2: #ec4899;
  --theme-primary-rgb: 244,114,182;
  --theme-secondary: #fb7185;
  --theme-secondary-rgb: 251,113,133;
}

html[data-theme="purple"] {
  --theme-primary: #a78bfa;
  --theme-primary-2: #8b5cf6;
  --theme-primary-rgb: 167,139,250;
  --theme-secondary: #c084fc;
  --theme-secondary-rgb: 192,132,252;
}

html[data-theme="yellow"] {
  --theme-primary: #facc15;
  --theme-primary-2: #eab308;
  --theme-primary-rgb: 250,204,21;
  --theme-secondary: #f59e0b;
  --theme-secondary-rgb: 245,158,11;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="number"] { -moz-appearance: textfield; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0B1120; }
::-webkit-scrollbar-thumb { background: #243044; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #34d399; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 240px; z-index: 100;
  background: linear-gradient(180deg, #0d1220 0%, #0a0f1a 100%);
  border-right: 1px solid rgba(255,255,255,0.04);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar.open { transform: translateX(0); }
@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); }
}
.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.logo-wrapper { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.sidebar-nav { flex: 1; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; border-radius: 0.75rem;
  color: #94A3B8; font-size: 0.85rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.nav-link:hover { color: #e2e8f0; background: rgba(255,255,255,0.03); }
.nav-link.active {
  color: #00E5A0; background: rgba(0,229,160,0.08);
  box-shadow: inset 3px 0 0 #00E5A0;
}
.nav-link i { width: 20px; text-align: center; font-size: 0.9rem; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.04); }
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* ===== MAIN ===== */
.main-content {
  margin-left: 0; min-height: 100vh;
  padding: 0 1rem 2rem;
  transition: margin-left 0.3s;
}
@media (min-width: 1024px) {
  .main-content { margin-left: 240px; }
}
.mobile-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0; position: sticky; top: 0;
  background: rgba(6,9,16,0.85); backdrop-filter: blur(12px);
  z-index: 50; margin-bottom: 0.5rem;
}
@media (min-width: 1024px) {
  .mobile-header { display: none; }
}

/* ===== PAGES ===== */
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-header {
  display: none; align-items: center; justify-content: space-between;
  padding: 1.5rem 0 1rem;
}
@media (min-width: 1024px) {
  .page-header { display: flex; }
}

/* ===== CARDS ===== */
.card {
  background: linear-gradient(135deg, rgba(17,24,39,0.9) 0%, rgba(15,20,30,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-1px); }
.card-glow-green {
  border-color: rgba(0,229,160,0.15);
  box-shadow: 0 0 30px rgba(0,229,160,0.05), inset 0 1px 0 rgba(0,229,160,0.1);
}

/* ===== FORMS ===== */
.label {
  display: block; font-size: 0.7rem; font-weight: 600;
  color: #94A3B8; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.input-field {
  width: 100%; padding: 0.65rem 0.85rem;
  background: #111827; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.75rem; color: #fff;
  font-size: 0.85rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
  border-color: #00E5A0;
  box-shadow: 0 0 0 3px rgba(0,229,160,0.1);
}
.input-field::placeholder { color: #4B5563; }
select.input-field { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center;
  padding-right: 2.2rem;
}
select.input-field option { background: #111827; color: #fff; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(135deg, #00E5A0 0%, #00C98B 100%);
  color: #060910; font-weight: 700; font-size: 0.85rem;
  padding: 0.6rem 1.25rem; border-radius: 0.75rem; border: none;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0,229,160,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,229,160,0.3); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; border: 1px solid rgba(255,255,255,0.1);
  color: #94A3B8; font-weight: 500; font-size: 0.8rem;
  padding: 0.5rem 1rem; border-radius: 0.75rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { border-color: #00E5A0; color: #00E5A0; }
.btn-tab {
  padding: 0.5rem 1rem; border-radius: 0.6rem;
  font-size: 0.8rem; font-weight: 500; border: none;
  cursor: pointer; transition: all 0.2s;
  background: rgba(255,255,255,0.03); color: #94A3B8;
}
.btn-tab.active { background: rgba(0,229,160,0.12); color: #00E5A0; }

/* ===== FILTER TABS ===== */
.filter-tab {
  padding: 0.4rem 0.85rem; border-radius: 0.6rem;
  font-size: 0.75rem; font-weight: 600; border: none;
  cursor: pointer; transition: all 0.2s;
  background: transparent; color: #64748B;
  white-space: nowrap;
}
.filter-tab:hover { color: #94A3B8; }
.filter-tab.active { background: rgba(0,229,160,0.12); color: #00E5A0; }

/* ===== TX TYPE TOGGLE ===== */
.tx-type-btn {
  background: transparent; border: none; color: #94A3B8; cursor: pointer;
}
.tx-type-btn.active[data-type="expense"] {
  background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(220,38,38,0.15));
  color: #fca5a5;
}
.tx-type-btn.active[data-type="income"] {
  background: linear-gradient(135deg, rgba(0,229,160,0.25), rgba(0,201,139,0.15));
  color: #00E5A0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-track {
  width: 100%; height: 8px; border-radius: 8px;
  background: rgba(255,255,255,0.05); overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #00E5A0, #00D4FF);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.progress-bar-fill::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15));
  border-radius: 8px;
}
.progress-bar-fill.warning { background: linear-gradient(90deg, #FFA726, #FF7043); }
.progress-bar-fill.danger { background: linear-gradient(90deg, #FF5252, #D32F2F); }

/* ===== FAB ===== */
.fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 80;
  width: 56px; height: 56px; border-radius: 16px; border: none;
  background: linear-gradient(135deg, #00E5A0 0%, #00D4FF 100%);
  color: #060910; font-size: 1.4rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,229,160,0.3);
  transition: all 0.2s;
}
.fab:hover { transform: scale(1.08) rotate(90deg); box-shadow: 0 6px 30px rgba(0,229,160,0.4); }
@media (min-width: 1024px) {
  .fab { bottom: 2rem; right: 2rem; }
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}
.modal-content {
  background: linear-gradient(180deg, #131B2E 0%, #0d1220 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 1.5rem;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
@media (min-width: 640px) {
  /* Keep modal open transition smooth without a noticeable zoom */
  .modal-content { border-radius: 1.25rem; transform: translateY(20px) scale(1); }
  .modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
}

/* ===== TRANSACTION ITEMS ===== */
.tx-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem; border-radius: 0.85rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  transition: all 0.2s; cursor: default;
}
.tx-item:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.06); }
.tx-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.tx-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}
.tx-actions {
  display: flex; gap: 0.25rem; transition: opacity 0.2s;
}
.tx-actions button {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: rgba(255,255,255,0.04); color: #94A3B8;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}
.tx-actions button:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ===== BILL ITEMS ===== */
.bill-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem; border-radius: 0.85rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  transition: all 0.2s;
}
.bill-item:hover { background: rgba(255,255,255,0.04); }
.bill-check {
  width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
  background: transparent; color: transparent; font-size: 0.7rem;
}
.bill-check.paid {
  background: #00E5A0; border-color: #00E5A0; color: #060910;
}
.bill-item.paid-item { opacity: 0.6; }

/* ===== CHARTS ===== */
.chart-container { position: relative; height: 200px; }
.chart-container-bar { position: relative; height: 180px; }
.chart-container canvas,
.chart-container-bar canvas { width: 100% !important; }

/* ===== CATEGORY BAR ===== */
.cat-bar-track {
  height: 6px; border-radius: 6px;
  background: rgba(255,255,255,0.04); overflow: hidden;
}
.cat-bar-fill {
  height: 100%; border-radius: 6px;
  transition: width 0.6s ease;
}

/* ===== COLOR STATES ===== */
.balance-green { color: #34d399; }
.balance-orange { color: #FFA726; }
.balance-red { color: #FF5252; }

/* ===== DATE GROUPING ===== */
.date-group-header {
  font-size: 0.7rem; font-weight: 600; color: #64748B;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.5rem 0; margin-top: 0.5rem;
}

/* ===== NUMBER ANIMATION ===== */
.num-animate {
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ===== PULSE DOT ===== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #00E5A0; animation: pulse 2s infinite;
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%);
  background: #1A2332; color: #fff; padding: 0.75rem 1.5rem;
  border-radius: 0.75rem; font-size: 0.8rem; font-weight: 500;
  border: 1px solid rgba(0,229,160,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  z-index: 300; opacity: 0; transition: opacity 0.3s;
}
.toast.visible { opacity: 1; }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #243044; border-radius: 24px; transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: #94A3B8;
  border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #00E5A0; }
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px); background: #060910;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 2rem 1rem; color: #4B5563;
}
.empty-state i { font-size: 2rem; margin-bottom: 0.75rem; display: block; color: #374151; }

/* ===== LOADING BAR ===== */
.splash-loader {
  width: 120px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.06); overflow: hidden;
  margin: 0 auto;
}
.splash-loader-bar {
  width: 40%; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #00E5A0, #00D4FF);
  animation: splashSlide 1s ease infinite;
}
@keyframes splashSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ===== PIN SCREEN ===== */
.pin-screen {
  min-height: 100vh;
  background: #060910;
  display: flex; align-items: center; justify-content: center;
}
.pin-container { text-align: center; padding: 2rem; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.pin-logo {
  width: 180px; height: 100px; border-radius: 28px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 0.1rem;
}
.pin-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 28px;
}
#pin-message {
  margin-top: -0.2rem;
}
.pin-dots {
  display: flex; gap: 14px; justify-content: center; margin-bottom: 2rem;
}
.pin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.pin-dot.filled {
  background: #00E5A0; border-color: #00E5A0;
  box-shadow: 0 0 10px rgba(0,229,160,0.4);
}
.pin-dot.error {
  background: #FF5252; border-color: #FF5252;
  box-shadow: 0 0 10px rgba(255,82,82,0.4);
}
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; max-width: 260px; margin: 0 auto;
}
.pin-key {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff; font-size: 1.4rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.pin-key:hover { background: rgba(255,255,255,0.08); }
.pin-key:active { transform: scale(0.92); background: rgba(0,229,160,0.15); }
.pin-key-empty { visibility: hidden; }
@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.pin-shake { animation: pinShake 0.4s ease; }

/* ===== MONTH NAVIGATION ===== */
.month-nav-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #94A3B8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-size: 0.85rem;
}
.month-nav-btn:hover { background: rgba(0,229,160,0.1); color: #00E5A0; border-color: rgba(0,229,160,0.2); }

/* ===== TREND INDICATORS ===== */
.trend-up { color: #FF5252; }
.trend-down { color: #34d399; }
.trend-neutral { color: #64748B; }
.trend-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.7rem; font-weight: 600;
  padding: 2px 6px; border-radius: 6px;
}
.trend-badge.worse { background: rgba(255,82,82,0.15); color: #FF5252; }
.trend-badge.better { background: rgba(52,211,153,0.15); color: #34d399; }
.trend-badge.same { background: rgba(100,116,139,0.15); color: #94A3B8; }

/* ===== RECURRING INCOME ROW ===== */
.recurring-row {
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.5rem; border-radius: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.recurring-row input, .recurring-row select {
  flex: 1; min-width: 0;
}

/* ===== NOTIFICATION BELL ===== */
.notif-bell {
  position: relative; background: none; border: none;
  color: #94A3B8; font-size: 1.1rem; cursor: pointer;
  transition: all 0.2s; padding: 4px;
}
.notif-bell:hover { color: #FFA726; }
.notif-bell.has-notif { color: #FFA726; }
.notif-bell-desktop {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
}
.notif-bell-desktop:hover { background: rgba(255,166,38,0.1); border-color: rgba(255,166,38,0.2); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: #FF5252; color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
  box-shadow: 0 2px 8px rgba(255,82,82,0.4);
  animation: pulse 2s infinite;
}
.notif-badge-inline {
  min-width: 18px; height: 18px; border-radius: 9px;
  background: #FF5252; color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1; margin-left: 4px;
}
@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(2deg); }
}
.notif-bell.has-notif i { animation: bellRing 1s ease 0s 1; }

/* ===== ALERT BANNER ===== */
.alert-banner {
  border-radius: 0.85rem; padding: 0.75rem 1rem;
  margin-bottom: 0.75rem; cursor: pointer;
  display: flex; align-items: center; gap: 0.75rem;
  transition: all 0.2s; font-size: 0.8rem; font-weight: 500;
}
.alert-banner:hover { transform: translateY(-1px); }
.alert-banner.alert-red {
  background: linear-gradient(135deg, rgba(255,82,82,0.15), rgba(211,47,47,0.08));
  border: 1px solid rgba(255,82,82,0.2); color: #fca5a5;
}
.alert-banner.alert-amber {
  background: linear-gradient(135deg, rgba(255,167,38,0.15), rgba(245,124,0,0.08));
  border: 1px solid rgba(255,167,38,0.2); color: #fcd34d;
}
.alert-banner.alert-blue {
  background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(6,182,212,0.06));
  border: 1px solid rgba(34,211,238,0.15); color: #a5f3fc;
}

/* ===== NOTIFICATION ITEMS ===== */
.notif-item {
  padding: 0.85rem; border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: flex-start; gap: 0.75rem;
}
.notif-item.notif-overdue {
  background: rgba(255,82,82,0.06);
  border-color: rgba(255,82,82,0.12);
}
.notif-item.notif-today {
  background: rgba(255,167,38,0.06);
  border-color: rgba(255,167,38,0.12);
}
.notif-item.notif-upcoming {
  background: rgba(34,211,238,0.06);
  border-color: rgba(34,211,238,0.12);
}
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}

/* ===== BILL CALENDAR ===== */
.bill-calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-header {
  font-size: 0.45rem; font-weight: 600; color: #4B5563;
  text-align: center; padding: 2px 0; text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1; border-radius: 4px; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.5rem; font-weight: 500; color: #4B5563;
  position: relative; transition: all 0.15s; line-height: 1;
}
.cal-day.today { color: #fff; font-weight: 700; }
.cal-day.today::after {
  content: ''; position: absolute; bottom: 1px;
  width: 3px; height: 3px; border-radius: 50%; background: #00E5A0;
}
.cal-day.empty { visibility: hidden; }
.cal-day.has-bill { background: rgba(255,166,38,0.15); color: #FFA726; font-weight: 700; }
.cal-day.has-bill.all-paid { background: rgba(52,211,153,0.15); color: #34d399; }

/* ===== SAVINGS GOAL COLOR PICKER ===== */
.sg-color-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: all 0.15s;
}
.sg-color-btn:hover { transform: scale(1.15); }
.sg-color-btn.active { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.2); }

/* ===== CATEGORY BUDGET ROW ===== */
.cat-budget-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem; border-radius: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.cat-budget-row.disabled { opacity: 0.4; }

/* ===== RESPONSIVE TWEAKS ===== */
@media (min-width: 1024px) {
  .main-content { padding: 0 2rem 2rem; }
}
@media (max-width: 639px) {
  .modal-content { max-height: 85vh; }
  /* Prevent iOS Safari focus-zoom (it zooms when form controls are "too small"). */
  .modal-content {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .modal-content input,
  .modal-content textarea,
  .modal-content select {
    font-size: 16px !important;
    line-height: 1.2;
  }
}

/* ===== THEME ACCENT OVERRIDES ===== */
::-webkit-scrollbar-thumb:hover { background: var(--theme-primary); }
.logo-icon { background: transparent; }
.nav-link.active {
  color: var(--theme-primary);
  background: rgba(var(--theme-primary-rgb), 0.08);
  box-shadow: inset 3px 0 0 var(--theme-primary);
}
.card-glow-green {
  border-color: rgba(var(--theme-primary-rgb), 0.18);
  box-shadow: 0 0 30px rgba(var(--theme-primary-rgb), 0.08), inset 0 1px 0 rgba(var(--theme-primary-rgb), 0.12);
}
.input-field:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.12);
}
.btn-primary {
  background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-2) 100%);
  box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.24);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(var(--theme-primary-rgb), 0.34); }
.btn-outline:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.btn-tab.active { background: rgba(var(--theme-primary-rgb), 0.12); color: var(--theme-primary); }
.filter-tab.active { background: rgba(var(--theme-primary-rgb), 0.12); color: var(--theme-primary); }
.tx-type-btn.active[data-type="income"] {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.25), rgba(var(--theme-primary-rgb), 0.15));
  color: var(--theme-primary);
}
.progress-bar-fill { background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); }
.fab {
  background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
  box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.3);
}
.fab:hover { box-shadow: 0 6px 30px rgba(var(--theme-primary-rgb), 0.42); }
.bill-check.paid { background: var(--theme-primary); border-color: var(--theme-primary); }
.pulse-dot { background: var(--theme-primary); }
.toast { border-color: rgba(var(--theme-primary-rgb), 0.25); }
.toggle-switch input:checked + .toggle-slider { background: var(--theme-primary); }
.splash-loader-bar { background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); }
.pin-logo { background: transparent; }
.pin-dot.filled {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  box-shadow: 0 0 10px rgba(var(--theme-primary-rgb), 0.45);
}
.pin-key:active { background: rgba(var(--theme-primary-rgb), 0.15); }
.month-nav-btn:hover {
  background: rgba(var(--theme-primary-rgb), 0.1);
  color: var(--theme-primary);
  border-color: rgba(var(--theme-primary-rgb), 0.25);
}
.cal-day.today::after { background: var(--theme-primary); }
.cal-day.has-bill.all-paid { background: rgba(var(--theme-primary-rgb), 0.15); color: var(--theme-primary); }

/* Tailwind utility overrides so accent updates app-wide */
.text-neon-400, .text-neon-500, .text-neon-600 { color: var(--theme-primary) !important; }
.text-cyan-400, .text-cyan-500 { color: var(--theme-secondary) !important; }
.text-neon-400\/90 { color: rgba(var(--theme-primary-rgb), 0.9) !important; }
.bg-neon-500 { background-color: var(--theme-primary) !important; }
.bg-neon-600 { background-color: var(--theme-primary-2) !important; }
.bg-neon-500\/10 { background-color: rgba(var(--theme-primary-rgb), 0.10) !important; }
.bg-neon-500\/15 { background-color: rgba(var(--theme-primary-rgb), 0.15) !important; }
.bg-neon-500\/20 { background-color: rgba(var(--theme-primary-rgb), 0.20) !important; }
.bg-neon-500\/30 { background-color: rgba(var(--theme-primary-rgb), 0.30) !important; }
.border-neon-500 { border-color: var(--theme-primary) !important; }
.hover\:text-neon-400:hover, .hover\:text-neon-500:hover { color: var(--theme-primary) !important; }
.hover\:text-cyan-400:hover, .hover\:text-cyan-500:hover { color: var(--theme-secondary) !important; }
.hover\:bg-neon-500\/20:hover { background-color: rgba(var(--theme-primary-rgb), 0.20) !important; }
.hover\:bg-neon-500\/25:hover { background-color: rgba(var(--theme-primary-rgb), 0.25) !important; }
.hover\:bg-neon-500\/30:hover { background-color: rgba(var(--theme-primary-rgb), 0.30) !important; }
.from-neon-500 {
  --tw-gradient-from: var(--theme-primary) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(var(--theme-primary-rgb), 0) var(--tw-gradient-to-position) !important;
}
.to-neon-600 { --tw-gradient-to: var(--theme-primary-2) var(--tw-gradient-to-position) !important; }
.to-cyan-500 { --tw-gradient-to: var(--theme-secondary) var(--tw-gradient-to-position) !important; }

/* Settings: collapsible category sections */
.settings-collapse.is-collapsed .settings-collapse-panel { display: none; }
.settings-collapse.is-collapsed .settings-collapse-chevron { transform: rotate(-90deg); }
.settings-collapse:not(.is-collapsed) .settings-collapse-chevron { transform: rotate(0deg); }
.settings-collapse-chevron { transition: transform 0.2s ease; }
