.gobarito-auth-required-nav {
    display: none !important;
}

body.gobarito-authenticated .gobarito-auth-required-nav {
    display: inline-flex !important;
}

.gobarito-auth-area {
    position: relative;
}

.gobarito-login-placeholder.gobarito-auth-button {
    height: 34px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    text-decoration: none;
    white-space: nowrap;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    min-width: 116px;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.gobarito-login-placeholder.gobarito-auth-button:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 94, 215, 0.16);
}

.gobarito-login-mark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #0b5ed7);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.gobarito-login-placeholder.gobarito-auth-button:disabled,
.gobarito-login-placeholder.gobarito-auth-button.is-busy {
    cursor: wait;
    opacity: 0.72;
}

.gobarito-login-placeholder.gobarito-auth-button.is-authenticated {
    min-width: 0;
    max-width: 170px;
    padding: 0 10px 0 8px;
}

.gobarito-login-placeholder.gobarito-auth-button.is-authenticated span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.gobarito-auth-avatar {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e7efff;
    color: #0b4fb3;
    font-weight: 800;
    object-fit: cover;
    flex: 0 0 auto;
}

.gobarito-auth-avatar-button {
    width: 22px;
    height: 22px;
    font-size: 0.74rem;
}

.gobarito-account-avatar {
    width: 42px;
    height: 42px;
    font-size: 1rem;
}

.gobarito-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 120;
    width: min(300px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
}

.gobarito-account-profile {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 6px 4px 10px;
}

.gobarito-account-profile-text {
    min-width: 0;
}

.gobarito-account-profile-text strong,
.gobarito-account-profile-text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gobarito-account-profile-text strong {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.25;
}

.gobarito-account-profile-text span {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 2px;
}

.gobarito-account-menu-divider {
    height: 1px;
    margin: 4px 0;
    background: rgba(15, 23, 42, 0.08);
}

.gobarito-account-menu-item {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.gobarito-account-menu-item:hover {
    background: #f4f7fb;
}

.gobarito-account-menu-item[aria-disabled='true'] {
    color: #64748b;
    cursor: default;
}

.gobarito-account-menu-item[aria-disabled='true']:hover {
    background: transparent;
}

.gobarito-account-menu-item-danger {
    color: #b42318;
}

.gobarito-auth-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 240;
    max-width: min(360px, calc(100vw - 36px));
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 700;
}

.gobarito-auth-toast[data-state='error'] {
    border-color: rgba(180, 35, 24, 0.26);
    color: #b42318;
}

body.gobarito-auth-locked > main.corrige-page,
body.gobarito-auth-locked > .modal-overlay,
body.gobarito-auth-locked > .corrige-modal,
body.gobarito-auth-locked > canvas.corrige-processing-canvas,
body.gobarito-auth-locked > .corrige-status {
    display: none !important;
}

.gobarito-access-gate {
    width: min(720px, calc(100% - 32px));
    min-height: calc(100vh - var(--corrige-top-offset, var(--gobarito-topbar-height)));
    margin: 0 auto;
    display: grid;
    place-items: center;
    box-sizing: border-box;
}

.gobarito-access-gate[hidden] {
    display: none !important;
}

.gobarito-access-gate.is-overlay {
    position: fixed;
    inset: var(--gobarito-topbar-height) 0 0;
    z-index: 105;
    width: 100%;
    min-height: 0;
    background: rgba(248, 251, 255, 0.96);
}

.gobarito-access-panel {
    width: min(420px, 100%);
    border: 1px solid rgba(11, 94, 215, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
    padding: 24px;
    text-align: left;
    box-sizing: border-box;
}

.gobarito-access-eyebrow {
    display: block;
    color: #0b5ed7;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.gobarito-access-panel h1 {
    margin: 8px 0 8px;
    color: #0f172a;
    font-size: 1.45rem;
    line-height: 1.18;
    letter-spacing: 0;
}

.gobarito-access-panel p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.gobarito-access-login-btn {
    height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 0 14px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.gobarito-access-login-btn:hover {
    border-color: rgba(11, 94, 215, 0.22);
    background: #f8fbff;
}

.gobarito-access-status {
    min-height: 20px;
    margin-top: 14px;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
}

.gobarito-access-status[data-state='error'] {
    color: #b42318;
}

.gobarito-access-status[data-state='loading'] {
    color: #0b5ed7;
}

@media (max-width: 900px) {
    .gobarito-account-menu {
        right: 50%;
        transform: translateX(50%);
    }

    .gobarito-access-panel {
        padding: 20px;
    }
}
