:root {
    --gobarito-topbar-height: 54px;
    --gobarito-topbar-bg: rgba(248, 251, 255, 0.84);
    --gobarito-topbar-border: rgba(11, 61, 145, 0.08);
    --gobarito-topbar-text: #4b5b7a;
    --gobarito-topbar-text-strong: #0b3d91;
    --gobarito-topbar-pill: #ffffff;
    --gobarito-topbar-pill-border: rgba(11, 61, 145, 0.08);
    --gobarito-topbar-shadow: none;
}

body.gobarito-has-topbar {
    flex-direction: column;
}

.gobarito-mini-topbar {
    height: var(--gobarito-topbar-height);
    min-height: var(--gobarito-topbar-height);
    border-bottom: 1px solid var(--gobarito-topbar-border);
    background: var(--gobarito-topbar-bg);
    backdrop-filter: blur(16px);
    box-shadow: var(--gobarito-topbar-shadow);
    position: relative;
    z-index: 30;
    box-sizing: border-box;
}

.gobarito-mini-topbar.no-print {
    display: block;
}

.gobarito-mini-topbar-inner {
    width: min(1280px, calc(100% - 28px));
    height: 100%;
    min-height: calc(var(--gobarito-topbar-height) - 1px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}

.gobarito-mini-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 28px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}

.gobarito-mini-brand img {
    width: auto;
    height: 28px;
    display: block;
}

.gobarito-mini-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.gobarito-mini-nav a,
.gobarito-login-placeholder {
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.gobarito-mini-nav a {
    border: 1px solid transparent;
    color: var(--gobarito-topbar-text);
    font-size: 0.92rem;
    font-weight: 600;
}

.gobarito-mini-nav a:hover {
    color: var(--gobarito-topbar-text-strong);
    background: rgba(11, 94, 215, 0.04);
}

.gobarito-mini-nav a.is-active {
    color: var(--gobarito-topbar-text-strong);
    background: var(--gobarito-topbar-pill);
    border-color: var(--gobarito-topbar-pill-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.gobarito-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 34px;
    min-width: 150px;
    flex-shrink: 0;
}

.gobarito-login-placeholder {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: not-allowed;
    min-width: 132px;
    justify-content: center;
}

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

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

body.gobarito-has-topbar .paper-container {
    flex: 1 1 auto;
    min-height: 0;
}

body.gobarito-has-topbar > .gobarito-mini-topbar {
    flex: 0 0 var(--gobarito-topbar-height);
}

body.gobarito-has-topbar .paper-footer-wrap {
    padding-bottom: 20px;
}

body.gobarito-corrige-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(42, 115, 232, 0.12), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

body.gobarito-corrige-page .gobarito-mini-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

body.gobarito-corrige-page .container {
    width: min(900px, calc(100% - 32px));
    margin: 20px auto 28px;
}

@media (max-width: 900px) {
    .gobarito-mini-topbar {
        height: auto;
    }

    .gobarito-mini-topbar-inner {
        width: calc(100% - 20px);
        padding: 10px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .gobarito-mini-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .gobarito-topbar-actions {
        min-width: auto;
    }
}

@media print {
    .gobarito-mini-topbar {
        display: none !important;
    }
}
