/* ==============================================================
   ZULUINFOR — DESIGN SYSTEM GLOBAL
   Cargar este archivo PRIMERO en todas las páginas del proyecto.
   Provee: tokens de diseño, reset, tipografía, scrollbar y
   utilidades compartidas (alerts, badges, accent).
   ============================================================== */

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* Marca */
  --primary:       #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-ring:  rgba(37, 99, 235, 0.12);

  /* Semánticos */
  --success: #10b981;
  --danger:  #ef4444;
  --warning: #f59e0b;

  /* Neutros */
  --dark:   #0f172a;
  --slate:  #64748b;
  --muted:  #94a3b8;
  --border: #e2e8f0;

  /* Superficies */
  --bg:      #f8fafc;
  --bg-card: #ffffff;

  /* Elevación */
  --shadow:    0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.10);

  /* Radios */
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* Layout */
  --nav-h: 60px;
}

/* ── BASE RESET ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--slate); }

/* ── LOGO / MARCA ───────────────────────────────────────────── */
/* "Zulu" oscuro + "Infor" azul en todas las páginas */
.accent-text { color: var(--primary); }

/* ── ALERTAS ────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--primary-light); color: var(--primary); border: 1px solid #bfdbfe; }

/* ── BADGES ─────────────────────────────────────────────────── */
.bdg {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.bdg-green  { background: #d1fae5; color: #065f46; }
.bdg-red    { background: #fee2e2; color: #991b1b; }
.bdg-orange { background: #fef3c7; color: #92400e; }
.bdg-gray   { background: #f1f5f9; color: var(--slate); border: 1px solid var(--border); }
.bdg-blue   { background: var(--primary-light); color: var(--primary); border: 1px solid #bfdbfe; }
.bdg-purple { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }

/* ── MODAL BASE ─────────────────────────────────────────────── */
.modal-zulu {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-zulu.open { display: flex; }
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  animation: modalSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.modal-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3  { margin: 0; font-size: 16px; font-weight: 800; color: var(--dark); }
.close-modal      { cursor: pointer; font-size: 22px; color: var(--slate); transition: color 0.2s; line-height: 1; }
.close-modal:hover { color: var(--dark); }
.modal-body       { padding: 20px 24px; overflow-y: auto; flex: 1; }

/* scroll fino dentro de modal */
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border: none; border-radius: 4px; }

/* ── ANIMACIÓN SPIN ─────────────────────────────────────────── */
@keyframes fa-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
