:root {
    --azul-institucional: #0b3b82;
    --celeste-suave: #eaf3ff;
    --rojo-alerta: #dc3545;
    --verde-ok: #198754;
}
body {
    background: #f5f7fb;
    color: #243042;
}
.navbar-sistema {
    background: linear-gradient(90deg, var(--azul-institucional), #1456b8);
}
.tarjeta-panel {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(10, 36, 88, .08);
}
.bloque-redaccion {
    border: 1px solid #d9e5f6;
    border-left: 5px solid var(--azul-institucional);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
    margin-bottom: 14px;
}
.contador-palabras.ok { color: var(--verde-ok); }
.contador-palabras.error { color: var(--rojo-alerta); }
.menu-lateral {
    min-height: calc(100vh - 56px);
    background: #fff;
    border-right: 1px solid #e6edf7;
}
.menu-lateral a {
    color: #26364d;
    text-decoration: none;
    display: block;
    padding: .75rem 1rem;
    border-radius: 10px;
    margin-bottom: .25rem;
}
.menu-lateral a:hover, .menu-lateral a.activo {
    background: var(--celeste-suave);
    color: var(--azul-institucional);
    font-weight: 600;
}
.matriz-card {
    border: 1px solid #d9e5f6;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    margin-bottom: 16px;
}
.matriz-subcard {
    border: 1px dashed #b9cae3;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
    margin-bottom: 12px;
}
.matriz-tabla-wrap {
    margin-bottom: 16px;
}
.matriz-tabla {
    min-width: 1080px;
    background: #fff;
}
.matriz-tabla th {
    background: #0b3b82;
    color: #fff;
    text-align: center;
    vertical-align: middle;
}
.matriz-tabla td {
    vertical-align: top;
}
.matriz-tabla textarea.form-control {
    min-height: 56px;
}
.matriz-tabla-categorias th {
    background: #0b6b86;
}
.matriz-tabla-ideas th {
    background: #7a3d0b;
}
.badge-rol {
    background: #eaf3ff;
    color: #0b3b82;
}
textarea.form-control {
    min-height: 120px;
    overflow: hidden;
    resize: none;
}
textarea.form-control-sm {
    min-height: 56px;
    overflow: hidden;
    resize: none;
}
.referencia-card {
    border: 1px solid #d9e5f6;
    border-left: 5px solid #0b6b86;
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    margin-bottom: 14px;
}
.apa-toolbar {
    position: sticky;
    top: 70px;
    z-index: 5;
}
.apa-toolbar .btn {
    min-height: 32px;
}
.form-control-color-sm {
    width: 38px;
    min-height: 32px;
    padding: 3px;
}
.rich-editor-input {
    min-height: 130px;
    height: auto;
    overflow: visible;
    white-space: normal;
    line-height: 1.8;
    text-align: justify;
}
.rich-editor-small {
    min-height: 64px;
    font-size: .875rem;
}
.rich-editor-input:empty::before {
    content: attr(data-placeholder);
    color: #8a96a8;
}
.rich-editor-input:focus {
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}
.rich-editor-input ul,
.rich-editor-input ol {
    margin-bottom: .5rem;
    padding-left: 1.4rem;
}
.aviso-proteccion-estudiante {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2000;
    max-width: 340px;
    padding: .75rem 1rem;
    border-radius: 6px;
    background: #243042;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.aviso-proteccion-estudiante.visible {
    opacity: 1;
    transform: translateY(0);
}
.registro-encabezado,
.registro-formulario,
.registro-mensaje {
    max-width: 1050px;
}
.plan-registro {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-height: 240px;
    padding: 1.25rem;
    border: 2px solid #d9e5f6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.plan-registro:hover {
    border-color: #8eb7ee;
    transform: translateY(-2px);
}
.plan-registro.plan-seleccionado,
.plan-registro:has(.plan-registro-radio:checked) {
    border-color: var(--azul-institucional);
    box-shadow: 0 0 0 3px rgba(11, 59, 130, .12);
}
.plan-registro-nombre {
    color: var(--azul-institucional);
    font-size: 1.2rem;
    font-weight: 700;
}
.plan-registro-selector {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    align-self: flex-start;
    padding: .3rem .65rem;
    border: 1px solid #b9cae3;
    border-radius: 999px;
    color: #526174;
    font-size: .78rem;
    font-weight: 700;
}
.plan-registro-radio {
    margin: 0;
    flex: 0 0 auto;
    cursor: pointer;
}
.plan-registro.plan-seleccionado .plan-registro-selector,
.plan-registro:has(.plan-registro-radio:checked) .plan-registro-selector {
    border-color: var(--azul-institucional);
    background: var(--azul-institucional);
    color: #fff;
}
.plan-registro-descripcion {
    min-height: 48px;
    color: #5d6878;
}
.plan-registro-detalle::before {
    content: "\2713";
    margin-right: .45rem;
    color: var(--verde-ok);
    font-weight: 700;
}
.plan-registro-precio {
    margin-top: auto;
    padding-top: .5rem;
    color: #243042;
    font-weight: 700;
}
.login-experiencia {
    max-width: 1440px;
}
.login-tarjeta {
    max-width: 520px;
    margin-inline: auto;
}
.tutorial-producto {
    height: 100%;
    min-height: 610px;
    overflow: hidden;
    border: 1px solid #ccd9e9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(10, 36, 88, .08);
}
.tutorial-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    background: #0b3b82;
    color: #fff;
}
.tutorial-cabecera p {
    color: #dceaff;
}
.tutorial-etiqueta {
    font-size: .75rem;
    font-weight: 700;
}
.tutorial-pausa {
    min-width: 84px;
}
.tutorial-indicadores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #d9e5f6;
    background: #f8fbff;
}
.tutorial-indicador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 58px;
    padding: .65rem;
    border: 0;
    border-right: 1px solid #d9e5f6;
    background: transparent;
    color: #526174;
    font-size: .86rem;
    font-weight: 600;
}
.tutorial-indicador:last-child {
    border-right: 0;
}
.tutorial-indicador span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid #9eb5d2;
    border-radius: 50%;
    background: #fff;
    color: #0b3b82;
}
.tutorial-indicador.activo {
    color: #0b3b82;
    box-shadow: inset 0 -3px #0b3b82;
}
.tutorial-indicador.activo span {
    border-color: #0b3b82;
    background: #0b3b82;
    color: #fff;
}
.tutorial-pantalla {
    position: relative;
    min-height: 388px;
    background: #edf2f8;
}
.tutorial-escena {
    position: absolute;
    inset: 0;
    padding: 1.15rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
}
.tutorial-escena.activa {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}
.tutorial-navegador {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-height: 36px;
    padding: 0 .8rem;
    border: 1px solid #cbd7e6;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #f8fafc;
    color: #526174;
    font-size: .78rem;
}
.tutorial-navegador span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b3c0d1;
}
.tutorial-navegador strong {
    margin-left: .45rem;
}
.tutorial-app {
    display: grid;
    grid-template-columns: 170px 1fr;
    min-height: 310px;
    overflow: hidden;
    border: 1px solid #cbd7e6;
    border-radius: 0 0 6px 6px;
    background: #fff;
}
.tutorial-menu {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1rem .75rem;
    border-right: 1px solid #dfe7f1;
    background: #f8fbff;
    color: #5b6879;
    font-size: .76rem;
}
.tutorial-menu b {
    margin-bottom: .35rem;
    color: #243042;
}
.tutorial-menu span {
    padding: .45rem .55rem;
    border-radius: 4px;
}
.tutorial-menu .seleccionado {
    background: #dceaff;
    color: #0b3b82;
    font-weight: 700;
}
.tutorial-menu .completado::before {
    content: "\2713";
    margin-right: .35rem;
    color: #198754;
}
.tutorial-editor {
    padding: 1.15rem 1.35rem;
    color: #344052;
}
.tutorial-editor h2,
.tutorial-resultado h2 {
    margin: .25rem 0 .35rem;
    font-size: 1.05rem;
    color: #172438;
}
.tutorial-editor p,
.tutorial-resultado p {
    margin-bottom: .75rem;
    color: #637083;
    font-size: .8rem;
}
.tutorial-editor label {
    display: block;
    margin: .65rem 0 .25rem;
    font-size: .72rem;
    font-weight: 700;
}
.tutorial-paso {
    color: #0b6b86;
    font-size: .68rem;
    font-weight: 800;
}
.tutorial-campo {
    min-height: 37px;
    padding: .55rem .7rem;
    border: 1px solid #b7c8dc;
    border-radius: 5px;
    background: #fff;
    color: #26364d;
    font-size: .76rem;
}
.tutorial-campo-largo {
    color: #718096;
}
.tutorial-escritura {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: tutorialEscritura 3.4s steps(30, end) infinite;
}
.tutorial-barra {
    display: flex;
    gap: .35rem;
    padding: .4rem;
    border: 1px solid #ccd8e7;
    border-radius: 5px 5px 0 0;
    background: #f7f9fc;
    font-size: .68rem;
}
.tutorial-barra > * {
    min-width: 25px;
    padding: .2rem .35rem;
    border-right: 1px solid #ccd8e7;
    text-align: center;
}
.tutorial-hoja {
    min-height: 125px;
    padding: .7rem;
    border: 1px solid #ccd8e7;
    border-top: 0;
    background: #fff;
    font-family: "Times New Roman", serif;
    font-size: .72rem;
    line-height: 1.6;
}
.tutorial-hoja p {
    color: #2d3748;
    text-indent: 1.27cm;
}
.tutorial-linea {
    height: 6px;
    margin: .45rem 0;
    border-radius: 3px;
    background: #dce4ee;
}
.tutorial-linea.corta {
    width: 64%;
}
.tutorial-avance {
    height: 7px;
    margin-top: .8rem;
    overflow: hidden;
    border-radius: 4px;
    background: #e2e8f0;
}
.tutorial-avance span {
    display: block;
    height: 100%;
    background: #198754;
}
.tutorial-editor small,
.tutorial-resultado small {
    color: #718096;
    font-size: .65rem;
}
.tutorial-app-documento {
    grid-template-columns: 1fr 1fr;
    padding: 1.15rem;
    gap: 1.25rem;
    background: #f8fbff;
}
.tutorial-documento {
    min-height: 270px;
    padding: 1.15rem;
    border: 1px solid #c5d0de;
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 38, 65, .1);
    font-family: "Times New Roman", serif;
    font-size: .7rem;
}
.tutorial-documento > span {
    display: block;
    margin-bottom: .7rem;
    text-align: center;
    font-weight: 700;
}
.tutorial-documento h2 {
    margin-bottom: 1rem;
    font-size: .86rem;
    text-align: center;
}
.tutorial-documento strong {
    display: block;
    margin-top: 1rem;
}
.tutorial-resultado {
    align-self: center;
}
.tutorial-estado {
    margin: 1rem 0 .65rem;
    color: #198754;
    font-size: .78rem;
    font-weight: 700;
}
.tutorial-estado span {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: .35rem;
    border-radius: 50%;
    background: #198754;
}
.tutorial-boton-simulado {
    display: inline-block;
    margin-bottom: .55rem;
    padding: .5rem .75rem;
    border-radius: 5px;
    background: #0b3b82;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}
.tutorial-pie {
    padding: .8rem 1.25rem 1rem;
}
.tutorial-pie p {
    margin-top: .55rem;
    color: #536174;
    font-size: .82rem;
}
.tutorial-progreso {
    height: 4px;
    overflow: hidden;
    background: #dfe7f1;
}
.tutorial-progreso span {
    display: block;
    width: 0;
    height: 100%;
    background: #0b3b82;
}
.tutorial-progreso span.animando {
    animation: tutorialProgreso 6.5s linear forwards;
}
@keyframes tutorialProgreso {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes tutorialEscritura {
    0% { width: 0; }
    55%, 90% { width: 100%; }
    100% { width: 0; }
}
@media (max-width: 991.98px) {
    .tutorial-producto {
        min-height: 600px;
    }
}
@media (max-width: 575.98px) {
    .tutorial-cabecera {
        padding: 1rem;
    }
    .tutorial-cabecera h1 {
        font-size: 1.2rem;
    }
    .tutorial-indicador {
        flex-direction: column;
        font-size: .68rem;
        text-align: center;
    }
    .tutorial-pantalla {
        min-height: 420px;
    }
    .tutorial-app {
        grid-template-columns: 1fr;
    }
    .tutorial-menu {
        display: none;
    }
    .tutorial-app-documento {
        grid-template-columns: 1fr 1fr;
    }
    .tutorial-escena {
        padding: .65rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tutorial-escena,
    .tutorial-escritura,
    .tutorial-progreso span.animando {
        animation: none;
        transition: none;
    }
}
