/* ============================================================================
   admin.css — Sistema de diseño del PANEL DE ADMIN (EURECA).
   App propia (sidebar + topbar, sin chrome de tienda). Look SaaS premium:
   profundidad por capas, jerarquía, ritmo de espaciado, micro-interacciones.
   Pure CSS, sin build. Depende de tokens.css + fonts.css (los carga _layout.php).
   ============================================================================ */

.adm *, .adm *::before, .adm *::after { box-sizing: border-box; }

body.adm {
  /* Paleta scoped del panel */
  --e-navy-0: #0A1326;
  --e-navy-1: #0E1A38;
  --e-navy-2: #14264F;
  --e-green:   #16A34A;
  --e-green-7: #15803D;
  --e-green-50:#ECFDF3;
  --e-ink:     #0E1726;
  --e-muted:   #5B6B82;
  --e-faint:   #8A99AE;
  --e-line:    #D5DEEC;
  --e-line-2:  #E2E8F2;
  --e-surface: #E4EAF4;   /* fondo de la página: más profundo para que las tarjetas resalten */
  --e-surface-2: #EDF1F8; /* tinte intermedio (sub-zonas dentro de tarjetas) */
  --e-card:    #FFFFFF;
  /* Elevación (sombras en capas, tintadas — más presencia para separar del fondo) */
  --sh-1: 0 1px 2px rgba(20,38,79,.06), 0 1px 3px rgba(20,38,79,.05);
  --sh-2: 0 6px 16px rgba(20,38,79,.09), 0 2px 6px rgba(20,38,79,.06);
  --sh-3: 0 20px 42px rgba(20,38,79,.14), 0 8px 16px rgba(20,38,79,.08);
  --sh-green: 0 10px 24px rgba(22,163,74,.26);
  --r-1: 10px; --r-2: 14px; --r-3: 18px;
  --ease: cubic-bezier(.22,.61,.36,1);

  margin: 0;
  color: var(--e-ink);
  font-family: var(--font-cuerpo, "Inter", system-ui, sans-serif);
  font-size: 14.5px; line-height: 1.55; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 540px at 80% -10%, rgba(22,163,74,.10), transparent 60%),
    radial-gradient(950px 520px at 5% 0%, rgba(28,57,132,.10), transparent 55%),
    var(--e-surface);
  background-attachment: fixed;
}
.adm a { color: inherit; text-decoration: none; }
.adm img { display: block; max-width: 100%; }
.adm ::selection { background: rgba(22,163,74,.18); }

@keyframes admRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes admFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --------------------------------- Layout --------------------------------- */
.adm-shell { display: flex; min-height: 100vh; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* -------------------------------- Sidebar --------------------------------- */
.adm-side {
  --side-w: 270px;
  position: sticky; top: 0; align-self: flex-start;
  width: var(--side-w); min-width: var(--side-w); height: 100vh; overflow-y: auto;
  color: #C4D0E6;
  background:
    radial-gradient(420px 220px at 30% -4%, rgba(22,163,74,.20), transparent 62%),
    radial-gradient(360px 300px at 100% 8%, rgba(40,80,170,.18), transparent 60%),
    linear-gradient(184deg, var(--e-navy-2) 0%, var(--e-navy-1) 46%, var(--e-navy-0) 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 1px 0 0 rgba(255,255,255,.04), 6px 0 30px rgba(8,14,30,.22);
}
.adm-side::-webkit-scrollbar { width: 9px; }
.adm-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 9px; border: 3px solid transparent; background-clip: padding-box; }
.adm-side::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); background-clip: padding-box; }

.adm-brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.2rem 1.25rem; margin-bottom: .35rem;
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(10,19,38,.96), rgba(10,19,38,.72) 70%, transparent);
  backdrop-filter: blur(6px);
}
.adm-brand::after { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); }
.adm-brand img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.adm-brand__t { display: flex; flex-direction: column; line-height: 1.12; }
.adm-brand__n { font-family: var(--font-display); font-weight: 700; font-size: .96rem; color: #fff; letter-spacing: 0; }
.adm-brand__s { font-family: var(--font-display); font-weight: 600; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: #5FE6A0; margin-top: 2px; }

.adm-menu { padding: .35rem .7rem 2.5rem; }
.adm-sec { border: 0; margin: 1px 0; }
.adm-sec > summary {
  display: flex; align-items: center; gap: .7rem; cursor: pointer; list-style: none; user-select: none;
  padding: .62rem .7rem; border-radius: var(--r-1);
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: #D7E0F1;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.adm-sec > summary::-webkit-details-marker { display: none; }
.adm-sec > summary:hover { background: rgba(255,255,255,.055); color: #fff; }
.adm-ic { width: 19px; height: 19px; flex-shrink: 0; opacity: .92; }
.adm-sec > summary .adm-ic { color: #93A6CC; transition: color .18s var(--ease); }
.adm-sec > summary:hover .adm-ic, .adm-sec[open] > summary .adm-ic { color: #6FE3A6; }
.adm-caret { margin-left: auto; width: 13px; height: 13px; opacity: .55; transition: transform .22s var(--ease); }
.adm-sec[open] > summary { color: #fff; }
.adm-sec[open] > summary .adm-caret { transform: rotate(180deg); opacity: .85; }

.adm-sub { display: flex; flex-direction: column; gap: 2px; padding: .2rem 0 .55rem 0; margin: 2px 0 0 1.35rem; position: relative; }
.adm-sub::before { content: ""; position: absolute; left: 0; top: .25rem; bottom: .7rem; width: 1.5px; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.02)); border-radius: 2px; }
.adm-sub a {
  position: relative; padding: .5rem .75rem .5rem .85rem; margin-left: .35rem; border-radius: 9px;
  font-size: .855rem; color: #9DACC8; transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.adm-sub a:hover { background: rgba(255,255,255,.055); color: #EAF0FB; transform: translateX(2px); }
.adm-sub a.is-active {
  background: linear-gradient(135deg, var(--e-green) 0%, #11924A 100%);
  color: #fff; font-weight: 600; box-shadow: var(--sh-green);
}
.adm-sub a.is-active::before { content: ""; position: absolute; left: -1.0rem; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: #6FE3A6; transform: translateY(-50%); box-shadow: 0 0 8px rgba(111,227,166,.9); }
.adm-sub__group { padding: .75rem .75rem .3rem; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: #66789B; font-weight: 600; }

.adm-item {
  display: flex; align-items: center; gap: .7rem; padding: .62rem .7rem; margin: 1px 0; border-radius: var(--r-1);
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: #D7E0F1;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.adm-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.adm-item .adm-ic { color: #93A6CC; }
.adm-item.is-active { background: linear-gradient(135deg, rgba(22,163,74,.20), rgba(22,163,74,.06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(111,227,166,.18); }
.adm-item.is-active .adm-ic { color: #6FE3A6; }

/* -------------------------------- Topbar ---------------------------------- */
.adm-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  height: 68px; padding: 0 1.9rem;
  background: rgba(255,255,255,.78); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--e-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px rgba(14,23,38,.04);
}
.adm-top__crumb { font-size: .82rem; color: var(--e-faint); letter-spacing: .01em; }
.adm-top__crumb b { color: var(--e-ink); font-weight: 600; }
.adm-user { margin-left: auto; position: relative; }
.adm-user > summary {
  display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none; user-select: none;
  padding: .35rem .55rem .35rem .4rem; border-radius: 999px; border: 1px solid var(--e-line);
  background: #fff; transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.adm-user > summary::-webkit-details-marker { display: none; }
.adm-user > summary:hover { border-color: #D7DEE9; box-shadow: var(--sh-1); }
.adm-user__av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .85rem; background: linear-gradient(135deg, #1C3984, #16A34A); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.adm-user__n { font-weight: 600; font-size: .88rem; color: var(--e-ink); }
.adm-user > summary svg { color: var(--e-faint); }
.adm-user__menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 216px;
  background: #fff; border: 1px solid var(--e-line); border-radius: var(--r-2);
  box-shadow: var(--sh-3); padding: .4rem; z-index: 30;
  animation: admRise .18s var(--ease) both;
}
.adm-user__menu a { display: flex; align-items: center; gap: .5rem; padding: .58rem .7rem; border-radius: 9px; font-size: .88rem; color: var(--e-ink); transition: background .14s; }
.adm-user__menu a:hover { background: var(--e-surface); }
.adm-user__menu a.is-out { color: #C0392B; }
.adm-user__menu a.is-out:hover { background: #FDECEA; }
.adm-user__menu hr { border: 0; border-top: 1px solid var(--e-line-2); margin: .35rem .2rem; }

/* -------------------------------- Content --------------------------------- */
/* `backwards`, no `both`: con `both` la animación de `opacity` se queda en
   efecto PARA SIEMPRE y este contenedor pasa a ser un contexto de apilamiento
   permanente, que encierra dentro de él a cualquier ventana `position: fixed`
   de las páginas (confirmaciones, vistas previas). La entrada se ve idéntica.
   Es el mismo arreglo que en `.es-wrap` del panel del estudiante, donde por
   esto el footer llegaba a pintarse encima del examen. */
.adm-body { padding: 2rem 1.9rem 3.5rem; max-width: 1820px; width: 100%; animation: admFade .4s var(--ease) backwards; }
.adm-h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.72rem; letter-spacing: -.025em; margin: 0 0 .4rem; color: var(--e-ink); }
.adm-sub-lead { color: var(--e-muted); margin: 0 0 1.85rem; font-size: .96rem; max-width: 70ch; }
.adm-section { margin-top: 2.35rem; }
.adm-section__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.05rem; }
.adm-h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.16rem; letter-spacing: 0; margin: 0; color: var(--e-ink); }
.adm-h2::before { content: ""; display: inline-block; width: 4px; height: 1em; border-radius: 3px; background: linear-gradient(180deg, var(--e-green), #11924A); margin-right: .6rem; vertical-align: -.12em; }
.adm-link { font-weight: 600; color: var(--e-green-7); font-size: .9rem; white-space: nowrap; transition: gap .15s; }
.adm-link:hover { color: var(--e-green); }

/* Tiles */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 1.1rem; margin-bottom: 1.5rem; }
.adm-tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem 1.45rem;
  background: linear-gradient(180deg, #fff, #FCFDFE);
  border: 1px solid var(--e-line); border-radius: var(--r-2); box-shadow: var(--sh-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  animation: admRise .5s var(--ease) both;
}
.adm-tile:nth-child(1){ animation-delay:.03s } .adm-tile:nth-child(2){ animation-delay:.08s }
.adm-tile:nth-child(3){ animation-delay:.13s } .adm-tile:nth-child(4){ animation-delay:.18s }
.adm-tile:nth-child(5){ animation-delay:.23s } .adm-tile:nth-child(6){ animation-delay:.28s }
.adm-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--e-green), #4ADE80); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.adm-tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(22,163,74,.07), transparent 70%); z-index: -1; }
.adm-tile:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: #D9E7DF; }
.adm-tile:hover::before { transform: scaleX(1); }
.adm-tile__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.adm-tile__ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--e-green-7); background: linear-gradient(140deg, #EAFBEF, #D2F0DC); box-shadow: inset 0 0 0 1px rgba(22,163,74,.14), 0 6px 14px rgba(22,163,74,.14); }
.adm-tile__ic svg { width: 22px; height: 22px; }
.adm-tile__n { font-family: var(--font-display); font-weight: 800; font-size: 2.45rem; line-height: 1; letter-spacing: -.03em; color: var(--e-ink); }
.adm-tile__l { font-weight: 600; font-size: .98rem; color: var(--e-ink); }
.adm-tile__s { font-size: .8rem; color: var(--e-faint); }
.adm-tile.is-alert { border-color: #F7C9CD; background: linear-gradient(180deg, #FFF8F8, #FFFCFC); }
.adm-tile.is-alert::before { background: linear-gradient(90deg, #E5484D, #F87171); }
.adm-tile.is-alert .adm-tile__ic { background: linear-gradient(140deg, #FFE9EA, #FCD5D8); color: #C0392B; box-shadow: inset 0 0 0 1px rgba(229,72,77,.16), 0 6px 14px rgba(229,72,77,.14); }
.adm-tile.is-alert .adm-tile__n { color: #B42F2F; }

/* Card */
.adm-card { background: var(--e-card); border: 1px solid var(--e-line); border-radius: var(--r-2); box-shadow: var(--sh-1); }
.adm-card--pad { padding: 1.5rem; }

/* Bloque de tabla (estilo DataTables, refinado) */
.adm-tableblock { background: var(--e-card); border: 1px solid var(--e-line); border-radius: var(--r-2); box-shadow: var(--sh-2); padding: 1.15rem 1.3rem 1.3rem; overflow-x: auto; }
.adm-dt-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.adm-dt-show { font-size: .85rem; color: var(--e-muted); display: flex; align-items: center; gap: .45rem; }
.adm-dt-show select, .adm-search input { font: inherit; font-size: .85rem; padding: .5rem .7rem; border: 1px solid var(--e-line); border-radius: var(--r-1); background: #fff; color: var(--e-ink); transition: border-color .16s, box-shadow .16s; }
.adm-search { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--e-muted); }
.adm-search input { min-width: 230px; background: var(--e-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A99AE' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4-4'/%3E%3C/svg%3E") no-repeat .6rem 50% / 15px; padding-left: 2rem; }
.adm-search input:focus, .adm-dt-show select:focus { outline: none; border-color: var(--e-green); box-shadow: 0 0 0 3.5px rgba(22,163,74,.13); background-color: #fff; }

.adm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.adm-table thead th {
  text-align: left; padding: .7rem .6rem; background: linear-gradient(180deg, #EDF1F9, #E5EBF5); border-bottom: 2px solid #CAD6E8;
  font-family: var(--font-display); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: #5C6B85; font-weight: 600;
  white-space: normal; vertical-align: bottom; line-height: 1.25;
}
.adm-table thead th:first-child { border-top-left-radius: var(--r-1); }
.adm-table thead th:last-child { border-top-right-radius: var(--r-1); }
.adm-table tbody td { padding: .78rem .5rem; border-bottom: 1px solid var(--e-line-2); vertical-align: middle; }
.adm-table .adm-c { text-align: center; }
.adm-table .adm-w-title { min-width: 200px; }
.adm-table tbody tr { transition: background .14s; }
.adm-table tbody tr:nth-child(even) td { background: #F1F5FB; }
.adm-table tbody tr:hover td { background: #E8F6EE; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-td-strong { font-weight: 600; color: var(--e-ink); }
.adm-td-sub { display: block; color: var(--e-faint); font-size: .8rem; font-weight: 400; margin-top: 1px; }
.adm-table a:hover { color: var(--e-green-7); }
.adm-dt-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; font-size: .85rem; color: var(--e-muted); }
.adm-pages { display: flex; gap: .3rem; }
.adm-pages a, .adm-pages span { min-width: 34px; text-align: center; padding: .4rem .65rem; border-radius: 9px; border: 1px solid var(--e-line); color: var(--e-ink); font-weight: 600; font-size: .82rem; transition: all .15s var(--ease); }
.adm-pages a:hover { border-color: var(--e-green); color: var(--e-green-7); background: var(--e-green-50); }
.adm-pages .is-current { background: linear-gradient(135deg, #1C3984, #14264F); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(28,57,132,.25); }
.adm-pages .is-muted { color: #B6C0CE; border-color: transparent; pointer-events: none; }

/* Badges (pill con punto) */
.adm-b { display: inline-flex; align-items: center; gap: .4em; padding: .26rem .65rem; border-radius: 999px; font-size: .73rem; font-weight: 600; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.adm-b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.adm-b--si, .adm-b--publicado, .adm-b--verificado, .adm-b--aprobado, .adm-b--activo { background: var(--e-green-50); color: #15803D; }
.adm-b--no, .adm-b--rechazado, .adm-b--inactivo { background: #FDECEC; color: #C0392B; }
.adm-b--borrador, .adm-b--pendiente { background: #FEF5D7; color: #946A06; }
.adm-b--archivado, .adm-b--neutro { background: #E9EEF8; color: #2A4A8C; }

/* Tag */
.adm-tag { display: inline-block; padding: .2rem .6rem; border-radius: 7px; background: #EBF0F9; color: #2A4A8C; font-family: var(--font-display); font-weight: 600; font-size: .73rem; letter-spacing: .01em; }
.adm-tag--cian { background: #DFF6FB; color: #0E7490; }

/* Interruptor Completado (panel del instructor) */
.adm-switchform { display: flex; align-items: center; gap: .45rem; }
.adm-switchform small { color: var(--e-muted); font-size: .72rem; }
.adm-switch { position: relative; width: 42px; height: 23px; border: 0; border-radius: 999px; background: #CBD5E3; cursor: pointer; transition: background .2s var(--ease); padding: 0; }
.adm-switch span { position: absolute; top: 2.5px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: left .2s var(--ease); }
.adm-switch.is-on { background: var(--e-green); }
.adm-switch.is-on span { left: 21px; }
.adm-switch:hover { filter: brightness(1.05); }

/* Barra de progreso (cursos del usuario) */
.adm-prog { position: relative; width: 120px; height: 18px; background: #EDF1F7; border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(15,23,42,.06); }
.adm-prog__bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--e-green), #4ADE80); border-radius: 999px; transition: width .3s var(--ease); }
.adm-prog__t { position: relative; display: block; text-align: center; font-size: .68rem; font-weight: 600; line-height: 18px; color: var(--e-ink); }
/* Cuando la barra verde ya cubre el centro, el número pasa a blanco. */
.adm-prog__t--luz { color: #fff; text-shadow: 0 1px 1px rgba(10, 25, 15, .35); }

/* Sugerencias en vivo del buscador (guía mientras se escribe) */
.adm-suggest-wrap { position: relative; display: inline-block; }
.adm-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: #fff; border: 1px solid var(--e-line); border-radius: var(--r-2);
  box-shadow: var(--sh-3); padding: .35rem; max-height: 320px; overflow-y: auto;
  animation: admRise .16s var(--ease) both;
}
.adm-suggest__item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: transparent; padding: .55rem .7rem; border-radius: 9px;
  font: inherit; transition: background .12s;
}
.adm-suggest__item:hover, .adm-suggest__item.is-sel { background: var(--e-green-50); }
.adm-suggest__n { display: block; font-weight: 600; font-size: .88rem; color: var(--e-ink); }
.adm-suggest__e { display: block; font-size: .78rem; color: var(--e-faint); }
.adm-suggest mark, .adm-table mark { background: #FDF0B7; color: inherit; border-radius: 3px; padding: 0 1px; }
.adm-suggest__vacio { padding: .6rem .7rem; font-size: .85rem; color: var(--e-faint); }

/* Modales (dialog nativo) */
.adm-modal { border: 0; border-radius: var(--r-3); padding: 1.5rem 1.6rem; width: min(480px, calc(100vw - 2rem)); box-shadow: 0 30px 70px rgba(8,14,30,.35); }
.adm-modal::backdrop { background: rgba(10,19,38,.55); backdrop-filter: blur(2px); }
.adm-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.adm-modal__head h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.015em; margin: 0; }
.adm-modal__x { border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--e-muted); padding: .3rem .45rem; border-radius: 8px; }
.adm-modal__x:hover { background: var(--e-surface); color: var(--e-ink); }
.adm-modal__foot { display: flex; justify-content: flex-end; gap: .6rem; padding-top: 1.1rem; border-top: 1px solid var(--e-line-2); }
.adm-modal--confirm { text-align: center; }
.adm-modal__warn { width: 64px; height: 64px; margin: .25rem auto .6rem; display: grid; place-items: center; border-radius: 50%; border: 3px solid #F4B26A; color: #E8923B; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; }
.adm-modal select[multiple] { min-height: 150px; }

/* Botones */
.adm-btn { display: inline-flex; align-items: center; gap: .45em; cursor: pointer; border: 1px solid transparent; border-radius: var(--r-1); padding: .58rem .95rem; font-family: var(--font-display); font-weight: 600; font-size: .88rem; line-height: 1; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s, border-color .15s, color .15s; }
.adm-btn:active { transform: translateY(1px); }
.adm-btn--sm { padding: .44rem .72rem; font-size: .82rem; }
/* Verde primario: texto SIEMPRE blanco (también cuando el botón es un enlace). */
.adm .adm-btn--primary, .adm .adm-btn--primary:hover,
.adm .adm-btn--ok, .adm .adm-btn--ok:hover { color: #fff; }
.adm .adm-btn--primary {
  background: linear-gradient(160deg, #1FB45B 0%, #129C4D 55%, #0E8A43 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 18px rgba(18,156,77,.30);
  font-weight: 700;
}
.adm .adm-btn--primary:hover {
  background: linear-gradient(160deg, #23C465 0%, #14A854 55%, #0F9147 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 26px rgba(18,156,77,.38);
  transform: translateY(-1px);
}
.adm .adm-btn--ok {
  background: linear-gradient(160deg, #1FB45B, #0E8A43);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 12px rgba(18,156,77,.24);
}
.adm .adm-btn--ok:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 9px 20px rgba(18,156,77,.34); }
.adm-btn--ghost { background: #fff; border-color: var(--e-line); color: var(--e-ink); box-shadow: var(--sh-1); }
.adm-btn--ghost:hover { border-color: var(--e-green); color: var(--e-green-7); }
/* Acciones de fila: sistema TONAL coherente (tinte + texto + borde del mismo matiz;
   hover = relleno sólido). Mismos matices del panel original: azul/cian/verde/rojo. */
.adm .adm-btn--edit { background: #EAF1FE; color: #1D4ED8; border-color: #C7D9FB; }
.adm .adm-btn--edit:hover { background: #1D4ED8; color: #fff; border-color: #1D4ED8; box-shadow: 0 6px 16px rgba(29,78,216,.28); transform: translateY(-1px); }
.adm .adm-btn--view { background: #E0F5FA; color: #0E7490; border-color: #BCE7F2; }
.adm .adm-btn--view:hover { background: #0E94B7; color: #fff; border-color: #0E94B7; box-shadow: 0 6px 16px rgba(14,148,183,.28); transform: translateY(-1px); }
.adm .adm-btn--assign { background: #E7F8EC; color: #15803D; border-color: #C3EAD0; }
.adm .adm-btn--assign:hover { background: var(--e-green); color: #fff; border-color: var(--e-green); box-shadow: 0 6px 16px rgba(22,163,74,.28); transform: translateY(-1px); }
.adm .adm-btn--del { background: #FDEBEC; color: #C0392B; border-color: #F6CDD1; }
.adm .adm-btn--del:hover { background: #E5484D; color: #fff; border-color: #E5484D; box-shadow: 0 6px 16px rgba(229,72,77,.28); transform: translateY(-1px); }
/* Acción APAGADA. Hacía falta: hay acciones que existen pero que en esa fila
   concreta no se pueden hacer —eliminar una categoría que todavía tiene cursos
   dentro— y esconder el botón deja al administrador buscando algo que no está.
   Apagado, con el motivo en el `title`, se ve que la acción existe y por qué no
   aplica AQUÍ. Sin hover, sin sombra y con cursor de prohibido: nada que invite
   a insistir. */
.adm .adm-btn:disabled,
.adm .adm-btn[disabled] {
  background: #F4F5F7; color: #9AA3AF; border-color: #E5E7EB;
  cursor: not-allowed; box-shadow: none;
}
.adm .adm-btn:disabled:hover,
.adm .adm-btn[disabled]:hover { background: #F4F5F7; color: #9AA3AF; border-color: #E5E7EB; transform: none; box-shadow: none; }
.adm-btn--icon { padding: .48rem; width: 36px; height: 36px; justify-content: center; }
.adm-acts { display: flex; gap: .4rem; flex-wrap: nowrap; }
.adm-acts--col { flex-direction: column; align-items: stretch; }
.adm-acts--col .adm-btn { justify-content: center; }

/* Formularios */
.adm-form { display: grid; gap: 1.15rem; max-width: 660px; }
/* `hidden` tiene que GANAR. El `display` de estas clases es de autor y pisa el
   del navegador para [hidden]: sin esto, un bloque marcado como oculto se sigue
   viendo (pasó con los datos de la alianza nueva en la ficha del curso). */
.adm-form[hidden], .adm-field[hidden], .adm-checks[hidden], .adm-check[hidden] { display: none !important; }
.adm-form--wide { max-width: 940px; grid-template-columns: 1fr 1fr; }
.adm-field { display: flex; flex-direction: column; gap: .4rem; }
.adm-field--full { grid-column: 1 / -1; }
.adm-field > label { font-family: var(--font-display); font-weight: 600; font-size: .86rem; color: var(--e-ink); }
/* Etiqueta suelta, para formularios cortos que no montan la rejilla .adm-form
   (cuentas de admin, alianzas). Misma voz que la de .adm-field, en bloque. */
.adm-label { display: block; margin-bottom: .35rem; font-family: var(--font-display); font-weight: 600; font-size: .86rem; color: var(--e-ink); }
.adm-input, .adm-select, .adm-textarea { font: inherit; padding: .7rem .85rem; border: 1px solid var(--e-line); border-radius: var(--r-1); background: #fff; color: var(--e-ink); width: 100%; transition: border-color .16s, box-shadow .16s; }
.adm-textarea { min-height: 120px; resize: vertical; }
.adm-input:focus, .adm-select:focus, .adm-textarea:focus { outline: none; border-color: var(--e-green); box-shadow: 0 0 0 3.5px rgba(22,163,74,.13); }
.adm-input::placeholder { color: #AEBACB; }
.adm-hint { font-size: .8rem; color: var(--e-muted); }

/* Toggles de opciones (checkbox cards) */
.adm-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem; }
.adm-check { position: relative; display: block; padding: .85rem 1rem .85rem 2.5rem; border: 1px solid var(--e-line); border-radius: var(--r-1); background: #fff; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s; }
.adm-check input { position: absolute; left: .95rem; top: 1.05rem; width: 16px; height: 16px; accent-color: var(--e-green); cursor: pointer; }
.adm-check__t { display: block; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--e-ink); }
.adm-check__d { display: block; font-size: .78rem; color: var(--e-muted); margin-top: 2px; }
.adm-check.is-on { border-color: #BFE9CC; background: linear-gradient(180deg, #F6FDF8, #EFFBF3); box-shadow: inset 0 0 0 1px rgba(22,163,74,.10); }
.adm-hint--ok { color: var(--e-green-7); }
.adm-hint--err { color: #C0392B; }

/* Avisos */
.adm-flash { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-radius: var(--r-1); margin-bottom: 1.1rem; font-size: .92rem; box-shadow: var(--sh-1); animation: admRise .25s var(--ease) both; }
.adm-flash--ok { background: linear-gradient(180deg, #F2FCF5, #ECFDF3); border: 1px solid #BFE9CC; color: #15803D; }
.adm-flash--err { background: #FDECEC; border: 1px solid #F6C9CC; color: #C0392B; }
.adm-flash--warn { background: #FEF6E7; border: 1px solid #F5D58A; color: #92610A; }
.adm-help { display: flex; gap: .65rem; background: linear-gradient(180deg, #F4FBF6, #ECFDF3); border: 1px solid #CDEBD7; border-radius: var(--r-1); padding: .95rem 1.15rem; color: #2C5E40; font-size: .9rem; margin-bottom: 1.3rem; }
.adm-empty { padding: 2.75rem 1.5rem; text-align: center; color: var(--e-muted); background: repeating-linear-gradient(45deg, #FBFCFE, #FBFCFE 10px, #F7F9FC 10px, #F7F9FC 20px); border: 1px dashed #D5DDE9; border-radius: var(--r-2); }
.adm-note { font-size: .85rem; color: var(--e-faint); }
.adm-soon { display: inline-flex; align-items: center; gap: .4em; padding: .22rem .65rem; border-radius: 999px; background: #E9EEF8; color: #2A4A8C; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }

/* Filtros */
.adm-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.adm-filters a { padding: .48rem .95rem; border-radius: 999px; border: 1px solid var(--e-line); background: #fff; font-size: .85rem; font-weight: 600; color: var(--e-muted); box-shadow: var(--sh-1); transition: all .16s var(--ease); }
.adm-filters a:hover { border-color: #C9D3E2; color: var(--e-ink); transform: translateY(-1px); }
.adm-filters a.is-active { background: linear-gradient(135deg, #1C3984, #14264F); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(28,57,132,.28); }

/* --------------------------------- Login ---------------------------------- */
.adm-login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem;
  background:
    radial-gradient(700px 400px at 80% -5%, rgba(22,163,74,.20), transparent 60%),
    radial-gradient(600px 500px at 10% 110%, rgba(40,80,170,.22), transparent 60%),
    linear-gradient(180deg, var(--e-navy-2), var(--e-navy-0));
}
.adm-login { width: 100%; max-width: 410px; background: #fff; border-radius: var(--r-3); box-shadow: 0 30px 70px rgba(8,14,30,.5), 0 2px 6px rgba(8,14,30,.3); padding: 2.4rem; animation: admRise .35s var(--ease) both; }
.adm-login__brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.6rem; }
.adm-login__brand img { width: 38px; height: 38px; }
.adm-login__brand b { font-family: var(--font-display); font-weight: 700; font-size: .98rem; }
.adm-login__brand span { font-family: var(--font-display); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--e-green-7); display: block; margin-top: 2px; }
.adm-login h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; margin: 0 0 .4rem; }
.adm-login p { color: var(--e-muted); margin: 0 0 1.6rem; font-size: .92rem; }

/* --------------------- Topnav del INSTRUCTOR (sin sidebar) ---------------- */
.in-shell { min-height: 100vh; display: flex; flex-direction: column; }
.in-nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .6rem 1.5rem;
  background:
    radial-gradient(420px 160px at 18% 0%, rgba(22,163,74,.18), transparent 62%),
    linear-gradient(92deg, var(--e-navy-2) 0%, var(--e-navy-1) 55%, var(--e-navy-0) 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(8,14,30,.25);
}
.in-nav .adm-brand { position: static; background: transparent; padding: .15rem 0; margin: 0; backdrop-filter: none; }
.in-nav .adm-brand::after { display: none; }
.in-links { display: flex; gap: .35rem; margin-left: .75rem; flex-wrap: wrap; }
.in-links a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .9rem; border-radius: 10px;
  color: #C9D4EC; font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.in-links a .adm-ic { width: 17px; height: 17px; color: #93A6CC; }
.in-links a:hover { background: rgba(255,255,255,.07); color: #fff; }
.in-links a:hover .adm-ic { color: #6FE3A6; }
.in-links a.is-active { background: linear-gradient(135deg, var(--e-green), #11924A); color: #fff; box-shadow: var(--sh-green); }
.in-links a.is-active .adm-ic { color: #fff; }
.in-nav .adm-user { margin-left: auto; }
.in-nav .adm-user > summary { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.in-nav .adm-user > summary:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); box-shadow: none; }
.in-nav .adm-user__n { color: #fff; }
.in-nav .adm-user > summary svg { color: #9FB0D2; }
.in-shell .adm-body { margin-inline: auto; }

/* ------------------------------- Responsive ------------------------------- */
.adm-menu-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-1); border: 1px solid var(--e-line); background: #fff; cursor: pointer; box-shadow: var(--sh-1); }
.adm-menu-toggle svg { width: 20px; height: 20px; }
@media (max-width: 900px) {
  .adm-side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .3s var(--ease); z-index: 50; }
  .adm-shell.is-open .adm-side { transform: none; }
  .adm-shell.is-open .adm-main::after { content: ""; position: fixed; inset: 0; background: rgba(8,14,30,.5); z-index: 40; }
  .adm-menu-toggle { display: inline-flex; }
  .adm-form--wide { grid-template-columns: 1fr; }
  .adm-body { padding: 1.5rem 1.15rem 3rem; }
}

/* ============================================================================
   Editor de Módulos (med-) — la vista MÁS importante del panel de instructor:
   aquí se edita y sube el material del curso. Jerarquía fuerte: cabecera navy
   por sección, formularios sobre panel tintado, tablas con encabezado oscuro
   y cebra, zona punteada para subir archivos y navegación de secciones fija.
   ============================================================================ */

/* --- Navegación de secciones (fija bajo la barra superior) --- */
.adm .med-nav { position: sticky; top: 70px; z-index: 25; display: inline-flex; gap: .3rem; flex-wrap: wrap; padding: .45rem; margin-bottom: 1.6rem; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--e-line); border-radius: 999px; box-shadow: var(--sh-2); max-width: 100%; }
.adm .med-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .44rem .95rem; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: #3A4A63; transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease); }
.adm .med-nav a:hover { background: #EFF4FB; }
.adm .med-nav a .n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E6EDF7; color: #33415C; font-size: .72rem; font-weight: 600; }
.adm .med-nav a.is-here { background: linear-gradient(135deg, var(--e-green), #11924A); color: #fff; box-shadow: var(--sh-green); }
.adm .med-nav a.is-here .n { background: rgba(255,255,255,.28); color: #fff; }

/* --- Tarjeta de sección con cabecera CLARA y amigable, codificada por color ---
   Cada sección lleva un modificador .med-sec--xxx en la tarjeta que define su
   color (--sec…). Así el instructor sabe de un vistazo en qué sección está
   (Módulo=azul · Archivos=ámbar · Videos=turquesa · Examen=violeta · Tareas=verde). */
.adm .med-card { background: var(--e-card); border: 1px solid var(--e-line); border-radius: var(--r-3); box-shadow: var(--sh-2); overflow: hidden; margin-bottom: 1.7rem; scroll-margin-top: 136px;
  --sec:#4F6BED; --sec-bg:#EEF3FF; --sec-line:#D7E1FB; --sec-soft:#E3EAFE; --sec-ink:#3A4FB0; }
.adm .med-sec--info  { --sec:#4F6BED; --sec-bg:#EEF3FF; --sec-line:#D7E1FB; --sec-soft:#E3EAFE; --sec-ink:#3A4FB0; }
.adm .med-sec--files { --sec:#E0890B; --sec-bg:#FFF7EA; --sec-line:#F2DFBD; --sec-soft:#FBEAC9; --sec-ink:#955F09; }
.adm .med-sec--video { --sec:#0E9AA7; --sec-bg:#E7FAFB; --sec-line:#C3EAED; --sec-soft:#D2F1F3; --sec-ink:#0A6E78; }
.adm .med-sec--exam  { --sec:#7C5CDB; --sec-bg:#F4EFFE; --sec-line:#E1D4FA; --sec-soft:#EADFFD; --sec-ink:#593EAD; }
.adm .med-sec--task  { --sec:#16A34A; --sec-bg:#EBF8F0; --sec-line:#C7E9D4; --sec-soft:#DBF2E4; --sec-ink:#15803D; }
.adm .med-head { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1.05rem 1.5rem; background: var(--sec-bg); border-bottom: 1px solid var(--sec-line); }
.adm .med-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--sec), transparent 72%); }
.adm .med-head .med-ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--sec); box-shadow: 0 5px 14px rgba(20,38,79,.18), inset 0 1px 0 rgba(255,255,255,.28); }
.adm .med-head .med-ic svg { width: 22px; height: 22px; }
.adm .med-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--e-ink); letter-spacing: 0; }
.adm .med-head .med-hsub { display: block; margin-top: .1rem; font-family: var(--font-cuerpo, "Inter", sans-serif); font-weight: 400; font-size: .8rem; color: var(--e-muted); }
.adm .med-head .med-count { margin-left: auto; flex: none; display: inline-flex; align-items: center; padding: .36rem .9rem; border-radius: 999px; background: var(--sec-soft); border: 1px solid var(--sec-line); color: var(--sec-ink); font-family: var(--font-display); font-weight: 700; font-size: .82rem; white-space: nowrap; }
.adm .med-body { padding: 1.5rem; }

/* --- Panel de formulario (tintado para despegarse del blanco) --- */
.adm .med-form { background: #F6F9FE; border: 1px solid #E1E9F4; border-radius: var(--r-2); padding: 1.3rem 1.4rem; }
.adm .med-form + .med-form { margin-top: 1.15rem; }
.adm .med-form .adm-input, .adm .med-form .adm-textarea { background: #fff; }
.adm .med-ftitle { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--e-ink); }
.adm .med-ftitle::before { content: ""; flex: none; width: 4px; height: 1.1em; border-radius: 2px; background: var(--sec, #16A34A); }
.adm .med-ftitle .med-fnote { margin-left: auto; font-family: var(--font-cuerpo, "Inter", sans-serif); font-weight: 400; font-size: .78rem; color: var(--e-muted); }

/* --- Subtítulo de lista dentro de la sección --- */
.adm .med-sub { display: flex; align-items: center; gap: .6rem; margin: 1.7rem 0 .95rem; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--e-ink); }
.adm .med-sub::before { content: ""; flex: none; width: 4px; height: 1.1em; border-radius: 2px; background: var(--sec, #16A34A); }
.adm .med-sub .n { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--sec-soft, #ECFDF3); border: 1px solid var(--sec-line, #BBE7CC); color: var(--sec-ink, #15803D); font-size: .74rem; font-weight: 600; }

/* --- Tablas bien definidas: marco, encabezado tintado del color de la sección, cebra y hover --- */
.adm .med-tablewrap { border: 1px solid var(--sec-line, #D5DfED); border-radius: var(--r-2); overflow-x: auto; box-shadow: var(--sh-1); background: #fff; }
.adm .med-tablewrap .adm-table thead th { background: var(--sec-soft, #EDF1F8); color: var(--sec-ink, #5C6B85); border-bottom: 2px solid var(--sec, #CAD6E8); padding: .72rem .85rem; }
.adm .med-tablewrap .adm-table thead th:first-child { border-top-left-radius: 0; padding-left: 1.15rem; }
.adm .med-tablewrap .adm-table thead th:last-child { border-top-right-radius: 0; }
.adm .med-tablewrap .adm-table tbody td { padding: .8rem .85rem; border-bottom: 1px solid #E6ECF5; }
.adm .med-tablewrap .adm-table tbody td:first-child { padding-left: 1.15rem; }
.adm .med-tablewrap .adm-table tbody tr:nth-child(even) td { background: #F4F8FD; }
.adm .med-tablewrap .adm-table tbody tr:hover td { background: #EDF7F1; }
.adm .med-tablewrap .adm-table tbody tr:last-child td { border-bottom: 0; }

/* --- Ítem editable en línea (cada video/pregunta/tarea con sus campos) ---
   Cada ítem abre con una BANDA de cabecera tintada + chip navy con su número:
   donde empieza una banda, empieza otro ítem. Los formularios de "Agregar"
   van en verde suave (verde = nuevo, navy/blanco = existente). */
.adm .med-item { background: #fff; border: 1px solid #C5D3E6; border-radius: var(--r-2); box-shadow: var(--sh-1); overflow: hidden; scroll-margin-top: 136px; }
.adm .med-item + .med-item { margin-top: 1.35rem; }
.adm .med-item__head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .78rem 1.3rem; background: linear-gradient(180deg, #F2F6FC, #E9F0F9); border-bottom: 1px solid #D7E2F0; }
.adm .med-item__num { flex: none; display: inline-flex; align-items: center; padding: .3rem .8rem; border-radius: 999px; background: var(--sec, #1C3984); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .76rem; letter-spacing: .02em; white-space: nowrap; box-shadow: 0 2px 7px rgba(20,38,79,.22); }
.adm .med-item__t { font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--e-ink); min-width: 0; overflow-wrap: anywhere; }
.adm .med-item__head form, .adm .med-item__head .med-item__der { margin-left: auto; }
.adm .med-item__body { padding: 1.2rem 1.3rem 1.3rem; }
.adm .med-item .adm-input, .adm .med-item .adm-textarea { background: #FBFCFE; }
.adm .med-item .adm-input:focus, .adm .med-item .adm-textarea:focus { background: #fff; }
.adm .med-item__foot { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: 1.05rem; padding-top: .95rem; border-top: 1px solid var(--e-line-2); }

/* Formulario de AGREGAR: verde suave para distinguirlo de los ítems existentes */
.adm .med-form--add { background: #F1FAF5; border-color: #C9E7D7; }
.adm .med-form--add .adm-input, .adm .med-form--add .adm-textarea { background: #fff; }

/* Opciones de pregunta: casilla para marcar la(s) correcta(s) + texto */
.adm .med-ops { display: flex; flex-direction: column; gap: .55rem; margin: .15rem 0 .55rem; }
.adm .med-oprow { display: flex; align-items: center; gap: .65rem; }
.adm .med-oprow input[type="checkbox"] { flex: none; width: 18px; height: 18px; accent-color: var(--e-green); cursor: pointer; }
.adm .med-oprow .adm-input { flex: 1; }

/* --- Tarjeta-resumen (el editor del módulo enlaza al examen en su página) --- */
.adm .med-summary { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.adm .med-summary__info { flex: 1; min-width: 240px; }
.adm .med-summary__chips { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.adm .med-summary .adm-btn { flex: none; }

/* --- Tira de estadísticas (cabecera de la página de examen) --- */
.adm .med-stats { display: flex; gap: .8rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.adm .med-stat { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1.1rem; background: var(--e-card); border: 1px solid var(--e-line); border-radius: var(--r-2); box-shadow: var(--sh-1); }
.adm .med-stat__n { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; color: #1C3984; line-height: 1.1; }
.adm .med-stat__n--on { color: var(--e-green-7); }
.adm .med-stat__n--off { color: #B23B3B; }
.adm .med-stat__l { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--e-faint); }

/* --- Acordeón de preguntas (página especializada del examen) ---
   Lista compacta: cada pregunta es una barra; clic → se abre su editor ahí mismo. */
.adm .med-acc { border: 1px solid #C5D3E6; border-radius: var(--r-2); background: #fff; box-shadow: var(--sh-1); overflow: hidden; scroll-margin-top: 90px; }
.adm .med-acc + .med-acc { margin-top: .7rem; }
.adm .med-acc__bar { display: flex; align-items: center; gap: .7rem; padding: .72rem 1.05rem; cursor: pointer; list-style: none; background: linear-gradient(180deg, #F4F8FD, #E9F0F9); transition: background .15s var(--ease); }
.adm .med-acc__bar::-webkit-details-marker { display: none; }
.adm .med-acc__bar:hover { background: linear-gradient(180deg, #EDF3FB, #E0EAF6); }
.adm .med-acc[open] > .med-acc__bar { border-bottom: 1px solid #D7E2F0; }
.adm .med-acc__q { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--e-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm .med-acc__ans { flex: none; display: inline-flex; align-items: center; gap: .32rem; max-width: 240px; padding: .22rem .65rem; border-radius: 999px; background: var(--e-green-50); border: 1px solid #BBE7CC; color: var(--e-green-7); font-size: .76rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm .med-acc__ans svg { flex: none; }
.adm .med-acc__chev { flex: none; color: #5B6B82; transition: transform .2s var(--ease); }
.adm .med-acc[open] > .med-acc__bar .med-acc__chev { transform: rotate(180deg); }
/* Miniatura del video en la barra (thumbnail de YouTube o ícono ▶) */
.adm .med-acc__thumb { flex: none; width: 48px; height: 30px; border-radius: 6px; object-fit: cover; background: linear-gradient(135deg, var(--e-navy-2), var(--e-navy-1)); border: 1px solid #C5D3E6; }
.adm .med-acc__thumb--ph { display: inline-flex; align-items: center; justify-content: center; color: #9FB6DE; }
.adm .med-acc__body { padding: 1.25rem 1.3rem 1.35rem; }
/* Variante verde para "Agregar nueva pregunta" */
.adm .med-acc--add { border-color: #C3E6D4; }
.adm .med-acc--add > .med-acc__bar { background: linear-gradient(180deg, #EAF8F0, #DCF2E5); }
.adm .med-acc--add > .med-acc__bar:hover { background: linear-gradient(180deg, #E1F4E9, #CFEdda); }
.adm .med-acc--add .med-acc__q { color: var(--e-green-7); font-weight: 700; }
@media (max-width: 640px) {
  .adm .med-acc__ans { max-width: 120px; }
}

/* --- Zona de subida (borde punteado, se enciende al pasar/enfocar) --- */
.adm .med-drop { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; border: 1.6px dashed #B9CBE2; border-radius: var(--r-2); background: #FAFCFF; padding: 1.05rem 1.2rem; transition: border-color .16s var(--ease), background .16s var(--ease); }
.adm .med-drop:hover, .adm .med-drop:focus-within { border-color: var(--e-green); background: #F6FCF8; }
.adm .med-drop .adm-input[type="file"] { background: #fff; }

/* --- Franja de evaluación del curso (verde suave) --- */
.adm .med-eval { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; padding: 1rem 1.2rem; background: linear-gradient(180deg, #F0FAF4, #EAF7EF); border: 1px solid #C9E9D6; border-radius: var(--r-2); }
.adm .med-eval .med-evaltitle { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--e-green-7); display: inline-flex; align-items: center; gap: .45rem; }

@media (max-width: 760px) {
  .adm .med-nav { position: static; }
  .adm .med-body { padding: 1.05rem; }
  .adm .med-head { padding: .85rem 1.05rem; }
  .adm .med-form { padding: 1.05rem 1.1rem; }
}

/* ===================== Administrar Estudiante ===================== */
.adm-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: #EEF2FA; border: 1px solid var(--e-line); color: #2A4A8C; font-size: .78rem; font-weight: 600; }
.adm-chip svg { opacity: .8; }

.est-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; }
.est-card { background: #fff; border: 1px solid var(--e-line); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: 0 2px 10px rgba(20, 38, 79, .05); display: flex; flex-direction: column; gap: .15rem; }
.est-card__k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6A788F; font-weight: 600; }
.est-card__v { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #14224A; line-height: 1.15; }
.est-card__s { font-size: .82rem; color: #5A6884; }

.est-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 .9rem; background: #fff; border: 1px solid var(--e-line); border-radius: 14px; padding: .4rem; }
.est-tab { padding: .5rem .95rem; border-radius: 9px; font-size: .9rem; font-weight: 600; color: #42506C; text-decoration: none; transition: background .14s var(--ease), color .14s var(--ease); white-space: nowrap; }
.est-tab:hover { background: #F1F5FB; color: #1C3984; }
.est-tab.is-on { background: #1C3984; color: #fff; box-shadow: 0 2px 8px rgba(28, 57, 132, .28); }

.est-quick { display: flex; flex-direction: column; gap: .15rem; border: 1px solid var(--e-line); border-radius: 11px; padding: .8rem .9rem; text-decoration: none; background: #F8FAFD; transition: border-color .14s var(--ease), transform .14s var(--ease); }
.est-quick:hover { border-color: #1C3984; transform: translateY(-1px); }
.est-quick__t { font-family: var(--font-display); font-weight: 700; color: #14224A; font-size: .98rem; }
.est-quick__s { font-size: .84rem; color: #5A6884; }

.est-tl { display: flex; flex-direction: column; }
.est-tl__row { display: flex; gap: .75rem; position: relative; }
.est-tl__row::before { content: ""; position: absolute; left: 17px; top: 34px; bottom: -2px; width: 2px; background: var(--e-line); }
.est-tl__row:last-child::before { display: none; }
.est-tl__dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; z-index: 1; }
.est-tl__body { display: flex; flex-direction: column; gap: .05rem; padding-bottom: 1rem; }
.est-tl__body b { font-size: .92rem; color: #14224A; }
.est-tl__t { font-size: .9rem; color: #42506C; }
.est-tl__d { font-size: .78rem; color: #7B8AA3; }

@media (max-width: 760px) {
  .est-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* ===== Estado claro: punto de color + palabra (calmado, legible) ===== */
.est-st { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 600; color: #33415C; white-space: nowrap; }
.est-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #98A6BC; }
.est-st--ok  { color: #15803D; } .est-st--ok  .est-dot { background: #16A34A; }
.est-st--bad { color: #B0444A; } .est-st--bad .est-dot { background: #CF5A60; }
.est-st--mut { color: #5A6884; } .est-st--mut .est-dot { background: #98A6BC; }
.est-st--warn{ color: #9A6A12; } .est-st--warn .est-dot { background: #E0A93B; }

.est-since { display: block; font-size: .76rem; color: #8593AC; font-weight: 400; margin-top: .15rem; }

/* Barra de progreso legible: conteo DEBAJO de la barra (no encima) */
.est-prog { display: flex; flex-direction: column; gap: .35rem; min-width: 150px; }
.est-prog__bar { height: 9px; background: #E7EDF5; border-radius: 999px; overflow: hidden; }
.est-prog__bar span { display: block; height: 100%; background: #2B5BC4; border-radius: 999px; }
.est-prog__bar span.is-done { background: #16A34A; }
.est-prog__t { font-size: .82rem; color: #5A6884; font-weight: 600; }

/* ---- Comunidad: editor de articulos/webinars (2 columnas) ---- */
.adm-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.com-ed { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; align-items: start; }
.com-ed__main .adm-field { margin-bottom: .85rem; }
.com-ed__body { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86rem; line-height: 1.55; }
.com-ed__side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 76px; }
.com-ed__h { margin: 0 0 .7rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.com-ed__cover { border-radius: 10px; overflow: hidden; margin-bottom: .6rem; aspect-ratio: 16/9; background: rgba(127,127,127,.08); border: 1px dashed rgba(127,127,127,.35); display: grid; place-items: center; font-size: .82rem; opacity: .9; }
.com-ed__cover img { width: 100%; height: 100%; object-fit: cover; }
.com-ed__cover:not(.is-empty) { border-style: solid; }
.com-ed__pub { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .9rem; cursor: pointer; margin: .35rem 0 .8rem; }
.com-ed__save { display: block; width: 100%; text-align: center; }
.com-thumb { display: grid; place-items: center; width: 44px; height: 33px; border-radius: 6px; overflow: hidden; background: rgba(127,127,127,.12); font-size: .95rem; }
.com-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 980px) { .com-ed { grid-template-columns: 1fr; } .com-ed__side { position: static; } }

/* ==========================================================================
   TARJETA DE ACCESO (instructor · administración · recuperar contraseña)
   Una sola pieza para todas las pantallas de entrada: logo arriba, campos con
   la etiqueta encima, botón sólido a todo lo ancho y un pie con las salidas
   (volver a la vitrina, cambiar de panel, recuperar contraseña).
   ========================================================================== */
.zv-log-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: linear-gradient(160deg, #0B1B3A 0%, #0D1F42 45%, #0A1730 100%);
}
.zv-log-wrap > canvas.zv-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.zv-log {
  /* Por encima del lienzo de estrellas, pase lo que pase con el apilamiento. */
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border: 1px solid #E7EDF5;
  border-radius: 18px;
  padding: 2.1rem 2rem 1.5rem;
  box-shadow: 0 30px 70px rgba(6, 12, 28, .45), 0 2px 8px rgba(6, 12, 28, .25);
  animation: admRise .35s var(--ease) both;
}

/* ---- Encabezado de marca (se conserva tal cual estaba) ---- */
.zv-log__marca { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.7rem; }
.zv-log__marca img,
.zv-log__marca svg { flex: none; }
.zv-log__marca span {
  font-family: var(--font-display);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--e-green-7);
  line-height: 1.5;
}

.zv-log h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -.02em;
  color: var(--e-ink);
  margin: 0 0 .35rem;
}
.zv-log > p {
  color: var(--e-muted);
  font-size: .9rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

/* ---- Campos ---- */
.zv-log__campo { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.05rem; }
.zv-log__campo > label,
.zv-log__campo .zv-log__lab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .84rem;
  color: var(--e-ink);
}
.zv-log__campo input {
  width: 100%;
  height: 2.7rem;
  padding: 0 .85rem;
  font: inherit;
  font-size: .92rem;
  color: var(--e-ink);
  background: #F4F7FB;
  border: 1px solid #E3EAF3;
  border-radius: 10px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.zv-log__campo input::placeholder { color: #9AA6BC; }
.zv-log__campo input:focus {
  outline: none;
  background: #fff;
  border-color: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .15);
}

/* Fila etiqueta + "¿Olvidaste tu contraseña?" */
.zv-log__fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
}
.zv-log__fila a { font-size: .8rem; color: #15803D; text-decoration: none; }
.zv-log__fila a:hover { text-decoration: underline; }

/* Contraseña con el ojo para revelarla */
.zv-log__pass { position: relative; }
.zv-log__pass input { padding-right: 2.8rem; }
.zv-log__pass button {
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: .3rem;
  cursor: pointer;
  color: #8B97AD;
  line-height: 0;
}
.zv-log__pass button:hover { color: var(--e-ink); }
.zv-log__pass button svg { width: 18px; height: 18px; }
.zv-log__pass button.is-on { color: #16A34A; }

/* ---- Botón principal ---- */
.zv-log__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.8rem;
  margin-top: .35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  text-decoration: none;
  background: #16A34A;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.zv-log__btn:hover { background: #15803D; box-shadow: 0 8px 22px -10px rgba(22, 163, 74, .8); }
.zv-log__btn:active { transform: translateY(1px); }

/* ---- Avisos ---- */
.zv-log__err,
.zv-log__ok {
  font-size: .86rem;
  line-height: 1.5;
  padding: .7rem .9rem;
  border-radius: 10px;
  margin-bottom: 1.1rem;
}
.zv-log__err { background: #FDECEC; border: 1px solid #F6C9CC; color: #C0392B; }
.zv-log__ok  { background: #F2FCF5; border: 1px solid #BFE9CC; color: #15803D; }

/* ---- Pie: las salidas de la pantalla ---- */
.zv-log__pie {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid #EDF1F7;
  font-size: .84rem;
  color: var(--e-faint);
}
.zv-log__pie a { color: var(--e-muted); text-decoration: none; }
.zv-log__pie a:hover { color: #15803D; text-decoration: underline; }
.zv-log__pie span { color: #C7D0DE; }

@media (max-width: 420px) {
  .zv-log { padding: 1.7rem 1.35rem 1.2rem; border-radius: 14px; }
  .zv-log h1 { font-size: 1.3rem; }
}
