/* ==========================================================================
   Login moderno — Portal do Servidor
   Card centralizado (não mais à direita), responsivo, com fundo full-bleed.
   Sobrepõe as regras antigas de login-register-lock.css.
   ========================================================================== */

.login-modern-body {
    height: 100%;
    margin: 0;
}

.login-modern {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

/* Camada escura sobre o fundo para dar contraste ao card */
.login-modern__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.65) 0%, rgba(23, 162, 184, 0.45) 100%);
    z-index: 0;
}

.login-modern__center {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Card central -------------------------------------------------------- */
.login-modern__card.card {
    width: 100%;
    max-width: 440px;
    margin: 0;
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: loginFadeIn 0.4s ease;
}

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

.login-modern__body {
    padding: 40px 40px 24px;
}

/* Logo e títulos ------------------------------------------------------ */
.login-modern__logo {
    display: block;
    margin-bottom: 8px;
}

.login-modern__logo img {
    height: 56px;
    width: auto;
}

.login-modern__brasao {
    display: block;
    max-height: 96px;
    width: auto;
    margin: 4px auto 12px;
}

.login-modern__title {
    font-size: 22px;
    font-weight: 600;
    color: #1f2733;
    margin: 8px 0 4px;
}

.login-modern__subtitle {
    font-size: 14px;
    color: #6b7682;
    margin-bottom: 8px;
}

/* Campos -------------------------------------------------------------- */
.login-modern .form-control {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #d8dee6;
    background: #f7f9fb;
    padding: 0 14px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-modern select.form-control {
    height: 46px;
}

.login-modern .form-control:focus {
    border-color: #17a2b8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.18);
}

.login-modern .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.login-modern .input-group-btn .btn {
    height: 46px;
    border: 1px solid #d8dee6;
    border-left: none;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    background: #f7f9fb;
    color: #6b7682;
}

/* Botão principal ----------------------------------------------------- */
.login-modern .btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
    transition: background 0.15s ease, transform 0.1s ease;
}

.login-modern .btn-info:hover {
    background: #138496;
    border-color: #138496;
}

.login-modern .btn-info:active {
    transform: translateY(1px);
}

/* Links --------------------------------------------------------------- */
.login-modern a:not(.btn):not(.br-sign-in) {
    color: #17a2b8;
    font-size: 13px;
    text-decoration: none;
}

.login-modern a:not(.btn):not(.br-sign-in):hover {
    text-decoration: underline;
}

/* gov.br -------------------------------------------------------------- */
.login-modern__govbr {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.login-modern__hint {
    font-size: 13px !important;
    color: #6b7682;
    line-height: 1.5;
    padding: 0 8px;
}

/* Rodapé com marcas --------------------------------------------------- */
.login-modern__brand.footer {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 24px;
    background: #f3f5f8;
    border-top: 1px solid #e7ebf0;
    margin: 0;
}

.login-modern__brand img {
    height: 34px;
    width: auto;
    opacity: 0.85;
}

/* Responsivo ---------------------------------------------------------- */
@media (max-width: 575.98px) {
    .login-modern {
        padding: 0;
        align-items: stretch;
    }
    .login-modern__card.card {
        max-width: none;
        min-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .login-modern__body {
        padding: 32px 22px 18px;
    }
    .login-modern__brand.footer {
        flex-wrap: wrap;
        gap: 16px;
    }
}

/* Modo escuro (combina com temas.css) -------------------------------- */
body[class*="-dark"] .login-modern__card.card {
    background: #24282f;
}
body[class*="-dark"] .login-modern__title { color: #e4e7ec; }
body[class*="-dark"] .login-modern__subtitle,
body[class*="-dark"] .login-modern__hint { color: #9aa3b0; }
body[class*="-dark"] .login-modern .form-control {
    background: #2b3038;
    border-color: #3a4049;
    color: #e4e7ec;
}
body[class*="-dark"] .login-modern .form-control:focus { background: #2b3038; }
body[class*="-dark"] .login-modern .input-group-btn .btn {
    background: #2b3038;
    border-color: #3a4049;
    color: #9aa3b0;
}
body[class*="-dark"] .login-modern__brand.footer {
    background: #1f2329;
    border-color: #3a4049;
}
