/* Telas publicas (login e recuperacao de senha): templates/registration/_base_publica.html.
   As cores vem de :root, definido na pagina pela cor da academia. */
body {
    background: linear-gradient(135deg, var(--cor-marca-escura) 0%, #000000 100%);
    /* min-height (e nao height): cartao mais alto que a tela faz a
       pagina rolar, em vez de cortar o topo - no celular pequeno o
       logo ficava acima da tela, sem como chegar nele. */
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 0;
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: none;
}

.login-header {
    background: var(--cor-marca);
    color: var(--cor-sobre-marca);
    padding: 30px 20px;
    text-align: center;
}

.login-header i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
}

.login-body {
    padding: 30px;
}

.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--cor-marca);
    box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.input-group-text {
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.btn-login {
    background: var(--cor-marca);
    border: none;
    color: var(--cor-sobre-marca);
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(var(--bs-primary-rgb), 0.35);
}

.forgot-password {
    color: var(--cor-marca-texto);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.alert {
    border-radius: 10px;
    border: none;
}

.logo-text {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.version {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 20px;
    font-size: 0.9rem;
}

.contato-academia a { color: rgba(255, 255, 255, 0.85) !important; }
.contato-academia a:hover { color: #fff !important; text-decoration: underline !important; }

.login-header img {
    max-width: 100%;
    height: auto;
}
/* Logo de qualquer formato cabe na mesma caixa (250 x 134). */
.login-header img.logo-academia {
    max-height: 134px;
    max-width: 250px;
    width: auto;
    object-fit: contain;
}

/* Celular: o cartao ocupava 80% da altura da tela com os tamanhos do
   computador. Logo menor, respiros menores - o formulario cabe
   inteiro com folga, sem rolar. */
@media (max-width: 575.98px) {
    .login-container {
        max-width: 340px;
    }
    .login-card {
        border-radius: 16px;
    }
    .login-header {
        padding: 18px 16px 14px;
    }
    .login-header img.logo-academia {
        width: 170px;
    }
    .version {
        font-size: 0.75rem;
        margin-top: 2px;
    }
    .login-body {
        padding: 20px 20px 16px;
    }
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    .form-control {
        padding: 9px 12px;
    }
    .login-body .mb-4 {
        margin-bottom: 1rem !important;
    }
    .form-check, .forgot-password {
        font-size: 0.85rem;
    }
    .btn-login {
        padding: 10px;
        margin-bottom: 0 !important;
    }
    .aviso-restrito {
        margin-top: 1rem !important;
        padding-top: 0.75rem !important;
        font-size: 0.8rem;
    }
    .footer-text {
        margin-top: 14px;
        font-size: 0.75rem;
    }
    .login-container.largo {
        max-width: calc(100% - 24px);
    }
}

/* Termos de uso (registration/termos.html): cartao largo e texto rolavel. */
.login-container.largo { max-width: 860px; }
.termo-texto {
    max-height: 55vh;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    background: #fff;
    font-size: .92rem;
    line-height: 1.55;
}
.termo-texto.inteiro { max-height: none; }
.termo-texto h2:first-child { margin-top: 0 !important; }
.termo-destaque {
    border-left: 4px solid var(--cor-marca);
    background: #fff6e5;
    padding: .75rem 1rem;
    border-radius: .25rem;
    margin-bottom: 1rem;
}
.termo-aceite .form-check { margin-bottom: .75rem; }
.termo-aceite .opcional {
    border: 1px dashed #adb5bd;
    border-radius: .5rem;
    padding: .6rem .8rem .6rem 2.2rem;
}
