/* ═══════════════════════════════════════════════════════
   FINANZAS — Glassmorphism Light
   Paleta: Índigo frío + blanco translúcido + acentos violeta
   ═══════════════════════════════════════════════════════ */

:root {
  /* Base */
  --bg-base: #eef2ff;
  --bg-base-2: #e0e7ff;

  /* Glass */
  --glass-bg: rgba(255,255,255,0.55);
  --glass-bg-strong: rgba(255,255,255,0.75);
  --glass-border: rgba(255,255,255,0.8);
  --glass-shadow: 0 8px 32px rgba(99,102,241,0.12), 0 2px 8px rgba(99,102,241,0.06);
  --glass-shadow-hover: 0 16px 48px rgba(99,102,241,0.18), 0 4px 16px rgba(99,102,241,0.1);

  /* Colores */
  --indigo: #4f46e5;
  --indigo-light: #6366f1;
  --violet: #7c3aed;
  --violet-light: #8b5cf6;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;

  /* Semánticos */
  --success: #059669;
  --success-bg: rgba(5,150,105,0.1);
  --warning: #d97706;
  --warning-bg: rgba(217,119,6,0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220,38,38,0.1);
  --info: #2563eb;
  --info-bg: rgba(37,99,235,0.1);

  /* Texto */
  --text-primary: #1e1b4b;
  --text-secondary: #4338ca;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;

  /* Tipografía */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Espaciado */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Layout */
  --sidebar-w: 220px;
  --topbar-h: 60px;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── FONDO ──────────────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #c7d2fe 0%, transparent 70%);
  top: -200px; left: -100px;
  animation: orb-float 20s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #ddd6fe 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: orb-float 25s ease-in-out infinite reverse;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #e0e7ff 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orb-float 18s ease-in-out infinite 5s;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ─── GLASS ──────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}
.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

/* ─── LAYOUT ─────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sidebar-header {
  padding: 20px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(99,102,241,0.1);
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon { font-size: 20px; }
.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--indigo);
  letter-spacing: -0.3px;
}
.sidebar-close {
  display: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.sidebar-close:hover { background: var(--purple-100); }

.nav-section {
  padding: 12px 10px 4px;
}
.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.8px;
  padding: 0 8px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--purple-100);
  color: var(--indigo);
}
.nav-item.active {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-personas {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(99,102,241,0.1);
}

/* ─── OVERLAY MOBILE ─────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30,27,75,0.4);
  backdrop-filter: blur(4px);
  z-index: 99;
}

/* ─── TOPBAR ─────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
}
.menu-btn {
  display: none;
  font-size: 20px;
  color: var(--indigo);
  padding: 6px;
  border-radius: var(--radius-sm);
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fecha-hoy {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.badge-alertas {
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ─── MAIN CONTENT ───────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.view-container {
  flex: 1;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* ─── VIEWS ──────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--glass-shadow-hover); }
.card-sm { padding: 14px 16px; }
.card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.card-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -1px;
}
.card-value.sm { font-size: 20px; }
.card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── GRIDS ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ─── SECTION HEADERS ────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── BOTONES ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79,70,229,0.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--purple-100);
  color: var(--indigo);
}
.btn-ghost:hover { background: var(--purple-200); }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(220,38,38,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; border-radius: 50%; }

/* ─── PROGRESS BARS ──────────────────────────────────── */
.progress-wrap {
  background: var(--purple-100);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--indigo) 0%, var(--violet-light) 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-bar.danger { background: linear-gradient(90deg, var(--danger) 0%, #f87171 100%); }
.progress-bar.success { background: linear-gradient(90deg, var(--success) 0%, #34d399 100%); }
.progress-bar.warning { background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%); }

/* ─── TAGS / PILLS ───────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.tag-indigo { background: var(--purple-100); color: var(--indigo); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }

/* ─── FORMS ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: var(--indigo-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236366f1' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-select:focus { border-color: var(--indigo-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,27,75,0.4);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
  margin-bottom: 16px;
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-close {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--purple-100); }
#modal-body { padding: 0 20px 20px; }

/* ─── ALERTAS BANNER ─────────────────────────────────── */
.alertas-banner {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  z-index: 150;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(220,38,38,0.9) 0%, rgba(185,28,28,0.9) 100%);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alertas-banner.hidden { display: none; }

/* ─── TOAST ──────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 300px;
  animation: toast-in 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--indigo); }
@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── DEUDA CARD ─────────────────────────────────────── */
.deuda-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s;
  margin-bottom: 10px;
}
.deuda-card:hover { box-shadow: var(--glass-shadow-hover); }
.deuda-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.deuda-nombre {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.deuda-persona {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.deuda-saldo {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-align: right;
}
.deuda-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.deuda-meta span { display: flex; align-items: center; gap: 4px; }

/* ─── TRACKER ITEMS ──────────────────────────────────── */
.gasto-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--glass-border);
  margin-bottom: 6px;
  transition: background 0.15s;
}
.gasto-item:hover { background: rgba(255,255,255,0.7); }
.gasto-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gasto-info { flex: 1; }
.gasto-desc { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.gasto-cat { font-size: 11px; color: var(--text-muted); }
.gasto-monto {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ─── PERSONA PILLS ──────────────────────────────────── */
.persona-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--purple-100);
  margin-bottom: 6px;
}
.persona-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.persona-info { flex: 1; }
.persona-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.persona-ingreso { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

/* ─── PLAN DE ATAQUE ─────────────────────────────────── */
.ataque-card {
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(79,70,229,0.08) 0%, rgba(124,58,237,0.06) 100%);
  border: 1px solid rgba(99,102,241,0.2);
  margin-bottom: 10px;
}
.ataque-prioridad {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.prioridad-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ataque-nombre { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ataque-razon { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── TIMELINE ───────────────────────────────────────── */
.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 11px; top: 24px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--indigo-light) 0%, transparent 100%);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  font-weight: 700;
}
.timeline-content { flex: 1; }
.timeline-mes { font-size: 12px; font-weight: 600; color: var(--indigo); margin-bottom: 2px; }
.timeline-desc { font-size: 13px; color: var(--text-primary); }

/* ─── HISTORIAL CHART PLACEHOLDER ───────────────────── */
.chart-wrap {
  height: 200px;
  background: rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  padding: 16px 8px 8px;
  gap: 6px;
  overflow: hidden;
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--indigo-light) 0%, var(--violet) 100%);
  min-height: 4px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.chart-label { font-size: 9px; color: var(--text-faint); font-family: var(--font-mono); }

/* ─── DIVIDER ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: rgba(99,102,241,0.1);
  margin: 16px 0;
}

/* ─── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-faint);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* ─── LOADING ────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--purple-200);
  border-top-color: var(--indigo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TABS ───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--purple-100);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.tab {
  flex: 1;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  transition: all 0.15s;
}
.tab.active {
  background: white;
  color: var(--indigo);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99,102,241,0.1);
}

/* ─── UTILITIES ──────────────────────────────────────── */
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: flex; }
  .sidebar-overlay.open { display: block; }
  .menu-btn { display: flex; }
  .main-content { margin-left: 0; }
  .alertas-banner { left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .view-container { padding: 16px; }
  .card-value { font-size: 20px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  .progress-bar { transition: none; }
}
