/* design-system.css - DAVOS Uruguay */
/* Sistema de Diseño Unificado */
/* Mantiene estética monocromática sin bordes redondeados */

:root {
  /* ================================ */
  /* COLORES BASE */
  /* ================================ */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --surface: #1f1f1f;
  --surface-hover: #252525;
  --surface-active: #2a2a2a;
  
  --text-primary: #fafafa;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;
  
  --border: #2a2a2a;
  --border-strong: #404040;
  
  /* Estados */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Colores especiales para cards */
  --card-visits: #2563eb;
  --card-time: #059669;
  --card-km: #9333ea;
  --card-clients: #d97706;
  
  /* ================================ */
  /* TIPOGRAFÍA */
  /* ================================ */
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  
  /* Escala tipográfica */
  --font-2xs: 10px;
  --font-xs: 11px;
  --font-sm: 12px;
  --font-base: 14px;
  --font-md: 16px;
  --font-lg: 20px;
  --font-xl: 24px;
  
  /* Pesos */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line heights */
  --leading-tight: 1.2;
  --leading-base: 1.5;
  --leading-relaxed: 1.625;
  
  /* ================================ */
  /* ESPACIADO (Base 4px) */
  /* ================================ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* ================================ */
  /* INTERACCIÓN */
  /* ================================ */
  --touch-min: 44px;
  --touch-target: 48px;
  --touch-comfortable: 56px;
  
  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

/* ================================ */
/* RESET Y BASE */
/* ================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ================================ */
/* TIPOGRAFÍA UTILITIES */
/* ================================ */
.text-2xs { font-size: var(--font-2xs); }
.text-xs { font-size: var(--font-xs); }
.text-sm { font-size: var(--font-sm); }
.text-base { font-size: var(--font-base); }
.text-md { font-size: var(--font-md); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }

.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.uppercase { text-transform: uppercase; letter-spacing: 0.025em; }

/* ================================ */
/* COMPONENTES: BOTONES */
/* ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  background: var(--surface-active);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: var(--font-bold);
}

.btn-primary:hover:not(:disabled) {
  background: var(--text-secondary);
  border-color: var(--text-secondary);
}

.btn-danger {
  border-color: var(--error);
  color: var(--error);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
}

.btn-success {
  border-color: var(--success);
  color: var(--success);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  min-height: var(--touch-comfortable);
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-md);
}

/* ================================ */
/* COMPONENTES: CARDS */
/* ================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-5);
  transition: all var(--transition-fast);
}

.card-hover:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================ */
/* COMPONENTES: MODALES */
/* ================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--space-4);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-primary);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--space-16);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.modal-title {
  font-size: var(--font-md);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-primary);
}

.modal-close {
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 24px;
  margin: calc(var(--space-2) * -1);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

/* Modal fullscreen en móvil */
@media (max-width: 640px) {
  .modal {
    align-items: stretch;
    padding: 0;
  }
  
  .modal-content {
    max-width: none;
    max-height: none;
    height: 100%;
    border: none;
  }
}

/* ================================ */
/* COMPONENTES: INPUTS */
/* ================================ */
.input,
.select,
.textarea {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-md);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--info);
  background: var(--bg-secondary);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-tertiary);
}

.label {
  display: block;
  font-size: var(--font-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* ================================ */
/* COMPONENTES: LISTAS */
/* ================================ */
.list {
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.list-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--space-16);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--surface-hover);
}

.list-item:active {
  background: var(--surface-active);
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: var(--font-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-subtitle {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-action {
  margin-left: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ================================ */
/* COMPONENTES: BADGES */
/* ================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-2xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.3);
}

/* ================================ */
/* COMPONENTES: TOAST */
/* ================================ */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  min-width: 300px;
  max-width: 90%;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left-width: 4px;
  color: var(--text-primary);
  font-size: var(--font-base);
  line-height: var(--leading-base);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 2000;
  transition: all var(--transition-base);
}

.toast.show {
  display: block;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-left-color: var(--success);
  background: var(--bg-secondary);
}

.toast.error {
  border-left-color: var(--error);
  background: var(--bg-secondary);
}

.toast.warning {
  border-left-color: var(--warning);
  background: var(--bg-secondary);
}

.toast.info {
  border-left-color: var(--info);
  background: var(--bg-secondary);
}

/* ================================ */
/* UTILITIES: ESPACIADO */
/* ================================ */
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

.px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* ================================ */
/* UTILITIES: LAYOUT */
/* ================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ================================ */
/* UTILITIES: TEXTO */
/* ================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================ */
/* ACCESIBILIDAD */
/* ================================ */
*:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ================================ */
/* ANIMACIONES */
/* ================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

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

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-slideUp { animation: slideUp 0.3s ease-out; }
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }

/* ================================ */
/* MEDIA QUERIES */
/* ================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-color-scheme: light) {
  /* Opción para tema claro si lo necesitas más adelante */
}

/* ================================ */
/* COMPONENTES ESPECÍFICOS DAVOS */
/* ================================ */

/* Header con logo */
.davos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.davos-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* GPS Bar */
.gps-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--touch-min);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: var(--font-sm);
}

.gps-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.gps-indicator.active {
  background: var(--success);
}

.gps-indicator.inactive {
  background: var(--error);
}

/* Visit Status Card */
.visit-status {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  display: none;
}

.visit-status.active {
  display: block;
  border-left: 4px solid var(--warning);
}

/* Stats Cards */
.stat-card {
  padding: var(--space-5);
  text-align: center;
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card:active {
  transform: translateY(0);
}

.stat-value {
  font-size: var(--font-xl);
  font-weight: var(--font-regular);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* Checkbox mejorado para tareas */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.checkbox-wrapper:hover {
  background: var(--surface-hover);
}

.checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: var(--space-3);
  cursor: pointer;
  accent-color: var(--success);
}

.checkbox-wrapper label {
  flex: 1;
  cursor: pointer;
  font-size: var(--font-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.checkbox-wrapper input:checked + label {
  color: var(--success);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  color: var(--text-tertiary);
  font-size: var(--font-sm);
}

/* Spinner */
.spinner {
  border: 2px solid var(--border);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

/* ================================ */
/* PRINT STYLES */
/* ================================ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
}


/* ================================ */
/* DASHBOARD: MÉTRICAS MEJORADAS */
/* ================================ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    overflow: hidden;
}

.metric-card.primary {
    background: linear-gradient(135deg, #4a9eff 0%, #3a8edf 100%);
    color: white;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.metric-card.primary .metric-header {
    border-bottom-color: rgba(255,255,255,0.1);
    background: transparent;
}

.metric-header h3 {
    font-size: var(--font-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0;
}

.metric-card.primary .metric-header h3 {
    color: rgba(255,255,255,0.9);
}

.metric-body {
    padding: var(--space-5);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    text-align: center;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-value {
    font-size: var(--font-2xl);
    font-weight: var(--font-regular);
    margin-bottom: var(--space-1);
    line-height: 1;
}

.metric-label {
    font-size: var(--font-2xs);
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 0.025em;
}

/* Progress Bar */
.progress-container {
    padding: var(--space-5);
}

.progress-bg {
    width: 100%;
    height: 20px;
    background: var(--bg-primary);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    margin-top: var(--space-3);
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

/* Días de la semana */
.dias-container {
    display: flex;
    justify-content: space-around;
    padding: var(--space-4);
    height: 60px;
    align-items: flex-end;
}

.dia-barra {
    width: 30px;
    background: var(--primary);
    position: relative;
    min-height: 4px;
    transition: all 0.3s;
}

/* Alertas */
.alertas-container {
    max-height: 200px;
    overflow-y: auto;
    padding: var(--space-4);
}

.alerta-item {
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-2);
    border-left: 4px solid var(--warning);
    background: var(--bg-primary);
    font-size: var(--font-sm);
}

.alerta-item.urgente {
    border-left-color: var(--error);
}

/* Botón actualización */
.btn-update {
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-min);
    height: var(--touch-min);
}

.btn-update:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.btn-update.updating {
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-row {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }
}