/* ============================================================
   AdventuriQ UI (aiq-ui) — sistema visual común del Gamifier
   Gamifier 4.81.0

   Nació con el Perfil del GM (4.74 → 4.80, antes en user-profile.css)
   y se extiende pantalla a pantalla a todo el Gamifier.

   REGLAS
   - Las variables viven en :root (las usa también el armazón).
   - Los componentes de contenido y los retoques de widgets de terceros
     (form-control, ui-grid…) se acotan a .aiq-page: una pantalla solo
     cambia cuando se migra (envolver su contenido en
     <div class="container-fluid aiq-page">).
     .aiq-profile es el alias histórico de .aiq-page.
   - Las capas globales (menú lateral, barra superior, migas, login,
     sweetalert, notificaciones, modales) se estilan sin acotar.
   - Catálogo vivo de componentes: #/admin/super-tools/ui-kit (Super Admin).
   - Lo propio del Perfil (licencias, idioma, banderas) sigue en
     user-profile.css.
   ============================================================ */

:root {
  --aiq-navy: #262e4f;
  --aiq-navy-deep: #161b33;
  --aiq-navy-soft: #3b4a7a;
  --aiq-blue: #448aff;
  --aiq-gold: #f1b83f;
  --aiq-green: #27c24c;
  --aiq-purple: #9b59b6;
  --aiq-coral: #ff5d6c;
  --aiq-cyan: #23b7e5;
  --aiq-orange: #f39c12;
  --aiq-ink: #1f2440;
  --aiq-muted: #7a819c;
  --aiq-faint: #a3a9bd;
  --aiq-line: #e8ebf3;
  --aiq-surface: #ffffff;
  --aiq-bg: #f4f6fb;
  --aiq-track: #eef0f6;
  --aiq-neutral-soft: #f0f2f7;
  --aiq-icon-empty: #c9cede;
  /* Tonos claros (fondo / texto) para etiquetas, alertas e iconos */
  --aiq-green-soft: #e7f8ec;
  --aiq-green-fg: #1b8a37;
  --aiq-red-soft: #fff0f1;
  --aiq-red-fg: #c62839;
  --aiq-blue-soft: #eaf2ff;
  --aiq-blue-fg: #2160d0;
  --aiq-purple-soft: #f4ebf9;
  --aiq-purple-fg: #7b3b98;
  --aiq-gold-soft: #fff6dd;
  --aiq-gold-fg: #a87200;
  --aiq-cyan-soft: #e6f7fd;
  --aiq-cyan-fg: #0f7ea3;
  --aiq-orange-soft: #fff2e0;
  --aiq-orange-fg: #b86200;
  /* Colores de ACCIÓN (norma de Mike, todo el Gamifier):
     crear = verde · modificar = azul · otras acciones (duplicar, copiar, ver, sincronizar…) = naranja · eliminar = rojo */
  --aiq-act-create: #27c24c;
  --aiq-act-edit: #448aff;
  --aiq-act-other: #f39c12;
  --aiq-act-delete: #f05050;
  --aiq-radius: 16px;
  --aiq-radius-sm: 10px;
  --aiq-shadow: 0 1px 2px rgba(22, 27, 51, 0.04), 0 8px 24px rgba(22, 27, 51, 0.06);
  --aiq-shadow-hover: 0 2px 4px rgba(22, 27, 51, 0.06), 0 16px 36px rgba(22, 27, 51, 0.12);
  --aiq-shadow-pop: 0 30px 80px rgba(22, 27, 51, 0.35);
  --aiq-focus: 0 0 0 3px rgba(68, 138, 255, 0.22);
  --aiq-hero-bg:
    radial-gradient(900px 320px at 100% 0%, rgba(68, 138, 255, 0.35), transparent 60%),
    radial-gradient(600px 300px at 0% 100%, rgba(155, 89, 182, 0.28), transparent 60%),
    linear-gradient(135deg, var(--aiq-navy-deep) 0%, var(--aiq-navy) 45%, var(--aiq-navy-soft) 100%);
  --aiq-navbar-h: 56px;
  /* padding-top de .layout-content (.ls-top-navbar del tema). El contenedor con
     scroll es .layout-content y position:sticky cuenta desde su padding */
  --aiq-layout-pad: 76px;
}

/* ---------- RAÍZ DE PÁGINA ---------- */
.aiq-page,
.aiq-profile {
  padding-bottom: 32px;
  color: var(--aiq-ink);
}
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- HERO ---------- */
.aiq-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 20px;
  color: #fff;
  background: var(--aiq-hero-bg);
  box-shadow: 0 18px 40px rgba(22, 27, 51, 0.28);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
/* Rejilla de puntos sutil sobre el degradado */
.aiq-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  pointer-events: none;
}
/* Brújula decorativa (marca: Aventuras) */
.aiq-hero::after {
  content: "\f14e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: -40px;
  bottom: -70px;
  font-size: 260px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  transform: rotate(-18deg);
  pointer-events: none;
}
.aiq-hero > * { position: relative; z-index: 1; }

.aiq-hero__main { display: flex; align-items: center; min-width: 0; flex: 1 1 420px; }
.aiq-hero__avatar {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 210deg, var(--aiq-gold), var(--aiq-coral), var(--aiq-purple), var(--aiq-blue), var(--aiq-gold));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-right: 24px;
}
.aiq-hero__avatar img,
.aiq-hero__avatar .aiq-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--aiq-navy);
  background: var(--aiq-navy-soft);
}
.aiq-hero__avatar .aiq-initials { display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 800; }
/* Variante cuadrada (imagen de Aventura, logo de Equipo…) */
.aiq-hero__avatar--square { border-radius: 18px; }
.aiq-hero__avatar--square img,
.aiq-hero__avatar--square .aiq-initials { border-radius: 14px; }
/* Icono en lugar de imagen (listados, herramientas) */
.aiq-hero__icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  margin-right: 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.aiq-hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
}
.aiq-hero__name {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  margin: 4px 0 2px;
  color: #fff;
  overflow-wrap: anywhere;
}
.aiq-hero__meta { color: rgba(255, 255, 255, 0.72); font-size: 14px; overflow-wrap: anywhere; }
.aiq-hero__meta i { margin-right: 4px; opacity: 0.8; }
.aiq-hero__meta span + span { margin-left: 14px; }
.aiq-hero__hint { margin: 12px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.62); }
.aiq-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }

.aiq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.aiq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  white-space: nowrap;
}
.aiq-chip--gold { background: rgba(241, 184, 63, 0.2); border-color: rgba(241, 184, 63, 0.55); color: #ffd981; }
.aiq-chip--danger { background: rgba(255, 93, 108, 0.2); border-color: rgba(255, 93, 108, 0.6); color: #ffb3ba; }
.aiq-chip--warning { background: rgba(255, 170, 0, 0.18); border-color: rgba(255, 170, 0, 0.5); color: #ffd27a; }
.aiq-chip--live { background: rgba(35, 183, 229, 0.18); border-color: rgba(35, 183, 229, 0.5); color: #9fe6ff; }
.aiq-chip--ok { background: rgba(39, 194, 76, 0.18); border-color: rgba(39, 194, 76, 0.5); color: #9ff0b3; }
.aiq-chip--link { text-decoration: none; transition: background 0.15s ease; cursor: pointer; }
.aiq-chip--link:hover,
.aiq-chip--link:focus { background: rgba(255, 255, 255, 0.22); color: #fff; text-decoration: none; }

/* Botón principal sobre el hero (claro sobre oscuro) */
.aiq-hero .aiq-btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: var(--aiq-navy);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.aiq-hero .aiq-btn-hero:hover,
.aiq-hero .aiq-btn-hero:focus { color: var(--aiq-navy-deep); text-decoration: none; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3); outline: none; }
/* Acción secundaria sobre el hero: translúcida */
.aiq-hero .aiq-btn-hero--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.28); }
.aiq-hero .aiq-btn-hero--ghost:hover,
.aiq-hero .aiq-btn-hero--ghost:focus { background: rgba(255, 255, 255, 0.24); color: #fff; box-shadow: none; }
.aiq-hero .aiq-btn-hero--icon { padding: 9px 12px; }
.aiq-hero__actions { flex-wrap: wrap; }

.aiq-hero__stats { display: flex; gap: 12px; flex: 0 1 auto; margin-top: 8px; }
.aiq-hero__stat {
  min-width: 132px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.aiq-hero__stat-value { display: block; font-size: 32px; font-weight: 800; line-height: 1.05; color: #fff; }
.aiq-hero__stat-value.is-negative { color: #ffb3ba; }
.aiq-hero__stat-label { display: block; margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, 0.65); font-weight: 600; }
.aiq-hero__stat-label i { margin-right: 4px; }

.aiq-hero--compact { padding: 24px 28px; }
.aiq-hero--compact::after { font-size: 190px; bottom: -50px; }
.aiq-hero--compact .aiq-hero__avatar { width: 96px; height: 96px; }
.aiq-hero--compact .aiq-hero__avatar .aiq-initials { font-size: 32px; }
.aiq-hero--compact .aiq-hero__name { font-size: 26px; }
.aiq-hero--compact .aiq-hero__stat { padding: 12px 16px; min-width: 116px; }
.aiq-hero--compact .aiq-hero__stat-value { font-size: 26px; }

/* ---------- AVATAR EDITABLE ---------- */
.aiq-avatar-edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--aiq-navy);
  background: var(--aiq-gold);
  color: var(--aiq-navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.aiq-avatar-edit:hover,
.aiq-avatar-edit:focus-visible { transform: scale(1.08); background: #ffd067; outline: none; }
.aiq-avatar-edit[disabled] { cursor: progress; opacity: 0.85; }

/* ---------- TABS ---------- */
.aiq-tabs {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 6px;
  margin: 0 0 20px;
  background: var(--aiq-surface);
  border-radius: 14px;
  box-shadow: var(--aiq-shadow);
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.aiq-tabs > li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--aiq-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.aiq-tabs > li > a:hover { color: var(--aiq-navy); background: #f2f4fa; }
/* .active en el li (ng-class) o en el enlace (pestañas jQuery data-toggle="tab" de Bootstrap 4) */
.aiq-tabs > li.active > a,
.aiq-tabs > li > a.active { background: var(--aiq-navy); color: #fff; box-shadow: 0 6px 16px rgba(38, 46, 79, 0.3); }
.aiq-tabs > li { float: none; margin: 0; }
.aiq-tabs.nav-tabs { border-bottom: 0; }
.aiq-tabs.nav-tabs .nav-link.active,
.aiq-tabs.nav-tabs .nav-link.active:hover,
.aiq-tabs.nav-tabs .nav-link.active:focus { background: var(--aiq-navy); color: #fff; border: 0; }
/* En escritorio, si no caben, pasan a otra línea (con ratón el scroll horizontal no se descubre);
   en móvil se mantiene el scroll horizontal. */
@media (min-width: 768px) { .aiq-tabs { flex-wrap: wrap; overflow-x: visible; } }
.aiq-tabs.nav-tabs::after { display: none; }
.aiq-tabs > li > a.nav-link { border: 0; margin: 0; }
/* Tamaño pequeño (p.ej. pestañas de idioma dentro de una sección) */
.aiq-tabs--sm { padding: 4px; border-radius: 12px; box-shadow: none; background: var(--aiq-neutral-soft); margin-bottom: 14px; }
.aiq-tabs--sm > li > a { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.aiq-tabs--sm > li > a:hover { background: #fff; }
.aiq-tabs--sm > li.active > a,
.aiq-tabs--sm > li > a.active { box-shadow: 0 3px 10px rgba(38, 46, 79, 0.25); }
/* El :hover de --sm (fondo blanco) no debe pisar la pestaña activa: quedaba blanco sobre blanco */
.aiq-tabs--sm > li.active > a:hover,
.aiq-tabs--sm > li > a.active:hover { background: var(--aiq-navy); color: #fff; }

/* ---------- ALERTAS ---------- */
.aiq-alerts { margin-bottom: 4px; }
.aiq-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  font-size: 14px;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  color: #7a5200;
}
.aiq-alert i { font-size: 18px; margin-top: 1px; }
.aiq-alert--danger { background: var(--aiq-red-soft); border-color: #ffc9ce; color: #9b1c2a; }
.aiq-alert--info { background: #eef4ff; border-color: #cddfff; color: #1d4fa8; }
.aiq-alert--ok { background: var(--aiq-green-soft); border-color: #bfeccb; color: #17722e; }
.aiq-alert a { font-weight: 700; color: inherit; text-decoration: underline; }

/* ---------- TARJETAS ---------- */
/* Filas flex para que las tarjetas de una misma fila tengan la misma altura */
.aiq-row-gap { display: flex; flex-wrap: wrap; }
.aiq-row-gap > [class*="col-"] { margin-bottom: 20px; float: none; }
.aiq-card {
  position: relative;
  height: 100%;
  background: var(--aiq-surface);
  border-radius: var(--aiq-radius);
  box-shadow: var(--aiq-shadow);
  border: 1px solid rgba(232, 235, 243, 0.8);
  padding: 20px 22px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.aiq-card--auto { height: auto; margin-bottom: 20px; }
.aiq-card--flush { padding: 0; overflow: hidden; }
.aiq-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--aiq-ink);
}
.aiq-card__title i { color: var(--aiq-navy-soft); margin-right: 8px; }
.aiq-card__title small { font-weight: 600; color: var(--aiq-muted); font-size: 12px; }
.aiq-card--list { display: flex; flex-direction: column; }
/* Tarjeta-enlace (accesos, herramientas, catálogos) */
a.aiq-card--link { display: block; color: inherit; text-decoration: none; }
.aiq-card--link { cursor: pointer; }
.aiq-card--link:hover,
.aiq-card--link:focus { box-shadow: var(--aiq-shadow-hover); transform: translateY(-2px); color: inherit; text-decoration: none; outline: none; }
/* Tarjeta de herramienta / acceso: icono de color + título + descripción + flecha
   <a class="aiq-card aiq-card--link aiq-tool"><span class="aiq-tool__icon aiq-tool__icon--blue"><i …></i></span>
   <div class="aiq-tool__body"><h5 class="aiq-tool__title">…</h5><p class="aiq-tool__desc">…</p></div>
   <i class="fa-solid fa-chevron-right aiq-tool__go"></i></a> */
a.aiq-tool, .aiq-tool { display: flex; align-items: flex-start; gap: 14px; }
.aiq-tool__icon { flex: 0 0 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: var(--aiq-neutral-soft); color: var(--aiq-navy-soft); }
.aiq-tool__icon--blue { background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); }
.aiq-tool__icon--green { background: var(--aiq-green-soft); color: var(--aiq-green-fg); }
.aiq-tool__icon--purple { background: var(--aiq-purple-soft); color: var(--aiq-purple-fg); }
.aiq-tool__icon--gold { background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); }
.aiq-tool__icon--cyan { background: var(--aiq-cyan-soft); color: var(--aiq-cyan-fg); }
.aiq-tool__icon--red { background: var(--aiq-red-soft); color: var(--aiq-red-fg); }
.aiq-tool__body { flex: 1 1 auto; min-width: 0; }
.aiq-tool__title { margin: 2px 0 4px; font-size: 15px; font-weight: 800; color: var(--aiq-ink); }
.aiq-tool__desc { margin: 0; font-size: 13px; color: var(--aiq-muted); line-height: 1.45; }
.aiq-tool__go { flex: 0 0 auto; align-self: center; color: var(--aiq-faint); transition: transform 0.2s ease, color 0.2s ease; }
.aiq-tool:hover .aiq-tool__go { color: var(--aiq-blue); transform: translateX(3px); }

/* ---------- SECCIONES (fichas largas con índice) ---------- */
.aiq-section {
  position: relative;
  background: var(--aiq-surface);
  border-radius: var(--aiq-radius);
  box-shadow: var(--aiq-shadow);
  border: 1px solid rgba(232, 235, 243, 0.8);
  padding: 22px 24px;
  margin-bottom: 20px;
  /* Que el ancla no quede bajo la barra superior fija */
  scroll-margin-top: calc(var(--aiq-navbar-h) + 16px);
}
.aiq-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.aiq-section__title { margin: 0; font-size: 17px; font-weight: 800; color: var(--aiq-ink); display: flex; align-items: center; gap: 10px; }
.aiq-section__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--aiq-blue-soft);
  color: var(--aiq-blue-fg);
  flex: 0 0 auto;
}
.aiq-section__sub { margin: 4px 0 0 44px; font-size: 13px; color: var(--aiq-muted); }
.aiq-section__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aiq-section + .aiq-section { margin-top: 0; }
.aiq-subhead { margin: 18px 0 10px; font-size: 12px; font-weight: 800; color: var(--aiq-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.aiq-divider { border: 0; border-top: 1px dashed var(--aiq-line); margin: 18px 0; }

/* ---------- ÍNDICE (TOC) + LAYOUT CON ÍNDICE ---------- */
.aiq-with-toc { display: flex; align-items: flex-start; gap: 24px; }
.aiq-with-toc__nav { flex: 0 0 240px; width: 240px; min-width: 0; position: sticky; top: calc(var(--aiq-navbar-h) + 16px - var(--aiq-layout-pad)); align-self: flex-start; }
.aiq-with-toc__body { flex: 1 1 auto; min-width: 0; }
.aiq-toc {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--aiq-surface);
  border-radius: 14px;
  box-shadow: var(--aiq-shadow);
  max-height: calc(100vh - var(--aiq-navbar-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.aiq-toc__group { padding: 10px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aiq-faint); }
.aiq-toc > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--aiq-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.aiq-toc > li > a i { width: 16px; text-align: center; opacity: 0.8; }
.aiq-toc > li > a:hover { background: #f2f4fa; color: var(--aiq-navy); }
.aiq-toc > li.active > a { background: var(--aiq-navy); color: #fff; box-shadow: 0 6px 16px rgba(38, 46, 79, 0.25); }
.aiq-toc > li.active > a i { opacity: 1; }
@media (max-width: 991px) {
  .aiq-with-toc { display: block; }
  .aiq-with-toc__nav { position: sticky; top: calc(var(--aiq-navbar-h) - var(--aiq-layout-pad)); z-index: 5; margin: 0 -4px 16px; }
  /* el ancla queda bajo la barra superior + la barra horizontal del índice */
  .aiq-with-toc .aiq-section { scroll-margin-top: calc(var(--aiq-navbar-h) + 72px); }
  .aiq-toc { display: flex; gap: 4px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 6px; }
  .aiq-toc__group { display: none; }
  .aiq-toc > li > a { white-space: nowrap; padding: 7px 12px; }
}

/* ---------- KPI ---------- */
.aiq-kpi { overflow: hidden; }
.aiq-kpi:hover { box-shadow: var(--aiq-shadow-hover); transform: translateY(-2px); }
.aiq-kpi::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--kpi-color, var(--aiq-blue));
  opacity: 0.07;
}
.aiq-kpi--gold { --kpi-color: var(--aiq-gold); }
.aiq-kpi--blue { --kpi-color: var(--aiq-blue); }
.aiq-kpi--purple { --kpi-color: var(--aiq-purple); }
.aiq-kpi--green { --kpi-color: var(--aiq-green); }
.aiq-kpi--coral { --kpi-color: var(--aiq-coral); }
.aiq-kpi--cyan { --kpi-color: var(--aiq-cyan); }
.aiq-kpi--navy { --kpi-color: var(--aiq-navy-soft); }

.aiq-kpi__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aiq-kpi__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
  background: var(--kpi-color, var(--aiq-blue));
  box-shadow: 0 8px 18px -6px var(--kpi-color, var(--aiq-blue));
}
.aiq-kpi__label { font-size: 13px; font-weight: 700; color: var(--aiq-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.aiq-kpi__value { font-size: 36px; font-weight: 800; line-height: 1; color: var(--aiq-ink); }
.aiq-kpi__value small { font-size: 15px; font-weight: 700; color: var(--aiq-muted); margin-left: 4px; }
.aiq-kpi__value.is-negative { color: var(--aiq-coral); }
.aiq-infinity { font-size: 1.35em; line-height: 0.8; }
.aiq-kpi__sub { margin-top: 6px; font-size: 13px; color: var(--aiq-muted); min-height: 19px; }
.aiq-kpi__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--aiq-line);
  font-size: 12px;
  color: var(--aiq-muted);
}
.aiq-kpi__foot b { display: block; font-size: 15px; color: var(--aiq-ink); font-weight: 800; }
.aiq-kpi__foot > :last-child { text-align: right; }

.aiq-trend { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.aiq-trend--up { background: var(--aiq-green-soft); color: var(--aiq-green-fg); }
.aiq-trend--down { background: var(--aiq-red-soft); color: var(--aiq-red-fg); }
.aiq-trend--flat { background: var(--aiq-neutral-soft); color: var(--aiq-muted); }

/* ---------- ANILLO DE PROGRESO ---------- */
.aiq-ring-wrap { display: flex; align-items: center; gap: 16px; }
.aiq-ring { position: relative; width: 92px; height: 92px; flex: 0 0 auto; }
.aiq-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.aiq-ring circle { fill: none; stroke-width: 10; }
.aiq-ring .aiq-ring__track { stroke: var(--aiq-track); }
.aiq-ring .aiq-ring__bar { stroke: var(--kpi-color, var(--aiq-blue)); stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.aiq-ring.is-warning .aiq-ring__bar { stroke: var(--aiq-orange); }
.aiq-ring.is-danger .aiq-ring__bar { stroke: var(--aiq-coral); }
.aiq-ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.aiq-ring__label small { font-size: 10px; color: var(--aiq-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.aiq-ring--sm { width: 64px; height: 64px; }
.aiq-ring--sm circle { stroke-width: 8; }
.aiq-ring--sm .aiq-ring__label { font-size: 14px; }

/* ---------- BARRA APILADA + LEYENDA ---------- */
.aiq-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--aiq-track); margin: 12px 0 10px; }
.aiq-stack > span { display: block; height: 100%; transition: width 0.8s ease; }
.aiq-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--aiq-muted); list-style: none; padding: 0; margin: 0; }
.aiq-legend li { display: inline-flex; align-items: center; gap: 6px; }
.aiq-legend b { color: var(--aiq-ink); }
.aiq-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.aiq-bg-blue { background: var(--aiq-blue); }
.aiq-bg-green { background: var(--aiq-green); }
.aiq-bg-gold { background: var(--aiq-gold); }
.aiq-bg-purple { background: var(--aiq-purple); }
.aiq-bg-coral { background: var(--aiq-coral); }
.aiq-bg-cyan { background: var(--aiq-cyan); }
.aiq-bg-muted { background: #c3c8d6; }

/* ---------- GRÁFICO DE BARRAS ---------- */
.aiq-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 220px;
  padding: 8px 4px 0;
  border-bottom: 1px solid var(--aiq-line);
  background-image: linear-gradient(var(--aiq-line) 1px, transparent 1px);
  background-size: 100% 25%;
  background-position: 0 -1px;
}
.aiq-bars__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--aiq-muted); font-size: 13px; font-weight: 600; z-index: 1; }
.aiq-bars__empty i { font-size: 28px; color: var(--aiq-icon-empty); margin-bottom: 8px; }
.aiq-bars.is-empty .aiq-bar__value { display: none; }
.aiq-bar { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.aiq-bar__fill {
  width: 100%;
  max-width: 38px;
  min-height: 3px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #7aa9ff 0%, var(--aiq-blue) 55%, #2f6fe0 100%);
  transition: height 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.2s ease;
}
.aiq-bar.is-empty .aiq-bar__fill { background: #e3e7f1; }
.aiq-bar.is-current .aiq-bar__fill { background: linear-gradient(180deg, #ffd27a 0%, var(--aiq-gold) 60%, #e09a14 100%); }
.aiq-bar:hover .aiq-bar__fill { filter: brightness(1.08) saturate(1.1); }
.aiq-bar__value {
  font-size: 11px;
  font-weight: 800;
  color: var(--aiq-ink);
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.aiq-bar:hover .aiq-bar__value,
.aiq-bar.is-current .aiq-bar__value,
.aiq-bar.is-max .aiq-bar__value { opacity: 1; transform: none; }
.aiq-bars-labels { display: flex; gap: 10px; padding: 8px 4px 0; }
.aiq-bars-labels span { flex: 1 1 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--aiq-muted); text-transform: capitalize; min-width: 0; }
/* Barras densas: series de hasta ~31 tramos (Actividad del Panel de Control).
   Con --dense las etiquetas se pintan solo cada N tramos y pueden desbordar su hueco. */
.aiq-bars--dense { gap: 3px; }
.aiq-bars--dense .aiq-bar__fill { max-width: 28px; border-radius: 5px 5px 2px 2px; }
.aiq-bars--dense .aiq-bar__value { font-size: 10px; white-space: nowrap; }
.aiq-bars-labels--dense { gap: 3px; }
/* Barra apilada (<aiq-barras> con segmentos): cada hijo lleva su aiq-bg-*, de abajo arriba */
.aiq-bar__fill--stack { display: flex; flex-direction: column-reverse; overflow: hidden; background: transparent; }
.aiq-bar__fill--stack > span { display: block; width: 100%; flex: 0 0 auto; }
/* aiq-meter con el color de una serie (leyendas de barras apiladas) */
.aiq-meter > span.aiq-bg-green { background: var(--aiq-green); }
.aiq-meter > span.aiq-bg-cyan { background: var(--aiq-cyan); }
.aiq-meter > span.aiq-bg-purple { background: var(--aiq-purple); }
.aiq-meter > span.aiq-bg-blue { background: var(--aiq-blue); }
.aiq-meter > span.aiq-bg-gold { background: var(--aiq-gold); }
.aiq-meter > span.aiq-bg-muted { background: #c3c8d6; }
.aiq-bars-labels--dense span { font-size: 10px; white-space: nowrap; overflow: visible; text-transform: none; }

/* KPI que hace de pestaña (Actividad del Panel de Control) */
.aiq-kpi--select { cursor: pointer; }
.aiq-kpi--select:focus { outline: none; box-shadow: var(--aiq-focus), var(--aiq-shadow); }
.aiq-kpi--select.is-selected { box-shadow: 0 0 0 2px var(--kpi-color, var(--aiq-navy)), var(--aiq-shadow-hover); }

/* Rango de fechas a mano junto a un aiq-filters */
.aiq-daterange { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aiq-daterange .form-control { width: auto; min-width: 0; height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
.aiq-chart-summary { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 16px; }
.aiq-chart-summary div { font-size: 12px; color: var(--aiq-muted); font-weight: 600; }
.aiq-chart-summary b { display: block; font-size: 22px; color: var(--aiq-ink); font-weight: 800; }

/* Barras horizontales (ranking de valores, estadísticas por Reto…) */
.aiq-hbars { list-style: none; margin: 0; padding: 0; }
.aiq-hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 7px 0; font-size: 13px; }
.aiq-hbars__label { font-weight: 700; color: var(--aiq-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aiq-hbars__value { font-weight: 800; color: var(--aiq-ink); text-align: right; }
.aiq-hbars .aiq-meter { grid-column: 1 / -1; }

/* ---------- DONUT ---------- */
.aiq-donut-wrap { display: flex; flex-direction: column; align-items: center; }
.aiq-donut { position: relative; width: 180px; height: 180px; margin: 4px auto 18px; }
.aiq-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.aiq-donut circle { fill: none; stroke-width: 22; }
.aiq-donut .aiq-donut__track { stroke: var(--aiq-track); }
.aiq-donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.aiq-donut__center b { font-size: 34px; font-weight: 800; line-height: 1; }
.aiq-donut__center small { font-size: 11px; color: var(--aiq-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* ---------- FILA DE ENTIDAD (Aventura, Misión, Reto…) ---------- */
.aiq-adv { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--aiq-line); }
.aiq-adv:last-child { border-bottom: 0; padding-bottom: 0; }
.aiq-adv__rank {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--aiq-neutral-soft);
  color: var(--aiq-muted);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aiq-adv:first-child .aiq-adv__rank { background: rgba(241, 184, 63, 0.18); color: #b07a00; }
.aiq-adv__handle { flex: 0 0 auto; color: var(--aiq-faint); cursor: grab; padding: 0 2px; }
.aiq-adv__thumb { flex: 0 0 auto; width: 76px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--aiq-track); }
.aiq-adv__body { flex: 1 1 auto; min-width: 0; }
.aiq-adv__title { display: block; font-weight: 800; font-size: 14px; color: var(--aiq-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.aiq-adv__title:hover { color: var(--aiq-blue); text-decoration: none; }
.aiq-adv__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.aiq-adv__space { font-size: 11px; color: var(--aiq-muted); margin-top: 4px; }
.aiq-adv__count { flex: 0 0 auto; text-align: right; }
.aiq-adv__count b { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.aiq-adv__count small { font-size: 11px; color: var(--aiq-muted); font-weight: 700; }
.aiq-adv__stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; font-size: 11px; font-weight: 700; color: var(--aiq-muted); }
.aiq-adv__stats i { margin-right: 5px; opacity: 0.75; }
.aiq-adv__actions { flex: 0 0 auto; display: flex; gap: 6px; }

/* ---------- ETIQUETAS ---------- */
.aiq-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--aiq-neutral-soft); color: var(--aiq-muted); white-space: nowrap; }
.aiq-tag i { margin-right: 4px; }
.aiq-tag--ok { background: var(--aiq-green-soft); color: var(--aiq-green-fg); }
.aiq-tag--blue { background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); }
.aiq-tag--purple { background: var(--aiq-purple-soft); color: var(--aiq-purple-fg); }
.aiq-tag--gold { background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); }
.aiq-tag--cyan { background: var(--aiq-cyan-soft); color: var(--aiq-cyan-fg); }
.aiq-tag--muted { background: var(--aiq-neutral-soft); color: var(--aiq-muted); }
.aiq-tag--danger { background: var(--aiq-red-soft); color: var(--aiq-red-fg); }
.aiq-tag--lg { font-size: 13px; padding: 5px 12px; }
/* Etiqueta clicable (copiar variable, filtro rápido…) */
.aiq-tag--btn { border: 0; cursor: pointer; transition: filter 0.15s ease, transform 0.15s ease; }
.aiq-tag--btn:hover { filter: brightness(0.95); transform: translateY(-1px); }
.aiq-tag--btn:focus { outline: none; box-shadow: var(--aiq-focus); }

/* ---------- MEDIDOR ---------- */
.aiq-meter { height: 6px; border-radius: 999px; background: var(--aiq-track); overflow: hidden; }
.aiq-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--aiq-purple); transition: width 0.8s ease; }
.aiq-meter--blue > span { background: var(--aiq-blue); }
.aiq-meter--green > span { background: var(--aiq-green); }
.aiq-meter.is-warning > span { background: var(--aiq-orange); }
.aiq-meter.is-danger > span { background: var(--aiq-coral); }

/* ---------- LISTAS CON SCROLL + BARRA DE HERRAMIENTAS ---------- */
.aiq-scroll {
  max-height: 600px;
  overflow-y: auto;
  margin-right: -12px;
  padding-right: 12px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cdd3e3 transparent;
  /* Sombra al pie que insinúa que hay más contenido */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 24px), transparent);
  padding-bottom: 18px;
}
.aiq-scroll::-webkit-scrollbar { width: 6px; }
.aiq-scroll::-webkit-scrollbar-thumb { background: #cdd3e3; border-radius: 6px; }
.aiq-scroll::-webkit-scrollbar-track { background: transparent; }
.aiq-list-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 8px; align-items: center; }
.aiq-list-toolbar__search { position: relative; flex: 1 1 200px; }
.aiq-list-toolbar__search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--aiq-muted); font-size: 13px; }
.aiq-list-toolbar__search .form-control { padding-left: 34px; border-radius: 10px; height: 38px; font-size: 13px; }
.aiq-list-toolbar__sort { position: relative; flex: 0 1 220px; margin: 0; }
.aiq-list-toolbar__sort i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--aiq-muted); font-size: 13px; pointer-events: none; }
.aiq-list-toolbar__sort .form-control { padding-left: 34px; border-radius: 10px; height: 38px; font-size: 13px; font-weight: 700; color: var(--aiq-ink); }
.aiq-list-toolbar__actions { display: flex; gap: 8px; margin-left: auto; }
.aiq-list-more { text-align: center; padding: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--aiq-muted); }

/* ---------- REGISTRO DE MOVIMIENTOS ---------- */
.aiq-mov { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--aiq-line); }
.aiq-mov:last-of-type { border-bottom: 0; }
.aiq-mov__icon {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--aiq-neutral-soft);
  color: var(--aiq-muted);
}
.aiq-mov__icon--green { background: var(--aiq-green-soft); color: var(--aiq-green-fg); }
.aiq-mov__icon--red { background: var(--aiq-red-soft); color: var(--aiq-red-fg); }
.aiq-mov__icon--blue { background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); }
.aiq-mov__icon--gold { background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); }
.aiq-mov__icon--purple { background: var(--aiq-purple-soft); color: var(--aiq-purple-fg); }
.aiq-mov__body { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.aiq-mov__body b { color: var(--aiq-ink); margin-right: 6px; }
.aiq-mov__detail { display: block; color: var(--aiq-muted); font-size: 12px; overflow-wrap: anywhere; }
.aiq-mov__date { display: block; color: var(--aiq-faint); font-size: 11px; font-weight: 600; margin-top: 2px; }
.aiq-mov__amount { flex: 0 0 auto; text-align: right; }
.aiq-mov__amount b { display: block; font-size: 17px; font-weight: 800; }
.aiq-mov__amount b.is-plus { color: var(--aiq-green-fg); }
.aiq-mov__amount b.is-minus { color: var(--aiq-red-fg); }
.aiq-mov__amount small { font-size: 11px; color: var(--aiq-muted); font-weight: 700; }

/* ---------- TIMELINE ---------- */
.aiq-feed { list-style: none; padding: 0; margin: 0; }
.aiq-feed li { display: flex; align-items: center; gap: 12px; padding: 9px 0; position: relative; }
.aiq-feed li + li::before { content: ""; position: absolute; left: 19px; top: -9px; height: 18px; border-left: 2px dotted var(--aiq-line); }
.aiq-feed__avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--aiq-blue), var(--aiq-purple));
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(22, 27, 51, 0.12);
}
.aiq-feed__body { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.aiq-feed__body b { color: var(--aiq-ink); }
.aiq-feed__body span { display: block; color: var(--aiq-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.aiq-feed__time { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--aiq-muted); white-space: nowrap; }

/* Línea de tiempo vertical para bloques largos (changelog, recorrido…) */
.aiq-timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.aiq-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; border-left: 2px solid var(--aiq-line); }
.aiq-timeline > li { position: relative; margin-bottom: 20px; }
.aiq-timeline > li:last-child { margin-bottom: 0; }
.aiq-timeline__dot {
  position: absolute;
  left: -28px;
  top: 22px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--aiq-blue);
  box-shadow: 0 0 0 4px var(--aiq-bg);
}
.aiq-timeline > li:first-child .aiq-timeline__dot { border-color: var(--aiq-gold); }

/* Changelog (lista de cambios dentro de cada versión) */
.aiq-changelog__list { list-style: none; margin: 0; padding: 0; }
.aiq-changelog__list > li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--aiq-line); font-size: 14px; }
.aiq-changelog__list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.aiq-changelog__list .aiq-tag { flex: 0 0 auto; min-width: 128px; text-align: center; margin-top: 1px; }
.aiq-changelog__text { flex: 1 1 auto; min-width: 0; color: var(--aiq-ink); }
@media (max-width: 575px) {
  .aiq-changelog__list > li { flex-direction: column; gap: 4px; }
}

/* ---------- VACÍO / CARGA ---------- */
.aiq-empty { text-align: center; padding: 28px 10px; color: var(--aiq-muted); }
.aiq-empty i { display: block; font-size: 30px; margin-bottom: 10px; color: var(--aiq-icon-empty); }
.aiq-empty--compact { padding: 12px 10px 18px; }
.aiq-skeleton { border-radius: 10px; background: linear-gradient(90deg, #eef0f6 25%, #f6f7fb 37%, #eef0f6 63%); background-size: 400% 100%; animation: aiq-shimmer 1.4s ease infinite; }
@keyframes aiq-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.aiq-fade-in { animation: aiq-fade 0.45s ease both; }
@keyframes aiq-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- TABLA ---------- */
.aiq-table { width: 100%; font-size: 13px; }
.aiq-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--aiq-muted); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--aiq-line); white-space: nowrap; }
.aiq-table td { padding: 12px 10px; border-bottom: 1px solid var(--aiq-line); vertical-align: middle; }
.aiq-table tr:last-child td { border-bottom: 0; }
.aiq-table .num { text-align: right; font-weight: 800; }
.aiq-table--hover tbody tr { transition: background 0.15s ease; }
.aiq-table--hover tbody tr:hover { background: #f8f9fc; }
.aiq-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.aiq-table .aiq-table__sub { display: block; font-size: 11px; color: var(--aiq-muted); font-weight: 600; margin-top: 2px; }
.aiq-table .is-muted { color: var(--aiq-faint); }
.aiq-text-plus { color: var(--aiq-green-fg); font-weight: 800; }
.aiq-text-minus { color: var(--aiq-red-fg); font-weight: 800; }
/* Fragmento técnico (payload JSON, claves): monoespaciada, envuelve */
.aiq-code { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 11px; color: var(--aiq-ink); background: var(--aiq-neutral-soft); border-radius: 6px; padding: 2px 6px; white-space: pre-wrap; overflow-wrap: anywhere; display: inline-block; max-width: 520px; }

.aiq-page .form-control.aiq-code-input,
.aiq-modal .form-control.aiq-code-input { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12px; }

/* Vista previa de un correo (simulación de envíos) */
.aiq-mailpreview { padding: 16px 18px; box-shadow: none; border: 1px solid var(--aiq-line); margin-bottom: 14px; }
.aiq-mailpreview__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.aiq-mailpreview__reasons { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.aiq-mailpreview__subject { font-size: 13px; margin: 0 0 10px; }
.aiq-mailpreview__body { border: 1px solid var(--aiq-line); border-radius: 10px; padding: 12px; overflow: auto; background: #fff; font-size: 13px; }

/* Llamada a la acción al pie de un KPI (crear, comprar…) */
.aiq-kpi__cta { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--aiq-line); }
.aiq-kpi__cta a { font-size: 13px; font-weight: 800; color: var(--aiq-blue); text-decoration: none; cursor: pointer; }
.aiq-kpi__cta a:hover { text-decoration: underline; }
.aiq-kpi__cta i { margin-right: 4px; }

/* ---------- FILA DE AVENTURA (listado de Inicio, Gamifier 4.83.0) ----------
   Imagen | datos (título, meta, creador/propietario, enlace, espacio) | lateral (estado, licencia, Players, acciones) */
.aiq-evrow { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--aiq-line); align-items: flex-start; }
.aiq-evrow:last-of-type { border-bottom: 0; }
/* Filas alternas: fondo gris azulado suave a todo el ancho de la tarjeta (padding de aiq-card: 22px) */
.aiq-evrow { margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
.aiq-evrow:nth-of-type(even) { background: #f5f7fc; }
.aiq-evrow:nth-of-type(even) .aiq-evrow__people { background: #fff; }
.aiq-evrow.is-deleted { opacity: 0.6; }
/* Columna izquierda: imagen de cabecera + licencia debajo */
.aiq-evrow__media { flex: 0 0 200px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.aiq-evrow__thumb { display: flex; width: 100%; height: 136px; border-radius: 14px; overflow: hidden; background: var(--aiq-track); align-items: center; justify-content: center; color: var(--aiq-icon-empty); font-size: 40px; box-shadow: 0 2px 8px rgba(38, 46, 79, 0.08); }
/* Sin imagen (o no carga): relleno de marca */
.aiq-evrow__placeholder { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--aiq-hero-bg, linear-gradient(135deg, #262e4f, #3b4a7a)); color: rgba(255, 255, 255, 0.85); font-size: 36px; }
.aiq-evrow__placeholder .fa-compass { position: absolute; right: -14px; bottom: -18px; font-size: 90px; color: rgba(255, 255, 255, 0.07); }
.aiq-evrow__thumb:hover .aiq-evrow__placeholder { color: #fff; }
/* Licencia bajo la imagen: tipo (icono + nombre) o aviso */
.aiq-evrow__lic { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #f7f8fc; border: 1px solid var(--aiq-line); font-size: 12px; font-weight: 700; color: var(--aiq-ink); min-width: 0; }
.aiq-evrow__lic img { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.aiq-evrow__lic span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.aiq-evrow__lic i { font-size: 16px; flex: 0 0 auto; }
.aiq-evrow__lic.is-warning { background: var(--aiq-orange-soft); border-color: #ffd9a8; color: var(--aiq-orange-fg); }
.aiq-evrow__lic.is-danger { background: var(--aiq-red-soft); border-color: #ffc9ce; color: var(--aiq-red-fg); }
/* Licencia con fechas de compra y caducidad debajo del tipo (4.96.0) */
.aiq-evrow__lic--fechas { flex-direction: column; align-items: stretch; gap: 6px; }
.aiq-evrow__lic-tipo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aiq-evrow__lic-fechas { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; margin: 0; padding-top: 6px; border-top: 1px solid var(--aiq-line); font-size: 11.5px; line-height: 1.35; }
.aiq-evrow__lic-fechas dt { font-weight: 600; color: var(--aiq-muted); margin: 0; }
.aiq-evrow__lic-fechas dd { font-weight: 700; color: var(--aiq-ink); margin: 0; min-width: 0; overflow-wrap: anywhere; }
.aiq-evrow__lic.is-warning .aiq-evrow__lic-fechas { border-top-color: #ffd9a8; }
.aiq-evrow__lic.is-warning .aiq-evrow__lic-fechas dt,
.aiq-evrow__lic.is-warning .aiq-evrow__lic-fechas dd { color: var(--aiq-orange-fg); }
.aiq-evrow__lic.is-warning .aiq-evrow__lic-fechas dt { opacity: .8; }
/* Aventura aparcada: su licencia actual es un Parking (Gamifier 4.109.1) */
.aiq-evrow__lic.is-parking { background: var(--aiq-purple-soft); border-color: #e2cdee; color: var(--aiq-purple-fg); }
.aiq-evrow__lic.is-parking .aiq-evrow__lic-fechas { border-top-color: #e2cdee; }
.aiq-evrow__lic.is-parking .aiq-evrow__lic-fechas dt,
.aiq-evrow__lic.is-parking .aiq-evrow__lic-fechas dd { color: var(--aiq-purple-fg); }
.aiq-evrow__lic.is-parking .aiq-evrow__lic-fechas dt { opacity: .8; }
.aiq-evrow__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.aiq-evrow__thumb:hover img { transform: scale(1.04); }
.aiq-evrow__body { flex: 1 1 auto; min-width: 0; }
.aiq-evrow__titleline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aiq-evrow__title { font-size: 16px; font-weight: 800; color: var(--aiq-ink); text-decoration: none; }
.aiq-evrow__title:hover { color: var(--aiq-blue); text-decoration: none; }
.aiq-evrow__desc { margin: 4px 0 0; font-size: 13px; color: var(--aiq-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aiq-evrow__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 10px; font-size: 12px; font-weight: 600; color: var(--aiq-muted); }
.aiq-evrow__meta i { margin-right: 5px; color: var(--aiq-faint); }
.aiq-evrow__meta b { color: var(--aiq-ink); }
.aiq-evrow__people { display: inline-flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #f7f8fc; border: 1px solid var(--aiq-line); margin-bottom: 10px; max-width: 100%; }
.aiq-evrow__person { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.aiq-evrow__person > i { width: 14px; text-align: center; color: var(--aiq-faint); }
.aiq-evrow__person .aiq-btn-icon { margin-left: auto; }
.aiq-evrow__plabel { color: var(--aiq-muted); min-width: 78px; font-weight: 600; }
.aiq-evrow__link { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 10px; min-width: 0; }
.aiq-evrow__link > i { color: var(--aiq-faint); }
.aiq-evrow__link a { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiq-evrow__space { max-width: 320px; }
/* Bloque de acceso destacado: Game PIN + deep link */
.aiq-evrow__access { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.aiq-access { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; min-width: 0; position: relative; }
.aiq-access__icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; }
.aiq-access__body { display: flex; flex-direction: column; min-width: 0; }
.aiq-access__label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.aiq-access--pin { background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); border: 1px solid rgba(241, 184, 63, 0.45); }
.aiq-access--pin .aiq-access__icon { background: var(--aiq-gold); }
.aiq-access__pin { font-size: 24px; font-weight: 800; letter-spacing: 0.12em; line-height: 1.1; color: var(--aiq-navy); font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.aiq-access--link { flex: 1 1 280px; background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); border: 1px solid rgba(37, 99, 235, 0.22); }
.aiq-access--link .aiq-access__icon { background: var(--aiq-blue); }
.aiq-access--link .aiq-access__body { flex: 1 1 auto; }
.aiq-access__url { font-size: 15px; font-weight: 800; color: var(--aiq-blue-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.aiq-access__url:hover { text-decoration: underline; color: var(--aiq-blue); }
/* Copiar = «otras acciones» → naranja (norma de colores de acción) */
.aiq-access__copy { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; border: 1px solid #ffd9a8; background: var(--aiq-orange-soft); color: var(--aiq-orange-fg); cursor: pointer; transition: background 0.15s ease; }
.aiq-access__copy:hover { background: var(--aiq-act-other); border-color: var(--aiq-act-other); color: #fff; }
.aiq-access__copy:focus { outline: none; box-shadow: var(--aiq-focus); }
/* 2.ª «otra acción» del grupo (descargar QR) → violeta suave (alternancia de tonos) */
.aiq-access__copy--other2 { border-color: #e4d0ef; background: var(--aiq-purple-soft); color: var(--aiq-purple-fg); }
.aiq-access__copy--other2:hover { background: #a77bca; border-color: #a77bca; color: #fff; }
.aiq-access__copied { position: absolute; right: 12px; bottom: -18px; font-size: 11px; font-weight: 700; color: var(--aiq-green-fg); }
.aiq-evrow__space-label { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 700; color: var(--aiq-muted); margin-bottom: 4px; }
.aiq-evrow__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.aiq-evrow__status { display: flex; align-items: center; gap: 14px; }
.aiq-evrow__select { display: flex; align-items: center; gap: 6px; }
.aiq-page .aiq-evrow__select .form-control { height: 34px; padding: 4px 10px; font-size: 12px; font-weight: 800; border-radius: 999px; min-width: 130px; color: var(--aiq-muted); }
.aiq-page .aiq-evrow__select.is-published .form-control { color: var(--aiq-green-fg); background: var(--aiq-green-soft); border-color: transparent; }
.aiq-evrow__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 1199px) {
  .aiq-evrow { flex-wrap: wrap; }
  .aiq-evrow__media { flex-basis: 160px; }
  .aiq-evrow__thumb { height: 110px; }
  .aiq-evrow__body { flex-basis: calc(100% - 180px); }
  .aiq-evrow__side { flex: 1 1 100%; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
}
@media (max-width: 575px) {
  .aiq-evrow__media { flex: 1 1 100%; }
  .aiq-evrow__thumb { height: 160px; }
  .aiq-evrow__body { flex-basis: 100%; }
  .aiq-evrow__link a, .aiq-evrow__space { max-width: 100%; }
}

/* ---------- FILTROS (pastillas con contador) ---------- */
/* <div class="aiq-filters"><button class="aiq-filter is-active">Todas <span class="aiq-filter__count">12</span></button>…</div>
   Variantes de color del estado activo: --ok, --warning, --blue, --danger */
.aiq-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.aiq-filters__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--aiq-muted); margin-right: 4px; }
.aiq-filter {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--aiq-line); background: #fff;
  color: var(--aiq-ink); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.aiq-filter:hover { border-color: var(--aiq-blue); color: var(--aiq-blue); }
.aiq-filter:focus { outline: none; box-shadow: var(--aiq-focus); }
.aiq-filter__count { font-size: 11px; font-weight: 800; background: var(--aiq-neutral-soft); color: var(--aiq-muted); border-radius: 999px; padding: 1px 7px; min-width: 22px; text-align: center; }
.aiq-filter.is-active { background: var(--aiq-navy); border-color: var(--aiq-navy); color: #fff; }
.aiq-filter.is-active .aiq-filter__count { background: rgba(255, 255, 255, 0.2); color: #fff; }
.aiq-filter--ok.is-active { background: var(--aiq-green-fg); border-color: var(--aiq-green-fg); }
.aiq-filter--warning.is-active { background: var(--aiq-gold-fg); border-color: var(--aiq-gold-fg); }
.aiq-filter--blue.is-active { background: var(--aiq-blue); border-color: var(--aiq-blue); }
.aiq-filter--danger.is-active { background: var(--aiq-red-fg); border-color: var(--aiq-red-fg); }

/* Indicador de carga en línea (dentro de tarjetas y tablas). OJO: NO llamarlo aiq-loading,
   que es la clase de la directiva <aiq-loading> (estilos en style.css). */
.aiq-busy { text-align: center; padding: 24px 10px; color: var(--aiq-muted); font-weight: 700; font-size: 13px; }
.aiq-busy i { margin-right: 8px; color: var(--aiq-blue); }

/* ---------- LISTA CLAVE / VALOR ---------- */
.aiq-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.aiq-dl dt { color: var(--aiq-muted); font-weight: 600; }
.aiq-dl dd { margin: 0; font-weight: 700; color: var(--aiq-ink); overflow-wrap: anywhere; }
.aiq-dl--right dd { text-align: right; }

/* ---------- BOTONES ---------- */
/* Botón redondo de acción para filas y cabeceras (ver, editar, borrar…) */
.aiq-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--aiq-line);
  background: #fff;
  color: var(--aiq-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.aiq-btn-icon:hover,
.aiq-btn-icon:focus { background: var(--aiq-blue-soft); border-color: #cddfff; color: var(--aiq-blue-fg); text-decoration: none; outline: none; }
.aiq-btn-icon--danger:hover,
.aiq-btn-icon--danger:focus { background: var(--aiq-red-soft); border-color: #ffc9ce; color: var(--aiq-red-fg); }
.aiq-btn-icon[disabled] { opacity: 0.45; cursor: not-allowed; }
.aiq-btn-icon--sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }

/* ---------- COLORES DE ACCIÓN (obligatorio en todo el Gamifier) ----------
   --create (verde): crear, añadir, nueva, importar, emitir
   --edit   (azul):  editar, modificar, guardar, asignar/cambiar, ajustar
   --other  (naranja): duplicar, copiar, ver/consultar, sincronizar, previsualizar, comprar
   --danger (rojo):  eliminar, cancelar un contrato, quitar
   En reposo: fondo suave + icono de color; al pasar el ratón: relleno. */
.aiq-btn-icon--create { background: var(--aiq-green-soft); border-color: #c4ebcf; color: var(--aiq-green-fg); }
.aiq-btn-icon--edit { background: var(--aiq-blue-soft); border-color: #cddfff; color: var(--aiq-blue-fg); }
.aiq-btn-icon--other { background: var(--aiq-orange-soft); border-color: #ffd9a8; color: var(--aiq-orange-fg); }
.aiq-btn-icon--danger { background: var(--aiq-red-soft); border-color: #ffc9ce; color: var(--aiq-red-fg); }
.aiq-btn-icon--create:hover, .aiq-btn-icon--create:focus { background: var(--aiq-act-create); border-color: var(--aiq-act-create); color: #fff; }
.aiq-btn-icon--edit:hover, .aiq-btn-icon--edit:focus { background: var(--aiq-act-edit); border-color: var(--aiq-act-edit); color: #fff; }
.aiq-btn-icon--other:hover, .aiq-btn-icon--other:focus { background: var(--aiq-act-other); border-color: var(--aiq-act-other); color: #fff; }
.aiq-btn-icon--danger:hover, .aiq-btn-icon--danger:focus { background: var(--aiq-act-delete); border-color: var(--aiq-act-delete); color: #fff; }
/* Varias «otras acciones» juntas: se alternan tonos para que no sean todas naranjas.
   1.ª --other (naranja) · 2.ª --other2 (violeta suave) · 3.ª --other3 (gris) · 4.ª --other4 (cian) */
.aiq-btn-icon--other2 { background: var(--aiq-purple-soft); border-color: #e4d0ef; color: var(--aiq-purple-fg); }
.aiq-btn-icon--other3 { background: var(--aiq-neutral-soft); border-color: #dde1ea; color: #4f5672; }
.aiq-btn-icon--other4 { background: var(--aiq-cyan-soft); border-color: #bfe8f6; color: var(--aiq-cyan-fg); }
.aiq-btn-icon--other2:hover, .aiq-btn-icon--other2:focus { background: #a77bca; border-color: #a77bca; color: #fff; }
.aiq-btn-icon--other3:hover, .aiq-btn-icon--other3:focus { background: #7a819c; border-color: #7a819c; color: #fff; }
.aiq-btn-icon--other4:hover, .aiq-btn-icon--other4:focus { background: var(--aiq-cyan); border-color: var(--aiq-cyan); color: #fff; }

/* Botones de texto del tema dentro de pantallas migradas, con la misma norma:
   btn-success = crear · btn-primary = modificar/guardar · btn-warning = otras · btn-danger(-outline) = eliminar */
.aiq-page .btn-success, .aiq-modal .btn-success { background: var(--aiq-act-create); border-color: var(--aiq-act-create); color: #fff; font-weight: 700; }
.aiq-page .btn-warning, .aiq-modal .btn-warning { background: var(--aiq-act-other); border-color: var(--aiq-act-other); color: #fff; font-weight: 700; }
.aiq-page .btn-danger, .aiq-modal .btn-danger { background: var(--aiq-act-delete); border-color: var(--aiq-act-delete); color: #fff; font-weight: 700; }
.aiq-page .btn-success:hover, .aiq-page .btn-success:focus, .aiq-modal .btn-success:hover, .aiq-modal .btn-success:focus,
.aiq-page .btn-warning:hover, .aiq-page .btn-warning:focus, .aiq-modal .btn-warning:hover, .aiq-modal .btn-warning:focus,
.aiq-page .btn-danger:hover, .aiq-page .btn-danger:focus, .aiq-modal .btn-danger:hover, .aiq-modal .btn-danger:focus { filter: brightness(0.92); color: #fff; }
.aiq-page .btn-danger-outline, .aiq-modal .btn-danger-outline { background: #fff; border: 1px solid var(--aiq-act-delete); color: var(--aiq-red-fg); font-weight: 700; }
.aiq-page .btn-danger-outline:hover, .aiq-modal .btn-danger-outline:hover { background: var(--aiq-act-delete); color: #fff; }
.aiq-page .btn-warning-outline, .aiq-modal .btn-warning-outline { background: #fff; border: 1px solid var(--aiq-act-other); color: var(--aiq-orange-fg); font-weight: 700; }
.aiq-page .btn-warning-outline:hover, .aiq-modal .btn-warning-outline:hover,
.aiq-page .btn-warning-outline:focus, .aiq-modal .btn-warning-outline:focus { background: var(--aiq-act-other); border-color: var(--aiq-act-other); color: #fff; }

/* Botones del hero con color de acción (sólidos sobre el navy) */
.aiq-hero .aiq-btn-hero--create { background: var(--aiq-act-create); color: #fff; }
.aiq-hero .aiq-btn-hero--edit { background: var(--aiq-act-edit); color: #fff; }
.aiq-hero .aiq-btn-hero--other { background: var(--aiq-act-other); color: #fff; }
.aiq-hero .aiq-btn-hero--create:hover, .aiq-hero .aiq-btn-hero--create:focus,
.aiq-hero .aiq-btn-hero--edit:hover, .aiq-hero .aiq-btn-hero--edit:focus,
.aiq-hero .aiq-btn-hero--other:hover, .aiq-hero .aiq-btn-hero--other:focus { color: #fff; filter: brightness(1.06); }

/* Leyenda de colores de acción (catálogo UI kit) */
.aiq-actions-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.aiq-actions-legend > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.aiq-actions-legend .aiq-btn-icon { grid-row: span 2; cursor: default; }
.aiq-actions-legend small { color: var(--aiq-muted); font-size: 11px; line-height: 1.4; }

/* Enlaces de acción al pie de un KPI */
.aiq-kpi__cta a.is-create { color: var(--aiq-green-fg); }
.aiq-kpi__cta a.is-other { color: var(--aiq-orange-fg); }

/* Barra de acciones fija al pie de una ficha larga */
.aiq-actionbar {
  position: sticky;
  bottom: 12px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px;
  margin-top: 8px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(22, 27, 51, 0.16);
  border: 1px solid var(--aiq-line);
}
/* Deja libre la esquina del widget de chat (assets/chatbot) */
.aiq-actionbar { margin-right: 72px; }
.aiq-actionbar__info { margin-right: auto; font-size: 13px; color: var(--aiq-muted); font-weight: 600; }

/* ---------- FORMULARIOS ---------- */
.aiq-profile .aiq-form .form-control-label,
.aiq-page .aiq-form .form-control-label,
.aiq-modal .aiq-form .form-control-label { font-weight: 700; color: var(--aiq-muted); font-size: 13px; }
.aiq-profile .aiq-form .form-control,
.aiq-page .aiq-form .form-control,
.aiq-modal .aiq-form .form-control { border-radius: 10px; }
.aiq-page .form-control:focus,
.aiq-modal .form-control:focus { border-color: var(--aiq-blue); box-shadow: var(--aiq-focus); }
.aiq-page .aiq-form input[type="date"].form-control,
.aiq-modal .aiq-form input[type="date"].form-control { height: 36px; padding-top: 6px; padding-bottom: 6px; }

/* Botones del tema dentro de pantallas migradas: primario azul de marca, secundario neutro
   (el btn-secondary del tema es azul y competía con la acción principal). */
.aiq-page .btn-primary,
.aiq-modal .btn-primary { background: var(--aiq-blue); border-color: var(--aiq-blue); color: #fff; font-weight: 700; }
.aiq-page .btn-primary:hover, .aiq-page .btn-primary:focus,
.aiq-modal .btn-primary:hover, .aiq-modal .btn-primary:focus { filter: brightness(0.92); background: var(--aiq-blue); border-color: var(--aiq-blue); color: #fff; }
.aiq-page .btn-secondary,
.aiq-modal .btn-secondary { background: #fff; border: 1px solid var(--aiq-line); color: var(--aiq-ink); font-weight: 700; }
.aiq-page .btn-secondary:hover, .aiq-page .btn-secondary:focus,
.aiq-modal .btn-secondary:hover, .aiq-modal .btn-secondary:focus { background: var(--aiq-neutral-soft); border-color: var(--aiq-line); color: var(--aiq-ink); }
.aiq-page .btn[disabled], .aiq-modal .btn[disabled] { opacity: 0.55; }
.aiq-form__actions { margin-bottom: 0; }
.aiq-form__actions .btn + .btn { margin-left: 8px; }
.aiq-help { display: block; margin-top: 4px; font-size: 12px; color: var(--aiq-muted); }

/* Elección entre pocas opciones como tarjetas (tipo de contrato, añadir/restar…)
   <div class="aiq-choices"><button type="button" class="aiq-choice" ng-class="{'is-active': x}">
     <i class="fa-solid fa-moon aiq-choice__icon"></i><span class="aiq-choice__label">Luna<small>…</small></span>
     <i class="fa-solid fa-circle-check aiq-choice__check"></i></button>…</div>
   Variantes del estado activo: --danger */
.aiq-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.aiq-choice {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 14px; border: 2px solid var(--aiq-line); background: #fff;
  color: var(--aiq-ink); font-weight: 800; font-size: 14px; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.aiq-choice:hover { border-color: var(--aiq-blue); }
.aiq-choice:focus { outline: none; box-shadow: var(--aiq-focus); }
.aiq-choice__icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--aiq-neutral-soft); color: var(--aiq-navy-soft); font-size: 16px; }
.aiq-choice__label { flex: 1 1 auto; min-width: 0; }
.aiq-choice__label small { display: block; font-weight: 600; font-size: 12px; color: var(--aiq-muted); }
.aiq-choice__check { color: var(--aiq-blue); opacity: 0; transition: opacity 0.15s ease; }
.aiq-choice.is-active { border-color: var(--aiq-blue); background: var(--aiq-blue-soft); }
.aiq-choice.is-active .aiq-choice__icon { background: var(--aiq-blue); color: #fff; }
.aiq-choice.is-active .aiq-choice__check { opacity: 1; }
.aiq-choice--danger.is-active { border-color: var(--aiq-red-fg); background: var(--aiq-red-soft); }
.aiq-choice--danger.is-active .aiq-choice__icon { background: var(--aiq-red-fg); }
.aiq-choice--danger.is-active .aiq-choice__check { color: var(--aiq-red-fg); }

/* Interruptor sobre un checkbox real. El tema ya oculta los checkbox nativos
   (opacity:0; position:absolute), así que el input sigue siendo el que manda. */
.aiq-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; font-weight: 700; color: var(--aiq-ink); font-size: 14px; user-select: none; }
.aiq-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.aiq-switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d5dae6;
  transition: background 0.2s ease;
}
.aiq-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 27, 51, 0.3);
  transition: transform 0.2s ease;
}
.aiq-switch input:checked + .aiq-switch__track { background: var(--aiq-blue); }
.aiq-switch input:checked + .aiq-switch__track::after { transform: translateX(18px); }
.aiq-switch input:focus-visible + .aiq-switch__track { box-shadow: var(--aiq-focus); }
.aiq-switch input:disabled + .aiq-switch__track { opacity: 0.5; }
.aiq-switch__label small { display: block; font-weight: 600; color: var(--aiq-muted); font-size: 12px; }
/* Rejilla de opciones con interruptor */
.aiq-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.aiq-option { padding: 12px 14px; border: 1px solid var(--aiq-line); border-radius: 12px; background: #fff; transition: border-color 0.15s ease; }
.aiq-option:hover { border-color: #cfd6e6; }

/* Zona de subida (ng-flow / drag & drop) */
.aiq-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 20px;
  border: 2px dashed #cfd6e6;
  border-radius: 14px;
  background: #fafbfe;
  color: var(--aiq-muted);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.aiq-dropzone i { font-size: 28px; color: var(--aiq-icon-empty); }
.aiq-dropzone:hover,
.aiq-dropzone.is-over { border-color: var(--aiq-blue); background: #f2f7ff; color: var(--aiq-blue-fg); }
.aiq-dropzone:hover i,
.aiq-dropzone.is-over i { color: var(--aiq-blue); }
.aiq-dropzone img { max-width: 100%; max-height: 180px; border-radius: 10px; }

/* ---------- DATOS TÉCNICOS ---------- */
.aiq-tech-toggle { padding: 0; font-weight: 700; color: var(--aiq-blue); }
.aiq-tech { margin-top: 14px; }
.aiq-tech__label { font-size: 12px; font-weight: 700; color: var(--aiq-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.aiq-tech__value { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aiq-tech__value code {
  flex: 1 1 220px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f6fa;
  color: var(--aiq-ink);
  font-size: 12px;
  word-break: break-all;
}

/* ---------- UI-GRID (dentro de una pantalla migrada) ---------- */
.aiq-page .ui-grid,
.aiq-modal .ui-grid { border: 0; border-radius: 12px; font-size: 13px; color: var(--aiq-ink); }
.aiq-page .ui-grid-header,
.aiq-modal .ui-grid-header { border-bottom: 1px solid var(--aiq-line); }
.aiq-page .ui-grid-top-panel,
.aiq-modal .ui-grid-top-panel { background: #fafbfe; border-radius: 12px 12px 0 0; }
.aiq-page .ui-grid-header-cell,
.aiq-modal .ui-grid-header-cell { background: transparent; border-right: 0; }
.aiq-page .ui-grid-header-cell .ui-grid-cell-contents,
.aiq-modal .ui-grid-header-cell .ui-grid-cell-contents { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--aiq-muted); }
.aiq-page .ui-grid-cell,
.aiq-modal .ui-grid-cell { border-right: 0; border-bottom: 1px solid var(--aiq-line); }
.aiq-page .ui-grid-row:nth-child(odd) .ui-grid-cell,
.aiq-page .ui-grid-row:nth-child(even) .ui-grid-cell,
.aiq-modal .ui-grid-row:nth-child(odd) .ui-grid-cell,
.aiq-modal .ui-grid-row:nth-child(even) .ui-grid-cell { background: #fff; }
.aiq-page .ui-grid-row:hover .ui-grid-cell,
.aiq-modal .ui-grid-row:hover .ui-grid-cell { background: #f8f9fc; }
.aiq-page .ui-grid-row.ui-grid-row-selected .ui-grid-cell,
.aiq-modal .ui-grid-row.ui-grid-row-selected .ui-grid-cell { background: #f2f7ff; }
.aiq-page .ui-grid-cell-contents,
.aiq-modal .ui-grid-cell-contents { padding: 8px 10px; }
/* Celdas centradas en vertical sin convertirlas en flex (conserva text-align y la elipsis):
   align-content en bloques (Chrome 123+, Firefox 125+, Safari 17.4+); sin soporte quedan arriba, como antes. */
.aiq-page .ui-grid-row .ui-grid-cell-contents,
.aiq-modal .ui-grid-row .ui-grid-cell-contents { align-content: center; padding-top: 0; padding-bottom: 0; }
.aiq-page .ui-grid-pager-panel,
.aiq-modal .ui-grid-pager-panel { background: transparent; }
.aiq-page .ui-grid-menu-button,
.aiq-modal .ui-grid-menu-button { background: transparent; border: 0; }
.aiq-page .ui-grid-filter-container input,
.aiq-modal .ui-grid-filter-container input { border-radius: 8px; border: 1px solid var(--aiq-line); padding: 2px 6px; }
/* Ayudantes para cellTemplate (Gamifier 4.82.0) */
.aiq-grid-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aiq-grid-user a { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--aiq-ink); text-decoration: none; }
.aiq-grid-user a:hover b { color: var(--aiq-blue); }
.aiq-grid-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiq-grid-user__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 28px; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(38, 46, 79, 0.15); }
.aiq-grid-muted { color: var(--aiq-muted); }
.aiq-grid-user__avatar--lg { width: 38px; height: 38px; flex-basis: 38px; }
/* Posición en una clasificación: 1.º oro, 2.º plata, 3.º bronce */
.aiq-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--aiq-neutral-soft); color: var(--aiq-muted); }
.aiq-rank--1 { background: linear-gradient(135deg, #ffd86b, #f1b83f); color: #6b4a00; box-shadow: 0 3px 8px rgba(241, 184, 63, 0.45); }
.aiq-rank--2 { background: linear-gradient(135deg, #eef1f6, #c3cad8); color: #3d4560; box-shadow: 0 3px 8px rgba(125, 135, 160, 0.35); }
.aiq-rank--3 { background: linear-gradient(135deg, #f3c6a0, #cd8a52); color: #5e3210; box-shadow: 0 3px 8px rgba(205, 138, 82, 0.4); }
.ui-grid-cell-contents .aiq-btn-icon + .aiq-btn-icon { margin-left: 0; }
.objetos-rank-link .fa-gift { margin-right: 4px; }
.aiq-grid-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiq-grid-thumb { width: 40px; height: 28px; object-fit: cover; border-radius: 6px; flex: 0 0 40px; }
.aiq-grid-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.ui-grid-cell-contents .aiq-meter { margin-top: 4px; }

/* ============================================================
   MODALES
   ============================================================ */
/* Base para todos los modales (uib): esquinas, sombra y fondo navy */
.modal-backdrop { background-color: var(--aiq-navy-deep); }
.modal-backdrop.in { opacity: 0.45; }
.modal-content { border: 0; border-radius: 18px; box-shadow: var(--aiq-shadow-pop); }
.modal-content > :first-child { border-top-left-radius: 18px; border-top-right-radius: 18px; }
.modal-content > :last-child { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; }
.modal-header { border-bottom-color: var(--aiq-line); }
.modal-footer { border-top-color: var(--aiq-line); }

/* Modal aiq: windowClass "aiq-modal" + cabecera __header */
.aiq-modal { color: var(--aiq-ink); }
.aiq-modal .modal-dialog { margin-top: 8vh; }
.aiq-modal .modal-content { overflow: visible; }
.aiq-modal__header,
.aiq-lang-modal__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  color: #fff;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(68, 138, 255, 0.35), transparent 60%),
    linear-gradient(135deg, var(--aiq-navy-deep), var(--aiq-navy) 60%, var(--aiq-navy-soft));
}
.aiq-modal__title,
.aiq-lang-modal__title { margin: 0; font-size: 18px; font-weight: 800; color: #fff; }
.aiq-modal__title i,
.aiq-lang-modal__title i { margin-right: 10px; color: #9fc2ff; }
.aiq-modal__sub,
.aiq-lang-modal__sub { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, 0.7); }
.aiq-modal__close,
.aiq-lang-modal__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.aiq-modal__close:hover,
.aiq-lang-modal__close:hover { background: rgba(255, 255, 255, 0.24); }
.aiq-modal__body,
.aiq-lang-modal__body { padding: 18px 24px 24px; }
.aiq-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--aiq-line);
  background: #fafbfe;
  border-radius: 0 0 18px 18px;
}
.aiq-modal__step-title { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--aiq-ink); }
.aiq-modal__scroll { max-height: 400px; overflow-y: auto; border: 1px solid var(--aiq-line); border-radius: 12px; margin: 0; padding: 0; }
.aiq-modal__scroll .aiq-table th { position: sticky; top: 0; background: #fafbfe; z-index: 1; }
.aiq-table tr.is-invalid td { background: var(--aiq-red-soft); }

/* Indicador de pasos de un asistente: <ol class="aiq-steps"><li class="is-done|is-current"><span class="aiq-steps__dot">1</span></li>… */
.aiq-steps { display: flex; justify-content: center; align-items: center; list-style: none; margin: 0 0 20px; padding: 0; }
.aiq-steps > li { display: flex; align-items: center; }
.aiq-steps > li + li::before { content: ""; width: 34px; height: 2px; background: var(--aiq-line); margin: 0 6px; }
.aiq-steps > li.is-done + li::before,
.aiq-steps > li.is-current::before { background: var(--aiq-green); }
.aiq-steps__dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--aiq-neutral-soft); color: var(--aiq-muted); transition: background 0.2s ease, color 0.2s ease; }
.aiq-steps > li.is-done .aiq-steps__dot { background: var(--aiq-green); color: #fff; }
.aiq-steps > li.is-current .aiq-steps__dot { background: var(--aiq-navy); color: #fff; box-shadow: 0 0 0 4px rgba(38, 46, 79, 0.15); }

/* Con etiqueta bajo cada paso: <ol class="aiq-steps aiq-steps--labels"> + <span class="aiq-steps__label"> */
.aiq-steps--labels { align-items: flex-start; margin-bottom: 24px; }
/* Ancho fijo por paso: la línea de unión (::before) se calcula sobre él y no invade los círculos */
.aiq-steps--labels > li { position: relative; flex-direction: column; align-items: center; gap: 6px; width: 110px; }
.aiq-steps--labels > li + li { margin-left: 10px; }
.aiq-steps--labels > li + li::before { position: absolute; top: 16px; right: calc(50% + 21px); width: 78px; margin: 0; }
.aiq-steps__label { font-size: 12px; font-weight: 700; color: var(--aiq-muted); white-space: nowrap; }
.aiq-steps > li.is-current .aiq-steps__label { color: var(--aiq-ink); }
.aiq-steps > li.is-done .aiq-steps__label { color: var(--aiq-green-fg); }
@media (max-width: 575px) {
  .aiq-steps--labels > li { width: 84px; }
  .aiq-steps--labels > li + li::before { width: 52px; }
  .aiq-steps__label { font-size: 10px; }
}

/* Asistente de creación de Aventura (wizard_evento.html) */
.aiq-wizard { max-width: 960px; margin: 0 auto; }
.aiq-wizard__footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--aiq-line); }
.aiq-page .aiq-form .form-control.aiq-wizard__title-input { font-size: 18px; font-weight: 700; height: 48px; }
.aiq-wizard__tz select, .aiq-wizard__tz .form-control { max-width: 100%; }
.aiq-wizard__structure { margin-top: 18px; padding: 18px; border-radius: 14px; background: #f7f8fc; border: 1px solid var(--aiq-line); }
.aiq-wizard__counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.aiq-wizard__count { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; background: #fff; border: 1px solid var(--aiq-line); border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--aiq-ink); }
.aiq-wizard__count img { width: 28px; height: 28px; object-fit: contain; flex: 0 0 28px; }
.aiq-wizard__count-icon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); }
.aiq-wizard__count-label { flex: 1 1 auto; min-width: 0; }
.aiq-page .aiq-wizard__count .form-control { flex: 0 0 76px; width: 76px; height: 34px; text-align: center; font-weight: 800; }
.aiq-choices--big .aiq-choice { padding: 20px; align-items: flex-start; }
.aiq-choices--big .aiq-choice__icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 20px; border-radius: 14px; }
.aiq-choices--big { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- DESPLEGABLE (details/summary, sin JS) ---------- */
.aiq-details { border: 1px solid var(--aiq-line); border-radius: 12px; margin-top: 10px; background: #fff; }
.aiq-details > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 13px; color: var(--aiq-ink); display: flex; align-items: center; gap: 8px; }
.aiq-details > summary::-webkit-details-marker { display: none; }
.aiq-details > summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: 11px; color: var(--aiq-muted); transition: transform 0.2s ease; }
.aiq-details[open] > summary::after { transform: rotate(180deg); }
.aiq-details > summary i { color: var(--aiq-navy-soft); }
.aiq-details > summary:hover { background: #fafbfe; border-radius: 12px; }
.aiq-details__body { padding: 4px 14px 14px; font-size: 13px; overflow-x: auto; }
.aiq-details--strong { background: #f7f8fc; }

/* ---------- GALERÍA de fotos/vídeos + visor ---------- */
.aiq-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.aiq-gallery__item { position: relative; height: 120px; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--aiq-track); box-shadow: 0 1px 4px rgba(38, 46, 79, 0.1); }
.aiq-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.aiq-gallery__item:hover img { transform: scale(1.05); }
.aiq-gallery__video { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--aiq-navy-deep); color: #fff; font-size: 34px; }
.aiq-gallery__who { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; background: linear-gradient(transparent, rgba(22, 27, 51, 0.8)); color: #fff; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiq-gallery__del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(22, 27, 51, 0.55); color: #fff; font-size: 11px; cursor: pointer; opacity: 0; transition: opacity 0.15s ease, background 0.15s ease; }
.aiq-gallery__item:hover .aiq-gallery__del, .aiq-gallery__del:focus { opacity: 1; }
.aiq-gallery__del:hover { background: var(--aiq-act-delete); }
.aiq-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(15, 18, 36, 0.92); display: flex; align-items: center; justify-content: center; }
.aiq-lightbox__close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 20px; cursor: pointer; z-index: 10001; }
.aiq-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 20px; cursor: pointer; z-index: 10001; }
.aiq-lightbox__close:hover, .aiq-lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.aiq-lightbox__nav--prev { left: 16px; }
.aiq-lightbox__nav--next { right: 16px; }
.aiq-lightbox__content { max-width: 90vw; max-height: 88vh; text-align: center; }
.aiq-lightbox__content img, .aiq-lightbox__content video { max-width: 90vw; max-height: 78vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.aiq-lightbox__info { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; color: #fff; font-size: 13px; }
.aiq-lightbox__info span { color: rgba(255, 255, 255, 0.65); }

.aiq-hero__stat-value--sm { font-size: 20px; }
/* Pestañas con una acción a la derecha (p. ej. recargar) */
.aiq-tabsbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.aiq-tabsbar .aiq-tabs { margin-bottom: 0; }
.aiq-tabsbar > .aiq-btn-icon { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
/* Recorrido del Player: iconos FA6 en las piezas que antes eran material-icons */
.player-detail .recorrido-meta-chip i, .player-detail .recorrido-detalle-label i, .player-detail .recorrido-detalle-badge i { margin-right: 4px; }
.player-detail .ro-ic, .player-detail .ri-ic { font-size: 15px; }
.player-detail .objeto-card-typebadge i, .player-detail .objeto-card-play i { font-size: 13px; }
.player-detail .objeto-card-icono i { font-size: 38px; }
.player-detail .fa-tag.is-off { opacity: 0.45; }

/* ---------- GAME BOARD (evento_gameboard.html) ---------- */
.aiq-toc__img { width: 18px; height: 18px; object-fit: contain; margin-right: 2px; vertical-align: -3px; }
.aiq-toc li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiq-gb-mission { padding: 16px 0; border-top: 1px solid var(--aiq-line); }
.aiq-gb-mission:first-of-type { border-top: 0; padding-top: 0; }
.aiq-gb-mission__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 15px; }
.aiq-gb-mission__head > i { color: var(--aiq-navy-soft); }
.aiq-gb-rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: stretch; }
.aiq-gb-ring { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: #f7f8fc; border: 1px solid var(--aiq-line); }
.aiq-gb-ring__text { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--aiq-muted); }
.aiq-gb-ring__text b { font-size: 13px; color: var(--aiq-ink); margin-bottom: 2px; }
.aiq-gb-facts { display: flex; flex-direction: column; gap: 8px; }
.aiq-gb-fact { padding: 10px 14px; border-radius: 12px; background: #f7f8fc; border: 1px solid var(--aiq-line); display: flex; flex-direction: column; }
.aiq-gb-fact__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--aiq-muted); }
.aiq-gb-fact__label i { color: var(--aiq-gold); }
.aiq-gb-fact b { font-size: 20px; font-weight: 800; color: var(--aiq-ink); }
.aiq-gb-fact small { font-size: 11px; color: var(--aiq-muted); }
.aiq-gb-sub { margin-top: 16px; }
.aiq-gb-reto__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aiq-gb-reto__type { width: 40px; height: 40px; object-fit: contain; flex: 0 0 40px; }
.aiq-gb-reto__head .aiq-section__title { margin: 0; }
.aiq-gb-reto__top { display: grid; grid-template-columns: auto repeat(2, minmax(220px, 1fr)); gap: 14px; align-items: stretch; }
.aiq-gb-reto__img { width: 180px; height: 100%; min-height: 110px; border-radius: 14px; overflow: hidden; background: var(--aiq-track); }
.aiq-gb-reto__img img { width: 100%; height: 100%; object-fit: cover; }
.aiq-gb-question { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--aiq-line); border-radius: 12px; }
.aiq-gb-question__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.aiq-gb-question__score { margin-left: auto; font-size: 12px; color: var(--aiq-muted); font-weight: 700; }
.aiq-gb-question__lang { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--aiq-muted); margin-top: 6px; }
.aiq-hbars li.is-correct .aiq-hbars__label { color: var(--aiq-green-fg); }
.aiq-meter--muted > span { background: #b8bfd0; }
.aiq-gb-detailrow > td { background: #f7f8fc; padding: 10px 16px !important; }
.aiq-gb-nick { color: var(--aiq-coral); }
.aiq-gb-score { font-size: 18px; font-weight: 800; color: var(--aiq-ink); }
.aiq-stars { color: var(--aiq-gold); margin-right: 4px; }
.aiq-stars .is-empty { color: #cdd2df; }
@media (max-width: 767px) {
  .aiq-gb-reto__top { grid-template-columns: 1fr; }
  .aiq-gb-reto__img { width: 100%; height: 160px; }
}

/* Barra de interruptores de filtro sobre un listado (Usuarios, Clasificación) */
.aiq-switchbar { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 4px 2px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--aiq-line); }
.aiq-switchbar .aiq-switch__label { font-size: 13px; }
.aiq-switchbar .aiq-switch__label i { color: var(--aiq-faint); margin-right: 2px; }

/* Alta rápida en una fila (Tags): campo + selector + botón */
.aiq-tagnew { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.aiq-tagnew .form-control { flex: 1 1 260px; max-width: 480px; }

/* Rejilla de contadores de resultado (importaciones, resúmenes) */
.aiq-statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.aiq-statgrid__item { border-radius: 14px; padding: 14px; background: var(--aiq-neutral-soft); text-align: center; }
.aiq-statgrid__item b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--aiq-ink); }
.aiq-statgrid__item span { font-size: 12px; font-weight: 700; color: var(--aiq-muted); }
.aiq-statgrid__item--green { background: var(--aiq-green-soft); } .aiq-statgrid__item--green b { color: var(--aiq-green-fg); }
.aiq-statgrid__item--blue { background: var(--aiq-blue-soft); } .aiq-statgrid__item--blue b { color: var(--aiq-blue-fg); }
.aiq-statgrid__item--purple { background: var(--aiq-purple-soft); } .aiq-statgrid__item--purple b { color: var(--aiq-purple-fg); }
.aiq-statgrid__item--gold { background: var(--aiq-gold-soft); } .aiq-statgrid__item--gold b { color: var(--aiq-gold-fg); }
.aiq-statgrid__item--coral { background: var(--aiq-red-soft); } .aiq-statgrid__item--coral b { color: var(--aiq-red-fg); }

/* Acción destructiva o secundaria a la izquierda del pie */
.aiq-modal__footer-start { margin-right: auto; }
/* Resumen de solo lectura al principio del cuerpo */
.aiq-modal__summary { grid-template-columns: auto 1fr auto 1fr; gap: 10px 14px; }
@media (max-width: 575px) { .aiq-modal__summary { grid-template-columns: auto 1fr; } }

/* ---------- FICHA DE AVENTURA (evento.html, Gamifier 4.87.0) ---------- */
/* Hero: KPIs de Players (antes anillos easyPieChart) y acciones en fila propia */
.aiq-evento .aiq-hero__stats { flex-wrap: wrap; }
.aiq-hero__stat-pct { margin-left: 6px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.62); }
.aiq-evento .aiq-hero__actions { flex: 1 1 100%; margin-top: 18px; }
.aiq-hero__actions-sep { flex: 0 0 1px; align-self: stretch; margin: 0 4px; background: rgba(255, 255, 255, 0.2); }
/* Variantes de color de acción sobre el hero (misma alternancia que aiq-btn-icon--other2/3/4) */
.aiq-hero .aiq-btn-hero--other2 { background: #a77bca; color: #fff; }
.aiq-hero .aiq-btn-hero--other3 { background: #7a819c; color: #fff; }
.aiq-hero .aiq-btn-hero--other4 { background: var(--aiq-cyan); color: #fff; }
.aiq-hero .aiq-btn-hero--danger { background: var(--aiq-act-delete); color: #fff; }
.aiq-hero .aiq-btn-hero--other2:hover, .aiq-hero .aiq-btn-hero--other2:focus,
.aiq-hero .aiq-btn-hero--other3:hover, .aiq-hero .aiq-btn-hero--other3:focus,
.aiq-hero .aiq-btn-hero--other4:hover, .aiq-hero .aiq-btn-hero--other4:focus,
.aiq-hero .aiq-btn-hero--danger:hover, .aiq-hero .aiq-btn-hero--danger:focus { color: #fff; filter: brightness(1.06); }
/* Barra de acciones: acción destructiva a la izquierda */
.aiq-actionbar__start { margin-right: auto; }
.aiq-section__icon--gold { background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); }

/* Separación vertical entre bloques dentro de una sección */
.aiq-evento-gap { margin-top: 14px; }
.aiq-evento-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.aiq-evento-datetime { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.aiq-page .aiq-evento__select { display: block; width: 100%; max-width: 380px; }
.aiq-evento-touchspin { display: block; margin-top: 6px; }
.aiq-page .aiq-evento-num { display: inline-block; width: 90px; margin-left: auto; }
.aiq-evento-option-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--aiq-ink); }
.aiq-evento-option-inline > i { color: var(--aiq-faint); }
.aiq-evento-muted-italic { display: inline; margin: 0; font-style: italic; }
.aiq-evento-help-top { margin: 0 0 6px; }
.aiq-evento-warn { color: var(--aiq-orange-fg); }
.aiq-evento-star { color: var(--aiq-gold); }
.aiq-evento-footer { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--aiq-line); display: flex; justify-content: flex-end; }

/* Mapa del Player (4.111.0): bloque «título + ayuda + aiq-choices» de las
   Opciones de la Aventura y del Reto. Texto grande, grueso y con contraste
   (norma de legibilidad): la ayuda NO va en gris flojo ni en letra pequeña. */
.aiq-mapopts { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--aiq-line); }
.aiq-mapopts__title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 17px; font-weight: 800; color: var(--aiq-ink); }
.aiq-mapopts__title > i { color: var(--aiq-blue-fg); }
.aiq-mapopt { margin-bottom: 20px; }
.aiq-mapopt:last-child { margin-bottom: 0; }
.aiq-mapopt__label { display: block; margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--aiq-ink); }
.aiq-mapopt__help { margin: 0 0 10px; max-width: 900px; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--aiq-navy-soft); }
.aiq-mapopt .aiq-choices { max-width: 1000px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.aiq-mapopt .aiq-choice { font-size: 15px; }
.aiq-mapopt__extra { margin-top: 14px; }
.aiq-mapopt__extra .aiq-mapopt__help { margin: 6px 0 0; }

/* Licencia */
.aiq-evento-lic { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; }
.aiq-evento-lic__icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); }
.aiq-evento .aiq-dl dt i { width: 16px; margin-right: 4px; color: var(--aiq-faint); }
/* Espacio y boosters de la licencia (4.100.0) */
.aiq-evento-lic__space { display: flex; flex-direction: column; gap: 4px; max-width: 260px; }
.aiq-evento-lic__boosters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aiq-evento-lic__boosters > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aiq-evento-lic__boosters small { color: var(--aiq-muted); font-weight: 600; font-size: 12px; }
/* El popover va en el span para que salga tambien con el boton deshabilitado */
.aiq-booster-btn { display: inline-block; }
.aiq-booster-btn .btn[disabled] { pointer-events: none; }
/* Modal «Aplicar booster» */
.aiq-booster-target { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; }
.aiq-booster-target small { display: block; color: var(--aiq-muted); font-weight: 600; font-size: 12px; margin-top: 2px; }
.aiq-booster-confirm { margin-top: 12px; }
.aiq-licpick .aiq-licpick__img--booster { background: var(--aiq-purple-soft); }
.aiq-licpick .aiq-licpick__img--booster i { color: var(--aiq-purple-fg); }

/* Acceso: Game PIN + deep link + QR */
.aiq-evento-access { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.aiq-evento-qr, .aiq-evento-code { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--aiq-line); border-radius: 14px; background: #fff; }
.aiq-evento-codes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.aiq-evento-code__title { font-size: 14px; font-weight: 800; color: var(--aiq-ink); overflow-wrap: anywhere; }
.aiq-evento-qr img, .aiq-evento-code img, .aiq-evento-qr canvas, .aiq-evento-code canvas { max-width: 100%; }
.aiq-evento-grid { height: 400px; }

/* Votaciones */
.aiq-evento-col-xs { width: 60px; }
.aiq-evento-vote-icon { font-size: 18px; }

/* Arena: tarjetas de las Misiones seleccionadas */
.aiq-evento-livecards { display: flex; flex-wrap: wrap; gap: 14px; }
.aiq-evento-livecard { width: 170px; overflow: hidden; border-radius: 12px; border: 1px solid var(--aiq-line); border-top: 4px solid #454d7a; background: #fff; box-shadow: var(--aiq-shadow); }
.aiq-evento-livecard__img { display: block; width: 100%; height: 90px; object-fit: cover; }
.aiq-evento-livecard__ph { display: flex; align-items: center; justify-content: center; background: var(--aiq-track); color: var(--aiq-icon-empty); font-size: 34px; }
.aiq-evento-livecard__title { padding: 8px 10px; text-align: center; font-size: 12px; font-weight: 800; color: var(--aiq-ink); }

/* Imágenes (ng-flow) dentro de aiq-dropzone */
.aiq-evento-uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.aiq-evento-upload .aiq-subhead { margin-top: 0; }
.aiq-evento-upload .aiq-dropzone { justify-content: flex-start; }
.aiq-evento-upload__preview { display: flex; align-items: center; justify-content: center; min-height: 110px; }
.aiq-evento-upload__preview > i { font-size: 64px; color: var(--aiq-icon-empty); }
.aiq-evento-upload__preview img { max-width: 100%; max-height: 160px; border-radius: 10px; object-fit: contain; }
.aiq-evento-upload__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.aiq-evento-progress { width: 100%; margin: 6px 0 0; }
.aiq-evento-progress__text { width: 100%; text-align: left; font-size: 11px; }
.aiq-evento-mapzone { max-width: 520px; }

/* Multimedia por idioma (audio / vídeo) */
.aiq-evento-media { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 16px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--aiq-line); }
.aiq-evento-media__label { margin: 8px 0 0; }
.aiq-evento-media__zone { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.aiq-evento-media__zone .aiq-evento-upload__actions { justify-content: flex-start; }
.aiq-evento-player { padding: 10px 0 10px 216px; }
@media (max-width: 767px) {
  .aiq-evento-media { grid-template-columns: 1fr; }
  .aiq-evento-player { padding-left: 0; }
  .aiq-evento-datetime { grid-template-columns: 1fr; }
}

/* Mapa de Google */
.aiq-evento-gmap { border-radius: 14px; overflow: hidden; }

/* Listas (Equipos, Objetos de la Aventura, POIs) con aiq-adv; los <ul dnd-list> conservan sus atributos */
.aiq-evento-list { list-style: none; margin: 0; padding: 0; }
.aiq-evento-list > li .aiq-adv { border-bottom: 1px solid var(--aiq-line); padding: 12px 0; }
.aiq-evento-list > li:last-child .aiq-adv { border-bottom: 0; }
.aiq-evento-list > li.selected .aiq-adv { background: #f2f7ff; }
.aiq-evento-thumb { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--aiq-track); color: var(--aiq-navy-soft); font-size: 26px; text-decoration: none; }
.aiq-evento-thumb img { width: 100%; height: 100%; object-fit: cover; }
.aiq-evento-thumb--wide { width: 96px; height: 60px; }
.aiq-evento-thumb--dark { background: var(--aiq-navy); color: #fff; }
.aiq-evento-thumb--dark img { object-fit: contain; padding: 6px; }
.aiq-evento-thumb:hover { text-decoration: none; color: var(--aiq-blue); }
.aiq-evento-invert { -webkit-filter: invert(1); filter: invert(1); }
.aiq-evento-type { width: 40px; height: 40px; object-fit: contain; }

/* Tablas de Misiones / Retos / Objetos */
.aiq-evento-table td { white-space: nowrap; }
.aiq-evento-table .aiq-evento-col-title { white-space: normal; min-width: 180px; }
.aiq-page .aiq-evento-order { width: 64px; text-align: center; font-weight: 800; }
.aiq-evento-color { font-size: 20px; }
.aiq-evento-idtag { text-decoration: none; }
.aiq-evento-idtag:hover { text-decoration: none; filter: brightness(0.95); }
.aiq-evento-idtag--color { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.aiq-evento-idtag--color:hover { color: #fff; }
.aiq-evento-icons i { margin-right: 6px; color: var(--aiq-navy-soft); font-size: 15px; }
.aiq-evento-date { font-size: 12px; color: var(--aiq-muted); font-weight: 600; }
.aiq-evento-date i { margin-right: 4px; color: var(--aiq-faint); }
.aiq-evento-parent { display: inline-flex; align-items: center; gap: 8px; }
.aiq-evento-parent__img { width: 70px; height: 40px; object-fit: cover; border-radius: 6px; flex: 0 0 70px; }
i.aiq-evento-parent__img { display: inline-flex; align-items: center; justify-content: center; background: var(--aiq-track); color: var(--aiq-icon-empty); font-size: 20px; }

/* ============================================================
   CAPAS GLOBALES: SweetAlert y notificaciones
   ============================================================ */
.sweet-overlay { background-color: rgba(22, 27, 51, 0.45); }
.sweet-alert {
  border-radius: 20px !important;
  font-family: "Nunito", sans-serif;
  box-shadow: var(--aiq-shadow-pop);
}
.sweet-alert h2 { font-size: 22px; font-weight: 800; color: var(--aiq-ink); }
.sweet-alert p { font-size: 14px; color: var(--aiq-muted); line-height: 1.5; }
.sweet-alert button {
  border-radius: 10px;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 26px;
  box-shadow: none !important;
}
.sweet-alert button.cancel { background-color: var(--aiq-neutral-soft); color: var(--aiq-ink); }
.sweet-alert button.cancel:hover { background-color: #e3e7f1; }
.sweet-alert fieldset input { border-radius: 10px; }

.ui-notification {
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(22, 27, 51, 0.22);
  font-family: "Nunito", sans-serif;
  overflow: hidden;
}
.ui-notification > h3 { font-weight: 800; }
.ui-notification .message { font-weight: 600; }
.ui-notification.success { background: #1f9a43; }
.ui-notification.error { background: #d63446; }
.ui-notification.warning { background: #e08e0b; }
.ui-notification.info { background: #2f74e8; }
.ui-notification:not(.success):not(.error):not(.warning):not(.info) { background: var(--aiq-navy); }

/* ============================================================
   ARMAZÓN: menú lateral (.aiq-sidebar), barra superior (.aiq-navbar),
   migas de pan (.aiq-breadcrumb)
   ============================================================ */
.aiq-sidebar.sidebar-dark {
  background:
    radial-gradient(420px 260px at 0% 100%, rgba(155, 89, 182, 0.16), transparent 60%),
    linear-gradient(180deg, var(--aiq-navy-deep) 0%, var(--aiq-navy) 100%);
  color: rgba(255, 255, 255, 0.62);
}
.aiq-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--aiq-navbar-h);
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: #fff;
}
.aiq-sidebar .sidebar-brand img { height: 34px; width: auto; }
.aiq-sidebar .sidebar-brand:hover { color: #fff; text-decoration: none; }
.aiq-sidebar .aiq-sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 12px 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.aiq-sidebar .aiq-sidebar__user:hover { background: rgba(255, 255, 255, 0.11); color: #fff; text-decoration: none; }
.aiq-sidebar .aiq-sidebar__user img {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  padding: 2px;
  background: conic-gradient(from 210deg, var(--aiq-gold), var(--aiq-coral), var(--aiq-purple), var(--aiq-blue), var(--aiq-gold));
}
.aiq-sidebar .aiq-sidebar__user span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiq-sidebar .aiq-sidebar__user small { display: block; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.5); }

.aiq-sidebar .sidebar-menu { padding: 6px 12px; border-bottom: 0; }
.aiq-sidebar .sidebar-menu-item { overflow: visible; margin-bottom: 2px; border-radius: 12px; }
.aiq-sidebar .sidebar-menu-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.3;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.66);
  transition: background 0.15s ease, color 0.15s ease;
}
.aiq-sidebar .sidebar-menu-icon {
  width: 22px;
  font-size: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  top: 0;
}
.aiq-sidebar .sidebar-menu-button:not(:only-child):before { right: 14px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.35); }
.aiq-sidebar .sidebar-menu-button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.aiq-sidebar .sidebar-menu-button:hover .sidebar-menu-icon { color: #fff; }
.aiq-sidebar .open { background: rgba(255, 255, 255, 0.04); }
.aiq-sidebar .open > .sidebar-menu-button { color: #fff; }
.aiq-sidebar .open > .sidebar-menu-button .sidebar-menu-icon { color: #9fc2ff; }
.aiq-sidebar .sm-active-button-bg .active > .sidebar-menu-button,
.aiq-sidebar .active > .sidebar-menu-button { color: #fff; background: rgba(68, 138, 255, 0.18); }
.aiq-sidebar .sm-active-button-bg .active > .sidebar-menu-button .sidebar-menu-icon,
.aiq-sidebar .active > .sidebar-menu-button .sidebar-menu-icon { color: #9fc2ff; }
.aiq-sidebar .sidebar-submenu { padding: 2px 0 6px; }
.aiq-sidebar .sidebar-submenu .sidebar-menu-button {
  line-height: 1.3;
  padding: 8px 12px 8px 46px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
}
.aiq-sidebar .sidebar-submenu .sidebar-menu-icon { width: 16px; font-size: 12px; color: rgba(255, 255, 255, 0.35); }
.aiq-sidebar .sidebar-submenu .sidebar-menu-button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.aiq-sidebar .sidebar-submenu .active > .sidebar-menu-button { color: #fff; background: rgba(255, 255, 255, 0.08); }
.aiq-sidebar .sidebar-submenu .active > .sidebar-menu-button .sidebar-menu-icon { color: var(--aiq-gold); }
.aiq-sidebar .manual-badge-sidebar { float: none; margin-left: auto; }
.aiq-sidebar .aiq-sidebar__stats {
  margin: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.aiq-sidebar .aiq-sidebar__stats b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; color: #fff; }
.aiq-sidebar .aiq-sidebar__stats small { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.aiq-sidebar .aiq-sidebar__stats i { color: var(--aiq-gold); margin-right: 6px; }

.aiq-navbar.navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--aiq-line);
  box-shadow: 0 6px 20px rgba(22, 27, 51, 0.04);
}
.aiq-navbar .navbar-brand { font-weight: 800; color: var(--aiq-ink); font-size: 17px; }
@media (max-width: 767px) {
  .aiq-navbar .navbar-brand { max-width: calc(100% - 170px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.aiq-navbar .navbar-toggler { color: var(--aiq-navy); border: 0; }
.aiq-navbar .aiq-navbar__right { display: flex; align-items: center; gap: 10px; height: 100%; line-height: 1.2; }
.aiq-navbar .aiq-navbar__right a,
.aiq-navbar .aiq-navbar__right span { line-height: 1.2; }
.aiq-navbar .aiq-navbar__right > .nav-item { float: none; margin: 0; display: flex; align-items: center; }
.aiq-navbar__versions { display: flex; align-items: center; gap: 6px; }
.aiq-navchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--aiq-muted);
  background: var(--aiq-neutral-soft);
  white-space: nowrap;
  text-decoration: none;
}
a.aiq-navchip:hover,
a.aiq-navchip:focus { background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); text-decoration: none; }
.aiq-navbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--aiq-line);
  background: #fff;
  color: var(--aiq-navy);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.aiq-navbtn:hover,
.aiq-navbtn:focus { border-color: #cddfff; background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); text-decoration: none; }
.aiq-navbar .aiq-navbar__avatar { display: inline-flex; padding: 2px; border-radius: 50%; cursor: pointer; background: conic-gradient(from 210deg, var(--aiq-gold), var(--aiq-coral), var(--aiq-purple), var(--aiq-blue), var(--aiq-gold)); }
.aiq-navbar .aiq-navbar__avatar.dropdown-toggle::after { display: none; }
.aiq-navbar .aiq-navbar__avatar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #fff; }
.aiq-navbar .dropdown-menu { border: 0; border-radius: 14px; box-shadow: 0 18px 40px rgba(22, 27, 51, 0.18); padding: 6px; margin-top: 10px; min-width: 200px; }
.aiq-navbar .dropdown-item { display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 9px 12px; font-weight: 700; font-size: 14px; color: var(--aiq-ink); }
.aiq-navbar .dropdown-item i { width: 18px; text-align: center; color: var(--aiq-muted); }
.aiq-navbar .dropdown-item:hover,
.aiq-navbar .dropdown-item:focus { background: var(--aiq-neutral-soft); color: var(--aiq-ink); }
.aiq-navbar .dropdown-item--danger:hover i { color: var(--aiq-red-fg); }

.aiq-breadcrumb.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 14px 2px 10px;
  margin: 0 0 6px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}
.aiq-breadcrumb.breadcrumb > li { float: none; display: inline-flex; align-items: center; min-width: 0; }
.aiq-breadcrumb.breadcrumb > li + li::before {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 9px;
  padding: 0 8px;
  color: var(--aiq-faint);
}
.aiq-breadcrumb.breadcrumb > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 320px;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--aiq-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}
.aiq-breadcrumb.breadcrumb > li > a:hover { background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); }
.aiq-breadcrumb.breadcrumb > li.active > a { color: var(--aiq-ink); background: #fff; box-shadow: var(--aiq-shadow); }
.aiq-breadcrumb .material-icons { font-size: 16px; vertical-align: middle; }
.aiq-breadcrumb img { height: 18px; }

/* ============================================================
   ACCESO (login / recuperar contraseña)
   ============================================================ */
.aiq-auth {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--aiq-hero-bg);
  color: var(--aiq-ink);
}
.aiq-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 70%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 70%);
  pointer-events: none;
}
.aiq-auth::after {
  content: "\f14e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: fixed;
  right: -80px;
  bottom: -120px;
  font-size: 480px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.035);
  transform: rotate(-18deg);
  pointer-events: none;
}
.aiq-auth__inner { position: relative; z-index: 1; width: 100%; max-width: 420px; margin: auto; }
.aiq-auth__brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; color: #fff; font-size: 26px; font-weight: 800; letter-spacing: 0.01em; text-decoration: none; }
.aiq-auth__brand:hover,
.aiq-auth__brand:focus { color: #fff; text-decoration: none; }
.aiq-auth__brand img { height: 48px; width: auto; }
.aiq-auth__card {
  background: #fff;
  border-radius: 20px;
  padding: 30px 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.aiq-auth__eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--aiq-muted); font-weight: 800; }
.aiq-auth__title { margin: 4px 0 20px; font-size: 18px; font-weight: 800; line-height: 1.35; color: var(--aiq-ink); }
.aiq-auth__field { position: relative; margin-bottom: 14px; }
.aiq-auth__field > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--aiq-muted); font-size: 14px; pointer-events: none; }
.aiq-auth__field .form-control { height: 46px; padding-left: 40px; border-radius: 12px; border: 1.5px solid var(--aiq-line); font-size: 14px; }
.aiq-auth__field .form-control:focus { border-color: var(--aiq-blue); box-shadow: var(--aiq-focus); }
.aiq-auth__label { display: block; margin: 4px 0 6px; font-size: 12px; font-weight: 700; color: var(--aiq-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.aiq-auth .ui-select-container,
.aiq-auth .ui-select-match,
.aiq-auth .ui-select-container .ui-select-toggle { width: 100% !important; height: auto !important; }
.aiq-auth .ui-select-container .ui-select-toggle { display: block; text-align: left; }
.aiq-auth .ui-select-container .ui-select-match > .btn,
.aiq-auth .ui-select-container .ui-select-toggle { border-radius: 12px; min-height: 42px; }
.aiq-auth .ui-select-match-text img { height: 14px; margin-right: 6px; }
.aiq-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 20px; }
.aiq-auth__link { font-size: 13px; font-weight: 700; color: var(--aiq-blue); }
.aiq-auth__link:hover { color: var(--aiq-blue-fg); }
.aiq-auth__submit {
  display: block;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--aiq-navy) 0%, var(--aiq-navy-soft) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 12px 26px -10px rgba(38, 46, 79, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.aiq-auth__submit:hover,
.aiq-auth__submit:focus { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(38, 46, 79, 0.8); outline: none; }
.aiq-auth__error { margin-top: 14px; }
.aiq-auth__foot { margin-top: 18px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.aiq-auth__foot a { color: rgba(255, 255, 255, 0.8); font-weight: 700; }

/* ============================================================
   RESPONSIVE / MOVIMIENTO
   ============================================================ */
@media (max-width: 991px) {
  .aiq-hero__stats { width: 100%; margin-top: 22px; }
  .aiq-hero__stat, .aiq-hero--compact .aiq-hero__stat { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 575px) {
  .aiq-hero { padding: 22px 18px; border-radius: 16px; }
  .aiq-hero__main { flex-direction: column; align-items: flex-start; }
  .aiq-hero__avatar { width: 84px; height: 84px; margin: 0 0 14px; }
  .aiq-hero__icon { margin: 0 0 14px; }
  .aiq-hero__name { font-size: 24px; }
  .aiq-hero__meta span { display: block; }
  .aiq-hero__meta span + span { margin-left: 0; }
  .aiq-hero__stats { gap: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aiq-hero__stat { padding: 12px; }
  .aiq-hero__stat-label { font-size: 11px; overflow-wrap: anywhere; }
  .aiq-hero__stat-value { font-size: 22px; }
  .aiq-hero--compact { padding: 20px; }
  .aiq-hero--compact .aiq-hero__avatar { width: 80px; height: 80px; }
  .aiq-bars, .aiq-bars-labels { gap: 4px; }
  .aiq-bars-labels span { font-size: 9px; }
  .aiq-adv__thumb { display: none; }
  .aiq-section { padding: 18px 16px; }
  .aiq-section__sub { margin-left: 0; }
  .aiq-form__actions .btn { display: block; width: 100%; }
  .aiq-form__actions .btn + .btn { margin: 8px 0 0; }
  .aiq-auth__card { padding: 24px 20px 20px; }
  .aiq-modal__header, .aiq-modal__body { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .aiq-page *, .aiq-page *::before, .aiq-page *::after,
  .aiq-profile *, .aiq-profile *::before, .aiq-profile *::after { animation: none !important; transition: none !important; }
}

/* ---------- EDITOR DE CONDICIONES Y/O (_condition_groups_editor.html, Gamifier 4.87.0) ----------
   Lo comparten Aventura (fin), Misión (fin) y Objetos digitales (obtención). */
.aiq-condgroups__or { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.aiq-condgroups__or::before, .aiq-condgroups__or::after { content: ""; flex: 1; border-top: 2px dashed var(--aiq-coral); opacity: 0.6; }
.aiq-condgroups__or span { font-weight: 800; font-size: 12px; letter-spacing: 0.15em; color: var(--aiq-coral); background: var(--aiq-red-soft); padding: 3px 12px; border-radius: 999px; }
.aiq-condgroup { border: 1px solid #d6e3f5; background: #f7faff; border-radius: 14px; padding: 14px 16px; }
.aiq-condgroup__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.aiq-condgroup__title { font-weight: 800; color: var(--aiq-ink); font-size: 14px; }
.aiq-condgroup__title i { color: var(--aiq-blue); margin-right: 6px; }
.aiq-condgroup__title small { font-weight: 600; color: var(--aiq-muted); margin-left: 6px; font-size: 12px; }
.aiq-condgroup__form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto; gap: 10px 14px; align-items: end; margin-bottom: 12px; }
.aiq-condgroup__field .form-control-label { font-weight: 700; color: var(--aiq-muted); font-size: 12px; padding: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.aiq-condgroup__actions { display: flex; gap: 6px; padding-bottom: 2px; }
.aiq-condgroup .aiq-table { background: #fff; border-radius: 10px; }
.aiq-condgroup .aiq-table tr.is-editing td { background: var(--aiq-gold-soft); }
.aiq-condgroup__empty { margin: 4px 0 0; font-style: italic; }
.aiq-condgroup__novalue { display: block; padding: 8px 0; font-style: italic; }
.aiq-condgroups__add { text-align: center; margin-top: 16px; }
@media (max-width: 991px) { .aiq-condgroup__form { grid-template-columns: 1fr; } }
/* ---------- FICHA DE MISIÓN (itinerario.html, Gamifier 4.88.0) ---------- */
/* También la usan notificacion_itinerario.html (.aiq-mision) y el modal crear_reto_rapido.html (.aiq-crr-*). */

/* Interruptor destacado al principio de una sección (Requiere código / Requiere llave) */
.aiq-mision-option { margin-bottom: 18px; }

/* ui-select dentro de la ficha: ancho acotado en lugar del style="width:380px" */
.aiq-page .aiq-mision-select { display: block; width: 100%; max-width: 380px; }

/* Icono de ayuda junto a la etiqueta de un interruptor (tooltip) */
.aiq-mision-help { margin-left: 4px; color: var(--aiq-faint); cursor: help; font-size: 13px; }
.aiq-mision-help:hover { color: var(--aiq-blue); }

/* Bloques que dependen de un interruptor (fechas de visibilidad / jugable, vídeo de portada) */
.aiq-mision-when { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--aiq-line); }
.aiq-mision-when .row { margin-bottom: 10px; }
.aiq-mision-when .row > [class*="col-"] { margin-bottom: 6px; }

/* Avisos dentro de la ficha: separación respecto al campo anterior */
.aiq-mision-alert { margin-top: 12px; margin-bottom: 0; }
.aiq-mision-warn { color: var(--aiq-orange-fg); font-weight: 600; }

/* Tamaño QR (touchspin) */
.aiq-mision-touchspin { max-width: 220px; }

/* Códigos de acceso con su QR */
.aiq-mision-qrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.aiq-mision-qr { min-width: 0; padding: 12px; border: 1px solid var(--aiq-line); border-radius: 12px; background: #fff; text-align: center; overflow: auto; }
.aiq-mision-qr__code { margin-bottom: 8px; font-weight: 800; font-size: 15px; color: var(--aiq-ink); word-break: break-word; }
.aiq-mision-qr canvas,
.aiq-mision-qr img { max-width: 100%; height: auto; }

/* Llave digital seleccionada */
.aiq-mision-llave__picker { max-width: 480px; }
.aiq-mision-llave { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; max-width: 480px; border: 1px solid var(--aiq-line); border-radius: 12px; background: #fafbfe; }
.aiq-mision-llave__media { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--aiq-gold-soft); color: var(--aiq-gold-fg); font-size: 22px; }
.aiq-mision-llave__media img { width: 100%; height: 100%; object-fit: cover; }
.aiq-mision-llave__body { flex: 1 1 auto; min-width: 0; }
.aiq-mision-llave__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: var(--aiq-muted); }
.aiq-mision-llave__meta a { font-weight: 700; }

/* Subida de ficheros con ng-flow sobre aiq-dropzone: vista previa + acciones en fila */
.aiq-dropzone.aiq-upload { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 16px; min-height: 0; padding: 14px 16px; text-align: left; }
.aiq-upload__preview { flex: 0 0 auto; width: 120px; height: 90px; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border: 1px solid var(--aiq-line); }
.aiq-upload__preview > div { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.aiq-dropzone .aiq-upload__preview img { max-width: 100%; max-height: 100%; border-radius: 0; object-fit: contain; }
.aiq-upload__body { flex: 1 1 220px; min-width: 0; }
.aiq-upload__field { flex: 1 1 220px; min-width: 0; }
.aiq-upload__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.aiq-upload__progress { margin-top: 10px; }
.aiq-upload__progress .aiq-help { margin-top: 4px; }
/* Los iconos de los botones no heredan el tamaño del icono grande del dropzone */
/* Los iconos de los BOTONES de una zona de subida no heredan el icono grande/gris de la zona (ni el azul del hover) */
.aiq-dropzone .btn i,
.aiq-dropzone:hover .btn i,
.aiq-dropzone.is-over .btn i { font-size: inherit; color: inherit; }
/* Audio / vídeo: campo con el nombre del fichero en lugar de vista previa */
.aiq-upload--file { align-items: flex-start; }

/* Reproductor de audio/vídeo bajo su campo */
.aiq-mision .videogular-container { border-radius: 12px; overflow: hidden; }

/* Mapa de Google */
.aiq-mision-map { margin-top: 6px; border-radius: 12px; overflow: hidden; }

/* Pie de sección con acciones (Mapa, Retos) */
.aiq-mision-foot { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--aiq-line); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Envoltura del botón Crear (lleva el tooltip, que no se muestra sobre botones deshabilitados) */
.aiq-mision-tooltipwrap { display: inline-block; }
.aiq-mision-tooltipwrap:empty { display: none; }

/* Listas con dnd-list (Objetos, Notificaciones, Retos): cada <li> lleva una fila aiq-adv.
   Las reglas ul[dnd-list] li del tema dejan el <li> transparente; la línea separadora va aquí
   porque cada .aiq-adv es el único hijo de su <li> (y :last-child le quitaría el borde). */
.aiq-mision-list { list-style: none; margin: 0; padding: 0; }
.aiq-mision-list > li > .aiq-adv { border-bottom: 1px solid var(--aiq-line); padding: 12px 6px; border-radius: 10px; }
.aiq-mision-list > li:last-child > .aiq-adv { border-bottom: 0; }
.aiq-mision-list > li[dnd-draggable] { cursor: grab; }
.aiq-mision-list > li.selected > .aiq-adv { background: var(--aiq-blue-soft); }
.aiq-mision-list__media { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--aiq-navy); color: #fff; font-size: 20px; }
.aiq-mision-list__media:hover { color: #fff; text-decoration: none; filter: brightness(1.15); }
.aiq-mision-list__media img { max-width: 80%; max-height: 80%; }
/* Los iconos de Objeto son PNG blancos (antes se invertían sobre la tabla blanca): aquí van sobre fondo oscuro */

/* Fila de Reto de la Misión */
.aiq-mision-reto { flex-wrap: wrap; }
.aiq-mision-reto__orden { flex: 0 0 72px; width: 72px; }
.aiq-mision-reto__label { display: block; margin: 0 0 2px; font-size: 11px; font-weight: 700; color: var(--aiq-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.aiq-page .aiq-mision-reto__orden .form-control { height: 34px; padding: 4px 8px; text-align: center; border-radius: 10px; }
.aiq-mision-reto__flags { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.aiq-mision-reto__flags .aiq-switch { font-size: 12px; }
.aiq-mision-reto__type { flex: 0 0 auto; width: 44px; height: 44px; object-fit: contain; }
.aiq-mision-reto__nothumb { display: flex; align-items: center; justify-content: center; color: var(--aiq-icon-empty); font-size: 20px; }
.aiq-mision-reto .aiq-adv__tags .aiq-tag i { margin-right: 0; }
.aiq-mision-reto .aiq-adv__stats { margin-bottom: 0; }
@media (max-width: 767px) {
  .aiq-mision-reto .aiq-adv__thumb { display: none; }
  .aiq-mision-reto .aiq-adv__body { flex-basis: 100%; }
}

/* ---- Modal «Crear Reto» rápido (crear_reto_rapido.html) ---- */
.aiq-crr__intro { margin: 0 0 12px; font-size: 13px; }
.aiq-crr-tipos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 991px) { .aiq-crr-tipos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .aiq-crr-tipos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aiq-crr-tipo {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  min-width: 0; padding: 14px 8px 12px; border: 2px solid var(--aiq-line); border-radius: 14px; background: #fff;
  color: var(--aiq-ink); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.aiq-crr-tipo:hover { border-color: var(--aiq-blue); background: var(--aiq-blue-soft); }
.aiq-crr-tipo:focus { outline: none; box-shadow: var(--aiq-focus); }
.aiq-crr-tipo__img { height: 52px; max-width: 100%; object-fit: contain; }
.aiq-crr-tipo__label { font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; }
.aiq-crr__back { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.aiq-crr__backlink { font-weight: 700; cursor: pointer; }
.aiq-crr__backlink i { margin-right: 4px; }
.aiq-crr__tipo img { height: 18px; margin-right: 6px; vertical-align: middle; }
.aiq-crr__lang { margin-bottom: 14px; }
/* ---------- RETOS (prueba_*.html, Gamifier 4.89.0) ---------- */
/* Ficha de Reto. Cada editor de tipo (prueba_pr.html, prueba_tv.html…) abre la rejilla
   .aiq-with-toc.aiq-reto__layout, incluye prueba_common.html (ng-include) y añade su sección
   «Configuración del Reto» (#re-config). prueba_common.html aporta cabecera, índice y secciones comunes.
   Las envolturas sin caja propia (el div del ng-include y el del ng-controller="PruebaController")
   llevan .aiq-reto__contents (display: contents) para que cabecera, índice y secciones sean celdas
   de la rejilla aunque vivan en plantillas distintas.
   Reutiliza clases de la Ficha de Misión (Gamifier 4.88.0): aiq-mision-option, -when, -help, -select,
   -alert, -warn, -touchspin, -qrs/-qr, -llave*, -list*, -reto*, -foot, -tooltipwrap, -map y aiq-upload*. */
.aiq-reto__contents { display: contents; }
@media (min-width: 992px) {
  .aiq-with-toc.aiq-reto__layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 24px; row-gap: 0; align-items: start; }
  .aiq-reto__layout .aiq-reto__hero { grid-column: 1 / -1; grid-row: 1; }
  /* El índice ocupa la columna izquierda de todas las filas siguientes (filas implícitas vacías = 0 px) */
  .aiq-reto__layout .aiq-reto__nav { grid-column: 1; grid-row: 2 / span 30; }
  .aiq-reto__layout .aiq-reto__main { grid-column: 2; min-width: 0; }
}

/* Cabecera: icono del tipo de Reto (PNG) en el eyebrow y como avatar cuando no hay imagen de cabecera */
.aiq-reto-hero__type { height: 18px; width: auto; margin-right: 6px; vertical-align: -3px; }
.aiq-hero__avatar .aiq-initials .aiq-reto-hero__typeimg { width: 60%; height: 60%; object-fit: contain; border-radius: 0; }

/* Icono de la sección «Configuración del Reto»: PNG del tipo dentro del cuadradito */
.aiq-section__icon.aiq-reto-config__icon { background: var(--aiq-neutral-soft); padding: 4px; }
.aiq-reto-config__icon img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Mensajes de validación bajo un campo */
.aiq-reto-error { color: var(--aiq-red-fg); font-weight: 600; }

/* Párrafo de ayuda bajo un aiq-subhead */
.aiq-reto-intro { margin: -4px 0 12px; }

/* Bloque de formulario con separación (subida de imagen de cabecera del tipo) */
.aiq-reto-block { margin-top: 18px; }

/* «Requiere localización»: interruptor + distancia mínima en la misma fila */
.aiq-reto-loc { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.aiq-reto-loc__switch { flex: 1 1 320px; min-width: 0; }
.aiq-reto-loc__field { flex: 0 1 200px; min-width: 0; }
.aiq-reto-loc__field .form-control-label { display: block; }

/* Interruptor + campo en línea (Respuesta Libre: muro + visibilidad) */
.aiq-reto-inline { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.aiq-reto-inline > .aiq-option { flex: 0 1 320px; min-width: 0; }
.aiq-reto-inline__field { flex: 1 1 260px; min-width: 0; }
.aiq-reto-inline__field .form-control-label { display: block; }

/* Cabecera de un bloque de idiomas: subtítulo + botón «Nueva traducción» */
.aiq-reto-langhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 10px; }
.aiq-reto-langhead .aiq-subhead { margin: 0; }
.aiq-reto-langhead .form-control-label { margin: 0; }

/* Aviso «crea al menos una traducción» con su botón */
.aiq-reto-alert { margin-bottom: 12px; }
.aiq-reto-alert__actions { margin-top: 8px; }

/* Respuestas de P/R, PRA, PRV y RA */
.aiq-reto-answers { margin: 6px 0 14px; }
.aiq-reto-answers__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.aiq-reto-answers__head .form-control-label { margin: 0; }
.aiq-reto-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--aiq-line); border-radius: 12px; background: #fff; }
.aiq-reto-answer__id { flex: 0 0 auto; font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.aiq-reto-answer__ok { flex: 0 0 auto; }
.aiq-reto-answer__ok .aiq-switch { font-size: 13px; }
.aiq-reto-answer__points { flex: 0 0 110px; min-width: 0; }
.aiq-reto-answer__text { flex: 1 1 240px; min-width: 0; }
.aiq-reto-answer .aiq-btn-icon { flex: 0 0 auto; }

/* Reproductor de la pregunta (PRA audio / PRV vídeo) */
.aiq-reto .videogular-container { border-radius: 12px; overflow: hidden; }
.aiq-reto-player { margin-top: 12px; position: relative; }
.aiq-reto-player--audio { max-width: 400px; height: 40px; }
.aiq-reto-player--audio .videogular-container { height: 40px; }
.aiq-reto-player--video { max-width: 500px; }
.aiq-reto-player--video .videogular-container { height: 280px; }

/* Preguntas Encadenadas: deslizador del % por tiempo e icono del tipo de cada Reto encadenado */
.aiq-reto-slider { padding: 4px 4px 0; }
.aiq-reto-slider .form-control-label { display: block; margin-bottom: 18px; }
.aiq-reto-tvtype { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); font-size: 17px; }
/* Resaltado del Reto recién creado (controllers.js añade .reto-nuevo-highlight al <li>) */
.aiq-mision-list > li.reto-nuevo-highlight > .aiq-adv { background: var(--aiq-green-soft); }

/* Respuesta Exacta: tramos de puntuación por intentos */
.aiq-reto-tramos { margin-bottom: 8px; }
.aiq-reto-tramos .aiq-table { margin-bottom: 10px; }
.aiq-reto-tramos__col { width: 120px; }
.aiq-reto-tramos__input { max-width: 180px; }
.aiq-reto-tramos__actions { text-align: right; white-space: nowrap; }

/* Ruleta: porciones */
.aiq-reto-ru__config { margin-bottom: 0; }
.aiq-reto-porcion { position: relative; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--aiq-line); border-left: 5px solid var(--aiq-line); border-radius: 12px; background: #fff; }
.aiq-reto-porcion__row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-start; }
.aiq-reto-porcion__icon { position: relative; flex: 0 0 60px; text-align: center; }
.aiq-reto-porcion__swatch { width: 50px; height: 50px; margin: 0 auto 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; cursor: pointer; background: var(--aiq-navy-soft); }
.aiq-reto-porcion__color { flex: 0 1 180px; min-width: 0; }
.aiq-reto-porcion__accion { flex: 1 1 260px; min-width: 0; }
.aiq-reto-porcion__peso { flex: 0 0 90px; min-width: 0; }
.aiq-reto-porcion__actions { align-self: center; margin-left: auto; }
.aiq-reto-porcion__sub { margin-top: 10px; }
.aiq-reto-porcion__sub .btn + .aiq-help { margin-top: 6px; }
.aiq-reto-porcion__obj { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--aiq-blue-soft); color: var(--aiq-blue-fg); font-weight: 600; }
.aiq-reto-porcion__obj .aiq-btn-icon { margin-left: auto; }
.aiq-reto-porcion__texts { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--aiq-line); }
.aiq-reto-porcion__texts .aiq-reto-langhead { margin-top: 0; }
.aiq-reto-radios { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.aiq-reto-radios .radio-inline { margin: 0; padding-left: 0; font-weight: 600; }
.aiq-reto-radios .radio-inline + .radio-inline { margin-left: 0; }
.aiq-reto-radios .radio-inline { display: inline-flex; align-items: center; gap: 6px; }
.aiq-reto-radios .radio-inline input[type="radio"] { position: static; margin: 0; }
/* Selector de icono de la porción */
.aiq-reto-iconpicker { position: absolute; z-index: 100; top: 80px; left: 0; width: 280px; padding: 10px; text-align: left; background: #fff; border: 1px solid var(--aiq-line); border-radius: 12px; box-shadow: var(--aiq-shadow-hover); }
.aiq-reto-iconpicker__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.aiq-reto-iconpicker__grid { max-height: 160px; overflow-y: auto; }
.aiq-reto-iconpicker__item { display: inline-block; padding: 5px 7px; cursor: pointer; font-size: 16px; border-radius: 6px; }
.aiq-reto-iconpicker__item:hover { background: var(--aiq-neutral-soft); }

/* Realidad Aumentada: fichero subido (nombre + quitar) y compilación del .mind */
.aiq-reto-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--aiq-ink); }
.aiq-reto-file__ok { color: var(--aiq-green-fg); }
.aiq-reto-file__name { min-width: 0; overflow-wrap: anywhere; }
.aiq-reto-compiling { max-width: 360px; margin-bottom: 8px; }
.aiq-reto-file .fa-spin { color: var(--aiq-blue); }

/* ---- Catálogo de tipos de Reto (prueba_seleccion_tipo.html) ---- */
.aiq-reto-tipos__bar { margin-bottom: 20px; }
.aiq-reto-tipos__bar .aiq-filters { margin-bottom: 0; }
.aiq-reto-tipo { height: 100%; }
.aiq-reto-tipo__icon { flex-basis: 54px; height: 54px; padding: 6px; }
.aiq-reto-tipo__icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.aiq-reto-tipo__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; font-weight: 800; color: var(--aiq-green-fg); }
.aiq-reto-tipo:hover .aiq-reto-tipo__cta { color: var(--aiq-act-create); }

/* ---- Modal «Seleccionar Objeto» (seleccionar_recompensa_modal.html, Ruleta) ---- */
.aiq-reto-recpick__count { margin: 0 0 10px; }
.aiq-reto-recpick { max-height: 400px; overflow-y: auto; padding: 2px; }
.aiq-reto-recpick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.aiq-reto-recpick__item { height: 100%; display: flex; flex-direction: column; border: 2px solid var(--aiq-line); border-radius: 14px; background: #fff; cursor: pointer; overflow: hidden; transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.aiq-reto-recpick__item:hover { border-color: var(--aiq-blue); }
.aiq-reto-recpick__item.is-active { border-color: var(--aiq-blue); background: var(--aiq-blue-soft); box-shadow: var(--aiq-focus); }
.aiq-reto-recpick__media { position: relative; min-height: 90px; padding: 10px; display: flex; align-items: center; justify-content: center; }
.aiq-reto-recpick__icon { font-size: 52px; color: var(--aiq-icon-empty); }
.aiq-reto-recpick__icon--key { color: var(--aiq-gold-fg); }
/* La imagen se muestra al cargar (onload) y oculta el icono de reserva */
.aiq-reto-recpick__img { display: none; position: absolute; max-height: 80px; max-width: 100%; object-fit: contain; }
.aiq-reto-recpick__check { position: absolute; top: 6px; right: 6px; font-size: 20px; color: var(--aiq-blue); }
.aiq-reto-recpick__body { padding: 8px 10px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.aiq-reto-recpick__title { font-size: 13px; font-weight: 700; color: var(--aiq-ink); overflow-wrap: anywhere; }
/* ---------- OBJETOS DIGITALES, POIs Y EQUIPOS (Gamifier 4.90.0) ---------- */
/* recompensa_prueba.html, recompensa_itinerario.html, recompensa_aventura.html (.aiq-objeto),
   poi_common.html (.aiq-poi) y clan.html (.aiq-clan). Las tres llevan también .aiq-mision para
   reutilizar lo de la ficha de Misión (Fase 7): aiq-upload*, aiq-mision-select, aiq-mision-map,
   aiq-mision-qrs, aiq-mision-touchspin, aiq-mision-foot, aiq-mision-tooltipwrap, aiq-mision-warn
   y el redondeo de .videogular-container. */

/* Hero: icono del tipo (PNG blanco del tipo de Objeto, icono de tipo de POI) dentro del avatar
   cuadrado; anula el img a sangre de .aiq-hero__avatar img */
.aiq-hero__avatar .aiq-hero__typeimg {
  width: 58%;
  height: 58%;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: none;
}

/* Tags de la traducción de un Objeto: click en el tag = desvincularlo */
.aiq-objeto-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.aiq-objeto-tags:empty { display: none; }
.aiq-objeto-tags__x { margin: 0 0 0 4px; color: var(--aiq-red-fg); }
.aiq-objeto-tagadd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aiq-page .aiq-objeto-tagadd .form-control { flex: 1 1 200px; max-width: 280px; min-width: 0; }

/* Editor de condiciones propio de recompensa_aventura.html (mismo aspecto que _condition_groups_editor) */
.aiq-page .aiq-objeto-condselect { display: block; width: 100%; }
.aiq-objeto-condchoice { white-space: normal; word-wrap: break-word; line-height: 1.3; }
.aiq-objeto-condcol--icon { width: 40px; }
.aiq-objeto-condcol--id { width: 60px; }
.aiq-objeto-condcol--actions { width: 90px; white-space: nowrap; }

/* POI: imagen del mapa ya existente (QR / Indoor), en una caja como la vista previa de subida */
.aiq-poi-mapimg { width: 160px; height: 120px; }
.aiq-poi-mapimg img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Equipo: textos alrededor de la rejilla de miembros */
.aiq-clan__intro { margin: 0 0 12px; }
.aiq-clan__filters { margin: 12px 0 0; }
.aiq-clan__filters i { margin-right: 4px; }

/* ---------- AJUSTES GLOBALES (Gamifier 4.90.0) ----------
   Imagen del hero que no carga (URL rota): en vez del icono roto del navegador,
   un marcador de imagen. Los navegadores solo pintan ::before en <img> rotas. */
.aiq-hero__avatar img { position: relative; }
.aiq-hero__avatar img::before {
  content: "\f03e";
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: var(--aiq-navy-soft);
  color: rgba(255, 255, 255, 0.55);
  font-size: 34px;
}
/* Índice lateral (escritorio): los títulos largos pasan a dos líneas en vez de cortarse */
@media (min-width: 992px) {
  .aiq-with-toc__nav .aiq-toc li a { white-space: normal; line-height: 1.3; }
}

/* ---------- FICHAS CON ÍNDICE EN PANTALLAS ESTRECHAS (Gamifier 4.91.1) ----------
   En móvil el índice (pastillas) y la barra de acciones ocupan todo el ancho, y los
   selectores con ancho fijo (zona horaria: min-width 380px en línea) no desbordan. */
.aiq-page timezone-selector select,
.aiq-page timezone-selector + .chosen-container,
.aiq-page .chosen-container { min-width: 0 !important; max-width: 100%; }
.aiq-page timezone-selector select { width: 100%; }
@media (max-width: 991px) {
  .aiq-with-toc__nav { flex: none; width: auto; }
  .aiq-with-toc__body { width: 100%; }
}
@media (max-width: 767px) {
  /* el botón del chat ocupa la esquina inferior derecha: la barra va justo encima, a todo el ancho */
  .aiq-actionbar { margin-right: 0; bottom: 84px; padding: 10px 12px; flex-wrap: nowrap; }
  .aiq-actionbar > .btn, .aiq-actionbar > span > .btn, .aiq-actionbar > div > .btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: normal; line-height: 1.2; }
  .aiq-actionbar > span:has(> .btn), .aiq-actionbar > div:has(> .btn) { flex: 1 1 0; min-width: 0; display: flex; }
  .aiq-actionbar > span > .btn, .aiq-actionbar > div > .btn { width: 100%; }
  .aiq-actionbar__info { display: none; }
  .aiq-actionbar__start { margin-right: 0; }
}

/* ---------- SELECTOR DE LICENCIA (select_license.html, Gamifier 4.92.0) ---------- */
.aiq-licpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; max-height: 44vh; overflow-y: auto; padding: 2px; }
.aiq-licpick__item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--aiq-line); background: #fff; color: var(--aiq-ink); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.aiq-licpick__item:hover { border-color: var(--aiq-blue); box-shadow: 0 4px 14px rgba(38, 46, 79, 0.08); }
.aiq-licpick__item.active { border-color: var(--aiq-blue); background: var(--aiq-blue-soft); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18); }
.aiq-licpick__img { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 12px; background: var(--aiq-neutral-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.aiq-licpick__img img { width: 100%; height: 100%; object-fit: contain; }
.aiq-licpick__img i { font-size: 22px; color: var(--aiq-muted); }
.aiq-licpick__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aiq-licpick__text b { font-weight: 700; font-size: 14px; line-height: 1.25; }
.aiq-licpick__text small { color: var(--aiq-muted); font-size: 12px; font-weight: 600; }
.aiq-licpick__text small i { margin-right: 3px; }
/* Parking (4.103.0): licencia que no se puede elegir para esta Aventura */
.aiq-licpick__item:disabled { opacity: .6; cursor: not-allowed; }
.aiq-licpick__item:disabled:hover { border-color: var(--aiq-line); box-shadow: none; }
.aiq-licpick__text small.aiq-licpick__nota { color: var(--aiq-red-fg); }
.aiq-licpick__check { color: var(--aiq-blue); font-size: 18px; flex: 0 0 auto; }
.aiq-modal__footer .aiq-licpick__count { margin: 0 auto 0 0; }

/* ---------- TOOLTIPS (Gamifier 4.92.0) ----------
   Un tooltip nunca captura el ratón: si quedaba encima del elemento (o de su borde),
   provocaba mouseleave -> se cerraba -> mouseenter -> se abría, en bucle (parpadeo).
   Los popovers (pueden tener contenido clicable) no se tocan. */
.tooltip { pointer-events: none; }

/* ---------- CIFRAS DEL HERO CON COLOR (Gamifier 4.92.0) ----------
   aiq-hero__stat--blue|cyan|green|gold|muted: tinte de la caja + color del número.
   --strong: énfasis (las cifras clave, p. ej. Players que han iniciado / finalizado). */
.aiq-hero__stat--blue  { background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.32); }
.aiq-hero__stat--blue  .aiq-hero__stat-value, .aiq-hero__stat--blue  .aiq-hero__stat-label i { color: #9cc7ff; }
.aiq-hero__stat--cyan  { background: rgba(34, 211, 238, 0.14); border-color: rgba(34, 211, 238, 0.4); }
.aiq-hero__stat--cyan  .aiq-hero__stat-value, .aiq-hero__stat--cyan  .aiq-hero__stat-label i { color: #67e8f9; }
.aiq-hero__stat--green { background: rgba(52, 211, 153, 0.15); border-color: rgba(52, 211, 153, 0.42); }
.aiq-hero__stat--green .aiq-hero__stat-value, .aiq-hero__stat--green .aiq-hero__stat-label i { color: #6ee7b7; }
.aiq-hero__stat--gold  { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.32); }
.aiq-hero__stat--gold  .aiq-hero__stat-value, .aiq-hero__stat--gold  .aiq-hero__stat-label i { color: #fcd34d; }
.aiq-hero__stat--muted { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
.aiq-hero__stat--muted .aiq-hero__stat-value { color: rgba(255, 255, 255, 0.6); }
.aiq-hero__stat--strong { border-width: 2px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.aiq-hero__stat--strong .aiq-hero__stat-value { font-size: 38px; }
.aiq-hero__stat--strong .aiq-hero__stat-label { color: rgba(255, 255, 255, 0.85); }
.aiq-hero__stat--cyan.aiq-hero__stat--strong  { background: linear-gradient(160deg, rgba(34, 211, 238, 0.26), rgba(34, 211, 238, 0.08)); }
.aiq-hero__stat--green.aiq-hero__stat--strong { background: linear-gradient(160deg, rgba(52, 211, 153, 0.28), rgba(52, 211, 153, 0.08)); }
@media (max-width: 575px) {
  .aiq-hero__stat--strong .aiq-hero__stat-value { font-size: 26px; }
}

/* La barra de acciones suele ser el último hijo del <form>: el tema (style.css) pone
   `form > :last-child { margin-bottom: 0 }`, más específico que .aiq-actionbar, y la
   pegaba a la sección siguiente. (Gamifier 4.92.1) */
.aiq-page form > .aiq-actionbar,
.aiq-page .aiq-actionbar { margin-bottom: 20px; }

/* Desplegables ui-select como capa flotante aiq (Gamifier 4.92.1) */
.aiq-page .ui-select-bootstrap > .ui-select-choices,
.aiq-modal .ui-select-bootstrap > .ui-select-choices {
  margin-top: 4px; border: 1px solid var(--aiq-line); border-radius: 12px; padding: 6px;
  box-shadow: 0 14px 34px rgba(22, 27, 51, 0.18); background: #fff; z-index: 1000;
}
.aiq-page .ui-select-bootstrap .ui-select-choices-row > span,
.aiq-modal .ui-select-bootstrap .ui-select-choices-row > span { border-radius: 8px; padding: 7px 12px; }
.aiq-page .ui-select-bootstrap .ui-select-choices-row.active > span,
.aiq-modal .ui-select-bootstrap .ui-select-choices-row.active > span { background: var(--aiq-blue); color: #fff; }
.aiq-licpick__toolbar { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.aiq-licpick__toolbar .aiq-licpick__search { flex: 1 1 260px; margin-bottom: 12px; }
.aiq-licpick__sort { position: relative; flex: 0 0 auto; margin: 0 0 12px; }
.aiq-licpick__sort i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--aiq-muted); pointer-events: none; }
.aiq-licpick__sort .form-control { height: 42px; border-radius: 10px; padding-left: 34px; min-width: 190px; }
.aiq-licpick__types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.aiq-licpick__type { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--aiq-line); background: #fff; color: var(--aiq-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.aiq-licpick__type img { width: 18px; height: 18px; object-fit: contain; }
.aiq-licpick__type b { background: var(--aiq-neutral-soft); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.aiq-licpick__type:hover { border-color: var(--aiq-blue); }
.aiq-licpick__type.active { background: var(--aiq-navy); border-color: var(--aiq-navy); color: #fff; }
.aiq-licpick__type.active b { background: rgba(255, 255, 255, 0.2); }
.aiq-licpick__more { text-align: center; margin-top: 12px; }

/* Reproductores de vídeo (videogular) de las fichas: a la mitad del ancho de su
   columna (máx. 560px) en vez de ocupar todo; 16:9. Los de audio no cambian.
   En móvil vuelven a todo el ancho. (Gamifier 4.92.1) */
.aiq-page videogular.videogular-container:not(.audio) {
  width: 50%; min-width: 280px; max-width: 560px; height: auto; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #000;
}
.aiq-page videogular.videogular-container:not(.audio) video { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767px) {
  .aiq-page videogular.videogular-container:not(.audio) { width: 100%; min-width: 0; max-width: none; }
}

/* ---------- RETO: MECÁNICA Y SUS TRADUCCIONES EN DOS TARJETAS (Gamifier 4.93.0) ----------
   La sección del tipo (id re-config, con su ng-controller y su único <form>) pasa a ser un
   envoltorio sin tarjeta; dentro del form van dos tarjetas: la mecánica y sus traducciones
   (id re-config-textos), y después la barra de Guardar común. */
.aiq-reto-split { scroll-margin-top: calc(var(--aiq-navbar-h) + 16px); }
.aiq-reto-split > form { margin: 0; }
@media (max-width: 991px) {
  .aiq-with-toc .aiq-reto-split { scroll-margin-top: calc(var(--aiq-navbar-h) + 72px); }
}
/* Índice: entradas cuya sección no está visible (ng-show/ng-if) se ocultan solas (aiqScrollSpy) */
.aiq-toc > li.aiq-toc__off { display: none; }
.aiq-reto-split__card > .aiq-section__head { flex-wrap: nowrap; align-items: flex-start; }
.aiq-reto-split__card > .aiq-section__head > div:first-child { flex: 1 1 auto; min-width: 0; }
.aiq-reto-split__card > .aiq-section__head > .aiq-section__actions { flex: 0 0 auto; }
@media (max-width: 575px) { .aiq-reto-split__card > .aiq-section__head { flex-wrap: wrap; } }

/* ---------- BANDERAS DE IDIOMA (<flag>, ng-flags; Gamifier 4.93.1) ----------
   El sprite flags16 es de PAÍSES: "eu" no existe (salía vacía), "ca" es Canadá y "gl"
   Groenlandia. Para los idiomas usamos nuestras banderas: ikurriña, senyera y Galicia
   (las mismas del selector de idioma, assets/images/flags/). */
.f16 .flag.eu, .f16 .flag.ca, .f16 .flag.gl {
  background-position: center; background-repeat: no-repeat; background-size: 16px 12px;
}
.f16 .flag.eu { background-image: url(../images/flags/eu.svg); }
.f16 .flag.ca { background-image: url(../images/flags/ca.svg); }
.f16 .flag.gl { background-image: url(../images/flags/gl.svg); }
/* Lo mismo para flag-icon-css (ficha del Player): getFlagCc() devuelve aiq-eu/ca/gl */
.flag-icon-aiq-eu { background-image: url(../images/flags/eu.svg); }
.flag-icon-aiq-ca { background-image: url(../images/flags/ca.svg); }
.flag-icon-aiq-gl { background-image: url(../images/flags/gl.svg); }

/* ============================================================
   Mi App (4.114.0): Webapp de marca del Game Master.
   Texto grande y de alto contraste: es una pantalla de lectura.
   ============================================================ */
.aiq-miapp .aiq-alert { font-size: 16px; line-height: 1.5; color: var(--aiq-navy); }
.aiq-miapp .aiq-alert b { font-weight: 700; }
.aiq-miapp__ayuda { margin: 0 0 14px; font-size: 16px; line-height: 1.5; font-weight: 500; color: var(--aiq-navy); }
.aiq-miapp__tabla td, .aiq-miapp__tabla th { font-size: 16px; }
.aiq-miapp__tabla td { font-weight: 600; color: var(--aiq-navy); vertical-align: middle; }
.aiq-miapp__tabla .btn { font-size: 15px; font-weight: 700; }
.aiq-miapp__historico { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 8px; }
.aiq-miapp__historico h4 { margin: 0; font-size: 22px; font-weight: 700; color: var(--aiq-navy); }
.aiq-miapp__historico h4 i { color: var(--aiq-navy-soft); margin-right: 8px; }
.aiq-miapp .aiq-changelog__text { font-size: 16px; line-height: 1.5; color: var(--aiq-navy); }

/* ============================================================
   Branderizaciones (4.114.0): colores e imagenes de la marca de un cliente.
   ============================================================ */
input[type="file"].aiq-file-hidden { display: none !important; }
.aiq-brand-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; margin: 4px 0 16px; }
.aiq-brand-color__campo { display: flex; align-items: center; gap: 8px; }
.aiq-brand-color__campo input[type="color"] { flex: 0 0 44px; width: 44px; height: 38px; padding: 2px; border: 1px solid var(--aiq-line); border-radius: 10px; background: #fff; cursor: pointer; }
.aiq-brand-color__campo .form-control { flex: 1 1 auto; min-width: 0; }
.aiq-brand-img { margin-bottom: 12px; }
.aiq-brand-img .aiq-brand-img__preview { width: 150px; height: 96px; background: var(--aiq-navy); border-color: var(--aiq-navy); }
.aiq-brand-img .aiq-brand-img__preview img { padding: 8px; }
.aiq-brand-img .aiq-brand-img__preview i { font-size: 30px; color: rgba(255, 255, 255, 0.45); }
.aiq-brand-img .aiq-upload__body b { display: block; font-size: 15px; color: var(--aiq-navy); }
.aiq-brand-gen__texto { font-size: 16px; line-height: 1.5; color: var(--aiq-navy); margin: 0 0 14px; }

/* Panel de configuracion de una Branderizacion (4.114.0) */
.aiq-brand-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aiq-brand-check > li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--aiq-line); border-radius: 12px; background: #fff; }
.aiq-brand-check__icono { flex: 0 0 auto; font-size: 22px; line-height: 1; color: var(--aiq-muted); }
.aiq-brand-check > li.is-ok .aiq-brand-check__icono { color: #1c9a4a; }
.aiq-brand-check > li.is-falta { border-color: #f3c97a; background: #fffaf0; }
.aiq-brand-check > li.is-falta .aiq-brand-check__icono { color: #c97a00; }
.aiq-brand-check__texto { flex: 1 1 auto; min-width: 0; }
.aiq-brand-check__texto b { display: block; font-size: 15px; font-weight: 700; color: var(--aiq-navy); }
.aiq-brand-check__texto small { display: block; font-size: 13px; line-height: 1.4; color: var(--aiq-ink); }
.aiq-brand-check > li.is-ok .btn { visibility: hidden; }
.aiq-brand-cols { display: flex; gap: 24px; align-items: flex-start; }
.aiq-brand-cols__form { flex: 1 1 auto; min-width: 0; }
.aiq-brand-cols__preview { flex: 0 0 230px; position: sticky; top: calc(var(--aiq-navbar-h) + 16px - var(--aiq-layout-pad)); }
.aiq-brand-cols__preview .aiq-subhead { margin-top: 0; }
@media (max-width: 991px) { .aiq-brand-cols { display: block; } .aiq-brand-cols__preview { position: static; margin-top: 16px; max-width: 260px; } }
.aiq-brand-phone { border: 6px solid #10142a; border-radius: 26px; overflow: hidden; background: #10142a; box-shadow: 0 10px 24px rgba(16, 20, 42, 0.25); }
.aiq-brand-phone__barra { height: 16px; }
.aiq-brand-phone__pantalla { padding: 22px 16px 26px; min-height: 330px; display: flex; flex-direction: column; gap: 10px; }
.aiq-brand-phone__logo { height: 52px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; font-weight: 800; font-size: 18px; text-align: center; }
.aiq-brand-phone__logo img { max-width: 100%; max-height: 52px; }
.aiq-brand-phone__campo { border-radius: 10px; padding: 9px 12px; font-size: 12px; font-weight: 600; opacity: 0.9; }
.aiq-brand-phone__boton { border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 800; text-align: center; }
.aiq-brand-phone__boton--borde { background: transparent; border: 2px solid; margin-top: 6px; }
.aiq-brand-phone__enlace { font-size: 12px; font-weight: 700; text-align: center; padding: 4px 0; }
.aiq-brand-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin-bottom: 16px; }
.aiq-brand-datos small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--aiq-muted); }
.aiq-brand-datos b { display: block; font-size: 16px; color: var(--aiq-navy); overflow-wrap: anywhere; }
.aiq-brand-datos span { display: block; font-size: 13px; color: var(--aiq-ink); overflow-wrap: anywhere; }
.aiq-brandpanel .aiq-alert .aiq-code { display: block; margin-top: 8px; font-size: 13px; max-width: 100%; }
