@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700;800;900&display=swap");

/* ========================= */
/* RESET GLOBAL */
/* ========================= */

html, body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0b2b57;
    font-family: "Exo 2", Arial, sans-serif;
}

#_dash-app-content {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ========================= */
/* VARIAVEIS GERAIS */
/* ========================= */

:root {
    --sidebar-width: 250px;
    --sidebar-min: 250px;
    --sidebar-max: 250px;
    --sidebar-bg: #0b2b57;
    --content-bg: #ffffff;
    --text-light: #ffffff;
    --text-dark: #0b2b57;
    --text-active: #b30000;
    --border-light: rgba(255, 255, 255, 0.25);
    --submenu-bg: rgba(255, 255, 255, 0.04);
    --button-bg: rgba(255, 255, 255, 0.06);
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================= */
/* LAYOUT PRINCIPAL */
/* ========================= */

.app-root {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    font-family: "Exo 2", Arial, sans-serif;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ========================= */
/* SIDEBAR */
/* ========================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    width: clamp(var(--sidebar-min), var(--sidebar-width), var(--sidebar-max));
    min-width: var(--sidebar-min);
    max-width: var(--sidebar-max);
    padding: 24px 20px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: "Exo 2", Arial, sans-serif;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    margin-bottom: 22px;
}

.sidebar-logo {
    width: 100%;
    max-width: 340px;
    height: auto;
    margin: 0 auto 14px auto;
    display: block;
}

.zoom-alert {
    width: 100%;
    margin: -2px 0 14px 0;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    color: #c00000;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.zoom-alert strong {
    color: #c00000;
    font-weight: 700;
}

/* ========================= */
/* CARREGAMENTO GLOBAL       */
/* ========================= */

.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 43, 87, 0.28);
    backdrop-filter: blur(2px);
}

.app-loading-card {
    min-width: 280px;
    max-width: 420px;
    padding: 26px 30px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(11, 43, 87, 0.24);
    text-align: center;
}

.app-loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px auto;
    border: 5px solid #dbe7f5;
    border-top-color: #0b2b57;
    border-radius: 50%;
    animation: app-loading-spin 0.8s linear infinite;
}

.app-loading-text {
    color: #0b2b57;
    font-size: 16px;
    font-weight: 700;
}

.app-loading-hint {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

@keyframes app-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.sidebar-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 2px;
    padding-bottom: 6px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sidebar-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--button-bg);
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    font-weight: 600;
}

.sidebar-button:hover {
    background: #ffffff;
    color: #0b2b57;
    border-color: #ffffff;
    transform: translateY(-1px);
}

.sidebar-button-active {
    background: #ffffff;
    color: #0b2b57 !important;
    border-color: #ffffff;
    font-weight: 700;
}

/* ========================= */
/* CONTEUDO PRINCIPAL */
/* ========================= */

.main-content {
    margin-left: clamp(var(--sidebar-min), var(--sidebar-width), var(--sidebar-max));
    width: calc(100vw - clamp(var(--sidebar-min), var(--sidebar-width), var(--sidebar-max)));
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    background-color: var(--content-bg);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    font-family: "Exo 2", Arial, sans-serif;
}

.page-wrapper {
    min-height: 100vh;
}

/* ========================= */
/* BARRA DE FILTROS STICKY */
/* ========================= */

.filtros-sticky {
    position: sticky;
    top: 0;
    z-index: 1200;
    background-color: #ffffff;
    padding: 6px 12px 10px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    overflow: visible;
    font-family: "Exo 2", Arial, sans-serif;
    transition: padding-bottom 0.15s ease;
}

.filtros-sticky:has(.Select.is-open) {
    padding-bottom: 220px;
}

/* ========================= */
/* HOME */
/* ========================= */

.home-container {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    background-image: url("/assets/fundo dcf.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% auto;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.home-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 43, 87, 0);
    pointer-events: none;
}

/* ========================= */
/* COMPONENTES PADRAO */
/* ========================= */

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.card {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.card-title {
    font-size: 14px;
    color: #555;
    text-align: center;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: #b30000;
    text-align: center;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

/* ========================= */
/* TABELAS E GRAFICOS */
/* ========================= */

.dash-table-container {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: visible !important;
    border-radius: 14px;
    font-family: "Exo 2", Arial, sans-serif;
}

.dash-table-container .dash-spreadsheet-container {
    border-radius: 14px;
    overflow: hidden;
}

.dash-table-container .dash-spreadsheet-inner {
    border-radius: 14px;
    overflow: hidden;
}

.dash-table-container table {
    border-collapse: separate;
    border-spacing: 0;
}

.dash-table-container .dash-spreadsheet-container th,
.dash-table-container .dash-spreadsheet-container td,
.dash-table-container .dash-spreadsheet-container .column-header-name,
.dash-table-container .dash-spreadsheet-container .dash-cell-value {
    text-align: center !important;
}

.dash-table-container .dash-spreadsheet-container .dash-cell-value {
    width: 100%;
}

.js-plotly-plot {
    width: 100% !important;
    overflow: visible !important;
}

.filtros-sticky .Select-control,
.filtros-sticky .Select-menu-outer,
.filtros-sticky .Select,
.filtros-sticky input[type="text"],
.filtros-sticky input[type="search"],
.filtros-sticky input[type="number"],
.filtros-sticky textarea {
    border-radius: 12px !important;
    font-family: "Exo 2", Arial, sans-serif !important;
}

.filtros-sticky .Select-control {
    border-color: #cbd5e1 !important;
    min-height: 38px;
    box-shadow: none !important;
}

.filtros-sticky .Select.is-focused > .Select-control,
.filtros-sticky input[type="text"]:focus,
.filtros-sticky input[type="search"]:focus,
.filtros-sticky input[type="number"]:focus,
.filtros-sticky textarea:focus {
    border-color: #93b2dd !important;
    box-shadow: 0 0 0 2px rgba(147, 178, 221, 0.18) !important;
    outline: none;
}

.filtros-sticky .Select-placeholder,
.filtros-sticky .Select-value-label {
    border-radius: 12px;
    font-family: "Exo 2", Arial, sans-serif !important;
}

.filtros-sticky .Select,
.filtros-sticky .Select-control,
.filtros-sticky .Select-menu-outer {
    overflow: visible !important;
}

button,
input,
select,
textarea {
    font-family: "Exo 2", Arial, sans-serif;
}

/* ========================= */
/* VISUALIZADOR DE PLANILHAS */
/* ========================= */

.planilhas-page {
    min-height: 100vh;
    padding: 24px;
    box-sizing: border-box;
    background: #f4f7fb;
    color: #0b2b57;
}

.planilhas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.planilhas-title {
    margin: 0;
    color: #0b2b57;
    font-size: 30px;
    line-height: 1.15;
}

.planilhas-subtitle {
    margin: 6px 0 0;
    color: #5b6b7f;
    font-size: 15px;
}

.planilhas-refresh {
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: #0b2b57;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(11, 43, 87, 0.2);
}

.planilhas-refresh:hover {
    background: #17477f;
}

.planilhas-controls {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(220px, 1fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(11, 43, 87, 0.08);
}

.planilhas-control {
    min-width: 0;
}

.planilhas-label {
    display: block;
    margin-bottom: 7px;
    color: #334e68;
    font-size: 13px;
    font-weight: 700;
}

.planilhas-status {
    margin: 14px 0;
    color: #52667d;
    font-size: 13px;
    font-weight: 600;
}

.planilhas-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.planilha-card {
    min-height: 82px;
    padding: 14px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 2px 7px rgba(11, 43, 87, 0.07);
}

.planilha-card-label {
    color: #62758a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.planilha-card-value {
    margin-top: 8px;
    color: #0b2b57;
    font-size: 21px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .planilhas-page {
        padding: 16px;
    }

    .planilhas-header {
        align-items: stretch;
        flex-direction: column;
    }

    .planilhas-controls {
        grid-template-columns: 1fr;
    }
}

.filtros-sticky .Select-menu-outer {
    z-index: 9999 !important;
}

/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100vw;
        --sidebar-min: 100vw;
        --sidebar-max: 100vw;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-width: 100%;
        height: auto;
        padding: 18px 14px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 0 0 10px 0;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
    }

    .sidebar-button {
        font-size: 13px;
        min-height: 42px;
        padding: 10px;
    }

    .sidebar-logo {
        max-width: 220px;
    }

    .zoom-alert {
        font-size: 11px;
        padding: 8px 9px;
        margin: 0 0 12px 0;
    }

    .filtros-sticky {
        position: static;
        box-shadow: none;
        padding: 6px 10px 8px 10px;
    }

    .card-value {
        font-size: 18px;
    }

    .card-title {
        font-size: 13px;
    }
}

/* Estrutura modular superior */
.modular-app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #f4f7fb; }
.institutional-header { position: relative; z-index: 2000; flex: 0 0 auto; padding: 10px 18px 9px; border-bottom: 1px solid #d5e0eb; background: #0b2b57; color: #fff; box-shadow: 0 4px 18px rgba(11,43,87,.16); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1900px; margin: 0 auto 8px; }
.brand-identity { display: flex; align-items: center; gap: 13px; min-width: 250px; }
.top-logo { width: 142px; height: 40px; object-fit: contain; object-position: left center; }
.brand-copy { display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,.3); padding-left: 12px; line-height: 1.25; }.brand-copy strong { font-size: 15px; }.brand-copy span { color: #c9d9eb; font-size: 10px; }
.panel-heading { text-align: right; }.panel-heading h1 { margin: 1px 0 0; font-size: 21px; }.panel-owner { color: #9fc2e6; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.module-navigation { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-width: 1900px; margin: 0 auto; }
.module-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; color: #e6eff8; background: rgba(255,255,255,.06); box-sizing: border-box; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: .15s ease; }
.module-tab:hover { color: #0b2b57; background: #fff; }.module-tab-active { border-color: #fff; color: #0b2b57; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.16); }.module-icon { opacity: .82; font-size: 12px; }
.scope-navigation { display: flex; justify-content: flex-end; gap: 6px; max-width: 1900px; margin: 7px auto 0; }
.scope-tab { padding: 5px 12px; border: 1px solid #7898ba; border-radius: 999px; color: #dbe9f7; font-size: 11px; font-weight: 700; text-decoration: none; }.scope-tab-active { border-color: #e58b2a; color: #fff; background: #bd6814; }
.modular-content { flex: 1 1 auto; min-height: 0; height: auto; overflow-x: hidden; overflow-y: auto; background: #f4f7fb; }
.modular-content .management-page { padding: 15px 18px 24px; }
.modular-content .dashboard-header { align-items: center; margin-bottom: 10px; padding: 12px 16px; border: 1px solid #dce6f0; color: #0b2b57; background: #fff; box-shadow: 0 3px 12px rgba(11,43,87,.055); }
.modular-content .dashboard-title { margin: 2px 0; font-size: 23px; }.modular-content .dashboard-kicker { color: #53718e; }.modular-content .dashboard-subtitle { color: #61758a; }
.overview-core { display: grid; grid-template-columns: minmax(0,1fr) 245px; gap: 14px; align-items: start; margin-bottom: 16px; }
.overview-main-table { min-width: 0; margin: 0; }.overview-indicators { display: flex; flex-direction: column; gap: 9px; }
.overview-side-cards, .overview-side-percentages { display: grid; gap: 7px; }.overview-indicators .metric-card { min-height: 60px; padding: 7px 10px; }.overview-indicators .metric-value { margin-top: 4px; font-size: 17px; }.overview-indicators .metric-title { font-size: 10px; }.overview-indicators .metric-icon { min-width: 23px; height: 23px; }.overview-indicators .percent-card { padding: 7px 10px; }.overview-indicators .percent-heading { margin-bottom: 5px; font-size: 11px; }
.module-metric-grid { grid-template-columns: repeat(6,minmax(145px,1fr)); }
.module-page-heading { padding: 20px 22px; border-radius: 14px; color: #fff; background: linear-gradient(125deg,#0b2b57,#174b7d); }.module-page-heading h1 { margin: 5px 0; }.module-page-heading p { margin: 0; color: #d9e8f7; }
.future-data-state { max-width: 680px; margin: 55px auto; padding: 42px; border: 1px dashed #9db3ca; border-radius: 16px; background: #fff; text-align: center; }.future-data-icon { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: #fff; background: #0b2b57; font-weight: 800; }.future-data-state h2 { color: #0b2b57; }

@media (max-width: 1500px) {
    .module-tab { padding: 5px 8px; font-size: 11px; }.module-metric-grid { grid-template-columns: repeat(3,minmax(150px,1fr)); }
}
@media (max-width: 1050px) {
    .brand-copy { display: none; }.overview-core { grid-template-columns: 1fr; }.overview-indicators { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }.module-metric-grid { grid-template-columns: repeat(2,minmax(150px,1fr)); }
}
@media (max-width: 768px) {
    .institutional-header { padding: 8px 10px; }.brand-row { margin-bottom: 7px; }.top-logo { width: 105px; height: 32px; }.panel-heading h1 { font-size: 14px; }.panel-owner { display: none; }
    .module-navigation { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }.module-tab { flex: 0 0 auto; }
    .scope-navigation { justify-content: center; margin-top: 3px; }.scope-tab { padding: 4px 9px; font-size: 10px; }
    .modular-content { height: auto; }.modular-content .management-page { padding: 9px; }.modular-content .dashboard-header { align-items: stretch; padding: 11px; }
    .overview-indicators, .module-metric-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 28vw;
        --sidebar-min: 320px;
        --sidebar-max: 400px;
    }

    .sidebar-logo {
        max-width: 280px;
    }

    .zoom-alert {
        font-size: 12px;
        padding: 9px 10px;
    }

    .sidebar-title {
        font-size: 22px;
    }

    .sidebar-button {
        font-size: 18px;
        min-height: 54px;
        padding: 14px 16px;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 30vw;
        --sidebar-min: 280px;
        --sidebar-max: 340px;
    }

    .sidebar {
        padding: 18px 14px;
    }

    .sidebar-logo {
        max-width: 220px;
    }

    .zoom-alert {
        font-size: 11px;
        line-height: 1.3;
        padding: 8px 9px;
        margin: 0 0 12px 0;
    }

    .sidebar-title {
        font-size: 18px;
    }

    .sidebar-button {
        font-size: 16px;
        min-height: 48px;
        padding: 12px 14px;
    }
}

@media (min-width: 1600px) {
    :root {
        --sidebar-width: 18vw;
        --sidebar-min: 300px;
        --sidebar-max: 360px;
    }

    .sidebar {
        padding: 14px 12px;
    }

    .sidebar-header {
        margin-bottom: 12px;
    }

    .sidebar-logo {
        max-width: 250px;
        margin: 0 auto 10px auto;
    }

    .zoom-alert {
        font-size: 11px;
        padding: 8px 9px;
        margin: 0 0 10px 0;
    }

    .sidebar-title {
        font-size: 18px;
    }

    .sidebar-menu {
        gap: 8px;
    }

    .sidebar-button {
        min-height: 46px;
        padding: 10px 12px;
        font-size: 16px;
        line-height: 1.15;
    }

    .home-container {
        background-position: center center;
        background-size: contain;
    }
}

/* Dashboards gerenciais */
.management-page { min-height: 100vh; padding: 24px; background: #f4f7fb; color: #20384f; box-sizing: border-box; }
.dashboard-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 22px 24px; margin-bottom: 16px; border-radius: 16px; color: #fff; background: linear-gradient(125deg, #0b2b57, #174b7d); box-shadow: 0 10px 28px rgba(11,43,87,.16); }
.dashboard-kicker { color: #a9c9eb; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-title { margin: 5px 0 4px; font-size: clamp(24px, 2.3vw, 36px); line-height: 1.12; }
.dashboard-subtitle { max-width: 760px; margin: 0; color: #d9e8f7; font-size: 14px; }
.dashboard-actions { display: flex; gap: 10px; align-items: end; min-width: 270px; }
.year-control { flex: 1; min-width: 115px; }
.year-control label, .dashboard-filter label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.dashboard-year { color: #20384f; }
.dashboard-refresh, .dashboard-clear { border: 0; border-radius: 8px; padding: 11px 14px; color: #fff; background: #e58b2a; font-family: inherit; font-weight: 700; cursor: pointer; }
.dashboard-clear { align-self: end; background: #61758a; }
.dashboard-update-status { min-height: 20px; color: #356278; font-size: 13px; }
.dashboard-filter-panel, .management-table-section, .sources-panel { margin-bottom: 16px; padding: 15px 18px; border: 1px solid #dce6f0; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(11,43,87,.055); }
.dashboard-filter-panel { position: relative; z-index: 100; overflow: visible; }
.dashboard-filter-panel[open] { z-index: 500; }
.dashboard-filter-panel summary, .sources-panel summary { color: #0b2b57; font-weight: 800; cursor: pointer; }
.dashboard-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 12px; align-items: end; margin-top: 14px; overflow: visible; }
.dashboard-filter { position: relative; min-width: 0; overflow: visible; }
.dashboard-filter:focus-within { z-index: 700; }
.dashboard-filter .Select, .dashboard-filter .Select-control, .dashboard-filter .Select-value { min-width: 0; }
.dashboard-filter .Select-value { max-width: calc(100% - 42px); overflow: hidden; }
.dashboard-filter .Select-value-label, .dashboard-filter .Select-placeholder { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-filter .Select-menu-outer { z-index: 8000 !important; width: max-content; min-width: 100%; max-width: min(520px, calc(100vw - 48px)); max-height: 322px !important; overflow: hidden !important; border-radius: 0 0 8px 8px; box-shadow: 0 12px 30px rgba(11,43,87,.22); }
.dashboard-filter .Select-menu { max-height: 320px !important; overflow-x: hidden !important; overflow-y: auto !important; }
.dashboard-filter .VirtualizedSelectOption, .dashboard-filter .Select-option { display: block; min-height: 44px; height: auto !important; padding: 10px 12px; box-sizing: border-box; line-height: 1.35; overflow: visible; white-space: normal; word-break: normal; }
.dashboard-filter .Select-input { max-width: calc(100% - 42px); }
.dashboard-filter .Select-input > input { width: 100% !important; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 13px; margin: 12px 0 18px; }
.metric-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { position: relative; overflow: hidden; min-height: 105px; padding: 17px; border: 1px solid #dfe8f1; border-left: 5px solid #2563a6; border-radius: 13px; background: #fff; box-sizing: border-box; box-shadow: 0 4px 14px rgba(11,43,87,.07); }
.metric-green { border-left-color: #16836b; }.metric-orange { border-left-color: #e58b2a; }.metric-red { border-left-color: #c43d4b; }
.metric-title { display: flex; gap: 8px; align-items: center; color: #62758a; font-size: 13px; font-weight: 700; }
.metric-icon { display: inline-grid; place-items: center; min-width: 27px; height: 27px; padding: 0 4px; border-radius: 8px; color: #fff; background: #0b2b57; font-size: 10px; box-sizing: border-box; }
.metric-value { margin-top: 13px; color: #0b2b57; font-size: clamp(20px, 1.7vw, 28px); font-weight: 800; white-space: nowrap; }
.metric-percent { margin-top: 4px; color: #61758a; font-size: 12px; }
.percent-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; margin-bottom: 18px; }
.percent-card { padding: 13px 15px; border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(11,43,87,.06); }
.percent-heading { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }.percent-track { height: 8px; overflow: hidden; border-radius: 8px; background: #e6edf5; }.percent-fill { height: 100%; background: #2563a6; }.percent-orange { background: #e58b2a; }.percent-green { background: #16836b; }
.management-chart-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }.management-chart-grid > div { min-width: 0; overflow: visible; border: 1px solid #dce6f0; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(11,43,87,.055); }
.section-title { margin: 0 0 10px; color: #0b2b57; font-size: 19px; }.section-caption { margin: -6px 0 12px; color: #6b7b8f; font-size: 12px; }
.no-data { margin-bottom: 14px; padding: 12px 15px; border: 1px solid #efcf9f; border-radius: 10px; background: #fff8ed; color: #76501b; }.no-data-title { font-weight: 800; }
.table-global-search { width: min(520px, 100%); height: 42px; margin: 0 0 14px; padding: 0 13px; border: 1px solid #b9c8d8; border-radius: 8px; box-sizing: border-box; color: #20384f; font-family: inherit; font-size: 14px; }
.table-global-search:focus { border-color: #2563a6; outline: 3px solid rgba(37,99,166,.12); }
.compact-detail-table .dash-table-container { border-radius: 8px; }
.compact-detail-table .dash-cell { overflow: hidden; }
.compact-detail-table .dash-cell div.dash-cell-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-detail-table .previous-next-container { padding: 12px 8px 4px; }
.compact-detail-table .page-number { margin: 0 12px; }

@media (max-width: 1500px) {
    .management-chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    :root { --sidebar-width: 220px; --sidebar-min: 220px; --sidebar-max: 220px; }
    .management-page { padding: 16px; }.management-chart-grid { grid-template-columns: 1fr; }.metric-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --sidebar-width: 100vw; --sidebar-min: 100vw; --sidebar-max: 100vw; }
    .dashboard-header { flex-direction: column; }.dashboard-actions { width: 100%; min-width: 0; }.management-page { padding: 10px; }
    .metric-grid, .metric-grid-3, .percent-grid { grid-template-columns: 1fr; }
}

/* Overrides finais do layout modular */
.metric-grid.module-metric-grid { grid-template-columns: repeat(6,minmax(145px,1fr)); }
@media (max-width: 1500px) { .metric-grid.module-metric-grid { grid-template-columns: repeat(3,minmax(150px,1fr)); } }
@media (max-width: 1050px) { .metric-grid.module-metric-grid { grid-template-columns: repeat(2,minmax(150px,1fr)); } }
@media (max-width: 768px) { .metric-grid.module-metric-grid { grid-template-columns: 1fr; } }

/* Menu inicial de painéis */
.portal-shell-hidden { display: none !important; }
.modular-content.portal-content { flex: 1 1 auto; height: 100vh; overflow-y: auto; background: #082f5b; }
.portal-page { position: relative; isolation: isolate; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; color: #fff; background-color: #082f5b; background-image: linear-gradient(120deg,rgba(4,31,67,.88),rgba(7,48,91,.55)),url("https://prad.sif.dev.br/static/images/fundo-unifei.webp"); background-position: center; background-size: cover; }
.portal-overlay { position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 72% 38%,rgba(37,99,166,.05),rgba(2,24,54,.42) 82%); }
.portal-header { display: flex; align-items: center; gap: 20px; width: min(1500px,calc(100% - 48px)); margin: 0 auto; padding: 22px 0 12px; }
.portal-logo { width: clamp(175px,15vw,245px); height: 68px; object-fit: contain; object-position: left center; }.portal-divider { width: 1px; height: 60px; background: rgba(255,255,255,.38); }
.portal-heading { min-width: 0; }.portal-heading h1 { margin: 0; font-size: clamp(22px,2.1vw,34px); line-height: 1.12; }.portal-heading p { margin: 4px 0 0; color: #dbe9f7; font-size: clamp(15px,1.35vw,21px); }
.portal-prad-link { margin-left: auto; padding: 10px 14px; border: 1px solid rgba(255,255,255,.45); border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }.portal-prad-link:hover { color: #082f5b; background: #fff; }
.portal-stage { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; width: min(1500px,calc(100% - 48px)); margin: 0 auto; padding: 18px 0 28px; box-sizing: border-box; }
.portal-intro { margin-bottom: 18px; }.portal-kicker { color: #b9d4ed; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }.portal-intro h2 { margin: 5px 0 3px; font-size: clamp(24px,2.2vw,36px); }.portal-intro p { margin: 0; color: #d5e4f2; }
.portal-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.portal-system-card { display: flex; gap: 14px; min-height: 142px; padding: 18px; border: 1px solid rgba(255,255,255,.54); border-radius: 15px; color: #0b2b57; background: rgba(255,255,255,.94); box-sizing: border-box; box-shadow: 0 14px 32px rgba(0,0,0,.19); text-decoration: none; backdrop-filter: blur(8px); transition: transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.portal-system-card:hover { transform: translateY(-3px); border-color: #fff; box-shadow: 0 19px 38px rgba(0,0,0,.28); }.portal-card-icon { flex: 0 0 50px; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#0b2b57,#2563a6); font-size: 23px; box-shadow: 0 6px 14px rgba(11,43,87,.23); }
.portal-system-card h2 { margin: 1px 0 7px; font-size: 18px; line-height: 1.15; }.portal-system-card p { margin: 0 0 12px; color: #587087; font-size: 12px; line-height: 1.4; }.portal-card-action { color: #14558e; font-size: 12px; font-weight: 800; }
.portal-footer { padding: 10px 24px 14px; color: rgba(255,255,255,.75); font-size: 11px; text-align: center; }
.home-return-tab { margin-right: auto; border-color: rgba(255,255,255,.48); background: rgba(255,255,255,.08); }

@media (max-width: 1200px) { .portal-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.portal-system-card { min-height: 132px; padding: 15px; } }
@media (max-width: 850px) { .portal-header { flex-wrap: wrap; width: calc(100% - 28px); padding-top: 14px; }.portal-prad-link { margin-left: 0; }.portal-stage { width: calc(100% - 28px); justify-content: flex-start; }.portal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .portal-page { overflow: visible; }.portal-logo { width: 135px; height: 45px; }.portal-divider { height: 42px; }.portal-heading h1 { font-size: 16px; }.portal-heading p { font-size: 13px; }.portal-prad-link { width: 100%; box-sizing: border-box; text-align: center; }.portal-grid { grid-template-columns: 1fr; }.portal-system-card { min-height: 116px; }.portal-footer { padding-bottom: 18px; } }
