/* Portal Auth — inspirado no layout Suite Betha (login.betha.cloud) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Raleway:ital,wght@0,600;0,700;1,700;1,800&display=swap');

:root {
    --gp-primary: #0761ff;
    --gp-primary-hover: #0052e0;
    --gp-primary-soft: #e8f0ff;
    --gp-text: #333333;
    --gp-text-muted: #71717a;
    --gp-border: #cccccc;
    --gp-bg: #ffffff;
    --gp-radius-input: 7px;
    --gp-radius-btn: 4px;
    --gp-font: "Open Sans", Arial, Helvetica, sans-serif;
    --gp-font-brand: "Raleway", "Open Sans", Arial, sans-serif;
    --gp-fs: 1;
}

html.gp-auth-html,
html:has(body.gp-auth-body),
body.gp-auth-body,
.gp-auth-body.page-body,
.gp-auth-body.login-page {
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    max-height: 100vh !important;
    min-height: 0 !important;
    background: var(--gp-bg) !important;
    font-family: var(--gp-font) !important;
    font-size: calc(16px * var(--gp-fs)) !important;
    font-weight: 400 !important;
    color: var(--gp-text);
    /* auto (não hidden): bolha nativa "Preencha este campo." precisa aparecer */
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.gp-auth-body strong,
.gp-auth-body b,
.gp-auth-body .btn,
.gp-auth-body button,
.gp-auth-body label,
.gp-perfil-body strong,
.gp-perfil-body b,
.gp-perfil-body .btn,
.gp-perfil-body button,
.gp-perfil-body label {
    font-weight: 400 !important;
}

.gp-auth-body .fa,
.gp-auth-body .fas,
.gp-auth-body .fab,
.gp-perfil-body .fa,
.gp-perfil-body .fas,
.gp-perfil-body .fab {
    font-weight: 900 !important;
}

/* Durante reportValidity a bolha nativa precisa escapar do overflow:hidden */
html.gp-auth-html.gp-auth-showing-validity,
html.gp-auth-html.gp-auth-showing-validity body.gp-auth-body,
html.gp-auth-html.gp-auth-showing-validity main,
body.gp-auth-body.gp-auth-showing-validity,
body.gp-auth-body.gp-auth-showing-validity main {
    overflow: visible !important;
    max-height: none !important;
}

/* Toasts do Notiflix precisam ficar acima do layout auth (overflow:hidden) */
html.gp-auth-html #NotiflixNotifyWrap,
body.gp-auth-body #NotiflixNotifyWrap,
main #NotiflixNotifyWrap,
#NotiflixNotifyWrap {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 2147483000 !important;
    pointer-events: none;
    overflow: visible !important;
}

html.gp-auth-html #NotiflixNotifyWrap > div,
body.gp-auth-body #NotiflixNotifyWrap > div,
main #NotiflixNotifyWrap > div,
#NotiflixNotifyWrap > div {
    pointer-events: auto;
}

/* Centraliza só o card de login (páginas com .gp-auth) — não afeta TipoAcesso */
body.gp-auth-body:has(.gp-auth) > main,
html.gp-auth-html:has(.gp-auth) main,
main:has(.gp-auth),
body.gp-auth-body:has(.gp-auth) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    width: 100% !important;
}

.gp-auth-body .login-container,
.gp-auth-body .login-form,
.gp-auth-body .login-content {
    all: unset;
    display: block;
}

/* Neutraliza leftovers do Neon Theme na área de autenticação */
.gp-auth-body.login-page .login-progressbar,
.gp-auth-body.login-page .login-progressbar-indicator {
    display: none !important;
}

.gp-auth-body.login-page {
    padding-top: 0 !important;
}

/* Card centralizado (form + painel), no padrão Betha */
.gp-auth {
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(320px, 520px);
    width: min(960px, 100%);
    height: min(680px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 28px;
    overflow: visible;
    box-sizing: border-box;
    box-shadow: 0 8px 40px rgba(15, 40, 100, 0.08);
    flex-shrink: 0;
}

.gp-auth__form-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: clamp(28px, 4vh, 44px) clamp(28px, 4vw, 48px);
    box-sizing: border-box;
    overflow: visible;
    grid-column: 1;
    grid-row: 1;
    border-radius: 28px 0 0 28px;
    background: #fff;
}

.gp-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 36px;
    flex-shrink: 0;
}

.gp-auth__brand:hover {
    text-decoration: none;
    opacity: 0.92;
}

.gp-auth__brand-icon {
    display: block;
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
    object-fit: contain;
}

.gp-auth__brand-fallback {
    display: inline-block;
    font-family: var(--gp-font-brand);
    font-style: italic;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: var(--gp-primary);
    line-height: 1;
    text-transform: uppercase;
}

.gp-auth__logo-mark,
.gp-auth__brand-text {
    display: none !important;
}

.gp-auth__steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.gp-auth__step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gp-text-muted);
}

.gp-auth__step.is-active {
    color: var(--gp-primary);
}

.gp-auth__step.is-done {
    color: var(--gp-text);
}

.gp-auth__step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1;
}

.gp-auth__step.is-active .gp-auth__step-num,
.gp-auth__step.is-done .gp-auth__step-num {
    background: var(--gp-primary);
    border-color: var(--gp-primary);
    color: #fff;
}

.gp-auth__step-sep {
    width: 24px;
    height: 1px;
    background: var(--gp-border);
}

.gp-auth__title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--gp-text);
    line-height: 1.25;
    flex-shrink: 0;
}

.gp-auth__subtitle {
    margin: 0 0 28px;
    font-size: 0.875rem;
    color: var(--gp-text-muted);
    line-height: 1.45;
    flex-shrink: 0;
}

.gp-auth__subtitle a {
    color: var(--gp-primary);
    text-decoration: none;
    font-weight: 400;
}

.gp-auth__subtitle a:hover {
    text-decoration: underline;
}

.gp-auth__field {
    margin-bottom: clamp(10px, 1.6vh, 16px);
    position: relative;
}

.gp-auth__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.gp-auth__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gp-text);
    margin-bottom: 6px;
}

.gp-auth__required {
    color: #c53030;
    font-weight: 400;
}

.gp-auth__hint {
    margin: 0 0 14px;
    font-size: 0.875rem;
    color: var(--gp-text-muted);
    line-height: 1.4;
}

.gp-auth__alert {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
}

.gp-auth__alert[hidden] {
    display: none !important;
}

.gp-auth__input.is-invalid {
    border-color: #c53030 !important;
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.15) !important;
}

.gp-auth__label-row .gp-auth__label {
    margin-bottom: 0;
}

.gp-auth__link {
    color: var(--gp-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
}

.gp-auth__link:hover {
    text-decoration: underline;
    color: var(--gp-primary-hover);
}

.gp-auth__input,
.gp-auth__select,
.gp-auth select.gp-auth__select,
.gp-auth .select2-container--default .select2-selection--single {
    width: 100% !important;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius-input);
    background: #fff;
    color: #555;
    font-size: 0.9rem;
    font-family: var(--gp-font);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gp-auth__input:focus,
.gp-auth__select:focus {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(7, 97, 255, 0.15);
}

.gp-auth__password-wrap {
    position: relative;
}

.gp-auth__password-wrap .gp-auth__input {
    padding-right: 48px;
}

.gp-auth__toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--gp-text-muted);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gp-auth__toggle-pass:hover {
    color: var(--gp-primary);
    background: var(--gp-primary-soft);
}

.gp-auth__check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 clamp(10px, 1.6vh, 14px);
    font-size: 0.875rem;
    color: var(--gp-text-muted);
    cursor: pointer;
    user-select: none;
}

.gp-auth__check input {
    width: 16px;
    height: 16px;
    accent-color: var(--gp-primary);
    cursor: pointer;
}

.gp-auth__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--gp-radius-btn);
    background: var(--gp-primary);
    color: #fff !important;
    font-family: var(--gp-font);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.1s ease;
}

.gp-auth__btn:hover {
    background: var(--gp-primary-hover);
    color: #fff !important;
}

.gp-auth__btn:active {
    transform: translateY(1px);
}

.gp-auth__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.gp-auth__municipio-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: clamp(10px, 1.8vh, 18px);
    background: var(--gp-primary-soft);
    border: 1px solid #c9dbff;
    border-radius: var(--gp-radius-input);
    flex-shrink: 0;
}

.gp-auth__municipio-chip-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.gp-auth__municipio-chip-info i {
    color: var(--gp-primary);
    margin-top: 2px;
}

.gp-auth__municipio-chip strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gp-text);
    word-break: break-word;
}

.gp-auth__municipio-chip span {
    font-size: 0.75rem;
    color: var(--gp-text-muted);
}

.gp-auth__org-chip .gp-auth__org-brasao {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #c9dbff;
}

.gp-auth__org-chip .gp-auth__municipio-chip-info {
    align-items: center;
}

.gp-auth__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 18px;
}

.gp-auth__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: clamp(12px, 2.5vh, 28px);
    padding-top: 16px;
    border-top: 1px solid #e8eef6;
    font-size: 0.875rem;
    color: var(--gp-text-muted);
    flex-shrink: 0;
}

.gp-auth__footer a {
    color: var(--gp-text-muted);
    text-decoration: none;
}

.gp-auth__footer a:hover {
    color: var(--gp-primary);
}

.gp-auth__version {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef5ff;
    border: 1px solid #d6e6ff;
    color: #0b5cab;
    font-weight: 400;
    line-height: 1.2;
}

.gp-auth__version i {
    font-size: 0.875rem;
    opacity: 0.85;
}

.gp-auth__version strong {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.gp-auth__footer-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
}

.gp-auth__footer-brand {
    font-weight: 400;
    color: #64748b;
    letter-spacing: 0.01em;
}

.gp-auth__visual {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    border-radius: 0 28px 28px 0;
    overflow: hidden;
    background: linear-gradient(145deg, #0761ff 0%, #0546c4 55%, #033aa3 100%);
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: clamp(24px, 4vh, 40px);
    box-sizing: border-box;
    height: 100%;
    max-height: none;
    min-height: 0;
    align-self: stretch;
}

/* Fundo digital (sugestão 2): tablet / serviços */
.gp-auth__visual-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.gp-auth__visual-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    animation: gp-auth-float-media 10s ease-in-out infinite;
}

.gp-auth__visual-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(7, 97, 255, 0.28) 0%,
            rgba(5, 70, 196, 0.42) 40%,
            rgba(3, 40, 120, 0.88) 100%
        ),
        linear-gradient(
            115deg,
            rgba(3, 58, 163, 0.35) 0%,
            transparent 55%
        );
    z-index: 1;
}

.gp-auth__visual-fx {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.gp-auth__visual-fx--1 {
    width: 280px;
    height: 280px;
    top: -90px;
    left: -80px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0 0 70% 0;
}

.gp-auth__visual-fx--2 {
    width: 200px;
    height: 200px;
    bottom: 12%;
    right: -70px;
    background: rgba(255, 255, 255, 0.08);
}

.gp-auth__visual-star {
    position: absolute;
    top: 28px;
    right: 36px;
    font-size: 1.35rem;
    color: #fff;
    opacity: 0.95;
    z-index: 3;
    animation: gp-auth-pulse 3.2s ease-in-out infinite;
}

.gp-auth__visual-content {
    position: relative;
    z-index: 3;
    max-width: 440px;
    width: 100%;
}

/* Tipografia do wordmark no estilo da sugestão 3 */
.gp-auth__visual-wordmark {
    margin: 0 0 12px;
    font-family: var(--gp-font-brand);
    font-style: italic;
    font-weight: 800;
    font-size: clamp(1.45rem, 3vh, 2rem);
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 0.98;
    text-transform: uppercase;
    text-shadow: 0 2px 18px rgba(0, 20, 80, 0.35);
}

.gp-auth__visual-phrase {
    margin: 0 0 18px;
    padding-left: 14px;
    border-left: 2px solid rgba(158, 233, 255, 0.85);
    font-family: var(--gp-font);
    font-style: normal;
    font-weight: 400;
    font-size: clamp(0.98rem, 1.85vh, 1.12rem);
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.94);
    max-width: 36ch;
}

.gp-auth__visual-secure {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--gp-font);
    font-style: normal;
    font-weight: 400;
    font-size: clamp(0.82rem, 1.45vh, 0.92rem);
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.78);
}

.gp-auth__visual-secure i {
    color: #9ee9ff;
    font-size: 0.9em;
    flex-shrink: 0;
}

.gp-auth__visual-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.gp-auth__visual-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.95);
}

.gp-auth__visual-benefits i {
    color: #9ee9ff;
    width: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    text-align: center;
}

.gp-auth__access-options {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.gp-auth__access-option {
    position: relative;
}

.gp-auth__access-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gp-auth__access-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius-input);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gp-auth__access-option input:checked + label {
    border-color: var(--gp-primary);
    background: var(--gp-primary-soft);
    box-shadow: 0 0 0 3px rgba(7, 97, 255, 0.12);
}

.gp-auth__access-option label i {
    color: var(--gp-primary);
    width: 22px;
    text-align: center;
}

.gp-auth__access-option strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gp-text);
}

.gp-auth__access-option small {
    display: block;
    color: var(--gp-text-muted);
    font-size: 0.78rem;
}

.gp-auth .select2-container {
    width: 100% !important;
}

.gp-auth .select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.gp-auth .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #555;
    line-height: 42px;
    padding-left: 4px;
}

.gp-auth .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 8px;
}

.gp-auth .select2-dropdown {
    border-color: var(--gp-border);
    border-radius: var(--gp-radius-input);
    overflow: hidden;
}

.gp-auth .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--gp-primary);
}

@keyframes gp-auth-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gp-auth-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes gp-auth-float-media {
    0%, 100% { transform: scale(1.04) translateY(0); }
    50% { transform: scale(1.06) translateY(-8px); }
}

@keyframes gp-auth-pulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 960px) {
    body.gp-auth-body:has(.gp-auth) > main,
    html.gp-auth-html:has(.gp-auth) main,
    main:has(.gp-auth),
    body.gp-auth-body:has(.gp-auth) {
        padding: 16px !important;
        align-items: center;
    }

    .gp-auth {
        grid-template-columns: 1fr;
        width: min(440px, 100%);
        height: auto;
        max-height: calc(100vh - 32px);
        min-height: 0;
    }

    .gp-auth__visual {
        display: none;
    }

    .gp-auth__form-pane {
        grid-column: 1;
        max-width: none;
        padding: 32px 24px;
        overflow-y: auto;
    }
}

@media (max-height: 720px) {
    .gp-auth__brand img,
    .gp-auth__brand-icon {
        height: 1.75rem;
        width: 1.75rem;
    }

    .gp-auth__steps {
        display: none;
    }

    .gp-auth__visual-card {
        animation: none;
    }

    .gp-auth__visual-benefits li:nth-child(n+4) {
        display: none;
    }

    .gp-auth__visual-media img {
        animation: none;
        transform: scale(1.02);
    }
}

/* Formulários densos (login / criar conta / recuperar senha) */
.gp-auth.gp-auth--dense {
    overflow: visible;
}

.gp-auth--dense .gp-auth__form-pane {
    justify-content: flex-start;
    padding-top: clamp(10px, 2vh, 24px);
    padding-bottom: clamp(10px, 2vh, 24px);
    overflow: visible;
}

/* Login / Município: poucos campos — mantém centralizado na vertical */
.gp-auth--dense:has(.gp-auth__steps) .gp-auth__form-pane {
    justify-content: center;
}

.gp-auth--dense .gp-auth__steps {
    margin-bottom: clamp(10px, 1.8vh, 16px);
}

.gp-auth--dense .gp-auth__step {
    font-size: 0.75rem;
}

.gp-auth--dense .gp-auth__step-num {
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
}

.gp-auth--dense .gp-auth__brand {
    margin-bottom: clamp(8px, 1.5vh, 16px);
}

.gp-auth--dense .gp-auth__brand img,
.gp-auth--dense .gp-auth__brand-icon {
    height: 1.5rem;
    width: 1.5rem;
    max-height: none;
    max-width: none;
}

/* Marca GestorPrev (telas auth) */
.gp-auth--brand-lg .gp-auth__brand {
    margin-bottom: clamp(10px, 1.8vh, 18px);
    gap: 10px;
}

.gp-auth--brand-lg .gp-auth__brand img,
.gp-auth--brand-lg .gp-auth__brand-icon {
    height: 2.15rem;
    width: 2.15rem;
}

.gp-auth--brand-lg .gp-auth__brand-fallback {
    font-size: 2.15rem;
}

.gp-auth--dense .gp-auth__title {
    font-size: clamp(1.1rem, 2vh, 1.3rem);
    margin-bottom: 4px;
}

.gp-auth--dense .gp-auth__subtitle {
    margin-bottom: clamp(6px, 1.2vh, 12px);
    font-size: 0.875rem;
}

.gp-auth--dense .gp-auth__field {
    margin-bottom: clamp(4px, 1vh, 10px);
}

.gp-auth--dense .gp-auth__label {
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.gp-auth--dense .gp-auth__input,
.gp-auth--dense .gp-auth__select,
.gp-auth--dense select.gp-auth__select {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.gp-auth--dense .gp-auth__btn {
    min-height: 38px;
    padding: 8px 16px;
    margin-top: 2px;
    font-size: 0.9rem;
    font-weight: 400;
}

.gp-auth--dense .gp-auth__check {
    margin: 2px 0 clamp(6px, 1.2vh, 10px);
    font-size: 0.875rem;
}

.gp-auth--dense .gp-auth__password-wrap .gp-auth__input {
    padding-right: 44px;
}

.gp-auth--dense .gp-auth__links {
    margin-top: 12px;
}

.gp-auth--dense .gp-auth__footer {
    margin-top: clamp(8px, 1.5vh, 16px);
}

@media (max-height: 780px) {
    .gp-auth--dense .gp-auth__footer {
        display: none;
    }
}

/* Seleção de perfil: tela cheia (não herda o card centralizado do login) */
html:has(body.gp-perfil-body),
body.gp-perfil-body,
body.gp-auth-body.gp-perfil-body,
html.gp-auth-html:has(body.gp-perfil-body),
main:has(.gp-perfil) {
    display: block !important;
    overflow: auto !important;
    max-height: none !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    background: #fff !important;
    width: 100% !important;
}

body.gp-perfil-body > main,
main:has(.gp-perfil) {
    height: auto !important;
    max-height: none !important;
    min-height: 100vh !important;
    overflow: visible !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
}

.gp-perfil-body.page-body {
    background: #fff !important;
}

.gp-perfil {
    min-height: 100vh;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    background: #fff;
    font-family: var(--gp-font);
    color: #4a4a4a;
}

.gp-perfil__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 20px;
    background: #1a1f2a;
    color: #fff;
    flex-shrink: 0;
}

.gp-perfil__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.gp-perfil__brand:hover {
    color: #fff;
    text-decoration: none;
    opacity: 0.92;
}

.gp-perfil__brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: transparent;
    display: block;
    object-fit: contain;
}

.gp-perfil__brand-text {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.gp-perfil__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #3a4254;
    border: 2px solid rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
}

.gp-perfil__entidade {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.gp-perfil__entidade-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #555;
    font-size: 0.875rem;
    max-width: 100%;
}

.gp-perfil__entidade-link:hover {
    color: var(--gp-primary);
    text-decoration: none;
}

.gp-perfil__entidade-crest {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0c14a, #2f6fed 55%, #1e9e4a);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.gp-perfil__entidade-label {
    font-weight: 400;
    color: #666;
}

.gp-perfil__entidade-nome {
    font-weight: 400;
    color: #444;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-perfil__entidade-chevron {
    font-size: 0.7rem;
    color: #888;
    margin-left: 2px;
}

.gp-perfil__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px 32px;
    box-sizing: border-box;
}

.gp-perfil__title {
    margin: 0;
    font-size: clamp(1.1rem, 2vh, 1.3rem);
    font-weight: 400;
    color: #5a5a5a;
    line-height: 1.3;
}

.gp-perfil__divider {
    border: 0;
    border-top: 1px solid #ececec;
    margin: 12px 0 0;
    width: 100%;
}

.gp-perfil__cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 20px 16px 28px;
    width: 100%;
    box-sizing: border-box;
}

.gp-perfil__card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    max-width: 480px;
    min-height: 76px;
    padding: 16px 24px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #f5f5f5;
    color: #555;
    font-family: var(--gp-font);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.gp-perfil__card:hover {
    background: #eef3ff;
    border-color: #c9dbff;
    box-shadow: 0 2px 10px rgba(7, 97, 255, 0.08);
}

.gp-perfil__card:active {
    transform: translateY(1px);
}

.gp-perfil__card:focus-visible {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(7, 97, 255, 0.18);
}

.gp-perfil__card:disabled {
    opacity: 0.7;
    cursor: wait;
}

.gp-perfil__card.is-loading {
    border-color: var(--gp-primary);
    background: #e8f0ff;
}

.gp-perfil__card-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    color: #5b9dff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gp-perfil__card-icon svg {
    width: 40px;
    height: 40px;
}

.gp-perfil__card-label {
    font-size: 1.05rem;
    font-weight: 400;
    color: #555;
    line-height: 1.3;
}

@media (max-width: 640px) {
    .gp-perfil__main {
        padding: 20px 16px 32px;
    }

    .gp-perfil__entidade {
        padding: 0 16px;
    }

    .gp-perfil__title {
        font-size: 1.1rem;
    }

    .gp-perfil__card {
        max-width: 100%;
        min-height: 68px;
        padding: 14px 18px;
        gap: 14px;
    }

    .gp-perfil__card-label {
        font-size: 1rem;
    }
}

