@import url(default.css);
* {    
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../images/login-bg.jpg") center center no-repeat fixed;
    background-size: cover;
    position: relative;
    color: #1f2d3d;
}

/* Leve esmaecimento da imagem de fundo */
.background-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
}

/* Container principal */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 46rem;
    padding: 1.6rem;
}

/* Card de login */
.login-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1.8rem;
    padding: 3.2rem 3.8rem 2.8rem;
    box-shadow: 0 1.8rem 4rem rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(.8rem);
    position: relative;
    overflow: hidden;
}

/* Cantos com detalhes verdes (como na imagem) */
.login-card::before,
.login-card::after {
    content: "";
    position: absolute;
    width: 3.8rem;
    height: 3.8rem;
    border-radius: .6rem;
    border: .2rem solid #27ae60;
}

.login-card::before {
    top: 1.6rem;
    left: 1.6rem;
    border-right: none;
    border-bottom: none;
}

.login-card::after {
    bottom: 1.6rem;
    right: 1.6rem;
    border-left: none;
    border-top: none;
}

/* Cabeçalho (logo + título) */
.login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.logo-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: .2rem solid #1f5fa8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Ícone simples simulando engrenagem/chave */
.logo-gear {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    border: .3rem solid #1f5fa8;
    box-shadow: 0 0 0 .2rem #ffffff;
}

.logo-text .brand-name {
    font-weight: 600;
    font-size: 1.76rem;
    color: #1f5fa8;
}

/* Corpo do card */
.login-body {
    text-align: center;
}

.login-body h1 {
    font-size: 2.4rem;
    margin-bottom: .4rem;
    color: #2c3e50;
}

.login-body p {
    font-size: 1.47rem;
    color: #7f8c8d;
    margin-bottom: 1.8rem;
}

/* Formulário */
form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: #7f8c8d;
    margin-bottom: .4rem;
}

/* Campo com ícone */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.2rem;
    font-size: 1.44rem;
    opacity: 0.7;
}

.input-wrapper input {
    width: 100%;
    border-radius: .4rem;
    border: .1rem solid #d0d7e2;
    padding: 1rem 1rem 1rem 3.4rem;
    font-size: 1.44rem;
    outline: none;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #b0b7c3;
}

.input-wrapper input:focus {
    border-color: #1f5fa8;
    box-shadow: 0 0 0 .2rem rgba(31, 95, 168, 0.15);
}

/* Botão principal */
.btn-primary {
    width: 100%;
    border: none;
    border-radius: .4rem;
    padding: 1rem;
    margin-top: .6rem;
    background: #1f5fa8;
    color: #ffffff;
    font-size: 1.54rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-primary:disabled {
    background-color: #2c3e50;
    cursor: default;
}

.btn-primary:not(:disabled):hover {
    background: #184a82;
    box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, 0.18);
    transform: translateY(-.1rem);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Link "Esqueceu a senha" */
.forgot-link {
    display: block;
    margin-top: 1.2rem;
    text-align: center;
    font-size: 1.28rem;
    color: #1f5fa8;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

button>.loader {
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 1rem;
}

.loader {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 50%;
    display: inline-block;
    border-top: .3rem solid #FFF;
    border-right: .3rem solid transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

div.alert {
    text-align: left;
    margin-bottom: 1rem;    
    background: #fee2e2;
    color: #7f1d1d;
    border: .1rem solid #fecaca;
    padding: 1rem;
    border-radius: .5rem;
}


.alert.alert-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.login-body .recover-info {
    font-size: 1.32rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.8rem;
}

.form-help-text {
    font-size: 1.18rem;
    color: #94a3b8;
    margin-top: .6rem;
    line-height: 1.4;
}

.password-rules {
    list-style: none;
    padding: 0;
    margin: .8rem 0 0;
    display: grid;
    gap: .45rem;
}

.password-rules li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.18rem;
    color: #94a3b8;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.password-rules li::before {
    content: "○";
    position: absolute;
    left: 0;
    top: 0;
    color: #94a3b8;
    font-weight: 700;
}

.password-rules li.valid {
    color: #166534;
}

.password-rules li.valid::before {
    content: "✓";
    color: #16a34a;
}

.password-rules li.invalid {
    color: #7f1d1d;
}

.password-rules li.invalid::before {
    content: "×";
    color: #dc2626;
}

.input-wrapper input.is-valid {
    border-color: #16a34a;
    box-shadow: 0 0 0 .2rem rgba(22, 163, 74, 0.12);
}

.input-wrapper input.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 .2rem rgba(220, 38, 38, 0.12);
}

.hidden {
    display: none;
}

/* Responsivo */
@media (max-width: 48rem) {
    .login-card {
        padding: 2.4rem 1.8rem 2.2rem;
    }

    .login-card::before,
    .login-card::after {
        display: none;
    }

    .logo-text .brand-name {
        font-size: 1.6rem;
    }
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
