:root {
    --brand-blue: #0b2d5c;
    --brand-blue-light: #16457f;
    --brand-gold: #d9aa3c;
    --brand-green: #37b56f;
    --surface: #f4f7fb;
    --line: #dde5ef;
    --text: #1f2937;
}

body {
    background: var(--surface);
    color: var(--text);
}

a {
    text-decoration: none;
}

.public-navbar,
.access-bar {
    background: var(--brand-blue);
}

.site-header {
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.access-bar {
    border-bottom: 3px solid var(--brand-green);
    color: #fff;
    font-size: .82rem;
    padding: 8px 0;
}

.access-shortcuts,
.access-links,
.brand-actions,
.social-links,
.site-search {
    display: flex;
    align-items: center;
}

.access-shortcuts,
.access-links {
    gap: 10px;
    flex-wrap: wrap;
}

.access-bar a {
    color: #fff;
    font-weight: 700;
}

.access-shortcuts a {
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 5px;
    padding: 4px 10px;
}

.access-shortcuts span {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .18);
}

.brand-bar {
    padding: 24px 0;
}

.brand-logo {
    color: var(--text);
}

.brand-logo img {
    width: min(100%, 360px);
    max-height: 96px;
    object-fit: contain;
    display: block;
}

.brand-title {
    color: var(--brand-blue);
}

.brand-subtitle {
    color: #5f6f85;
}

.brand-actions {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-links {
    gap: 12px;
}

.social-links a {
    color: var(--brand-blue-light);
    font-size: 1.8rem;
    line-height: 1;
    border: 0;
    background: transparent;
    width: auto;
    height: auto;
}

.social-links a:hover {
    color: var(--brand-green);
    background: transparent;
}

.site-search {
    width: min(100%, 360px);
    min-width: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.site-search .form-control {
    border: 1px solid #ced7e2;
    border-radius: 5px 0 0 5px;
    min-height: 42px;
    min-width: 0;
}

.site-search .btn {
    background: #f3f6fa;
    border: 1px solid #ced7e2;
    border-left: 0;
    border-radius: 0 5px 5px 0;
    min-height: 42px;
    color: #0b1f3d;
    width: 48px;
}

.public-navbar {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.theme-ouvidoria .public-navbar {
    background: #0f766e;
}

.public-navbar .nav-link {
    color: rgba(255, 255, 255, .88);
    font-weight: 700;
    padding: 14px 18px;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border-radius: 0;
}

.site-footer {
    background: var(--brand-blue);
    border-top: 4px solid var(--brand-green);
    color: #fff;
}

.footer-content {
    display: grid;
    grid-template-columns: 280px 1fr 1fr;
    gap: 28px;
    padding: 32px 0 18px;
}

.footer-logo-box {
    background: rgba(255, 255, 255, .06);
    border-radius: 8px;
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 20px;
}

.footer-logo-box img {
    width: 100%;
    max-width: 250px;
    max-height: none;
    object-fit: contain;
}

.footer-info {
    display: grid;
    align-content: start;
    gap: 26px;
}

.footer-contact-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    min-height: 124px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    overflow: hidden;
    padding-left: 0;
}

.footer-card-label {
    background: #25c95a;
    color: #061b38;
    display: grid;
    place-items: center;
    font-weight: 900;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .04em;
    font-size: .85rem;
    margin: 0;
}

.footer-card-body {
    padding: 18px;
    display: grid;
    gap: 5px;
    align-content: center;
    color: #fff;
    font-size: .94rem;
}

.footer-card-body span,
.footer-card-body strong {
    display: block;
}

.footer-card-body strong {
    color: #fff;
}

.footer-inline-link {
    color: #fff;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-inline-link:hover {
    color: var(--brand-green);
}

.footer-social h2,
.footer-apps h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.footer-social-links,
.footer-app-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-social-links a {
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    background: transparent;
    border: 0;
    width: auto;
    height: auto;
}

.footer-social-links a:hover {
    color: var(--brand-green);
    background: transparent;
}

.footer-app-buttons a {
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 182px;
    padding: 11px 16px;
    font-size: .8rem;
    line-height: 1.15;
}

.footer-app-buttons i {
    font-size: 1.75rem;
}

.footer-app-buttons a:hover {
    background: rgba(255, 255, 255, .1);
}

.footer-bottom {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .92rem;
    padding: 14px 0;
    text-align: center;
}

.hero,
.public-hero {
    background: linear-gradient(135deg, rgba(11, 45, 92, .96), rgba(22, 69, 127, .84));
    color: #fff;
    padding: 72px 0 54px;
}

.theme-ouvidoria .public-hero {
    background: linear-gradient(135deg, rgba(11, 45, 92, .94), rgba(15, 118, 110, .86));
}

.hero h1,
.public-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0;
}

.stat-card,
.document-card,
.filter-panel,
.content-panel,
.login-card,
.card-soft {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.stat-card {
    padding: 22px;
}

.stat-card strong {
    display: block;
    color: var(--brand-blue);
    font-size: 2rem;
    line-height: 1;
}

.btn-primary {
    --bs-btn-bg: var(--brand-blue);
    --bs-btn-border-color: var(--brand-blue);
    --bs-btn-hover-bg: var(--brand-blue-light);
    --bs-btn-hover-border-color: var(--brand-blue-light);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-blue);
    --bs-btn-border-color: var(--brand-blue);
    --bs-btn-hover-bg: var(--brand-blue);
    --bs-btn-hover-border-color: var(--brand-blue);
}

@media (max-width: 991.98px) {
    .brand-bar {
        padding: 18px 0;
    }

    .brand-logo img {
        max-height: 78px;
    }

    .brand-actions,
    .site-search {
        width: 100%;
    }

    .social-links {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-logo-box {
        min-height: auto;
    }
}
