:root {
    --auth-navy: #123f58;
    --auth-blue: #277b9f;
    --auth-sky: #51afd2;
    --auth-ink: #173447;
    --auth-muted: #647482;
    --auth-line: #dce7ed;
    --auth-soft: #f3f8fb;
    --auth-success: #20895a;
    --auth-danger: #b52939;
}

body.auth-entry {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 12% 16%, rgba(81, 175, 210, .18), transparent 28rem),
        radial-gradient(circle at 88% 82%, rgba(39, 123, 159, .14), transparent 30rem),
        linear-gradient(135deg, #f5fbfd 0%, #e5f3f8 100%);
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-entry::before {
    background-image: url('../img/hexagons.svg');
    background-position: center;
    background-size: 620px auto;
    opacity: .055;
}

.auth-entry .hexagon-pattern,
.auth-entry > .boersoft-footer {
    display: none;
}

.auth-entry .login-container,
.auth-entry .recovery-container,
.auth-entry .reset-container {
    width: 100%;
    max-width: 1080px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    justify-content: stretch;
    align-items: stretch;
    align-content: center;
    position: relative;
    z-index: 2;
}

.auth-brand-panel {
    min-height: 640px;
    padding: 54px;
    color: #fff;
    border-radius: 26px 0 0 26px;
    background:
        linear-gradient(145deg, rgba(13, 59, 82, .96), rgba(29, 118, 153, .91)),
        url('../img/hexagons.svg') center / 520px auto;
    box-shadow: 0 30px 80px rgba(13, 59, 82, .22);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: -150px;
    bottom: -150px;
    border: 56px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
}

.auth-brand-logo {
    width: 180px;
    height: auto;
    position: relative;
    z-index: 1;
}

.auth-brand-copy {
    max-width: 455px;
    position: relative;
    z-index: 1;
}

.auth-brand-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #bfe9f8;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.auth-brand-copy h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
}

.auth-brand-copy p {
    max-width: 420px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 1rem;
    line-height: 1.75;
}

.auth-brand-features {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.auth-brand-feature {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255, 255, 255, .9);
    font-size: .88rem;
}

.auth-brand-feature i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #d8f4ff;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, .6);
    font-size: .78rem;
}

.auth-entry .login-card,
.auth-entry .recovery-card,
.auth-entry .reset-card {
    width: 100%;
    max-width: none;
    min-height: 640px;
    border-radius: 0 26px 26px 0;
    border: 1px solid rgba(219, 231, 237, .86);
    border-left: 0;
    box-shadow: 0 30px 80px rgba(13, 59, 82, .15);
    background: rgba(255, 255, 255, .98);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.auth-entry .login-header,
.auth-entry .recovery-header,
.auth-entry .reset-header {
    padding: 42px 42px 10px;
    text-align: left;
    color: var(--auth-ink);
    background: transparent;
}

.auth-entry .login-header::before,
.auth-entry .recovery-header::before,
.auth-entry .reset-header::before {
    display: none;
}

.auth-entry .logo-container,
.auth-entry .login-header > img,
.auth-entry .recovery-header > img,
.auth-entry .reset-header > img {
    display: none;
}

.auth-entry .login-header h1,
.auth-entry .recovery-header h1,
.auth-entry .reset-header h1 {
    margin: 42px 0 6px;
    color: var(--auth-ink);
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: none;
}

.auth-entry .login-header p,
.auth-entry .recovery-header p,
.auth-entry .reset-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: .92rem;
    font-weight: 400;
}

.auth-entry .language-selector {
    top: 30px;
    right: 36px;
}

.auth-language-switcher {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 12;
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #f7fafc;
    box-shadow: 0 6px 16px rgba(13, 59, 82, .08);
}

.auth-language-option {
    min-width: 47px;
    min-height: 42px;
    padding: 4px 7px;
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #536b79;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.auth-language-option:hover,
.auth-language-option:focus-visible {
    color: var(--auth-blue);
    background: #eaf5f9;
    outline: none;
    transform: translateY(-1px);
}

.auth-language-option.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--auth-navy), var(--auth-blue));
    box-shadow: 0 5px 12px rgba(39, 123, 159, .22);
}

.auth-language-flag {
    width: 24px;
    height: 16px;
    display: block;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(13, 59, 82, .12);
    line-height: 0;
}

.auth-language-flag img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.auth-language-code {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.auth-entry .language-selector .dropdown-toggle,
.auth-entry .language-selector select {
    min-height: 40px;
    padding: 8px 34px 8px 12px !important;
    color: var(--auth-ink) !important;
    border: 1px solid var(--auth-line) !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    background-image: none !important;
    appearance: auto;
    box-shadow: 0 5px 14px rgba(13, 59, 82, .06);
    font-size: .82rem !important;
}

.auth-entry .language-selector select option {
    color: var(--auth-ink);
    background: #fff;
}

.auth-entry .login-body,
.auth-entry .recovery-body,
.auth-entry .reset-body {
    padding: 26px 42px 34px;
    background: transparent;
    flex: 1;
}

.auth-entry .login-footer,
.auth-entry .recovery-footer,
.auth-entry .reset-footer {
    padding: 20px 42px 26px;
    border-top: 1px solid #edf2f5;
    color: #7b8993;
    background: transparent;
    font-size: .76rem;
}

.auth-entry .form-group,
.auth-entry .mb-3 {
    margin-bottom: 19px !important;
}

.auth-entry .form-label {
    margin-bottom: 7px;
    color: #294556;
    font-size: .84rem;
    font-weight: 600;
}

.auth-entry .form-label i {
    color: var(--auth-blue);
}

.auth-entry .form-control {
    min-height: 50px;
    padding: 12px 14px;
    color: var(--auth-ink);
    border: 1px solid #d5e0e6;
    border-radius: 11px;
    background: #fbfdfe;
    font-size: .93rem;
}

.auth-entry .form-control:focus {
    border-color: var(--auth-sky);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(81, 175, 210, .15);
}

.auth-password-field {
    position: relative;
}

.auth-password-field .form-control {
    padding-right: 52px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    color: #5d7584;
    background: transparent;
}

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

.auth-caps-warning,
.auth-match-warning {
    display: none;
    margin-top: 7px;
    color: #a45c00;
    font-size: .76rem;
}

.auth-caps-warning.is-visible,
.auth-match-warning.is-visible {
    display: block;
}

.auth-entry .btn-login,
.auth-entry .btn-recovery,
.auth-entry .btn-reset,
.auth-primary-button {
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #257da2, #51afd2);
    box-shadow: 0 10px 24px rgba(39, 123, 159, .22);
    font-size: .94rem;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.auth-entry .btn-login:hover,
.auth-entry .btn-recovery:hover,
.auth-entry .btn-reset:hover,
.auth-primary-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(39, 123, 159, .28);
}

.auth-entry button[disabled] {
    cursor: wait;
    opacity: .72;
}

.auth-entry .forgot-password,
.auth-entry .back-to-login {
    margin-top: 20px;
    text-align: center;
}

.auth-entry .forgot-password a,
.auth-entry .back-to-login a,
.auth-entry .login-footer a,
.auth-entry .recovery-footer a,
.auth-entry .reset-footer a {
    color: var(--auth-blue);
    font-weight: 500;
    text-decoration: none;
}

.auth-access-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
}

.auth-access-links > span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #a8bac4;
}

.validation-success-banner {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 16px;
    color: #17613f;
    border: 1px solid #bfe4cf;
    border-radius: 13px;
    background: #effaf4;
}

.validation-success-banner > i {
    margin-top: 2px;
    color: var(--auth-success);
    font-size: 1.35rem;
}

.validation-success-banner strong,
.validation-success-banner span {
    display: block;
}

.validation-success-banner strong {
    margin-bottom: 2px;
    font-size: .94rem;
}

.validation-success-banner span {
    color: #477062;
    font-size: .76rem;
    line-height: 1.45;
}

.validation-data-list {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 13px;
    background: #fff;
}

.validation-data-row {
    display: grid;
    grid-template-columns: minmax(145px, .85fr) minmax(0, 1.15fr);
    gap: 18px;
    padding: 10px 13px;
    border-bottom: 1px solid #e9f0f4;
}

.validation-data-row:last-child {
    border-bottom: 0;
}

.validation-data-row:nth-child(even) {
    background: #f8fbfc;
}

.validation-data-row dt,
.validation-data-row dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .77rem;
    line-height: 1.45;
}

.validation-data-row dt {
    color: #536b79;
    font-weight: 600;
}

.validation-data-row dd {
    color: var(--auth-ink);
    font-weight: 500;
}

.validation-new-query {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    color: #fff;
    text-decoration: none;
}

.auth-validation-page .login-container {
    max-width: 1180px;
    grid-template-columns: minmax(0, .9fr) minmax(500px, 1.1fr);
}

.auth-validation-page .login-card,
.auth-validation-page .auth-brand-panel {
    min-height: 680px;
}

.auth-validation-page .login-header h1 {
    margin-top: 42px;
}

.auth-entry .alert {
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    box-shadow: none;
    font-size: .84rem;
    line-height: 1.5;
}

.auth-entry .alert-danger {
    color: #84202c;
    border-color: #f1c6cc;
    background: #fff3f4;
}

.auth-entry .alert-success {
    color: #17613f;
    border-color: #bfe4cf;
    background: #effaf4;
}

.auth-security-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 20px 0 0;
    padding: 12px 14px;
    border-radius: 11px;
    color: #567080;
    background: var(--auth-soft);
    font-size: .76rem;
    line-height: 1.5;
}

.auth-security-note i {
    margin-top: 2px;
    color: var(--auth-success);
}

.auth-progress {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 4px 0 22px;
}

.auth-progress-step {
    height: 5px;
    flex: 1;
    border-radius: 99px;
    background: #e4edf2;
}

.auth-progress-step.is-active {
    background: var(--auth-sky);
}

.auth-progress-label {
    margin-left: 6px;
    color: var(--auth-muted);
    font-size: .72rem;
    white-space: nowrap;
}

.auth-strength {
    margin: 12px 0 15px;
}

.auth-strength-track {
    height: 6px;
    overflow: hidden;
    border-radius: 99px;
    background: #e6eef2;
}

.auth-strength-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #d44955;
    transition: width .2s ease, background .2s ease;
}

.auth-strength-caption {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    color: var(--auth-muted);
    font-size: .72rem;
}

.auth-requirements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.auth-requirements li {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #768691;
    font-size: .74rem;
}

.auth-requirements li::before {
    content: "\f111";
    color: #bdc9cf;
    font-family: "Font Awesome 6 Free";
    font-size: .46rem;
    font-weight: 900;
}

.auth-requirements li.is-valid {
    color: #1f714c;
}

.auth-requirements li.is-valid::before {
    content: "\f058";
    color: #2aa36b;
    font-size: .78rem;
}

@media (max-width: 820px) {
    body.auth-entry {
        background: #eef7fa;
    }

    .auth-entry .login-container,
    .auth-entry .recovery-container,
    .auth-entry .reset-container {
        max-width: 610px;
        grid-template-columns: 1fr;
        padding: 18px;
        align-content: center;
    }

    .auth-validation-page .login-container {
        grid-template-columns: 1fr;
    }

    .auth-validation-page .login-card,
    .auth-validation-page .auth-brand-panel {
        min-height: 0;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 30px;
        border-radius: 22px 22px 0 0;
    }

    .auth-brand-logo {
        width: 132px;
    }

    .auth-brand-copy {
        margin-top: 24px;
    }

    .auth-brand-copy h2 {
        font-size: 1.55rem;
    }

    .auth-brand-copy p,
    .auth-brand-features,
    .auth-brand-footer {
        display: none;
    }

    .auth-entry .login-card,
    .auth-entry .recovery-card,
    .auth-entry .reset-card {
        min-height: 0;
        border: 1px solid var(--auth-line);
        border-top: 0;
        border-radius: 0 0 22px 22px;
    }
}

@media (max-width: 520px) {
    .auth-entry .login-container,
    .auth-entry .recovery-container,
    .auth-entry .reset-container {
        padding: 0;
    }

    .auth-brand-panel,
    .auth-entry .login-card,
    .auth-entry .recovery-card,
    .auth-entry .reset-card {
        border-radius: 0;
        box-shadow: none;
    }

    .auth-brand-panel {
        padding: 24px;
    }

    .auth-entry .login-header,
    .auth-entry .recovery-header,
    .auth-entry .reset-header {
        padding: 32px 24px 8px;
    }

    .auth-entry .login-header h1,
    .auth-entry .recovery-header h1,
    .auth-entry .reset-header h1 {
        margin-top: 42px;
        font-size: 1.5rem;
    }

    .auth-entry .language-selector {
        top: 20px;
        right: 20px;
    }

    .auth-language-switcher {
        top: 12px;
        right: 14px;
    }

    .auth-language-option {
        min-width: 43px;
        min-height: 40px;
        padding: 4px 6px;
    }

    .auth-entry .login-body,
    .auth-entry .recovery-body,
    .auth-entry .reset-body,
    .auth-entry .login-footer,
    .auth-entry .recovery-footer,
    .auth-entry .reset-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .auth-requirements {
        grid-template-columns: 1fr;
    }

    .auth-access-links {
        flex-direction: column;
    }

    .auth-access-links > span {
        display: none;
    }

    .validation-data-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-entry *,
    .auth-entry *::before,
    .auth-entry *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Alteração de senha dentro do portal autenticado */
.password-page .password-hero {
    padding: 28px 32px;
    margin-bottom: 22px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-navy), var(--auth-blue));
    box-shadow: 0 14px 34px rgba(13, 59, 82, .15);
}

.password-page .password-hero h2 { margin: 0 0 7px; font-size: 1.65rem; font-weight: 700; }
.password-page .password-hero p { margin: 0; color: rgba(255, 255, 255, .82); }
.password-page-grid { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(420px, 1.28fr); gap: 22px; max-width: 960px; margin: 0 auto; }
.password-help-card, .password-form-card { border: 1px solid #e0eaef; border-radius: 17px; background: #fff; box-shadow: 0 10px 28px rgba(13, 59, 82, .08); }
.password-help-card { padding: 27px; color: #5e7380; }
.password-help-icon { width: 50px; height: 50px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 15px; color: var(--auth-blue); background: #eaf6fa; font-size: 1.25rem; }
.password-help-card h3 { color: var(--auth-ink); font-size: 1.05rem; font-weight: 700; }
.password-help-card p, .password-help-card li { font-size: .84rem; line-height: 1.65; }
.password-help-card ul { margin: 18px 0 0; padding: 0; list-style: none; }
.password-help-card li { display: flex; gap: 9px; margin-top: 9px; }
.password-help-card li i { margin-top: 5px; color: var(--auth-success); }
.password-form-card { padding: 30px; }
.password-form-card .form-control { min-height: 49px; border-radius: 11px; }
.password-form-card .auth-primary-button { width: auto; min-width: 190px; }

@media (max-width: 800px) {
    .password-page-grid { grid-template-columns: 1fr; }
    .password-help-card { order: 2; }
}

@media (max-width: 520px) {
    .password-page .password-hero, .password-help-card, .password-form-card { padding: 22px; border-radius: 14px; }
    .password-form-actions { display: grid !important; }
    .password-form-card .auth-primary-button { width: 100%; }
}
