:root {
    --primary-dark: #0D3B66;
    --primary-medium: #1E5FAF;
    --accent-green: #2FA36B;
    --light-green: #5CC8A1;
    --alert-yellow: #F4B400;
    --page-bg: #F5F7FA;
    --white: #FFFFFF;
    --text-gray: #555;
    --border: #E4EAF1;
    --muted: #7A8794;
    --shadow: 0 16px 35px rgba(13, 59, 102, 0.10);
    --shadow-soft: 0 8px 20px rgba(13, 59, 102, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-gray);
    font-family: "Inter", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.portal-header {
    position: relative;
    overflow: hidden;
    width: 100%;
    color: var(--white);
    background:
        linear-gradient(120deg, rgba(13, 59, 102, 0.96), rgba(30, 95, 175, 0.92) 58%, rgba(47, 163, 107, 0.94)),
        var(--primary-dark);
    box-shadow: 0 7px 24px rgba(13, 59, 102, 0.22);
}

.portal-header__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 28px;
    width: min(1400px, calc(100% - 40px));
    min-height: 120px;
    margin: 0 auto;
    padding: 15px 0;
}

.portal-header__decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.portal-header__decor::before,
.portal-header__decor::after {
    content: "";
    position: absolute;
    right: -80px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    transform: rotate(-12deg);
}

.portal-header__decor::before {
    top: -70px;
    width: 360px;
    height: 210px;
    border-radius: 50%;
}

.portal-header__decor::after {
    bottom: -95px;
    width: 470px;
    height: 270px;
    border-radius: 48%;
    background: rgba(255, 255, 255, 0.07);
}

.portal-logo {
    width: 140px;
    max-width: 35vw;
    height: auto;
    flex: 0 0 auto;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.20));
}

.portal-header__text {
    max-width: 740px;
}

.portal-kicker {
    margin: 0 0 6px;
    font-size: 1.08rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.portal-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: 0;
}

.portal-title-line {
    display: block;
    width: 120px;
    height: 4px;
    margin: 8px 0;
    border-radius: 999px;
    background: var(--light-green);
}

.portal-subtitle {
    margin: 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
}

.portal-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 18px rgba(13, 59, 102, 0.08);
}

.portal-nav__inner {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    border-bottom: 3px solid transparent;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 700;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
    background: rgba(47, 163, 107, 0.06);
}

.portal-main {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 58px;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.indicator-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 128px;
    padding: 22px;
    border: 1px solid rgba(228, 234, 241, 0.9);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.indicator-card:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 163, 107, 0.28);
    box-shadow: var(--shadow);
}

.indicator-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.35rem;
}

.indicator-card--blue .indicator-icon {
    background: var(--primary-medium);
}

.indicator-card--green .indicator-icon {
    background: var(--accent-green);
}

.indicator-card--yellow .indicator-icon {
    background: var(--alert-yellow);
}

.indicator-card strong {
    display: block;
    color: var(--primary-dark);
    font-size: 2rem;
    line-height: 1;
}

.indicator-card span:last-child {
    display: block;
    margin-top: 6px;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 700;
}

.process-section {
    margin-top: 8px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-heading p {
    margin: 0 0 4px;
    color: var(--accent-green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.15;
}

.table-card {
    overflow: hidden;
    border: 1px solid rgba(228, 234, 241, 0.9);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    color: var(--primary-dark);
    background: #F8FAFC;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

tbody tr:hover {
    background: #FAFCFE;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.process-number {
    color: var(--primary-medium);
    font-weight: 800;
    white-space: nowrap;
}

.process-object {
    min-width: 280px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-iniciado {
    color: #6D4A00;
    background: #FFF3CD;
}

.status-andamento {
    color: #123F72;
    background: #DDEBFF;
}

.status-prorrogacao {
    color: var(--white);
    background: var(--primary-medium);
}

.status-concluido {
    color: #126143;
    background: #DDF6EB;
}

.icon-link,
.btn-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-link {
    width: 38px;
    height: 38px;
    color: var(--primary-medium);
    background: rgba(30, 95, 175, 0.10);
}

.icon-link:hover {
    color: var(--white);
    background: var(--accent-green);
}

.btn-portal {
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    color: var(--white);
    background: var(--primary-medium);
    font-size: 0.86rem;
}

.btn-portal:hover {
    transform: translateY(-1px);
    background: var(--accent-green);
}

.btn-portal--green {
    background: var(--accent-green);
}

.btn-portal--green:hover {
    background: var(--primary-dark);
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.muted {
    color: var(--muted);
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 210px;
    color: var(--muted);
    text-align: center;
}

.empty-state i {
    color: var(--primary-medium);
    font-size: 2rem;
}

.empty-state p {
    margin: 0;
    font-weight: 700;
}

.portal-footer {
    color: var(--white);
    background: var(--primary-dark);
}

.portal-footer__inner {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 30px;
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 15px;
}

.portal-footer h3 {
    margin: 0 0 8px;
    color: var(--light-green);
    font-size: 1.15rem;
}

.portal-footer p {
    margin: 0 0 9px;
    color: rgba(255, 255, 255, 0.82);
}

.footer-contact {
    display: grid;
    gap: 6px;
    align-content: start;
}

.footer-contact i {
    width: 20px;
    color: var(--light-green);
}

.portal-footer__bottom {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    text-align: center;
}

@media (max-width: 980px) {
    .indicator-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .portal-header__content {
        align-items: flex-start;
        min-height: 0;
        padding: 26px 0;
    }

    .portal-logo {
        width: 120px;
    }

    .portal-title-line {
        width: 90px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-list {
        display: none;
        align-items: stretch;
        min-height: 0;
        padding: 0 0 12px;
    }

    .nav-list.is-open {
        display: grid;
    }

    .nav-list a {
        min-height: 46px;
        padding: 0 4px;
        border-bottom: 0;
    }

    .nav-list a.active,
    .nav-list a:hover {
        padding-left: 12px;
        border-radius: 8px;
    }

    .portal-main {
        padding-top: 20px;
    }

    .indicator-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .indicator-card {
        min-height: 108px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-footer__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .portal-header__content {
        flex-direction: column;
        gap: 16px;
    }

    .portal-logo {
        max-width: 150px;
    }

    .portal-main,
    .portal-nav__inner, /* Mantém a largura total para o menu em telas pequenas */
    .portal-header__content, /* Mantém a largura total para o cabeçalho em telas pequenas */
    .portal-footer__inner, /* Mantém a largura total para o rodapé em telas pequenas */
    .portal-footer__bottom /* Mantém a largura total para o rodapé em telas pequenas */ {
        width: min(100% - 28px, 1400px); /* Ajustado para a nova largura máxima */
    }

    .indicator-card {
        padding: 18px;
    }

    .indicator-card strong {
        font-size: 1.75rem;
    }
}
