body {
    background-color: black;
    color: white;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

header {
    position: fixed;
    height: 15vh;
    width: 100%;
    padding: 20px;
    top: 0;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--bg-nav)
}

main {
    display: flex;
    padding-top: 15vh;
    min-height: 100vh;
}


/* TÍTULO */

.titulo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: aparecer-baixo 2s ease-in-out;
}

.titulo-text h1 {
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.1;
    font-weight: 700;
    text-align: center;
}

.titulo-text p {
    color: var(--texto-secundario);
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 350px;
    text-align: center;
}

nav {
    padding: 10px;
    z-index: 2;
}

.voltar {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;

    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;

    font-size: 20px;

    background-color: var(--cor-principal);
    color: white;
    transition: 0.3s;

    animation: aparecer-esquerda 2s ease-in-out;
}

.voltar:hover{
    background-color: var(--cor-principal-hover);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--cor-principal);
}

.voltar:active{
    transform: scale(0.95);
}


    /* CARD */

.arquivo {
    margin: 0 100px;
    height: 500px;
    animation: aparecer-direita 2s ease-in-out;
}

.header {
    margin-bottom: 32px;
}

.header h2 {
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    margin-bottom: 12px;
}

.header p {
    color: var(--texto-secundario);
    line-height: 1.5;
}

.abas {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.aba {
    padding: 14px 28px;

    background-color: rgba(255, 255, 255, 0.1);
    color: var(--texto-secundario);

    border: var(--borda);
    border-bottom: none;
    border-radius: 12px 12px 0 0;

    font-size: .9rem;
    font-weight: 700;

    cursor: pointer;            
}

.aba:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.aba.ativa {
    background-color: var(--bg-card);
    color: white;
    position: relative;
    z-index: 2;
    padding-bottom: 17px;
}

/* FORM */

.formulario {
    display: flex;
    flex-direction: column;
    z-index: -1;
    margin-top: -1px;

    background: var(--bg-card); 
    border: var(--borda); 
    border-radius: 0 var(--radius-grande) var(--radius-grande) var(--radius-grande); 
    backdrop-filter: blur(12px); 
    padding: 30px; 
    box-shadow: var(--sombra); 
    justify-content: space-between;
}

.campos-professor {
    display: none;
}

.campos-professor.mostrar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: aparecer .3s ease;
}

.campos-professor.esconder {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: esconder .3s ease;
}

form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
}

.metade {
    width: 50%;
}

.vertical {
    display: flex;
    gap: 14px;
}

.sexo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;

    background: rgba(255, 255, 255, 0.02);
    border: var(--borda);
    border-radius: var(--radius-media);
    padding: 0 18px;
    transition: var(--transicao);
}

.campo {
    display: flex;
    align-items: center;
    gap: 14px;

    background: rgba(255, 255, 255, 0.02);
    border: var(--borda);
    border-radius: var(--radius-media);
    padding: 0 18px;
    transition: var(--transicao);
}

.campo:focus-within, .sexo:focus-within {
    border-color: var(--cor-principal);
    box-shadow: 0 0 10px rgba(214,0,0,0.3);
}

select {
    width: 100%;
    height: 40px;

    background: transparent;
    border: none;
    outline: none;

    color: white;
    font-size: 1rem;
    font-family: var(--fonte-texto);

    cursor: pointer;
}

select option {
    background-color: #111;
    color: white;
} 

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;

}

input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
}

input::placeholder {
    color: var(--texto-secundario);
}

input[type="radio"] {
    width: 20px;
    accent-color: var(--cor-principal);
}

input[type="date"] {
    background: rgba(255, 255, 255, 0.02);
    border: var(--borda);
    border-radius: var(--radius-media);
    padding: 0 18px;
    transition: var(--transicao);
    color: var(--texto-secundario);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    filter: invert(1);
}

.mostrar-senha {
    background: none;
    border: none;
    cursor: pointer;

    width: 25px;
    height: 25px;
    opacity: 0.7;
    color: var(--texto-principal);
}


.btn-card {
    height: 64px;
    border: none;
    border-radius: var(--radius-media);
    background: var(--cor-principal);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: var(--transicao);
}

.btn-card:hover {
    background: var(--cor-principal-hover);
    transform: translateY(-2px);
}

.btn-card img {
    width: 20px;
    height: 20px;
}

.esqueci-senha {
    color: var(--cor-principal);
    text-align: end;
    font-size: 1.2rem;
    font-weight: bold;
}

.esqueci-senha:hover {
    color: var(--cor-principal-hover);
}


/* DIVISOR */

.separator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

.separator span {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.separator p {
    color: rgba(255, 255, 255, 0.5);
}


/* LINK PRO LOGIN OU CADASTRO */

.footer {
    border: var(--borda);
    border-radius: var(--radius-media);
    padding: 15px;
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
    color: var(--texto-secundario);
}

.footer a {
    text-decoration: none;
    color: var(--cor-principal);
    font-weight: 700;
    transition: var(--transicao);
}

.footer a:hover {
    color: var(--cor-principal-hover);
}


/* ========================================
   RESPONSIVIDADE: LOGIN E CADASTRO
======================================== */

/* TABLETS E CELULARES */
@media (max-width: 768px) {

    /* ESTRUTURA */
    body {
        overflow-x: hidden;
    }

    header {
        box-sizing: border-box;
        width: 100%;
        height: auto;
        min-height: 75px;
        padding: 12px 16px;
        z-index: 3
    }

    main {
        box-sizing: border-box;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
        min-height: 100vh;
        padding: 100px 20px 35px;
    }

    /* TÍTULO */
    .titulo-text {
        box-sizing: border-box;
        width: 100%;
        max-width: 500px;
        animation-duration: 0.7s;
    }

    .titulo-text h1 {
        font-size: clamp(1.6rem, 6vw, 2rem);
        line-height: 1.2;
        overflow-wrap: break-word;
    }

    .titulo-text p {
        width: 100%;
        max-width: 350px;
        font-size: 1rem;
        line-height: 1.6;
    }

    /* BOTÃO VOLTAR */
    .voltar {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
    }

    /* CARD */
    .arquivo {
        box-sizing: border-box;
        width: 100%;
        max-width: 560px;
        height: auto;
        min-height: 0;
        margin: 0;
        animation-duration: 0.7s;
    }

    .header {
        margin-bottom: 24px;
    }

    .header h2 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
        line-height: 1.2;
        overflow-wrap: break-word;
    }

    .header p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* ABAS */
    .abas {
        width: 100%;
        gap: 5px;
        z-index: 2;
    }

    .aba {
        flex: 1;
        min-width: 0;
        padding: 12px 8px;
        font-size: 0.85rem;
        text-align: center;
        overflow-wrap: break-word;
    }

    .aba.ativa {
        padding-bottom: 15px;
        z-index: 2;
    }

    /* FORMULÁRIO */
    .formulario {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        padding: 24px 20px;
        gap: 24px;
        border-radius: 0 var(--radius-grande)
            var(--radius-grande) var(--radius-grande);
    }

    form {
        width: 100%;
        min-width: 0;
        gap: 20px;
    }

    label {
        min-width: 0;
        gap: 8px;
        font-size: 0.9rem;
    }

    .metade {
        width: 100%;
        min-width: 0;
    }

    .vertical {
        flex-wrap: wrap;
        gap: 18px;
        width: 100%;
    }

    .campo,
    .sexo {
        box-sizing: border-box;
        min-width: 0;
        padding: 0 12px;
        gap: 10px;
    }

    .campo input,
    .campo select,
    .sexo input {
        min-width: 0;
    }

    input,
    select {
        font-size: 16px;
    }

    input[type="date"] {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        padding: 0 10px;
    }

    input[type="radio"] {
        flex-shrink: 0;
    }

    .mostrar-senha {
        flex-shrink: 0;
    }

    /* CAMPOS DINÂMICOS DE PROFESSOR */
    .campos-professor.mostrar,
    .campos-professor.esconder {
        gap: 20px;
        min-width: 0;
    }

    /* BOTÃO PRINCIPAL */
    .btn-card {
        box-sizing: border-box;
        width: 100%;
        min-height: 54px;
        height: auto;
        padding: 14px;
        gap: 10px;
    }

    .btn-card:hover {
        transform: none;
    }

    /* ESQUECI A SENHA */
    .esqueci-senha {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    /* DIVISOR */
    .separator {
        gap: 10px;
        margin: 24px 0;
    }

    .separator p {
        font-size: 0.85rem;
        text-align: center;
    }

    /* LINK LOGIN / CADASTRO */
    .footer {
        box-sizing: border-box;
        width: 100%;
        padding: 15px 12px;
        line-height: 1.5;
    }

    .footer p {
        overflow-wrap: anywhere;
    }

    #mensagem-alerta {
        overflow-wrap: anywhere;
        line-height: 1.5;
    }
}


/* CELULARES ESTREITOS */
@media (max-width: 400px) {

    main {
        padding: 90px 12px 25px;
        gap: 24px;
    }

    .titulo-text h1 {
        font-size: 1.6rem;
    }

    .titulo-text p {
        font-size: 0.95rem;
    }

    .arquivo {
        width: 100%;
    }

    .header h2 {
        font-size: 1.65rem;
    }

    .formulario {
        padding: 20px 14px;
    }

    .aba {
        padding: 11px 5px;
        font-size: 0.78rem;
    }

    .vertical {
        gap: 16px;
    }

    .campo {
        padding: 0 10px;
    }

    .btn-card {
        font-size: 0.95rem;
    }
}
