/* Botón «Acceso» de la cabecera y su menú */

.acc {
    position: relative;
    font-family: 'Poppins', sans-serif;
}

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

.acc svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.acc .acc-social svg {
    stroke: none;
}

.acc-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Botón */

.acc-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    padding: 7px 18px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #EA1621;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease;
}

.acc-boton:hover,
.acc-boton[aria-expanded="true"] {
    background: #FFE3E5;
}

.acc-boton:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.acc-candado {
    width: 15px;
    height: 15px;
    stroke-width: 2.4;
}

.acc-boton--dentro {
    gap: 8px;
    padding: 4px 14px 4px 4px;
    color: #252034;
    text-transform: none;
}

.acc-boton__nombre {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-flecha {
    width: 14px;
    height: 14px;
    stroke-width: 2.6;
    transition: transform .2s ease;
}

.acc-boton[aria-expanded="true"] .acc-flecha {
    transform: rotate(180deg);
}

.acc-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #EA1621;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
}

.acc-avatar--grande {
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, .5);
    font-size: 15px;
}

/* Menú */

.acc-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 10000;
    width: 360px;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(28, 24, 40, .35);
    color: #252034;
    text-align: left;
    text-transform: none;
    animation: acc-abre .18s ease-out;
}

.acc-menu[hidden] {
    display: none;
}

@keyframes acc-abre {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.acc-cab {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
    background: linear-gradient(110deg, #1C1828, #2A243B);
    color: #fff;
}

.acc-cab::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -60px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #EA1621;
    opacity: .9;
}

.acc-cab > * {
    position: relative;
    z-index: 1;
}

.acc-cab__ante {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #FF4A53;
}

.acc-cab__titulo {
    margin: 6px 0 0;
    font-family: 'Anton', 'Poppins', sans-serif;
    font-size: 28px;
    line-height: 1;
    text-transform: uppercase;
}

.acc-cab__titulo span {
    color: #FF4A53;
}

.acc-cab--alumno {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acc-cab--alumno small {
    display: block;
    font-size: 11px;
    color: #C9C4D6;
}

.acc-cab--alumno b {
    display: block;
    max-width: 230px;
    overflow: hidden;
    font-family: 'Anton', 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-cuerpo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 18px 22px;
}

/* Formulario */

.acc-error {
    padding: 10px 12px;
    border-radius: 12px;
    background: #FFF0F1;
    color: #C50F19;
    font-size: 12.5px;
    font-weight: 600;
}

.acc-error[hidden] {
    display: none;
}

.acc-error p {
    margin: 0;
}

.acc-campo {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 6px 0 14px;
    border: 2px solid #E6E3EB;
    border-radius: 12px;
    background: #fff;
    color: #8A859A;
    transition: border-color .2s ease;
}

.acc-campo:focus-within {
    border-color: #252034;
    color: #252034;
}

.acc-campo:has(input[aria-invalid="true"]) {
    border-color: #EA1621;
}

.acc-campo svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.acc-campo input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: #252034;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.acc-campo input::placeholder {
    color: #8A859A;
}

.acc-ver {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #252034;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.acc-ver:hover {
    background: #F1EFF4;
}

.acc-olvido {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 10px;
    margin: 0;
    font-size: 12px;
    color: #5B566A;
}

.acc-olvido a,
.acc-pie a {
    font-weight: 800;
    color: #EA1621;
    text-decoration: none;
}

.acc-olvido a:hover,
.acc-pie a:hover {
    color: #C50F19;
    text-decoration: underline;
}

.acc-entrar {
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #EA1621;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}

.acc-entrar:hover {
    background: #C50F19;
}

.acc-entrar:disabled {
    opacity: .7;
    cursor: progress;
}

.acc-separador {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    font-size: 11px;
    color: #8A859A;
}

.acc-separador::before,
.acc-separador::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ECE9EF;
}

.acc-sociales {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.acc-sociales--una {
    grid-template-columns: 1fr;
}

.acc-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: filter .2s ease;
}

.acc-social:hover {
    filter: brightness(.95);
    text-decoration: none;
}

.acc-social--google,
.acc-social--google:hover {
    border: 1px solid #dadce0;
    background: #fff;
    color: #3c4043;
}

.acc-social--apple,
.acc-social--apple:hover {
    background: #000;
    color: #fff;
}

.acc-pie {
    margin: 0;
    padding: 14px 22px;
    border-top: 1px solid #ECE9EF;
    background: #F6F5F8;
    font-size: 13px;
    color: #5B566A;
    text-align: center;
}

/* Menú del alumno */

.acc-rotulo {
    margin: 4px 0 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8A859A;
}

.acc-atajos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.acc-atajo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #F6F5F8;
    color: #252034;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease;
}

.acc-atajo:hover {
    border-color: #EA1621;
    background: #fff;
    color: #252034;
}

.acc-atajo span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #FFF0F1;
    color: #EA1621;
}

.acc-atajo svg {
    width: 18px;
    height: 18px;
}

.acc-lista {
    display: flex;
    flex-direction: column;
}

.acc-lista a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-top: 1px solid #F1EFF4;
    color: #252034;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

.acc-lista a:first-child {
    border-top: 0;
}

.acc-lista a:hover {
    color: #EA1621;
}

.acc-lista svg {
    width: 18px;
    height: 18px;
    color: #8A859A;
}

.acc-lista a:hover svg,
.acc-lista .acc-lista__admin,
.acc-lista .acc-lista__admin svg {
    color: #EA1621;
}

.acc-pie--salir {
    display: flex;
    justify-content: flex-end;
    padding: 10px 22px;
}

.acc-salir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #252034;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.acc-salir:hover {
    background: #FFF0F1;
    color: #C50F19;
}

.acc-salir svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}

.acc-menu a:focus-visible,
.acc-menu button:focus-visible {
    outline: 2px solid #EA1621;
    outline-offset: 2px;
}

/* Panel del móvil: el botón ocupa todo el ancho y el menú va debajo, sin flotar. */

.obh-panel .acc-boton {
    width: 100%;
    padding: 11px;
    background: #EA1621;
    color: #fff;
}

.obh-panel .acc-boton:hover,
.obh-panel .acc-boton[aria-expanded="true"] {
    background: #C50F19;
}

.obh-panel .acc-boton--dentro {
    padding: 6px 14px 6px 6px;
    justify-content: flex-start;
    background: #252034;
}

.obh-panel .acc-boton--dentro .acc-boton__nombre {
    flex: 1;
    max-width: none;
    text-align: left;
}

.obh-panel .acc-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
    border: 1px solid #ECE9EF;
    box-shadow: none;
}

@media (max-width: 380px) {
    .acc-sociales {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acc-menu,
    .acc-flecha {
        animation: none;
        transition: none;
    }
}
