:root {
  --navy: #012169;
  --navy-dark: #001040;
  --red: #CC0000;
  --red-bright: #E31837;
  --white: #FFFFFF;
  --gray-bg: #F2F3F5;
  --gray-light: #E8E9EB;
  --gray-mid: #6B7280;
  --text-dark: #1A1A1A;
  --green: #0A8754;
  --green-light: #E6F4ED;
  --red-light: #FDE8E8;
  --blue-accent: #2B6CB0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.animate-fade { animation: fadeIn 0.4s ease-out both; }
.animate-fade-d1 { animation: fadeIn 0.4s ease-out 0.1s both; }
.animate-fade-d2 { animation: fadeIn 0.4s ease-out 0.2s both; }
.animate-fade-d3 { animation: fadeIn 0.4s ease-out 0.3s both; }
.animate-fade-d4 { animation: fadeIn 0.4s ease-out 0.4s both; }
.animate-slide { animation: slideIn 0.35s ease-out both; }
.animate-scale { animation: scaleIn 0.3s ease-out both; }
.animate-shake { animation: shake 0.5s ease-in-out; }

.skeleton {
  background: linear-gradient(90deg, #e8e9eb 25%, #f2f3f5 50%, #e8e9eb 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s ease-in-out infinite;
  border-radius: 6px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
}

.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(204,0,0,0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-secondary:hover {
  background: #01307a;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-outline:hover {
  background: var(--navy);
  color: white;
}

input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  font-family: inherit;
  font-size: 15px;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s;
  outline: none;
  background: white;
  color: var(--text-dark);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(1,33,105,0.08);
}

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 8px 16px;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.nav-link:hover { color: white; }

.nav-link.active {
  color: white;
  border-bottom-color: var(--red-bright);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
  animation: scaleIn 0.3s ease-out;
}

.sparkline-svg {
  display: block;
}

.transaction-row {
  transition: background 0.15s;
}
.transaction-row:hover {
  background: #f8f9fa;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* Mobile hamburger */
@media (max-width: 768px) {
  .desktop-nav { display: none !important; }
  .mobile-menu-btn { display: flex !important; }
}
@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
  .mobile-nav { display: none !important; }
}

.donut-segment {
  transition: opacity 0.2s;
}
.donut-segment:hover {
  opacity: 0.8;
}