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

:root {
  --navy: #012169;
  --navy-light: #003da5;
  --accent: #c8102e;
  --accent-dark: #a00d24;
  --surface: #f5f6f8;
}

body { overflow-x: hidden; }

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

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

@keyframes countUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes checkmark {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(-45deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

.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: slideInLeft 0.3s ease-out both; }
.animate-count { animation: countUp 0.5s ease-out both; }
.animate-check { animation: checkmark 0.6s ease-out both; }
.animate-toast-in { animation: toastIn 0.35s ease-out both; }
.animate-toast-out { animation: toastOut 0.3s ease-in both; }

.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: 4px;
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.sidebar-item {
  transition: all 0.15s ease;
}

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

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(0,61,165,0.15);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

.toggle-switch {
  width: 44px; height: 24px;
  background: #ccc; border-radius: 12px;
  position: relative; cursor: pointer;
  transition: background 0.3s;
}
.toggle-switch.active { background: var(--navy-light); }
.toggle-switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: white; border-radius: 50%;
  transition: transform 0.3s;
}
.toggle-switch.active::after { transform: translateX(20px); }

.utilization-bar {
  height: 8px; border-radius: 4px; background: #e5e7eb; overflow: hidden;
}
.utilization-fill {
  height: 100%; border-radius: 4px; transition: width 0.8s ease-out;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--navy); z-index: 50;
    display: flex; justify-content: space-around;
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
  }
}