    /* ---------------------------------------------------------------
        ATTENDANCE FORM V2 - LOGIN GATE + LOGGED TEACHER BAR
    --------------------------------------------------------------- */

    [hidden]{
        display: none !important;
    }


    /** logged teacher bar (lives inside the header line) **/

    .form-wrapper-v2 .teacher-bar{
        position: absolute;
        inset: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 0 20px;
        z-index: 2;
    }

    .form-wrapper-v2 .teacher-identity{
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        max-width: 40%;
    }

    .form-wrapper-v2 .teacher-avatar{
        position: relative;
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        border-radius: 50%;
        border: solid 2px #ffffffb3;
        background-color: #a28dc7;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .form-wrapper-v2 .teacher-photo{
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        inset: 0;
    }

    .form-wrapper-v2 .teacher-initial{
        color: white;
        font-weight: 700;
        font-size: 1em;
        line-height: 1;
    }

    .form-wrapper-v2 .teacher-text{
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.25;
    }

    .form-wrapper-v2 .teacher-name{
        color: white;
        font-weight: 600;
        font-size: 0.9em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .form-wrapper-v2 .teacher-email{
        color: #e6e6e6;
        font-size: 0.75em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .form-wrapper-v2 .logout-button{
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border: solid 1px #ffffff80;
        border-radius: 30px;
        background-color: transparent;
        color: white;
        font-size: 0.8em;
        font-weight: 600;
        cursor: pointer;
        transition: background-color .2s ease, border-color .2s ease;
    }

    .form-wrapper-v2 .logout-button:hover{
        background-color: #f7a6991f;
        border-color: #f7a699;
        color: #f7a699;
    }


    /** login screen **/

    .form-wrapper-v2 .auth-screen{
        display: flex;
        justify-content: center;
        padding: 20px 0 40px;
    }

    .form-wrapper-v2 .auth-card{
        width: 460px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding: 35px 30px;
        background-color: #ffffff0f;
        border: solid 1px #ffffff26;
        border-radius: 15px;
    }

    .form-wrapper-v2 .auth-icon{
        width: 52px;
        height: 52px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        background-color: #a28dc733;
        color: #f7a699;
        font-size: 1.2em;
    }

    .form-wrapper-v2 .auth-title{
        margin: 0;
        color: white;
        font-size: 1.15em;
        font-weight: 600;
    }

    .form-wrapper-v2 .auth-description{
        margin: 0;
        color: #cfcfcf;
        font-size: 0.9em;
        line-height: 1.5;
    }

    .form-wrapper-v2 .google-login-button{
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 14px 20px;
        margin-top: 6px;
        border: none;
        border-radius: 10px;
        background-color: white;
        color: #3c4043;
        font-size: 0.95em;
        font-weight: 600;
        cursor: pointer;
        transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
    }

    .form-wrapper-v2 .google-login-button:hover:not(:disabled){
        transform: translateY(-1px);
        box-shadow: 0 6px 18px #00000059;
    }

    .form-wrapper-v2 .google-login-button:disabled{
        opacity: .65;
        cursor: progress;
    }

    .form-wrapper-v2 .google-icon{
        display: flex;
        align-items: center;
    }

    .form-wrapper-v2 .google-login-button.loading .google-icon{
        animation: authPulse 1s ease-in-out infinite;
    }

    @keyframes authPulse{
        0%, 100% { opacity: 1; }
        50%      { opacity: .3; }
    }

    .form-wrapper-v2 .auth-error{
        display: flex;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        padding: 12px 14px;
        border-radius: 8px;
        border: solid 1px #f7a69966;
        background-color: #f7a69914;
        color: #f7a699;
        font-size: 0.85em;
        text-align: left;
        line-height: 1.45;
    }

    .form-wrapper-v2 .auth-note{
        margin: 0;
        color: #9a9a9a;
        font-size: 0.75em;
    }


    /** form loading state (while the server renders the class) **/

    .form-wrapper-v2 .form-loading{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        padding: 60px 0;
        color: #cfcfcf;
    }

    .form-wrapper-v2 .form-loading span{
        width: 38px;
        height: 38px;
        border: solid 3px #ffffff26;
        border-top-color: #f7a699;
        border-radius: 50%;
        animation: authSpin .8s linear infinite;
    }

    .form-wrapper-v2 .form-loading p{
        margin: 0;
        font-size: 0.9em;
    }

    @keyframes authSpin{
        to { transform: rotate(360deg); }
    }


    /** responsive **/

    @media (max-width: 600px){

        .form-wrapper-v2 .teacher-bar{
            padding: 0 12px;
        }

        .form-wrapper-v2 .teacher-email{
            display: none;
        }

        .form-wrapper-v2 .teacher-identity{
            max-width: 45%;
        }

        .form-wrapper-v2 .logout-button span{
            display: none;
        }

        .form-wrapper-v2 .logout-button{
            padding: 9px 11px;
        }

        .form-wrapper-v2 .auth-card{
            padding: 28px 20px;
        }
    }
