/* =====================================================================
   ANMAX Telecomunicaciones - Sistema de Credenciales
   ESTILOS PREMIUM del panel administrativo y pantallas de acceso.
   Rediseno 2026: profundidad, glassmorphism, gradientes y micro-animaciones.
   Mobile-first sobre Bootstrap 5. Mismos nombres de clase (no rompe HTML).
   Las variables de paleta --anx-* las inyecta el layout desde settings.
   ===================================================================== */

:root {
  --anx-navy: #0d2340;
  --anx-primary: #1b75bc;
  --anx-blue-light: #2a9fd6;
  --anx-green: #7ac143;
  --anx-green-dark: #4caf1e;
  --anx-yellow: #d6df21;
  --anx-red: #e2231a;
  --anx-teal: #0f7d8c;

  /* Superficies y neutros (derivados, mas finos que el gris plano anterior) */
  --anx-bg: #eef2f8;
  --anx-bg-2: #e6ecf5;
  --anx-surface: #ffffff;
  --anx-surface-2: #f7fafd;
  --anx-border: #e4eaf2;
  --anx-border-soft: #eef2f8;
  --anx-text: #13233c;
  --anx-text-muted: #647689;

  /* Escala de radios y sombras */
  --anx-radius: 16px;
  --anx-radius-sm: 11px;
  --anx-radius-pill: 999px;
  --anx-sidebar-w: 256px;

  --anx-shadow-sm: 0 1px 2px rgba(13,35,64,.05), 0 2px 8px rgba(13,35,64,.05);
  --anx-shadow: 0 2px 6px rgba(13,35,64,.06), 0 12px 28px rgba(13,35,64,.08);
  --anx-shadow-lg: 0 10px 24px rgba(13,35,64,.10), 0 28px 60px rgba(13,35,64,.16);
  --anx-ring: 0 0 0 4px rgba(27,117,188,.18);

  /* Gradientes de marca */
  --anx-grad-primary: linear-gradient(135deg, var(--anx-primary), var(--anx-blue-light));
  --anx-grad-navy: linear-gradient(185deg, #123059 0%, var(--anx-navy) 55%, #091a31 100%);
  --anx-grad-green: linear-gradient(135deg, var(--anx-green), var(--anx-green-dark));

  --anx-ease: cubic-bezier(.22,.61,.36,1);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--anx-text);
  background:
    radial-gradient(1200px 600px at 100% -5%, rgba(42,159,214,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(122,193,67,.10), transparent 55%),
    var(--anx-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(27,117,188,.22); }

/* Scrollbar sutil */
* { scrollbar-width: thin; scrollbar-color: #c3cedd transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #c7d2e0; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #a9b8cc; background-clip: content-box; }

/* ------------------------------------------------------------------ */
/* Pantallas de acceso                                                 */
/* ------------------------------------------------------------------ */

.anx-auth-body {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(42,159,214,.30), transparent 42%),
    radial-gradient(circle at 82% 85%, rgba(122,193,67,.26), transparent 44%),
    radial-gradient(circle at 60% 50%, rgba(27,117,188,.18), transparent 60%),
    var(--anx-navy);
}

/* Aurora animada de fondo */
.anx-auth-body::before,
.anx-auth-body::after {
  content: "";
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .5;
  z-index: 0;
  animation: anxFloat 18s var(--anx-ease) infinite alternate;
}
.anx-auth-body::before { background: radial-gradient(circle, rgba(42,159,214,.5), transparent 70%); top: -20vmax; left: -15vmax; }
.anx-auth-body::after  { background: radial-gradient(circle, rgba(122,193,67,.42), transparent 70%); bottom: -22vmax; right: -16vmax; animation-delay: -7s; }

@keyframes anxFloat {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4vmax,3vmax,0) scale(1.15); }
}

.anx-auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.anx-auth-card {
  width: 100%;
  max-width: 424px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 22px;
  padding: 30px 28px;
  box-shadow: 0 30px 70px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.7);
  animation: anxRise .6s var(--anx-ease) both;
}

@keyframes anxRise {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.anx-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--anx-border);
}

.anx-auth-logo { width: 48px; height: auto; filter: drop-shadow(0 4px 10px rgba(13,35,64,.2)); }
.anx-auth-company { font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; }
.anx-auth-sub { font-size: 12px; color: var(--anx-text-muted); }

.anx-auth-title { font-size: 23px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.02em; }
.anx-auth-text { font-size: 13.5px; color: var(--anx-text-muted); margin-bottom: 20px; }

.anx-auth-links { margin-top: 18px; text-align: center; font-size: 13.5px; }
.anx-auth-links a { color: var(--anx-primary); text-decoration: none; font-weight: 600; }
.anx-auth-links a:hover { text-decoration: underline; }

.anx-auth-foot { margin-top: 22px; font-size: 12.5px; color: rgba(255,255,255,.75); text-align: center; position: relative; z-index: 1; }
.anx-auth-flashes .alert { font-size: 13.5px; border-radius: 12px; }

/* ------------------------------------------------------------------ */
/* Botones y elementos comunes                                         */
/* ------------------------------------------------------------------ */

.btn { border-radius: 11px; font-weight: 600; transition: transform .16s var(--anx-ease), box-shadow .2s, filter .2s; }
.btn:active { transform: translateY(1px) scale(.99); }

.anx-btn-primary {
  background: var(--anx-grad-primary);
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(27,117,188,.35);
}
.anx-btn-primary:hover,
.anx-btn-primary:focus {
  color: #fff;
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(27,117,188,.45);
  transform: translateY(-2px);
}

.btn-outline-secondary { border-color: var(--anx-border); color: var(--anx-text); }
.btn-outline-secondary:hover { background: var(--anx-surface-2); border-color: #cfd9e6; color: var(--anx-navy); }
.btn-outline-primary { color: var(--anx-primary); border-color: rgba(27,117,188,.5); }
.btn-outline-primary:hover { background: var(--anx-primary); border-color: var(--anx-primary); }

.form-control, .form-select {
  border-radius: 11px;
  border-color: var(--anx-border);
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--anx-primary);
  box-shadow: var(--anx-ring);
}

.anx-req { color: var(--anx-red); }

.anx-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 11px;
  border-radius: var(--anx-radius-pill);
  white-space: nowrap;
}

.anx-badge-activo { background: rgba(122,193,67,.18); color: #3d7a13; box-shadow: inset 0 0 0 1px rgba(122,193,67,.3); }
.anx-badge-suspendido { background: rgba(226,35,26,.14); color: #a3170f; box-shadow: inset 0 0 0 1px rgba(226,35,26,.26); }
.anx-badge-inactivo { background: rgba(13,35,64,.09); color: #445266; }
.anx-badge-tipo { background: rgba(27,117,188,.13); color: var(--anx-primary); }
.anx-badge-rol { background: rgba(15,125,140,.14); color: var(--anx-teal); }
.anx-badge-perm { background: rgba(27,117,188,.10); color: var(--anx-primary); margin: 0 4px 6px 0; }
.anx-badge-privado { background: rgba(214,223,33,.28); color: #6c7300; }
.anx-badge-accion { background: rgba(42,159,214,.14); color: var(--anx-teal); text-transform: capitalize; }

/* ------------------------------------------------------------------ */
/* Estructura del panel                                                */
/* ------------------------------------------------------------------ */

.anx-admin { min-height: 100vh; }

.anx-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--anx-sidebar-w);
  background: var(--anx-grad-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transform: translateX(-100%);
  transition: transform .28s var(--anx-ease);
  box-shadow: 8px 0 40px rgba(9,20,40,.3);
}
.anx-sidebar::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.14), transparent);
}
.anx-sidebar.is-open { transform: translateX(0); }

.anx-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.anx-sidebar-brand img { width: 36px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.anx-brand-name { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.anx-brand-sub { display: block; font-size: 11px; color: #9fc4e8; letter-spacing: .04em; text-transform: uppercase; }

.anx-sidebar-close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 18px; line-height: 1; opacity: .8; }
.anx-sidebar-close:hover { opacity: 1; }

.anx-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.anx-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 3px;
  transition: background .18s, color .18s, transform .18s var(--anx-ease);
}
.anx-nav-link i {
  font-size: 16px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  transition: background .18s, color .18s;
}
.anx-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(3px); }
.anx-nav-link:hover i { background: rgba(255,255,255,.14); }

.anx-nav-link.active {
  background: linear-gradient(100deg, rgba(27,117,188,.95), rgba(42,159,214,.9));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(27,117,188,.4);
}
.anx-nav-link.active i { background: rgba(255,255,255,.22); color: #fff; }
.anx-nav-link.active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--anx-green);
  box-shadow: 0 0 12px var(--anx-green);
}

.anx-nav-sep { height: 1px; background: rgba(255,255,255,.1); margin: 12px 12px; }

.anx-sidebar-user {
  padding: 15px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  background: rgba(0,0,0,.14);
}
.anx-user-name { font-weight: 600; }
.anx-user-role { font-size: 12px; color: #9fc4e8; }
.anx-sidebar-user .btn { border-radius: 10px; }

.anx-backdrop {
  position: fixed; inset: 0;
  background: rgba(9,20,40,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1040;
  animation: anxFade .25s ease both;
}
@keyframes anxFade { from { opacity: 0; } to { opacity: 1; } }

.anx-main { min-height: 100vh; display: flex; flex-direction: column; }

.anx-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--anx-border);
  padding: 11px 16px;
  box-shadow: 0 4px 20px rgba(13,35,64,.05);
}

.anx-menu-btn {
  background: var(--anx-surface);
  border: 1px solid var(--anx-border);
  border-radius: 11px;
  width: 40px; height: 40px;
  font-size: 19px; line-height: 1;
  color: var(--anx-navy);
  transition: background .18s, transform .16s;
}
.anx-menu-btn:hover { background: var(--anx-surface-2); transform: translateY(-1px); }

.anx-page-title {
  font-size: 18px; font-weight: 800; margin: 0; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: -.02em;
}

.anx-topbar-right { display: flex; align-items: center; gap: 10px; }
.anx-topbar-user { flex-direction: column; line-height: 1.2; text-align: right; }
.anx-topbar-name { font-size: 13px; font-weight: 600; }
.anx-topbar-role { font-size: 11.5px; color: var(--anx-text-muted); }

.anx-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--anx-grad-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(27,117,188,.4);
  transition: transform .18s var(--anx-ease), box-shadow .2s;
}
.anx-avatar:hover { color: #fff; transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 18px rgba(27,117,188,.5); }

.anx-content { flex: 1; padding: 18px 16px 30px; animation: anxEnter .45s var(--anx-ease) both; }

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

.anx-footer {
  padding: 16px;
  border-top: 1px solid var(--anx-border);
  font-size: 12.5px;
  color: var(--anx-text-muted);
  text-align: center;
  background: rgba(255,255,255,.5);
}
.anx-credito { font-size: 11.5px; opacity: .6; }

/* ------------------------------------------------------------------ */
/* Tarjetas, tablas y listas                                           */
/* ------------------------------------------------------------------ */

.anx-card {
  background: var(--anx-surface);
  border: 1px solid var(--anx-border);
  border-radius: var(--anx-radius);
  overflow: hidden;
  box-shadow: var(--anx-shadow-sm);
  transition: transform .2s var(--anx-ease), box-shadow .25s var(--anx-ease), border-color .2s;
}
.anx-card:hover { box-shadow: var(--anx-shadow); border-color: #d7e1ee; }

.anx-card-danger { border-color: rgba(226,35,26,.35); }

.anx-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--anx-border-soft);
  background: linear-gradient(180deg, var(--anx-surface-2), var(--anx-surface));
}
.anx-card-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.anx-card-body { padding: 18px; }

.anx-table { font-size: 14px; }
.anx-table thead th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--anx-text-muted);
  background: var(--anx-surface-2);
  border-bottom: 1px solid var(--anx-border);
  white-space: nowrap;
  padding-top: 11px; padding-bottom: 11px;
}
.anx-table tbody td { border-color: var(--anx-border-soft); }
.anx-table-hover tbody tr { transition: background .15s; }
.anx-table-hover tbody tr:hover { background: rgba(27,117,188,.05); }
.anx-link-strong { color: var(--anx-navy); font-weight: 600; text-decoration: none; }
.anx-link-strong:hover { color: var(--anx-primary); text-decoration: underline; }

.anx-thumb { width: 40px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid var(--anx-border); background: #eef2f7; }
.anx-thumb-empty { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 18px; }

.anx-empty { padding: 44px 20px; text-align: center; color: var(--anx-text-muted); }
.anx-empty i { font-size: 36px; display: block; margin-bottom: 10px; color: #b6c2d2; }

.anx-dl { margin: 0; }
.anx-dl dt { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--anx-text-muted); font-weight: 600; }
.anx-dl dd { margin: 0 0 12px; font-size: 14.5px; }
.anx-dl-label { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--anx-text-muted); font-weight: 600; }

.anx-observations { background: var(--anx-surface-2); border: 1px solid var(--anx-border); border-radius: 10px; padding: 11px 13px; font-size: 14px; margin-top: 6px; }

.anx-stat-list { list-style: none; padding: 0; margin: 0; }
.anx-stat-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--anx-border); font-size: 14px; }
.anx-stat-list li:last-child { border-bottom: 0; }

.anx-perm-list { display: flex; flex-wrap: wrap; }
.anx-value-old { color: #94a3b8; text-decoration: line-through; }
.anx-value-new { color: var(--anx-navy); font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Inicio: indicadores                                                 */
/* ------------------------------------------------------------------ */

.anx-hello h2 { font-size: 21px; font-weight: 800; margin-bottom: 2px; letter-spacing: -.02em; }
.anx-hello p { color: var(--anx-text-muted); font-size: 14px; margin-bottom: 18px; }

.anx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

.anx-kpi {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  background: var(--anx-surface);
  border: 1px solid var(--anx-border);
  border-radius: var(--anx-radius);
  padding: 16px 16px 16px 18px;
  overflow: hidden;
  box-shadow: var(--anx-shadow-sm);
  transition: transform .2s var(--anx-ease), box-shadow .25s var(--anx-ease);
}
.anx-kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--anx-primary);
}
.anx-kpi:hover { transform: translateY(-4px); box-shadow: var(--anx-shadow); }

.anx-kpi-icon {
  font-size: 22px;
  width: 46px; height: 46px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: rgba(27,117,188,.1);
  color: var(--anx-primary);
}
.anx-kpi-value { font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.anx-kpi-label { font-size: 12.5px; color: var(--anx-text-muted); }

.anx-kpi-primary::before { background: linear-gradient(var(--anx-primary), var(--anx-blue-light)); }
.anx-kpi-primary .anx-kpi-icon { background: rgba(27,117,188,.12); color: var(--anx-primary); }
.anx-kpi-green::before { background: linear-gradient(var(--anx-green), var(--anx-green-dark)); }
.anx-kpi-green .anx-kpi-icon { background: rgba(122,193,67,.16); color: var(--anx-green-dark); }
.anx-kpi-yellow::before { background: linear-gradient(var(--anx-yellow), #b0b800); }
.anx-kpi-yellow .anx-kpi-icon { background: rgba(214,223,33,.22); color: #93990a; }
.anx-kpi-navy::before { background: linear-gradient(#24456f, var(--anx-navy)); }
.anx-kpi-navy .anx-kpi-icon { background: rgba(13,35,64,.1); color: var(--anx-navy); }
.anx-kpi-teal::before { background: linear-gradient(#17a3b5, var(--anx-teal)); }
.anx-kpi-teal .anx-kpi-icon { background: rgba(15,125,140,.14); color: var(--anx-teal); }

/* ------------------------------------------------------------------ */
/* Listado: barra de herramientas y filtros                            */
/* ------------------------------------------------------------------ */

.anx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.anx-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.anx-filters { background: var(--anx-surface); border: 1px solid var(--anx-border); border-radius: var(--anx-radius); padding: 16px; box-shadow: var(--anx-shadow-sm); }
.anx-filters .form-label { font-size: 12px; font-weight: 600; color: var(--anx-text-muted); margin-bottom: 4px; }

.anx-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.anx-pag-info { font-size: 13px; color: var(--anx-text-muted); margin: 12px 0 0; }
.anx-pagination .anx-pag-info { margin: 0; }
.anx-pagination .page-link { color: var(--anx-primary); border-radius: 9px; margin: 0 2px; border-color: var(--anx-border); }
.anx-pagination .page-item.active .page-link { background: var(--anx-grad-primary); border-color: transparent; }

/* ------------------------------------------------------------------ */
/* Ficha y fotografias                                                 */
/* ------------------------------------------------------------------ */

.anx-profile-name { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.anx-profile-role { font-size: 13.5px; color: var(--anx-text-muted); }

.anx-photo-preview { width: 100%; max-width: 200px; aspect-ratio: 4/5; object-fit: cover; border-radius: 12px; border: 1px solid var(--anx-border); background: #eef2f7; box-shadow: var(--anx-shadow-sm); }
.anx-photo-placeholder { width: 100%; max-width: 200px; aspect-ratio: 4/5; border-radius: 12px; border: 1px dashed #b6c2d2; background: var(--anx-surface-2); display: flex; align-items: center; justify-content: center; font-size: 46px; color: #b6c2d2; }
.anx-photo-current { text-align: center; }
.anx-photo-versions { display: flex; gap: 6px; flex-wrap: wrap; }
.anx-cropper-box { max-height: 320px; background: #f1f5f9; border-radius: 10px; overflow: hidden; }
.anx-cropper-box img { max-width: 100%; display: block; }
.anx-cropper-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.anx-status-actions form { max-width: 280px; margin: 0 auto; }

/* ------------------------------------------------------------------ */
/* Graficos, mapa, ranking y alertas                                   */
/* ------------------------------------------------------------------ */

.anx-grafico { position: relative; height: 260px; }
.anx-mapa { height: 460px; width: 100%; background: #eef2f7; border-radius: 12px; }
.anx-mapa-estado { margin: 0; padding: 10px 16px; font-size: 13px; color: var(--anx-text-muted); border-top: 1px solid var(--anx-border); }
.leaflet-container { z-index: 1; border-radius: 12px; }
.leaflet-pane, .leaflet-top, .leaflet-bottom { z-index: 2; }

.anx-posicion { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #eef2f7; color: var(--anx-navy); font-weight: 700; font-size: 13px; }
.anx-posicion-oro { background: linear-gradient(135deg,#ffd572,#f5b301); color: #fff; box-shadow: 0 4px 12px rgba(245,179,1,.4); }
.anx-posicion-plata { background: linear-gradient(135deg,#d7e0ea,#b6c2d2); color: #fff; }
.anx-posicion-bronce { background: linear-gradient(135deg,#e0a06a,#c9803f); color: #fff; }

.anx-alertas { list-style: none; margin: 0; padding: 0; }
.anx-alertas li { padding: 15px 18px; border-bottom: 1px solid var(--anx-border-soft); transition: background .15s; }
.anx-alertas li:hover { background: var(--anx-surface-2); }
.anx-alertas li:last-child { border-bottom: 0; }
.anx-alerta-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.anx-alerta-titulo { font-size: 14.5px; font-weight: 600; margin: 0 0 4px; }
.anx-alertas-lista .anx-select-estado { max-width: 150px; }

/* ------------------------------------------------------------------ */
/* Evaluaciones                                                        */
/* ------------------------------------------------------------------ */

.anx-estrellas { color: #f5b301; letter-spacing: 1px; white-space: nowrap; }
.anx-estrellas-grande { font-size: 30px; line-height: 1; }
.anx-estrella-vacia { color: #d5dde5; }

.anx-revisiones { list-style: none; margin: 0; padding: 0; }
.anx-revisiones li { padding: 13px 18px; border-bottom: 1px solid var(--anx-border-soft); }
.anx-revisiones li:last-child { border-bottom: 0; }
.anx-revision-cabecera { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 4px; }

.anx-credencial-preview { width: 100%; max-width: 280px; aspect-ratio: 53.98/85.6; object-fit: contain; border-radius: 12px; box-shadow: var(--anx-shadow-lg); background: #fff; }

/* ------------------------------------------------------------------ */
/* Importacion, respaldos y configuracion                              */
/* ------------------------------------------------------------------ */

.anx-pasos { margin: 0; padding-left: 18px; font-size: 13.5px; }
.anx-pasos li { margin-bottom: 10px; }
.anx-pasos li:last-child { margin-bottom: 0; }

.anx-reglas { list-style: none; margin: 0; padding: 0; }
.anx-reglas li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 7px; color: var(--anx-text-muted); }
.anx-reglas i { color: var(--anx-red); margin-top: 2px; }

.anx-fila-error > td { background: rgba(226,35,26,.045); }
.anx-cambios { margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--anx-border); }
.anx-cambios > div { margin-bottom: 2px; }

.anx-respaldo-opcion {
  height: 100%; border: 1px solid var(--anx-border); border-radius: var(--anx-radius);
  padding: 18px 16px; text-align: center; background: var(--anx-surface);
  box-shadow: var(--anx-shadow-sm); transition: transform .2s var(--anx-ease), box-shadow .25s;
}
.anx-respaldo-opcion:hover { transform: translateY(-3px); box-shadow: var(--anx-shadow); }
.anx-respaldo-opcion i { font-size: 30px; color: var(--anx-primary); display: block; margin-bottom: 8px; }
.anx-respaldo-opcion h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.anx-respaldo-opcion p { font-size: 12.5px; color: var(--anx-text-muted); min-height: 52px; }

.form-control-color { height: 38px; padding: 4px; border-radius: 10px; }

/* ------------------------------------------------------------------ */
/* Escritorio                                                          */
/* ------------------------------------------------------------------ */

@media (min-width: 992px) {
  .anx-sidebar { transform: translateX(0); }
  .anx-sidebar-close { display: none; }
  .anx-main { margin-left: var(--anx-sidebar-w); }
  .anx-menu-btn { display: none; }
  .anx-backdrop { display: none !important; }
  .anx-content { padding: 24px 28px 36px; }
  .anx-topbar { padding: 13px 28px; }
  .anx-page-title { font-size: 20px; }
  .anx-dl-2 { display: grid; grid-template-columns: 190px 1fr; column-gap: 16px; align-items: baseline; }
  .anx-dl-2 dt { padding-top: 2px; }
}

/* ================================================================== */
/* EXTRAS PREMIUM (intensidad alta)                                    */
/* ================================================================== */

/* Malla de luz animada, muy sutil, detras de todo el panel */
.anx-admin::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 430px at 12% 6%, rgba(42,159,214,.16), transparent 60%),
    radial-gradient(660px 460px at 88% 94%, rgba(122,193,67,.13), transparent 60%),
    radial-gradient(500px 500px at 50% 50%, rgba(27,117,188,.06), transparent 70%);
  animation: anxDrift 26s var(--anx-ease) infinite alternate;
}
@keyframes anxDrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-26px,-20px,0) scale(1.07); } }

/* Titulos y numeros con degradado de marca */
.anx-hello h2,
.anx-page-title {
  background: linear-gradient(118deg, var(--anx-navy), var(--anx-primary) 72%, var(--anx-blue-light));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.anx-kpi-value {
  background: linear-gradient(135deg, var(--anx-navy), var(--anx-primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Destello de luz al pasar por tarjetas y KPIs */
.anx-card::after,
.anx-kpi::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg); opacity: 0; pointer-events: none; z-index: 2;
}
.anx-card:hover::after,
.anx-kpi:hover::after { animation: anxSheen .9s var(--anx-ease); }
@keyframes anxSheen { 0% { left: -60%; opacity: 0; } 18% { opacity: .85; } 100% { left: 135%; opacity: 0; } }

/* Boton primario con brillo que cruza */
.anx-btn-primary { position: relative; overflow: hidden; }
.anx-btn-primary::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.anx-btn-primary:hover::after { animation: anxSheen .8s var(--anx-ease); }

/* Entrada escalonada de los KPIs */
.anx-kpi { animation: anxPop .5s var(--anx-ease) both; }
.anx-kpi:nth-child(1) { animation-delay: .04s; }
.anx-kpi:nth-child(2) { animation-delay: .12s; }
.anx-kpi:nth-child(3) { animation-delay: .20s; }
.anx-kpi:nth-child(4) { animation-delay: .28s; }
.anx-kpi:nth-child(5) { animation-delay: .36s; }
.anx-kpi:nth-child(6) { animation-delay: .44s; }
@keyframes anxPop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* Halo pulsante muy leve en el item activo del menu */
.anx-nav-link.active { animation: anxGlow 3.6s ease-in-out infinite; }
@keyframes anxGlow {
  0%,100% { box-shadow: 0 8px 20px rgba(27,117,188,.40); }
  50%     { box-shadow: 0 8px 30px rgba(42,159,214,.62); }
}

/* Halo en el avatar */
.anx-avatar { box-shadow: 0 4px 12px rgba(27,117,188,.4), 0 0 0 4px rgba(27,117,188,.12); }

/* Degradado animado en las barras superiores de los KPI de color */
.anx-kpi::before { background-size: 100% 220%; animation: anxBar 6s ease-in-out infinite alternate; }
@keyframes anxBar { from { background-position: 0 0; } to { background-position: 0 100%; } }

/* ================================================================== */
/* AYUDAS DE USO: caja de tips, boton flotante y tour guiado           */
/* ================================================================== */

.anx-ayuda-box {
  position: relative;
  background: linear-gradient(135deg, rgba(27,117,188,.07), rgba(42,159,214,.05)), var(--anx-surface);
  border: 1px solid rgba(27,117,188,.22);
  border-radius: var(--anx-radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--anx-shadow-sm);
  animation: anxEnter .45s var(--anx-ease) both;
}
.anx-ayuda-box.is-collapsed { display: none; }

.anx-ayuda-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: 14.5px; color: var(--anx-primary); margin-bottom: 12px;
}
.anx-ayuda-head i { margin-right: 4px; }
.anx-ayuda-x {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(13,35,64,.06); border: 0; border-radius: 50%;
  color: var(--anx-text-muted); font-size: 22px; line-height: 1; font-weight: 400;
  cursor: pointer; transition: background .15s, color .15s, transform .2s var(--anx-ease);
}
.anx-ayuda-x:hover { background: rgba(226,35,26,.12); color: var(--anx-red); transform: rotate(90deg); }
.anx-ayuda-x:focus-visible { outline: none; box-shadow: var(--anx-ring); }

.anx-ayuda-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.anx-ayuda-list li { display: flex; gap: 12px; align-items: flex-start; }
.anx-ayuda-list strong { font-size: 13.8px; }
.anx-ayuda-list p { margin: 2px 0 0; font-size: 13px; color: var(--anx-text-muted); line-height: 1.45; }
.anx-ayuda-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--anx-grad-primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  box-shadow: 0 3px 8px rgba(27,117,188,.35);
}

/* Boton flotante "?" */
.anx-ayuda-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  width: 54px; height: 54px; border-radius: 50%;
  border: none; color: #fff; font-size: 24px; line-height: 1;
  background: var(--anx-grad-primary);
  box-shadow: 0 10px 26px rgba(27,117,188,.5);
  z-index: 1035; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .2s var(--anx-ease), box-shadow .25s;
  animation: anxPulse 3.2s ease-in-out infinite;
}
.anx-ayuda-fab:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 14px 32px rgba(27,117,188,.6); }
@keyframes anxPulse {
  0%,100% { box-shadow: 0 10px 26px rgba(27,117,188,.5), 0 0 0 0 rgba(42,159,214,.5); }
  50%     { box-shadow: 0 10px 26px rgba(27,117,188,.5), 0 0 0 12px rgba(42,159,214,0); }
}

/* Overlay con foco (spotlight) */
.anx-tour-ov { position: fixed; inset: 0; z-index: 4000; display: none; }
.anx-tour-ov:not(.has-spot) { background: rgba(9,20,40,.66); }
.anx-tour-ov::before {
  content: ""; position: fixed; left: 50%; top: 50%; width: 0; height: 0; border-radius: 14px;
}
.anx-tour-ov.has-spot::before {
  left: var(--sx); top: var(--sy); width: var(--sw); height: var(--sh);
  box-shadow: 0 0 0 9999px rgba(9,20,40,.66);
  transition: all .3s var(--anx-ease);
}
body.anx-tour-on { overflow: hidden; }

/* Globo del tour */
.anx-tour-tip {
  position: fixed; z-index: 4001; display: none;
  width: min(330px, calc(100vw - 24px));
  background: var(--anx-surface); color: var(--anx-text);
  border-radius: 16px; padding: 18px 18px 16px;
  box-shadow: var(--anx-shadow-lg);
  animation: anxPop .3s var(--anx-ease) both;
}
.anx-tour-step { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--anx-primary); }
.anx-tour-tip h4 { font-size: 16px; font-weight: 800; margin: 6px 0 0; letter-spacing: -.01em; }
.anx-tour-tip p { font-size: 13.5px; color: var(--anx-text-muted); margin: 8px 0 0; line-height: 1.5; }
.anx-tour-dots { display: flex; gap: 6px; margin: 14px 0 12px; }
.anx-tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--anx-border); transition: all .2s; }
.anx-tour-dots span.on { background: var(--anx-primary); width: 20px; border-radius: 4px; }
.anx-tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.anx-tour-nav > span { flex: 1; }
.anx-tour-close {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px;
  border: 0; background: none; color: var(--anx-text-muted); font-size: 20px; line-height: 1;
}
.anx-tour-close:hover { background: rgba(13,35,64,.07); color: var(--anx-navy); }

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .anx-sidebar, .anx-topbar, .anx-footer, .anx-toolbar-actions { display: none !important; }
  .anx-main { margin-left: 0; }
  .anx-card { border-color: #ccc; box-shadow: none; }
  body { background: #fff; }
}
