/* =====================================================================
   Entrada del analista: /MapaAprendizaje (AnalistaMapaAprendizaje.razor)
   Usa los tokens de fontan-design-system.css. Todo con prefijo .ma-
   ===================================================================== */

.ma-pantalla {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--fd-bg, #F5F1FC);
    color: var(--fd-text, #1A0033);
    font-family: var(--fd-font, 'Outfit', 'Plus Jakarta Sans', sans-serif);
}

.ma-contenido {
    flex: 1 0 auto;
    padding: 16px clamp(12px, 3vw, 32px) 32px;
}

/* ── Barra morada (misma que .pc-header-entrada), fija arriba ───────── */
.ma-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 8px 20px;
    background: var(--fd-purple, #50007D);
    color: #fff;
    border-radius: 0 0 20px 20px;
}

.ma-header-izq {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.ma-header-der {
    display: flex;
    align-items: center;
    color: #fff;
}

.ma-atras {
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-weight: 700;
    border-radius: 22px;
    padding: 5px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.ma-atras:hover { background: rgba(255, 255, 255, .30); border-color: rgba(0, 200, 255, .6); }

.ma-titulo {
    font-size: clamp(18px, 1.8vw, 24px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.ma-subtitulo { color: rgba(255, 255, 255, .8); font-size: 13px; }

.ma-error {
    background: var(--fd-white, #fff);
    border: 1px solid #F4C7C9;
    border-radius: var(--fd-radius-md, 16px);
    padding: 24px;
    text-align: center;
    color: var(--fd-text-muted, #6B5680);
}

.ma-error b { display: block; color: #C0272D; margin-bottom: 4px; }

.ma-error button {
    margin-top: 12px;
    border: none;
    background: var(--fd-purple, #50007D);
    color: #fff;
    font-weight: 700;
    border-radius: 18px;
    padding: 6px 18px;
    cursor: pointer;
}

.ma-cargando {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: var(--fd-text-muted, #6B5680);
}

/* ── Cifras (cambian la vista) ──────────────────────────────────────── */
.ma-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.ma-cifra {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    text-align: left;
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--fd-transition-fast, all .18s);
    color: inherit;
}

.ma-cifra:hover { border-color: var(--fd-purple, #50007D); }

.ma-cifra-icono { grid-row: 1 / span 2; display: flex; }
.ma-cifra-numero { font-size: 26px; font-weight: 800; line-height: 1; }
.ma-cifra-texto { font-size: 13px; color: var(--fd-text-muted, #6B5680); }

.ma-cifra-activa {
    background: var(--fd-purple, #50007D);
    border-color: var(--fd-purple, #50007D);
    color: #fff;
}

.ma-cifra-activa .ma-cifra-texto { color: rgba(255, 255, 255, .85); }

.ma-icono-ia {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--fd-cyan, #00C8FF);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

/* ── Filtros ────────────────────────────────────────────────────────── */
.ma-filtros {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: end;
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.ma-filtro label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--fd-text-muted, #6B5680);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ma-limpiar {
    border: none;
    background: transparent;
    color: var(--fd-purple, #50007D);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 8px 4px;
}

/* ── Cuerpo: lista de taus + panel lateral ─────────────────────────── */
.ma-cuerpo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 16px;
    align-items: start;
}

.ma-lista-titulo {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 800;
    font-size: 17px;
    margin: 2px 2px 10px;
}

.ma-lista-titulo span { font-weight: 500; font-size: 13px; color: var(--fd-text-muted, #6B5680); }

.ma-vacio {
    background: var(--fd-white, #fff);
    border: 1px dashed var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
    padding: 28px;
    text-align: center;
    color: var(--fd-text-muted, #6B5680);
}

.ma-vacio b { display: block; color: var(--fd-text, #1A0033); margin-bottom: 4px; }

.ma-tau {
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--fd-transition-fast, all .18s);
}

.ma-tau:hover { border-color: var(--fd-purple, #50007D); transform: translateY(-1px); }

.ma-tau-cabeza { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

.ma-tau-codigo {
    font-weight: 800;
    color: var(--fd-purple, #50007D);
    background: rgba(80, 0, 125, .08);
    border-radius: 8px;
    padding: 1px 8px;
    font-size: 13px;
}

.ma-tau-nombre { font-weight: 700; font-size: 16px; }
.ma-tau-meta { font-size: 13px; color: var(--fd-text-muted, #6B5680); margin-top: 2px; }
.ma-tau-espera { color: #B45309; font-weight: 600; }

.ma-tau-estudiantes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

.ma-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    background: var(--fd-bg, #F5F1FC);
    border-radius: 14px;
    padding: 3px 10px;
}

.ma-chip b {
    background: #F5B800;
    color: #3d2e00;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 11.5px;
}

.ma-chip-pendiente { background: #FFF6D6; }
.ma-chip-mas { color: var(--fd-text-muted, #6B5680); }

.ma-tau-conteos { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.ma-conteo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 14px;
}

.ma-conteo-mio { color: #8a6300; }
.ma-conteo-cerrado { color: var(--fd-text-muted, #6B5680); font-weight: 600; }

.ma-conteo-ia {
    background: var(--fd-cyan, #00C8FF);
    color: #fff;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 12px;
}

.ma-tau-abrir { margin-left: auto; color: var(--fd-purple, #50007D); font-weight: 700; font-size: 13px; }

/* ── Panel lateral ──────────────────────────────────────────────────── */
.ma-lateral { display: flex; flex-direction: column; gap: 12px; }

.ma-panel {
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
    padding: 14px 16px;
}

.ma-panel-titulo {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 8px;
}

.ma-panel-titulo span { color: var(--fd-text-muted, #6B5680); font-weight: 600; }
.ma-panel-vacio { font-size: 13px; color: var(--fd-text-muted, #6B5680); }

.ma-estudiantes { max-height: 52vh; overflow: auto; margin-right: -8px; padding-right: 8px; }

.ma-estudiante { padding: 8px 0; border-bottom: 1px solid rgba(80, 0, 125, .07); }
.ma-estudiante:last-child { border-bottom: none; }

.ma-estudiante-nombre { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; }

.ma-estudiante-pendientes {
    background: #F5B800;
    color: #3d2e00;
    border-radius: 10px;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 800;
    height: fit-content;
}

.ma-estudiante-acciones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.ma-estudiante-acciones button,
.ma-herramientas button {
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    background: transparent;
    color: var(--fd-purple, #50007D);
    border-radius: 14px;
    padding: 2px 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.ma-estudiante-acciones button:hover,
.ma-herramientas button:hover { background: var(--fd-purple, #50007D); color: #fff; }

.ma-estudiante-acciones .ma-alerta { border-color: #C0272D; color: #C0272D; }
.ma-estudiante-acciones .ma-alerta:hover { background: #C0272D; color: #fff; }

.ma-herramientas { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* ── Alertas IA ─────────────────────────────────────────────────────── */
.ma-panel-alertas { border-color: #F4C7C9; }
.ma-panel-alertas .ma-panel-titulo { color: #C0272D; }
.ma-panel-ayuda { font-size: 12.5px; color: var(--fd-text-muted, #6B5680); margin-bottom: 6px; }

.ma-alerta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    border: none;
    border-top: 1px solid rgba(80, 0, 125, .07);
    background: transparent;
    padding: 6px 0;
    cursor: pointer;
    color: inherit;
}

.ma-alerta-item span { font-size: 12.5px; color: var(--fd-text-muted, #6B5680); }
.ma-alerta-item:hover b { color: #C0272D; }

@media (max-width: 900px) {
    .ma-filtros { grid-template-columns: 1fr; }
    .ma-cuerpo { grid-template-columns: 1fr; }
    .ma-header { flex-wrap: wrap; }
}

/* =====================================================================
   Entrada del analista (AnalistaEntrada.razor): asignaturas y avisos
   ===================================================================== */
.ent-asignaturas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1.2vh;
    max-width: 560px;
}

.ent-asignatura {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    border-radius: 16px;
    padding: 3px 12px;
    font-size: clamp(12px, 1.5vh, 14px);
    font-weight: 600;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ent-avisos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 16px clamp(10px, 3vw, 28px) 8px;
    font-family: var(--fd-font, 'Outfit', sans-serif);
}

.ent-aviso {
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
    padding: 14px 16px;
    min-width: 0;
}

.ent-aviso-titulo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--fd-purple, #50007D);
    margin-bottom: 6px;
}

.ent-aviso-ia .ent-aviso-titulo { color: #C0272D; }

.ent-aviso-conteo {
    background: #F5B800;
    color: #3d2e00;
    border-radius: 12px;
    padding: 1px 10px;
    font-size: 12px;
    font-weight: 800;
}

.ent-aviso-conteo-ia { background: #C0272D; color: #fff; }

.ent-aviso-ayuda { font-size: 12.5px; color: var(--fd-text-muted, #6B5680); margin-bottom: 4px; }
.ent-aviso-vacio { font-size: 13.5px; color: var(--fd-text-muted, #6B5680); padding: 8px 0; }

.ent-aviso-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    text-align: left;
    border: none;
    border-top: 1px solid rgba(80, 0, 125, .07);
    background: transparent;
    padding: 8px 4px;
    cursor: pointer;
    color: var(--fd-text, #1A0033);
    border-radius: 8px;
}

.ent-aviso-item:hover { background: var(--fd-bg, #F5F1FC); }

.ent-aviso-linea { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ent-aviso-fecha { color: var(--fd-text-muted, #6B5680); font-size: 12px; white-space: nowrap; }
.ent-aviso-donde { font-size: 12.5px; color: var(--fd-text-muted, #6B5680); }
.ent-aviso-texto { font-size: 13px; color: #3b2a4d; }

.ma-actualizando { color: var(--fd-cyan-light, #80E5FF); font-style: italic; }

/* =====================================================================
   Mapa de un tau (/VisorMapa): barra de herramientas y rejilla de tiras
   ===================================================================== */
.mt-pantalla { height: 100vh; min-height: 0; overflow: hidden; }
.mt-margen { margin: 16px clamp(12px, 3vw, 32px); }

.mt-barra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin: 12px clamp(12px, 2vw, 24px) 6px;
    padding: 10px 14px;
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
}

.mt-segmentos {
    display: inline-flex;
    background: var(--fd-bg, #F5F1FC);
    border-radius: 22px;
    padding: 3px;
    gap: 2px;
}

.mt-segmento {
    border: none;
    background: transparent;
    color: var(--fd-text, #1A0033);
    font-weight: 600;
    font-size: 13.5px;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
}

.mt-segmento span {
    margin-left: 4px;
    font-size: 12px;
    color: var(--fd-text-muted, #6B5680);
}

.mt-segmento-activo { background: var(--fd-purple, #50007D); color: #fff; }
.mt-segmento-activo span { color: rgba(255, 255, 255, .8); }

.mt-fechas { display: inline-flex; gap: 12px; }

.mt-fechas label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fd-text-muted, #6B5680);
}

.mt-fechas input {
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: 10px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--fd-text, #1A0033);
}

.mt-zoom {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: 20px;
    padding: 2px;
    margin-left: auto;
}

.mt-zoom button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--fd-purple, #50007D);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.mt-zoom button:hover:not(:disabled) { background: var(--fd-bg, #F5F1FC); }
.mt-zoom button:disabled { color: #c9bfd4; cursor: default; }
.mt-zoom span { min-width: 46px; text-align: center; font-size: 13px; font-weight: 700; }

.mt-guardadas { position: relative; }

.mt-boton-claro {
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    background: transparent;
    color: var(--fd-purple, #50007D);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.mt-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    width: 420px;
    max-height: 50vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(26, 0, 51, .15);
    padding: 6px;
}

.mt-menu-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 8px;
}

.mt-menu-item:hover { background: var(--fd-bg, #F5F1FC); }
.mt-menu-item small { color: var(--fd-text-muted, #6B5680); }
.mt-menu-tipo { font-size: 11px; color: var(--fd-text-muted, #6B5680); }

.mt-menu-item button {
    border: none;
    background: var(--fd-purple, #50007D);
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    cursor: pointer;
}

.mt-leyenda {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin: 0 clamp(12px, 2vw, 24px) 8px;
    font-size: 12px;
    color: var(--fd-text-muted, #6B5680);
}

.mt-leyenda span { display: inline-flex; align-items: center; gap: 4px; }
.mt-leyenda i { display: inline-block; width: 14px; height: 12px; border-radius: 3px; }
.mt-leyenda .mt-leyenda-ia { background: #e15852; opacity: .35; }
.mt-leyenda-ayuda { font-style: italic; margin-left: auto; }

/* ── Rejilla ────────────────────────────────────────────────────────── */
.mt-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin: 0 clamp(12px, 2vw, 24px) 12px;
    background: #fff;
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: var(--fd-radius-md, 16px);
}

.mt-rejilla {
    display: grid;
    width: max-content;
    min-width: 100%;
    --alto: calc(32px * var(--z, 1));
    grid-auto-rows: minmax(var(--alto), auto);
    font-size: calc(13px * max(var(--z, 1), .8));
}

.mt-esquina,
.mt-cab {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    border-bottom: 2px solid rgba(80, 0, 125, .12);
}

.mt-esquina {
    left: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 6px 10px;
    font-weight: 800;
    color: var(--fd-purple, #50007D);
    border-right: 2px solid rgba(80, 0, 125, .12);
}

.mt-esquina small { font-weight: 500; color: var(--fd-text-muted, #6B5680); font-size: 11.5px; }

.mt-cab {
    position: sticky;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 8px 4px;
    min-width: 0;
    cursor: grab;
    border-left: 1px solid rgba(80, 0, 125, .06);
    user-select: none;
}

.mt-cab-mia { background: #F1E8FA; }
.mt-cab-procesada .mt-cab-nombre { color: var(--fd-text-muted, #6B5680); }
.mt-cab-arrastrando { opacity: .4; }

.mt-cab-nombre {
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mt-insignia {
    background: var(--fd-purple, #50007D);
    color: #fff;
    border-radius: 8px;
    padding: 0 6px;
    font-size: 10.5px;
    margin-right: 3px;
}

.mt-cab-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 11px;
    color: var(--fd-text-muted, #6B5680);
    white-space: nowrap;
    overflow: hidden;
}

.mt-cab-pendientes {
    background: #F5B800;
    color: #3d2e00;
    border-radius: 8px;
    padding: 0 6px;
    font-weight: 800;
}

.mt-cab-acciones { display: flex; gap: 2px; opacity: .55; }
.mt-cab:hover .mt-cab-acciones { opacity: 1; }

.mt-cab-acciones button {
    border: none;
    background: transparent;
    color: var(--fd-purple, #50007D);
    font-size: 13px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 6px;
    cursor: pointer;
}

.mt-cab-acciones button:hover { background: var(--fd-bg, #F5F1FC); }
.mt-cab-acciones .mt-fav-activa { color: #E0A800; }

.mt-redim {
    position: absolute;
    top: 0;
    right: -3px;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    z-index: 4;
}

.mt-redim:hover, body.mt-redimensionando .mt-redim { background: rgba(0, 200, 255, .5); }
body.mt-redimensionando { cursor: col-resize; user-select: none; }

.mt-seccion {
    grid-column: 1 / -1;
    position: sticky;
    left: 0;
    padding: 8px 10px 4px;
    font-weight: 800;
    color: var(--fd-purple, #50007D);
    background: var(--fd-bg, #F5F1FC);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mt-pregunta {
    position: sticky;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: #fff;
    border-right: 2px solid rgba(80, 0, 125, .12);
    border-bottom: 1px solid rgba(80, 0, 125, .05);
    min-width: 0;
}

.mt-num {
    flex: 0 0 auto;
    min-width: 26px;
    font-weight: 800;
    color: var(--fd-purple, #50007D);
    font-size: 12px;
}

.mt-texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3b2a4d; }
.mt-pregunta-actual { background: #FFF6D6; }

.mt-celda {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    margin: 2px 3px;
    padding: 0 4px;
    border-radius: 5px;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    transition: transform .1s;
}

.mt-celda:hover { outline: 2px solid var(--fd-purple, #50007D); outline-offset: 1px; }
.mt-celda-vacia { background: #F6F4F8; cursor: default; }
.mt-celda-vacia:hover { outline: none; }
.mt-celda-ia { opacity: .38; }
/* Te toca responder: franja ámbar gruesa a la izquierda y contorno, no solo un borde */
.mt-celda-pendiente {
    box-shadow: inset 6px 0 0 #F5B800, inset 0 0 0 2px #F5B800;
    padding-left: 9px;
}

/* Las campanas van sobre una pastilla clara: sobre el rojo o el azul se perdían */
.mt-campanas { display: inline-flex; align-items: center; gap: 0; min-width: 0; overflow: hidden; border-radius: 9px; }
.mt-campanas:has(svg) { background: rgba(255, 255, 255, .88); padding: 1px 3px; box-shadow: 0 0 0 1px rgba(26, 0, 51, .08); }

.mt-punto { width: 7px; height: 7px; border-radius: 50%; background: #F5B800; margin: auto; }

.mt-compacto .mt-celda { margin: 1px; border-radius: 2px; }
.mt-compacto .mt-cab-acciones, .mt-compacto .mt-cab-meta { display: none; }
.mt-compacto .mt-cab-nombre { font-size: 10.5px; }
.mt-compacto .mt-texto { font-size: 11px; }

.mt-destacada { outline: 3px solid #00C8FF !important; outline-offset: 1px; animation: mt-pulso 1.2s ease 2; }

@keyframes mt-pulso {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 255, .6); }
    50% { box-shadow: 0 0 0 8px rgba(0, 200, 255, 0); }
}

/* ── Pestañas del mapa ──────────────────────────────────────────────── */
.mt-pestanas {
    display: flex;
    gap: 4px;
    margin: 10px clamp(12px, 2vw, 24px) 0;
    border-bottom: 2px solid rgba(80, 0, 125, .12);
}

.mt-pestanas button {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--fd-text-muted, #6B5680);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
}

.mt-pestanas button:hover { color: var(--fd-purple, #50007D); }
.mt-pestanas .mt-pestana-activa { color: var(--fd-purple, #50007D); border-bottom-color: var(--fd-purple, #50007D); }

.mt-pestana-conteo {
    margin-left: 6px;
    background: #F5B800;
    color: #3d2e00;
    border-radius: 10px;
    padding: 0 7px;
    font-size: 12px;
}

.mt-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fd-text-muted, #6B5680);
    cursor: pointer;
}

.mt-check input { accent-color: var(--fd-purple, #50007D); }

/* ── Listas: % de error y pendientes ────────────────────────────────── */
.mt-lista {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin: 6px clamp(12px, 2vw, 24px) 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mt-lista-ayuda { font-size: 13px; color: var(--fd-text-muted, #6B5680); margin: 2px 2px 4px; }

.mt-fila-error, .mt-fila-pendiente {
    display: grid;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    color: inherit;
}

.mt-fila-error:hover, .mt-fila-pendiente:hover { border-color: var(--fd-purple, #50007D); }

.mt-fila-error { grid-template-columns: 28px 36px minmax(0, 1fr) minmax(120px, 220px) 52px 64px auto; }
.mt-fila-pendiente { grid-template-columns: 28px 110px minmax(150px, 220px) minmax(0, 1fr) auto auto; }

.mt-rank { font-weight: 800; color: var(--fd-text-muted, #6B5680); font-size: 12px; text-align: right; }
.mt-error-texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mt-barra-error { height: 10px; background: #F1ECF6; border-radius: 6px; overflow: hidden; }
.mt-barra-error span { display: block; height: 100%; background: linear-gradient(90deg, #F9974F, #e15852); border-radius: 6px; }

.mt-error-pct { font-weight: 800; text-align: right; }
.mt-error-n { font-size: 12px; color: var(--fd-text-muted, #6B5680); white-space: nowrap; }

.mt-pend-fecha, .mt-pend-quien, .mt-pend-texto { display: flex; flex-direction: column; min-width: 0; }
.mt-pend-fecha small, .mt-pend-quien small, .mt-pend-texto small { color: var(--fd-text-muted, #6B5680); font-size: 12px; }
.mt-pend-quien b, .mt-pend-texto small, .mt-pend-texto span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-pend-texto span { font-size: 13.5px; }

.mt-pend-campanas { display: inline-flex; gap: 1px; padding: 3px 6px; border-radius: 8px; }
.mt-pend-ir { color: var(--fd-purple, #50007D); font-weight: 700; font-size: 13px; white-space: nowrap; }

/* =====================================================================
   Plan de estudios (ControlPlanEstudios.razor): tarjeta por asignatura
   ===================================================================== */
.pl-plan {
    margin: 8px clamp(12px, 4vw, 48px) 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: var(--fd-font, 'Outfit', sans-serif);
}

.pl-leyenda {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    font-size: 12.5px;
    color: var(--fd-text-muted, #6B5680);
}

.pl-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.pl-leyenda-ayuda { font-style: italic; margin-left: auto; }
.pl-ficha-mini { display: inline-block; width: 18px; height: 12px; border-radius: 4px; }

.pl-curso {
    --pl-color: #50007D;
    background: var(--fd-white, #fff);
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .15));
    border-left: 6px solid var(--pl-color);
    border-radius: var(--fd-radius-md, 16px);
    padding: 4px 18px 16px;
}

.pl-curso-cab {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 320px) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 12px 0 10px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--fd-text, #1A0033);
}

.pl-curso-titulo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.pl-curso-titulo b { font-size: 18px; font-weight: 800; }
.pl-punto { width: 12px; height: 12px; border-radius: 50%; background: var(--pl-color); flex: 0 0 auto; }

.pl-taller, .pl-modo {
    font-size: 12px;
    font-weight: 600;
    color: var(--fd-text-muted, #6B5680);
    background: var(--fd-bg, #F5F1FC);
    border-radius: 10px;
    padding: 2px 9px;
}

.pl-avance { display: flex; flex-direction: column; gap: 4px; }
.pl-avance-texto { font-size: 13px; color: var(--fd-text-muted, #6B5680); }
.pl-avance-texto b { color: var(--fd-text, #1A0033); font-size: 15px; }

.pl-barra {
    position: relative;
    height: 8px;
    background: #EEE8F4;
    border-radius: 6px;
}

.pl-barra-llena { position: absolute; inset: 0 auto 0 0; background: var(--pl-color); border-radius: 6px; }

.pl-barra-marca {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 16px;
    margin-left: -1px;
    background: var(--fd-purple, #50007D);
    border-radius: 2px;
}

/* Botón a la vista, también en pantallas angostas (antes era un enlace pequeño que se perdía) */
.pl-ver {
    justify-self: end;
    background: var(--fd-purple, #50007D);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 18px;
    padding: 6px 14px;
}
.pl-curso-cab:hover .pl-ver { background: var(--fd-purple-mid, #6A00A8); }

.pl-taus {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
}

.pl-ficha {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: transform .12s, box-shadow .12s;
}

.pl-ficha:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26, 0, 51, .10); }
.pl-codigo { font-weight: 800; font-size: 13.5px; }
.pl-estado { font-size: 11.5px; font-weight: 600; }
.pl-fecha { font-size: 11px; opacity: .8; }

/* Terminado: color de la asignatura, sólido */
.pl-terminado, .pl-ficha-mini.pl-terminado { background: var(--pl-color, #50007D); color: #fff; }
.pl-ficha-mini.pl-terminado { background: #50007D; }

/* En curso: borde del color de la asignatura y fondo suave */
.pl-activo {
    background: color-mix(in srgb, var(--pl-color) 14%, #fff);
    border: 2px solid var(--pl-color);
    color: var(--fd-text, #1A0033);
}
.pl-ficha-mini.pl-activo { background: #EFE6F7; border: 2px solid #50007D; }

/* Pendiente: gris claro */
.pl-pendiente, .pl-ficha-mini.pl-pendiente { background: #F4F2F6; color: #6B5680; border: 1px dashed #D9D2E0; }

/* En físico: rayado, no se presenta en la plataforma */
.pl-fisico, .pl-ficha-mini.pl-fisico {
    background: repeating-linear-gradient(135deg, #F4F2F6 0 6px, #E9E4EF 6px 12px);
    color: #6B5680;
    border: 1px solid #E2DBEA;
}

.pl-sin-cursos {
    margin: 16px clamp(12px, 4vw, 48px);
    padding: 24px;
    border: 1px dashed #D9D2E0;
    border-radius: 12px;
    color: var(--fd-text-muted, #6B5680);
    background: #fff;
}

@media (max-width: 760px) {
    .pl-curso-cab { grid-template-columns: 1fr; gap: 8px; }
    .pl-ver { justify-self: stretch; text-align: center; padding: 8px 14px; }
}

/* Pendiente cuya fecha prevista ya pasó */
.pl-atrasado { border: 1px solid #F0C36D; background: #FFF8E6; }
.pl-atrasado .pl-estado { color: #A15C00; }
.pl-ficha-mini.pl-atrasado { border: 1px solid #F0C36D; background: #FFF8E6; }

/* Termómetro: el tau en físico va rayado (antes era una imagen que no existe) */
.tc-fisico {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(135deg, #EEF1F4 0 6px, #E2E6EA 6px 12px);
    border-radius: 8px;
    color: #5d676d;
    font-weight: 700;
}

/* =====================================================================
   Ventana de presentaciones de un tau (ListaPresentacionesTau)
   ===================================================================== */
.lp-dialogo .e-dlg-header { font-family: var(--fd-font, 'Outfit', sans-serif); font-weight: 800; color: var(--fd-purple, #50007D); }
.lp-dialogo .e-dlg-content { padding-top: 6px; }

.lp-marco { font-family: var(--fd-font, 'Outfit', sans-serif); color: var(--fd-text, #1A0033); }
.lp-tau { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.lp-codigo {
    font-weight: 800;
    color: var(--fd-purple, #50007D);
    background: rgba(80, 0, 125, .08);
    border-radius: 8px;
    padding: 2px 9px;
}

.lp-nombre { font-size: 19px; font-weight: 800; }
.lp-datos { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }

.lp-chip {
    font-size: 12.5px;
    color: var(--fd-text-muted, #6B5680);
    background: var(--fd-bg, #F5F1FC);
    border-radius: 12px;
    padding: 3px 10px;
}

.lp-chip b { color: var(--fd-text, #1A0033); }
.lp-chip-estado { background: var(--fd-purple, #50007D); color: #fff; font-weight: 700; }

.lp-vacio {
    padding: 18px;
    text-align: center;
    color: var(--fd-text-muted, #6B5680);
    background: var(--fd-bg, #F5F1FC);
    border-radius: 12px;
}

.lp-tabla { border: 1px solid var(--fd-border, rgba(80, 0, 125, .15)); border-radius: 12px; overflow: hidden; }

.lp-fila {
    display: grid;
    grid-template-columns: 44px minmax(150px, 1.6fr) repeat(3, minmax(64px, .7fr)) minmax(100px, 1fr) 82px;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    font-size: 13.5px;
    border-top: 1px solid rgba(80, 0, 125, .07);
}

.lp-cabeza {
    border-top: none;
    background: var(--fd-bg, #F5F1FC);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--fd-text-muted, #6B5680);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.lp-vez { font-weight: 800; color: var(--fd-purple, #50007D); }
.lp-fechas { display: flex; flex-direction: column; }
.lp-fechas small { color: var(--fd-text-muted, #6B5680); font-size: 11.5px; }
.lp-efectiva { font-weight: 800; }
.lp-nivel { font-size: 12.5px; }

.lp-insignia { display: inline-block; border-radius: 10px; padding: 2px 9px; font-size: 11.5px; font-weight: 800; }
.lp-gano { background: #E3F3E6; color: #2E6B3E; }
.lp-nogano { background: #FDE7E6; color: #B42318; }
.lp-encurso { background: #F1E8FA; color: var(--fd-purple, #50007D); }

.lp-mensajes {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #FFF8E6;
    color: #7A4A00;
    font-size: 13px;
}

.lp-acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; width: 100%; }

.lp-boton {
    border: 1px solid var(--fd-border, rgba(80, 0, 125, .2));
    background: #fff;
    color: var(--fd-purple, #50007D);
    font-family: var(--fd-font, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 14px;
    border-radius: 20px;
    padding: 7px 16px;
    cursor: pointer;
    white-space: nowrap;
}

.lp-boton:hover:not(:disabled) { background: var(--fd-bg, #F5F1FC); }
.lp-boton:disabled { color: #B9AEC6; border-color: #EEE8F4; cursor: not-allowed; }
.lp-boton-principal { background: var(--fd-purple, #50007D); border-color: var(--fd-purple, #50007D); color: #fff; }
.lp-boton-principal:hover:not(:disabled) { background: var(--fd-purple-mid, #6A00A8); }
.lp-boton-claro { border-color: transparent; color: var(--fd-text-muted, #6B5680); }

@media (max-width: 700px) {
    .lp-fila { grid-template-columns: 34px 1fr 64px 76px; }
    .lp-fila > :nth-child(3), .lp-fila > :nth-child(4), .lp-fila > :nth-child(6) { display: none; }
    .lp-acciones { justify-content: stretch; }
    .lp-boton { flex: 1 1 auto; }
}

/* =====================================================================
   Fondo sobre el que va la cuadrícula del mapa (pedido 2026-10-20):
   de #f5f5f5 a #f2f2f2. La cuadrícula conserva sus colores.
   ===================================================================== */
.ma-pantalla { background: linear-gradient(180deg, #f5f5f5 0%, #f2f2f2 100%); }

/* Franja de las secciones dentro del mapa: gris neutro en vez de lila */
.mt-seccion { background: #f2f2f2; color: #3b3b3b; }

/* Líneas divisorias de la cuadrícula en gris (antes lila) y preguntas sin responder en #f2f2f2 */
.mt-pregunta,
.mt-esquina { border-right-color: #dcdcdc; }
.mt-esquina,
.mt-cab { border-bottom-color: #dcdcdc; }
.mt-pregunta { border-bottom-color: #ececec; }
.mt-cab { border-left-color: #ececec; }
.mt-celda-vacia { background: #f2f2f2; }
