:root {
    --brand: #0326A6;
    --brand-dark: #021B73;
    --brand-mid: #162687;
    --brand-light: #E8EEFC;
    --brand-soft: rgba(3, 38, 166, 0.12);
    --white: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(3, 38, 166, 0.08);
    --shadow-hover: 0 8px 32px rgba(3, 38, 166, 0.15);
    --radius: 8px;
    --container: 1200px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-dark); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header — padrão portal FBAC, paleta APAC */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 160;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.site-header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 88px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    min-width: 0;
}

.site-logo {
    height: 64px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    background: var(--brand);
    border-radius: 10px;
    padding: 6px;
}

.site-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    align-items: center;
    justify-content: center;
}

.site-brand-mark__badge {
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: .04em;
}

.site-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-brand-text strong {
    font-size: 1rem;
    color: var(--brand-dark);
    line-height: 1.2;
}

.site-brand-text small {
    color: var(--text-muted);
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.site-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: .1rem;
}
.site-nav-item { position: relative; }

.site-nav-item > a:not(.site-nav-cta),
.site-nav-trigger {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .65rem .75rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.site-nav-item > a:not(.site-nav-cta):hover,
.site-nav-trigger:hover,
.site-nav-item.is-open .site-nav-trigger {
    color: var(--brand);
}

.site-nav-item--cta { margin-left: .25rem; }
.site-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem 1.15rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--white);
    background: var(--brand);
    border: 2px solid var(--brand);
    box-shadow: 0 4px 14px rgba(3, 38, 166, .28);
}
.site-nav-cta:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: var(--white);
}

.site-nav-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.site-nav-item.is-open .site-nav-caret { transform: rotate(180deg); }

.site-submenu {
    list-style: none;
    margin: 0;
    padding: .5rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 200;
}

.site-nav-item.has-submenu:hover .site-submenu,
.site-nav-item.is-open .site-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-submenu a {
    display: block;
    padding: .6rem 1rem;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
}
.site-submenu a:hover {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.site-header-actions { display: contents; }

.site-header-help-chat {
    display: inline-flex;
    align-items: center;
    padding: .55rem 1rem;
    border: 2px solid var(--brand);
    border-radius: 999px;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: .8125rem;
    font-weight: 700;
    white-space: nowrap;
}
.site-header-help-chat:hover {
    background: var(--brand);
    color: var(--white);
}

.site-nav-toggle,
.site-nav__head,
.site-nav-close,
.site-nav-backdrop,
.site-nav__title {
    display: none;
}

body.nav-locked { overflow: hidden; }
main { min-height: 55vh; }

/* Home */
.home-hero {
    position: relative;
    min-height: calc(100svh - 7rem);
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(2, 27, 115, .88) 0%, rgba(3, 38, 166, .72) 55%, rgba(22, 38, 135, .65) 100%),
        radial-gradient(circle at 20% 20%, #4d6ad4 0%, transparent 40%);
    color: var(--white);
    overflow: hidden;
}

.home-hero__inner {
    max-width: 46rem;
    padding: 4rem 0;
}

.home-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 700;
    margin: 0 0 .75rem;
    color: #c9d4ff;
}

.home-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.home-hero p {
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
    color: rgba(255,255,255,.9);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.35rem;
    border-radius: 999px;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: .95rem;
}
.btn-brand {
    background: var(--white);
    color: var(--brand-dark);
}
.btn-brand:hover { background: var(--brand-light); color: var(--brand-dark); }
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.55);
    margin-left: .5rem;
}
.btn-outline:hover { background: rgba(255,255,255,.12); color: var(--white); }

.home-cards {
    padding: 3rem 0 4rem;
    background: #f8fafc;
}
.home-cards h2 {
    margin: 0 0 1.5rem;
    color: var(--brand-dark);
    font-size: 1.4rem;
}
.grid-3 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: box-shadow .2s, transform .2s;
    color: inherit;
    display: block;
}
.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: inherit;
}
.card h3 {
    margin: 0 0 .5rem;
    color: var(--brand);
    font-size: 1.05rem;
}
.card p { margin: 0; color: var(--text-muted); font-size: .95rem; }

.page-hero {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 100%);
    color: var(--white);
    padding: 2.25rem 0;
}
.page-hero h1 { margin: 0 0 .35rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.page-hero p { margin: 0; color: rgba(255,255,255,.88); }

.page-body {
    padding: 2.25rem 0 3.5rem;
}
.prose {
    max-width: 46rem;
    margin: 0 auto;
}
.prose h2 { color: var(--brand-dark); }
.prose table {
    width: 100%;
    border-collapse: collapse;
}
.page-body table {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 1.5rem;
    background: var(--white);
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.page-body th,
.page-body td {
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.page-body th {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: .85rem;
}
.page-body img { max-width: 100%; height: auto; }

.form-card,
.page-body form {
    max-width: 720px;
    margin: 0 auto;
}
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}
input[type="submit"],
button[type="submit"] {
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .7rem 1.4rem;
    font-weight: 700;
    cursor: pointer;
}
input[type="submit"]:hover,
button[type="submit"]:hover { background: var(--brand-dark); }

.question {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.question input,
.question .answer { display: none; }
.question label {
    display: block;
    font-weight: 600;
    color: var(--brand);
    cursor: pointer;
    width: 100%;
}
.question input:checked ~ .answer {
    display: block;
    color: var(--text);
    margin-top: .5rem;
}

.site-footer {
    background: #0f172a;
    color: rgba(255, 255, 255, .82);
    padding: 1.75rem 0 1.5rem;
    font-size: .875rem;
}
.site-footer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    flex-wrap: wrap;
    padding-bottom: 1.15rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-footer__address { margin: 0; max-width: 36rem; line-height: 1.45; }
.site-footer__actions { margin-left: auto; }
.site-footer__links { display: flex; gap: .75rem; flex-wrap: wrap; }
.site-footer__links a {
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(3, 38, 166, .45);
    background: rgba(3, 38, 166, .22);
    color: #9eb4ff;
    font-weight: 700;
}
.site-footer__links a:hover {
    background: var(--brand);
    color: var(--white);
}
.site-footer__copy {
    margin: 0;
    text-align: center;
    color: rgba(255,255,255,.65);
    font-size: .8rem;
}

/* Compatibilidade com páginas antigas (sidebar) */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 88px;
    background: var(--white);
    color: var(--brand-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.logo-container { display: flex; align-items: center; }
.logo-container img {
    height: 52px;
    width: auto;
    object-fit: contain;
    margin-right: 10px;
    background: var(--brand);
    border-radius: 10px;
    padding: 4px;
}
.logo-container span { font-size: 1rem; font-weight: 700; }
.open-btn, .close-btn {
    font-size: 28px;
    background: none;
    border: none;
    color: var(--brand);
    cursor: pointer;
    display: none;
}
.sidebar {
    height: calc(100% - 88px);
    width: 250px;
    position: fixed;
    top: 88px;
    left: 0;
    background: var(--brand-mid);
    padding-top: 12px;
    overflow-y: auto;
    z-index: 900;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar ul li { padding: 4px 12px; }
.sidebar ul li a {
    color: white;
    display: block;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 6px;
}
.sidebar ul li a:hover { background: var(--brand-dark); }
.content {
    margin-left: 250px;
    padding: 24px;
}
.sidebar1 td[bgcolor="#162687"],
.sidebar td[bgcolor="#162687"] {
    background: var(--brand-dark) !important;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.filter-bar label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: .35rem;
}
.filter-bar select,
.filter-bar input[type="text"] {
    min-width: 16rem;
}
.entity-meta {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--brand-light);
    border-radius: var(--radius);
    color: var(--brand-dark);
}
.entity-meta strong { display: block; font-size: 1.05rem; }
.data-list {
    display: grid;
    gap: 1rem;
}
.data-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow);
}
.data-item h3 {
    margin: 0 0 .5rem;
    color: var(--brand);
    font-size: 1.05rem;
}
.data-item p { margin: .25rem 0; color: var(--text); }
.data-item .btn { margin-top: .75rem; }
.person-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.person-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}
.person-card img {
    width: 88px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--brand-light);
}
.person-card h3 {
    margin: 0 0 .25rem;
    font-size: 1rem;
    color: var(--brand-dark);
}
.person-card p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.form-stack {
    display: grid;
    gap: .9rem;
    max-width: 40rem;
}
.form-stack label { font-weight: 600; color: var(--brand-dark); }
.empty-note {
    color: var(--text-muted);
    padding: 1.5rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

@media (max-width: 960px) {
    .site-header-help-chat,
    .site-nav-item--cta { display: none; }
    .site-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--white);
        color: var(--text);
        cursor: pointer;
        font-size: 1.2rem;
    }
    .site-header-actions {
        display: flex;
        align-items: center;
        gap: .5rem;
        margin-left: auto;
    }
    .site-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 165;
    }
    .site-header.is-nav-open .site-nav-backdrop { display: block; }
    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: min(320px, 88vw);
        background: var(--white);
        z-index: 170;
        transform: translateX(100%);
        transition: transform .25s;
        box-shadow: var(--shadow-hover);
        justify-content: flex-start;
    }
    .site-header.is-nav-open .site-nav { transform: translateX(0); }
    .site-nav__inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 1rem;
        overflow: auto;
    }
    .site-nav__head {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .site-nav__title { display: block; font-weight: 700; color: var(--brand-dark); }
    .site-nav-close {
        display: inline-flex;
        border: 0;
        background: none;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text);
    }
    .site-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .site-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        display: none;
        padding-left: .5rem;
    }
    .site-nav-item.is-open .site-submenu { display: block; }
    .home-hero { min-height: auto; }
    .btn-outline { margin: .5rem 0 0; display: inline-flex; }
    .open-btn { display: block; }
    .sidebar { left: -250px; }
    .sidebar.active { left: 0; }
    .content { margin-left: 0; }
}
