/* =========================================================
   DASHBOARD ESTADUAL - LAYOUT SIMPLIFICADO
========================================================= */

.modal-dashboard-estadual {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); z-index: 3000;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden; padding: 10px; box-sizing: border-box;
}
.modal-dashboard-estadual.active { display: flex; }

.dash-est-content {
    background-color: #fff; width: 100%; max-width: 1300px;
    height: 95vh; max-height: 95vh;
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; overflow: hidden;
}

/* Header */
.dash-est-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 25px; background: linear-gradient(135deg, #0d5d2e 0%, #1b8a4f 100%); color: white;
    flex-shrink: 0;
}
.dash-est-title { font-size: 22px; font-weight: 700; margin: 0; }
.btn-close-dash {
    background: rgba(255,255,255,0.2); border: none; color: white;
    width: 35px; height: 35px; border-radius: 50%; font-size: 22px; cursor: pointer;
}

/* === ABAS === */
.tabs-container {
    display: flex; background: #f4f6f8; border-bottom: 1px solid #ddd; flex-shrink: 0;
}
.tab-btn {
    padding: 12px 20px; background: transparent; border: none;
    font-size: 15px; font-weight: 600; color: #666; cursor: pointer;
    border-bottom: 3px solid transparent; transition: all 0.2s;
}
.tab-btn:hover { background: #eaeaea; }
.tab-btn.active { background: white; color: #0d5d2e; border-bottom-color: #0d5d2e; }

.tab-content {
    flex: 1; overflow-y: auto; padding: 20px; background: white;
    display: none; box-sizing: border-box;
}
.tab-content.active { display: block; }

/* === KPIS === */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.kpi-card {
    background: #fff; padding: 15px; border-radius: 6px;
    display: flex; align-items: center; justify-content: space-between;
    border: 1px solid #eee; box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.kpi-info { display: flex; flex-direction: column; }
.kpi-label { font-size: 12px; color: #666; text-transform: uppercase; font-weight: 600; line-height: 1.3; }
.kpi-value { font-size: 24px; font-weight: 700; color: #333; margin-top: 5px; }

/* Cores temáticas */
.alert-theme .kpi-value { color: #e65100; }
.embargo-theme .kpi-value { color: #c62828; }

/* === SEÇÕES (GRID LAYOUT) === */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.dash-card {
    background: #fafafa; padding: 15px; border-radius: 8px; border: 1px solid #eee;
}
.dash-card-title {
    font-size: 15px; font-weight: 600; color: #333;
    margin-bottom: 15px; border-bottom: 2px solid #e0e0e0; padding-bottom: 5px;
    text-align: center;
}

/* Gráfico */
.chart-box { height: 250px; position: relative; }

/* Lista */
.ranking-list { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; }
.ranking-item {
    display: flex; align-items: center; padding: 8px 10px;
    background: #fff; border-radius: 4px; border: 1px solid #eee;
}
.rank-name { flex: 1; font-size: 13px; color: #444; }
.rank-value { font-weight: 700; font-size: 12px; color: #333; }

/* Responsividade */
@media (max-width: 992px) {
    .dash-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
}

/* TABELA CUSTOS */
.custos-container { margin-top: 25px; border: 1px solid #e0e0e0; background: #fff; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.custos-titulo-bioma { margin: 0 0 5px 0; color: #0d5d2e; font-size: 16px; font-weight: 700; text-transform: uppercase; }
.custos-fonte { font-size: 11px; color: #666; margin-bottom: 15px; font-style: italic; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.tabela-custos-portaria { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela-custos-portaria th { background-color: #f5f5f5; padding: 10px; text-align: left; border-bottom: 2px solid #0d5d2e; }
.tabela-custos-portaria td { padding: 10px; border-bottom: 1px solid #eee; }
.tabela-custos-portaria .custo-total { color: #d32f2f; font-weight: bold; }