:root {
  --primary: #012169;
  --primary-light: #0a3a8a;
  --secondary: #0056b3;
  --accent-red: #C41230;
  --accent-red-dark: #a00f28;
  --bg: #F4F4F4;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --border: #E5E7EB;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

.dark {
  --primary: #0a3a8a;
  --primary-light: #1a4faa;
  --bg: #0f1724;
  --card: #1a2438;
  --text: #E5E7EB;
  --text-secondary: #9CA3AF;
  --border: #2d3a4f;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.4);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-press:active {
  transform: scale(0.98);
}

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

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.stagger-1 { animation-delay: 0.05s; opacity: 0; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes skeleton {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 0px, #f0f0f0 40px, var(--border) 80px);
  background-size: 200px 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.dark .skeleton {
  background: linear-gradient(90deg, #2d3a4f 0px, #3d4f6f 40px, #2d3a4f 80px);
  background-size: 200px 100%;
}

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

@keyframes circle-draw {
  0% { stroke-dashoffset: 166; }
  100% { stroke-dashoffset: 0; }
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: circle-draw 0.6s ease forwards;
}

.checkmark-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkmark-draw 0.4s 0.4s ease forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.toast-enter {
  animation: slideInRight 0.3s ease forwards;
}

.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideDrawer {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.drawer-enter {
  animation: slideDrawer 0.3s ease forwards;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #4a5568;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}