/* ============================================================
   Ziemtinel · Intranet Admin — Diseño unificado con Portal v3
   Canvas oscuro premium, sidebar glassmórfico, workspace claro.
   Idéntico al portal en estructura visual; mismos tokens y efectos.
   ============================================================ */

@import url('/assets/css/estilo-base.css');

/* ─────────────────────────────────────────────────────────
   TOKENS — idénticos al portal
   ───────────────────────────────────────────────────────── */
:root {
  --app-bg:        #0a0d14;
  --sidebar-bg:    rgba(10, 6, 24, 0.92);
  --card-bg:       rgba(17, 24, 39, 0.75);
  --card-border:   rgba(255,255,255,0.07);
  --card-hover-bd: rgba(108,56,157,0.45);
  --text-main:     #e2e8f0;
  --text-muted:    #94a3b8;
  --text-dim:      #4b5563;
  --purple:        #6C389D;
  --purple-hi:     #8f4fc0;
  --purple-glow:   rgba(108,56,157,0.3);
  --purple-light:  #c084fc;
  --blue-glow:     rgba(3,105,161,0.25);
  /* legado light */
  --text-gray:     #64748b;
  --shadow-card:   0 1px 3px rgba(15,23,42,.06), 0 6px 20px rgba(15,23,42,.07);
  --shadow-hover:  0 4px 16px rgba(108,56,157,.14), 0 1px 4px rgba(15,23,42,.08);
}

/* ─────────────────────────────────────────────────────────
   KEYFRAMES
   ───────────────────────────────────────────────────────── */
@keyframes orb-a {
  0%,100% { transform:translate(0,0) scale(1); }
  33%      { transform:translate(40px,-55px) scale(1.1); }
  66%      { transform:translate(-28px,28px) scale(0.92); }
}
@keyframes orb-b {
  0%,100% { transform:translate(0,0) scale(1); }
  40%      { transform:translate(-55px,38px) scale(1.14); }
  70%      { transform:translate(32px,-24px) scale(0.9); }
}
@keyframes orb-c {
  0%,100% { transform:translate(0,0); }
  50%      { transform:translate(24px,48px); }
}
@keyframes grid-breathe {
  0%,100% { opacity:.04; }
  50%      { opacity:.09; }
}
@keyframes hex-spin {
  from { transform:rotate(0deg); }
  to   { transform:rotate(360deg); }
}
@keyframes scanline {
  0%   { top:-2%; }
  100% { top:102%; }
}
@keyframes fade-up {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes sidebar-stripe {
  0%,100% { background-position:0% 50%; }
  50%      { background-position:100% 50%; }
}

/* ─────────────────────────────────────────────────────────
   EFECTOS DE FONDO
   ───────────────────────────────────────────────────────── */
.orb { position:fixed; border-radius:50%; pointer-events:none; z-index:0; }
.orb-1 {
  width:700px; height:700px;
  background:radial-gradient(circle,rgba(108,56,157,.45),transparent 65%);
  top:-200px; left:-180px; filter:blur(90px);
  animation:orb-a 18s ease-in-out infinite;
}
.orb-2 {
  width:550px; height:550px;
  background:radial-gradient(circle,rgba(3,105,161,.35),transparent 65%);
  bottom:-160px; right:-140px; filter:blur(80px);
  animation:orb-b 22s ease-in-out infinite;
}
.orb-3 {
  width:400px; height:400px;
  background:radial-gradient(circle,rgba(143,79,192,.22),transparent 65%);
  top:40%; left:50%; filter:blur(100px);
  animation:orb-c 15s ease-in-out infinite;
}
.app-grid {
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(rgba(143,79,192,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,79,192,.06) 1px, transparent 1px);
  background-size:52px 52px;
  animation:grid-breathe 8s ease-in-out infinite;
}
.hex-ring {
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none; z-index:0;
}
.hex-ring svg { width:min(860px,95vw); height:min(860px,95vw); opacity:.03; animation:hex-spin 80s linear infinite; }
.scanline {
  position:fixed; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(143,79,192,.22),transparent);
  animation:scanline 9s linear infinite;
  pointer-events:none; z-index:1;
}

/* ─────────────────────────────────────────────────────────
   BASE
   ───────────────────────────────────────────────────────── */
body {
  background:var(--app-bg);
  color:var(--text-main);
  font-family:'Inter','Poppins',sans-serif;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4 { color:#f8fafc; }
a { color:var(--purple-light); }
a:hover { color:#e9d5ff; }

/* ─────────────────────────────────────────────────────────
   APP SHELL
   ───────────────────────────────────────────────────────── */
.admin-app {
  display:grid;
  grid-template-columns:272px 1fr;
  min-height:100vh;
  position:relative; z-index:1;
}
@media(max-width:900px) {
  .admin-app { grid-template-columns:1fr; }
  .admin-sidebar { position:relative; height:auto; }
}

/* ─────────────────────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────────────────────── */
.admin-sidebar {
  background:linear-gradient(160deg,#0c0418 0%,#100728 50%,#0a1220 100%);
  border-right:1px solid rgba(143,79,192,.2);
  position:sticky; top:0; height:100vh;
  overflow:hidden;                          /* el sidebar no scrollea — solo el nav interno */
  display:flex; flex-direction:column;
  box-shadow:4px 0 32px rgba(0,0,0,.4);
  z-index:10;
}

/* Franja de color superior */
.admin-sidebar::before {
  content:'';
  display:block; height:3px; flex-shrink:0;
  background:linear-gradient(90deg,#6C389D,#a855f7,#38bdf8,#6C389D);
  background-size:300% 100%;
  animation:sidebar-stripe 6s ease-in-out infinite;
}

/* Brand */
.admin-sidebar .brand {
  padding:13px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
  flex-shrink:0;
}
.admin-sidebar .brand a {
  display:flex; align-items:center; gap:10px; text-decoration:none;
}
.brand-icon-wrap {
  width:34px; height:34px; flex-shrink:0;
  border-radius:9px;
  background:rgba(108,56,157,.2);
  border:1px solid rgba(108,56,157,.35);
  display:flex; align-items:center; justify-content:center;
  padding:3px;
  box-shadow:0 0 14px rgba(108,56,157,.4), inset 0 0 8px rgba(108,56,157,.1);
}
.brand-icon-wrap img { width:22px; height:22px; filter:drop-shadow(0 0 7px rgba(108,56,157,.8)); }
.brand-text { display:flex; flex-direction:column; }
.brand-name {
  font-family:'Poppins',sans-serif;
  font-weight:900; font-size:14px;
  color:#fff; letter-spacing:-.3px; line-height:1;
}
.brand-sub {
  font-size:9px; font-weight:700;
  letter-spacing:2px; text-transform:uppercase;
  background:linear-gradient(135deg,#f97316,#ef4444);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
  display:block; margin-top:3px;
}

/* Nav — único elemento scrolleable dentro del sidebar */
.admin-sidebar nav {
  padding:5px 7px;
  display:flex; flex-direction:column; gap:1px;
  flex:1;
  overflow-y:auto; overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:rgba(108,56,157,.3) transparent;
}
.admin-sidebar nav a {
  color:rgba(255,255,255,.72);
  padding:6px 9px;
  border-radius:8px;
  font-size:12px; font-weight:500;
  display:flex; align-items:center; gap:8px;
  transition:all .17s;
  text-decoration:none;
  position:relative;
  letter-spacing:.01em;
}
.admin-sidebar nav a .nav-icon {
  width:24px; height:24px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  border-radius:6px;
  font-size:11px;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.13);
  transition:all .17s;
}
.admin-sidebar nav a .nav-label { flex:1; }
.admin-sidebar nav a .nav-badge {
  font-size:9.5px; font-weight:700;
  padding:1px 6px; border-radius:99px;
  background:rgba(239,68,68,.18); color:#fca5a5;
  border:1px solid rgba(239,68,68,.25);
  flex-shrink:0;
}
.admin-sidebar nav a.legacy {
  opacity:.55;
}
.admin-sidebar nav a:hover {
  color:rgba(255,255,255,.9);
  background:rgba(108,56,157,.14);
}
.admin-sidebar nav a:hover .nav-icon {
  background:rgba(108,56,157,.22);
  border-color:rgba(108,56,157,.35);
  color:#c084fc;
}
.admin-sidebar nav a.active {
  color:#fff;
  background:rgba(108,56,157,.22);
  font-weight:600;
}
.admin-sidebar nav a.active .nav-icon {
  background:linear-gradient(135deg,rgba(108,56,157,.55),rgba(143,79,192,.3));
  border-color:rgba(143,79,192,.5);
  color:#e9d5ff;
  box-shadow:0 0 10px rgba(108,56,157,.35);
}
.admin-sidebar nav a.active::before {
  content:'';
  position:absolute; left:0; top:20%; bottom:20%;
  width:3px; border-radius:0 3px 3px 0;
  background:linear-gradient(180deg,#f97316,#ef4444);
  box-shadow:0 0 8px rgba(249,115,22,.7);
}

/* Separador de sección en nav */
.nav-sep {
  height:1px; background:rgba(255,255,255,.05);
  margin:4px 8px;
}
.nav-sep-label {
  font-size:9px; font-weight:700; text-transform:uppercase;
  letter-spacing:.12em; color:rgba(255,255,255,.2);
  padding:5px 9px 2px; display:block;
}

/* User footer */
.sidebar-user {
  display:flex; align-items:center; gap:9px;
  padding:10px 14px;
  border-top:1px solid rgba(255,255,255,.06);
  flex-shrink:0;
}
.sidebar-user-avatar {
  width:30px; height:30px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,#f97316,#ef4444);
  display:flex; align-items:center; justify-content:center;
  font-family:'Poppins',sans-serif; font-weight:800; font-size:12px; color:#fff;
  box-shadow:0 0 12px rgba(249,115,22,.4);
}
.sidebar-user-info { flex:1; min-width:0; font-size:11px; }
.sidebar-user-info strong { display:block; color:#e2e8f0; font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user-info span  { display:block; color:#4b5563; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.sidebar-user-info a     { color:#fb923c; font-size:10px; text-decoration:none; display:inline-block; margin-top:2px; }
.sidebar-user-info a:hover { color:#fdba74; }

/* ─────────────────────────────────────────────────────────
   MAIN CONTENT — workspace claro (igual que portal)
   ───────────────────────────────────────────────────────── */
.admin-main {
  position:relative;
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(249,115,22,0.06), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(239,68,68,0.05), transparent 60%),
    radial-gradient(800px 400px at 50% 0%, rgba(108,56,157,0.07), transparent 55%),
    linear-gradient(180deg, #fbfaff 0%, #ffffff 40%, #f6f3ff 100%);
  color:#1f2937;
  min-height:100vh;
  padding:32px 40px;
  isolation:isolate;
  animation:fade-up .4s ease both;
}
@media(max-width:640px) { .admin-main { padding:20px 16px; } }

/* Textura de puntos */
.admin-main::before {
  content:"";
  position:absolute; inset:0;
  background-image:radial-gradient(rgba(108,56,157,0.07) 1px, transparent 1px);
  background-size:22px 22px;
  pointer-events:none; z-index:-1;
  mask-image:linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
  -webkit-mask-image:linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
}

/* Tipografía del workspace */
.admin-main h1,
.admin-main h2,
.admin-main h3,
.admin-main h4 { color:#1e1b4b; }
.admin-main p,
.admin-main li,
.admin-main td { color:#334155; }
.admin-main small,
.admin-main .meta { color:#64748b; }

/* Heading principal con gradient */
.admin-main > h1:first-child,
.admin-header h1 {
  font-family:'Poppins',sans-serif;
  font-size:26px; font-weight:800;
  background:linear-gradient(135deg,#1e1b4b 0%,#6C389D 70%,#c084fc 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
  margin:0 0 4px; letter-spacing:-.3px;
}

/* ─────────────────────────────────────────────────────────
   ADMIN HEADER BAR
   ───────────────────────────────────────────────────────── */
.admin-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:28px; padding-bottom:20px;
  border-bottom:1.5px solid rgba(108,56,157,.12);
}
.admin-header .meta {
  font-size:12.5px; color:#64748b; margin-top:6px;
  font-weight:500;
}
.admin-header .header-actions { display:flex; gap:10px; align-items:center; }

/* ── Page Hero — icono + título + descripción ── */
.page-hero {
  display:flex; align-items:flex-start; gap:16px;
}
.page-hero-icon {
  width:52px; height:52px; border-radius:14px; flex-shrink:0;
  background:linear-gradient(135deg,rgba(108,56,157,.1) 0%,rgba(192,132,252,.16) 100%);
  border:1.5px solid rgba(108,56,157,.18);
  display:flex; align-items:center; justify-content:center;
  font-size:22px; color:#6C389D;
  box-shadow:0 2px 12px rgba(108,56,157,.1);
}
.page-desc {
  font-size:13px; color:#64748b; margin:5px 0 0;
  font-weight:400; line-height:1.55; max-width:560px;
}

/* ─────────────────────────────────────────────────────────
   HELP FAB — botón flotante de ayuda contextual
   ───────────────────────────────────────────────────────── */
.help-fab {
  position:fixed; bottom:28px; right:28px; z-index:900;
  width:46px; height:46px; border-radius:50%;
  background:linear-gradient(135deg,#6C389D,#8f4fc0);
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:18px;
  box-shadow:0 4px 20px rgba(108,56,157,.5);
  transition:transform .18s, box-shadow .18s;
}
.help-fab:hover {
  transform:scale(1.1) translateY(-2px);
  box-shadow:0 8px 28px rgba(108,56,157,.65);
}
.help-fab:active { transform:scale(.97); }

/* ─────────────────────────────────────────────────────────
   HELP MODAL — FAQ contextual
   ───────────────────────────────────────────────────────── */
.help-overlay {
  position:fixed; inset:0; z-index:1000;
  background:rgba(10,13,20,.45); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none;
  transition:opacity .22s;
}
.help-overlay.open { opacity:1; pointer-events:all; }

.help-modal {
  position:fixed; bottom:84px; right:28px; z-index:1001;
  width:390px; max-width:calc(100vw - 40px);
  background:#ffffff; border-radius:18px;
  border:1.5px solid rgba(108,56,157,.15);
  box-shadow:0 20px 60px rgba(10,13,20,.16), 0 4px 16px rgba(108,56,157,.1);
  overflow:hidden;
  transform:translateY(16px) scale(.97); opacity:0; pointer-events:none;
  transition:transform .24s cubic-bezier(.34,1.56,.64,1), opacity .2s;
}
.help-modal.open {
  transform:translateY(0) scale(1); opacity:1; pointer-events:all;
}
.help-modal-header {
  padding:16px 20px 15px;
  background:linear-gradient(135deg,#1e1b4b 0%,#6C389D 100%);
  display:flex; align-items:center; gap:10px;
}
.help-modal-header h3 {
  margin:0; font-size:14px; font-weight:700; color:#fff;
  font-family:'Poppins',sans-serif; letter-spacing:-.2px;
}
.help-badge {
  font-size:10px; background:rgba(255,255,255,.18);
  border-radius:20px; padding:2px 9px; color:rgba(255,255,255,.88);
  font-weight:600; letter-spacing:.4px; text-transform:uppercase;
}
.help-modal-close {
  margin-left:auto; background:none; border:none; cursor:pointer;
  color:rgba(255,255,255,.65); font-size:16px; padding:2px;
  line-height:1; transition:color .15s;
}
.help-modal-close:hover { color:#fff; }

.help-modal-body {
  padding:16px 20px 20px;
  max-height:400px; overflow-y:auto;
}
.help-modal-body::-webkit-scrollbar { width:4px; }
.help-modal-body::-webkit-scrollbar-track { background:transparent; }
.help-modal-body::-webkit-scrollbar-thumb { background:rgba(108,56,157,.25); border-radius:4px; }

.faq-item {
  border-bottom:1px solid rgba(15,23,42,.06);
  padding:12px 0;
}
.faq-item:first-child { padding-top:4px; }
.faq-item:last-child { border-bottom:none; padding-bottom:0; }
.faq-q {
  font-size:13px; font-weight:600; color:#1e1b4b;
  margin:0 0 5px; display:flex; align-items:flex-start; gap:8px;
}
.faq-q::before {
  content:'?'; display:inline-flex; align-items:center; justify-content:center;
  width:18px; height:18px; min-width:18px; border-radius:50%;
  background:linear-gradient(135deg,#6C389D,#c084fc);
  color:#fff; font-size:10px; font-weight:800; margin-top:.5px;
}
.faq-a {
  font-size:12.5px; color:#475569; margin:0; line-height:1.55;
  padding-left:26px;
}

/* ─────────────────────────────────────────────────────────
   KPI GRID — mismo estilo que dashboard portal
   ───────────────────────────────────────────────────────── */
.kpi-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(188px,1fr));
  gap:14px; margin-bottom:28px;
}
.kpi-card {
  background:#ffffff;
  border:1px solid #ece9f5;
  border-radius:14px;
  padding:20px 22px;
  position:relative; overflow:hidden;
  box-shadow:0 1px 3px rgba(30,27,75,.04), 0 8px 24px -12px rgba(108,56,157,.15);
  transition:border-color .2s, box-shadow .2s, transform .2s;
}
.kpi-card:hover {
  border-color:rgba(108,56,157,.35);
  box-shadow:0 4px 20px rgba(108,56,157,.14);
  transform:translateY(-2px);
}
.kpi-card .num {
  font-family:'Poppins',sans-serif;
  font-size:34px; font-weight:900; line-height:1;
  margin-bottom:6px; color:#1e1b2e;
}
.kpi-card .label { font-size:12px; color:#64748b; font-weight:500; }
.kpi-card .kpi-stripe {
  position:absolute; bottom:0; left:0; right:0;
  height:3px; border-radius:0 0 14px 14px;
}
/* Icono decorativo */
.kpi-card .kpi-icon {
  position:absolute; top:16px; right:16px;
  width:36px; height:36px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; color:#fff; opacity:.9;
}

/* ─────────────────────────────────────────────────────────
   ADMIN TABLE
   ───────────────────────────────────────────────────────── */
.admin-table {
  width:100%; border-collapse:collapse;
  background:#ffffff;
  border:1px solid #ece9f5;
  border-radius:14px; overflow:hidden;
  box-shadow:0 1px 3px rgba(30,27,75,.04), 0 6px 20px -8px rgba(108,56,157,.1);
}
.admin-table th {
  background:#f7f4ff;
  color:#6C389D;
  padding:11px 15px; text-align:left;
  font-family:'Poppins',sans-serif;
  font-size:10.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.7px;
  border-bottom:1.5px solid #ece9f5;
}
.admin-table td {
  padding:11px 15px; text-align:left;
  font-size:13.5px; color:#334155;
  border-bottom:1px solid #f5f3ff;
}
.admin-table tbody tr { transition:background .13s; }
.admin-table tbody tr:hover { background:#faf8ff; }
.admin-table tr:last-child td { border-bottom:none; }
.admin-table strong { color:#1e1b2e; }
.admin-table small { color:#64748b; }

/* ─────────────────────────────────────────────────────────
   NORMA GROUP — acordeón
   ───────────────────────────────────────────────────────── */
.norma-group {
  margin-bottom:10px;
  border:1px solid #ece9f5;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 6px rgba(108,56,157,.05);
}
.norma-group-summary {
  display:flex; align-items:center;
  padding:14px 18px;
  cursor:pointer;
  background:linear-gradient(135deg,#faf5ff,#f5f0ff);
  user-select:none; list-style:none; gap:10px;
  border-bottom:1px solid transparent;
  transition:background .14s;
}
.norma-group-summary::-webkit-details-marker { display:none; }
.norma-group-summary::marker { display:none; }
.norma-group[open] > .norma-group-summary {
  background:linear-gradient(135deg,#f5f0ff,#ede9fe);
  border-bottom-color:#ede9fe;
}
.norma-group-summary:hover { background:linear-gradient(135deg,#f0ebff,#e9e4ff); }
.norma-chevron { flex-shrink:0; color:#c4b5fd; font-size:11px; transition:transform .2s; margin-left:auto; }
.norma-group[open] > .norma-group-summary .norma-chevron { transform:rotate(180deg); }
.norma-badge {
  font-size:11px; background:#ede9fe; color:#6C389D;
  padding:2px 9px; border-radius:20px; font-weight:600; white-space:nowrap;
}
.norma-inner-table { margin:0; border-radius:0; box-shadow:none; border:none; }
.norma-inner-table thead th { background:#fafbfd; }
.norma-group-body { background:#ffffff; }

/* ─────────────────────────────────────────────────────────
   CARD (genérico)
   ───────────────────────────────────────────────────────── */
.card {
  background:#ffffff;
  border:1px solid #ece9f5;
  border-radius:16px; padding:28px 32px;
  box-shadow:0 1px 3px rgba(30,27,75,.04), 0 8px 24px -12px rgba(108,56,157,.12);
}
.card h2 {
  font-family:'Poppins',sans-serif;
  font-size:18px; font-weight:700;
  color:#1e1b2e; margin-bottom:20px;
}
.card:hover {
  border-color:rgba(108,56,157,.3);
  box-shadow:0 2px 4px rgba(30,27,75,.06), 0 18px 38px -16px rgba(108,56,157,.2);
}

/* ─────────────────────────────────────────────────────────
   TAG BADGES
   ───────────────────────────────────────────────────────── */
.tag {
  display:inline-block; padding:3px 11px; border-radius:50px;
  font-size:11px; font-weight:700; letter-spacing:.04em;
}
.tag-pendiente  { background:#fff7ed; color:#b45309;  border:1px solid #fde68a; }
.tag-pagada     { background:#eff6ff; color:#1d4ed8;  border:1px solid #bfdbfe; }
.tag-entregada  { background:#ecfdf5; color:#047857;  border:1px solid #a7f3d0; }
.tag-fallida    { background:#fef2f2; color:#b91c1c;  border:1px solid #fecaca; }
.tag-cancelada  { background:#f1f5f9; color:#475569;  border:1px solid #e2e8f0; }

/* ─────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  font-family:'Poppins',sans-serif; font-weight:700; font-size:13px;
  padding:10px 20px; border:none; border-radius:10px;
  cursor:pointer; text-decoration:none;
  background:linear-gradient(135deg,var(--purple),var(--purple-hi));
  color:#fff !important;
  box-shadow:0 2px 10px rgba(108,56,157,.28);
  transition:all .17s;
}
.btn:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(108,56,157,.4); }
.btn-mini { padding:5px 12px; font-size:11.5px; border-radius:7px; }
.btn-sm   { padding:7px 14px; font-size:12px; border-radius:8px; }
.btn-danger {
  background:linear-gradient(135deg,#dc2626,#ef4444);
  box-shadow:0 2px 10px rgba(220,38,38,.28);
}
.btn-danger:hover { box-shadow:0 6px 20px rgba(220,38,38,.4); }
.btn-success {
  background:linear-gradient(135deg,#059669,#047857);
  box-shadow:0 2px 10px rgba(5,150,105,.28);
}
.btn-success:hover { box-shadow:0 6px 20px rgba(5,150,105,.4); }
.btn-outline {
  background:#ffffff;
  border:1.5px solid #d8b4fe;
  color:var(--purple) !important;
  box-shadow:none;
}
.btn-outline:hover {
  background:#f7f4ff;
  border-color:var(--purple-hi);
  box-shadow:none; transform:translateY(-1px);
}

/* ─────────────────────────────────────────────────────────
   ALERTS
   ───────────────────────────────────────────────────────── */
.alert {
  padding:14px 18px;
  border-radius:12px;
  margin-bottom:20px;
  font-size:14px; line-height:1.6;
  display:flex; align-items:flex-start; gap:12px;
}
.alert-error   { background:#fef2f2; color:#7f1d1d; border:1px solid rgba(239,68,68,.28); }
.alert-success { background:#f0fdf4; color:#14532d; border:1px solid rgba(34,197,94,.3); }
.alert-info    { background:#faf5ff; color:#4c1d95; border:1px solid rgba(108,56,157,.22); }
.alert-warn    { background:#fffbeb; color:#92400e; border:1px solid rgba(245,158,11,.3); }
.alert a  { color:inherit; font-weight:700; }
.alert code { background:rgba(108,56,157,.1); padding:1px 6px; border-radius:4px; font-size:.9em; }

/* ─────────────────────────────────────────────────────────
   FORMS
   ───────────────────────────────────────────────────────── */
.form-group { margin-bottom:16px; }
.form-group label {
  display:block; font-size:11.5px; font-weight:700;
  color:#374151; margin-bottom:6px;
  text-transform:uppercase; letter-spacing:.07em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width:100%; padding:10px 14px;
  font-family:inherit; font-size:14px;
  background:#ffffff;
  border:1.5px solid #e2e8f0;
  border-radius:10px; color:#1e293b;
  transition:border-color .18s, box-shadow .18s, background .18s;
  box-sizing:border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color:#94a3b8; font-weight:400;
}

/* Hover */
.form-group input:hover:not(:focus):not(:disabled),
.form-group select:hover:not(:focus):not(:disabled),
.form-group textarea:hover:not(:focus):not(:disabled) {
  border-color:#c4b5fd;
}

/* Focus */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline:none;
  border-color:var(--purple);
  background:#fdfbff;
  box-shadow:0 0 0 3px rgba(108,56,157,.12);
}

/* Select — chevron custom, sin apariencia nativa */
.form-group select {
  -webkit-appearance:none; 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='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 13px center;
  padding-right:36px;
  cursor:pointer;
}

/* Textarea — solo resize vertical */
.form-group textarea {
  resize:vertical; min-height:88px; line-height:1.55;
}

/* File input */
.form-group input[type="file"] {
  padding:8px 12px; cursor:pointer;
  color:#64748b; font-size:13px; line-height:1.4;
}
.form-group input[type="file"]::-webkit-file-upload-button {
  background:linear-gradient(135deg,#6C389D,#8f4fc0);
  color:#fff; border:none; border-radius:6px;
  padding:5px 13px; font-size:12.5px; font-weight:600;
  cursor:pointer; margin-right:10px;
  font-family:inherit; transition:opacity .15s;
}
.form-group input[type="file"]::-webkit-file-upload-button:hover { opacity:.85; }

/* Deshabilitado */
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background:#f8fafc; color:#94a3b8;
  border-color:#eef0f3; cursor:not-allowed;
}
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media(max-width:640px) { .grid-2 { grid-template-columns:1fr; } }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media(max-width:800px) { .grid-3 { grid-template-columns:1fr 1fr; } }
@media(max-width:480px) { .grid-3 { grid-template-columns:1fr; } }

/* ─────────────────────────────────────────────────────────
   SECTION HEADER (usado en vistas internas)
   ───────────────────────────────────────────────────────── */
.section-head {
  display:flex; align-items:center; justify-content:space-between;
  margin:28px 0 14px; gap:12px;
}
.section-head h2 {
  font-family:'Poppins',sans-serif; font-size:16px; font-weight:800;
  color:#1e1b2e; margin:0;
  display:flex; align-items:center; gap:10px;
}
.section-head h2 i { color:#7c3aed; font-size:15px; }

/* ─────────────────────────────────────────────────────────
   EMPTY STATE
   ───────────────────────────────────────────────────────── */
.empty-state {
  text-align:center; padding:48px 20px;
  color:#9ca3af;
}
.empty-state i { font-size:36px; display:block; margin-bottom:14px; color:#d8b4fe; }
.empty-state p { font-size:14px; margin:0; }

/* ─────────────────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────────────────── */
.text-center { text-align:center; }
.text-muted  { color:#6b7280; }
.text-purple { color:#6C389D; font-weight:700; }
.text-green  { color:#047857; font-weight:700; }
.text-red    { color:#b91c1c; font-weight:700; }
.mt-0 { margin-top:0; }    .mt-1 { margin-top:8px; }
.mt-2 { margin-top:16px; } .mt-3 { margin-top:24px; }
.mt-4 { margin-top:32px; }
.mb-0 { margin-bottom:0; } .mb-1 { margin-bottom:8px; }
.mb-2 { margin-bottom:16px; } .mb-3 { margin-bottom:24px; }
.gap-2 { gap:16px; }
.flex  { display:flex; }
.flex-center { display:flex; align-items:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
