/* ===== [ BODY ] ===== */
body {
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: var(--color-lopes-blue); /* Fallback */
    font-family: var(--font-default);
}

/* ===== [ CARD ] ===== */
.auth-panel {
    max-width: 440px;
}

.auth-panel-wide {
    max-width: 520px;
}

.auth-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(9, 17, 54, 0.24) !important;
    animation: card-enter 0.5s ease-out both;
}

.auth-title {
    color: #1f294d;
    font-size: clamp(1.5rem, 5vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: #6c7388;
    font-size: 0.95rem;
}

.auth-alert {
    justify-content: center;
    border: 0;
    background: transparent;
    color: #dc3545;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.auth-alert i {
    flex-shrink: 0;
}

.auth-alert-success {
    color: #198754;
}

.auth-notice {
    border: 1px solid #ffe08a;
    border-radius: 12px;
    background: #fff9e8;
    padding: 0.85rem 1rem;
    color: #73510d;
    font-size: 0.86rem;
    line-height: 1.4;
}

.auth-notice > i {
    flex-shrink: 0;
    color: #d69e12;
}

/* ===== [ IMAGES ] ===== */
.auth-brand {
    min-height: 68px;
}

.app-logo {
    max-height: 68px;
}

.logo-lopes {
    max-height: 42px;
    opacity: 0.82;
    transition: opacity 0.2s ease;
}

.auth-company a:hover .logo-lopes {
    opacity: 1;
}

/* ===== [ ANIMATIONS ] ===== */
@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* ===== [ RESPONSIVE ] ===== */
@media (max-width: 575.98px) {
    .auth-panel {
        max-width: 420px;
    }

    .auth-panel-wide {
        max-width: 440px;
    }

    .auth-card {
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }
}

/* ===== [ LINKS ] ===== */
a {
    color: var(--color-lopes-blue);
    text-decoration: none;
}

a:hover {
    color: var(--color-lopes-blue--hover);
    text-decoration: none;
}

/* ===== [ FOOTER ] ===== */
.auth-footer {
    color: #8a90a1;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

/* ===== [ INPUTS ] ===== */
.auth-field {
    position: relative;
}

.auth-field .form-control {
    min-height: 58px;
    border: 1px solid #dfe3ec;
    border-radius: 12px;
    background-color: #f8f9fc;
    padding-left: 3rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field .form-control:hover {
    border-color: #bec5d5;
}

.auth-field .form-control:focus {
    border-color: var(--color-lopes-blue);
    background-color: #fff;
    box-shadow: 0 0 0 0.22rem rgba(var(--color-lopes-blue-shadow), 0.13);
}

.auth-field > label {
    padding-left: 3rem;
    color: #747b8e;
}

.auth-field-icon {
    position: absolute;
    z-index: 6;
    top: 29px;
    left: 1.1rem;
    color: #8790a6;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-field:focus-within .auth-field-icon {
    color: var(--color-lopes-blue);
}

.auth-password-input {
    padding-right: 3.25rem !important;
}

.auth-field .auth-password-input.is-valid,
.auth-field .auth-password-input.is-invalid {
    padding-right: 5.5rem !important;
    background-position: right 3.25rem center;
}

.auth-password-toggle {
    position: absolute;
    z-index: 6;
    top: 29px;
    right: 0.65rem;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #747b8e;
    transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: #e9ecf4;
    color: var(--color-lopes-blue);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid rgba(var(--color-lopes-blue-shadow), 0.35);
}

.auth-field .invalid-feedback {
    margin: 0.45rem 0.25rem 0;
    font-size: 0.78rem;
}

.form-control:focus {
    border-color: var(--color-lopes-blue);
}

/* ===== [ ACTIONS ] ===== */
.auth-submit {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(var(--color-lopes-blue-shadow), 0.24);
}

.auth-submit:not(:disabled):active {
    transform: translateY(0);
}

.auth-recovery-link {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== [ LIST ] ===== */
.password-requirements {
    border: 1px solid #e2e6ef;
    border-radius: 12px;
    background: #f8f9fc;
    padding: 0.85rem 1rem;
}

.password-requirements-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    color: #4f586f;
    font-size: 0.85rem;
    font-weight: 700;
}

.password-requirements ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 0.75rem;
    padding: 0;
}

.password-requirements li {
    font-size: 0.78rem;
    line-height: 1.35;
}

.li-valid {
    color: #26771c;
    list-style-type: none;
}

.li-valid::before {
    display: inline-block;
    width: 1em;
    color: #26771c;
    content: "✓ ";
}

.li-invalid {
    color: #ff0000;
    list-style-type: none;
}

.li-invalid::before {
    display: inline-block;
    width: 1em;
    color: #8a90a1;
    content: "○ ";
}

.password-requirements .li-invalid {
    color: #737b8e;
}

@media (max-width: 575.98px) {
    .password-requirements ul {
        grid-template-columns: 1fr;
    }
}