:root {
    --mhe-blue-900: #ffffff;
    --mhe-blue-800: #123a5a;
    --mhe-blue-700: #eaf0f5;
    --mhe-blue-500: #2e6f9e;
    --mhe-black-800: #000000;
    --mhe-red-800: #7e0202;
    --mhe-green-800: #004d0d;
    --mhe-gold: #d7a22a;
    --mhe-gold-soft: #efd28a;
    --bg-main: #f4f7fb;
    --card-bg: #ffffff;
    --text-main: #1e2b37;
    --text-soft: #000000;
    --border-soft: rgba(18, 58, 90, 0.10);
    --shadow-soft: 0 10px 30px rgba(13, 39, 64, 0.10);
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(215, 162, 42, 0.10), transparent 20%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg-main) 100%);
    color: var(--text-main);
}

.page-shell {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--mhe-blue-900), var(--mhe-blue-700));
    color: #000000;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.brand-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255,255,255,0.18);
    color: #000000;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

.hero h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    line-height: 1.15;
}

.hero p {
    margin: 0;
    color: rgba(92, 92, 92, 0.86);
    max-width: 760px;
}

.hero-mini-card {
    min-width: 220px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 18px 20px;
    border-radius: 18px;
    text-align: left;
}

.hero-mini-card span {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.78);
    margin-bottom: 6px;
}

.hero-mini-card strong {
    font-size: 18px;
}

.hero-left {    
    align-items: left;
}

.hero-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.filters-panel {
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    gap: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.filter-group select,
.filter-group input {
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(18, 58, 90, 0.15);
    background: #fff;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--mhe-blue-500);
    box-shadow: 0 0 0 4px rgba(46, 111, 158, 0.10);
}

.filter-actions {
    display: flex;
    align-items: end;
}

.btn-primary {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mhe-gold), #c18c1c);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(193, 140, 28, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(193, 140, 28, 0.30);
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.indicator-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
}

.indicator-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 15px;
    background: var(--mhe-blue-500);
}

.indicator-label {
    display: block;
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
}

.indicator-card strong {
    font-size: 28px;
    font-weight: 800;
    color: var(--mhe-blue-800);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    min-height: 420px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 39, 64, 0.25);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255,255,255,0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
    .filters-panel {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .indicators-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-panel {
        grid-template-columns: 1fr;
    }

    .indicators-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 26px;
    }
}


.dashboard-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0d6efd;
    margin-bottom: 0.3rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1f2937;
}

.section-header p {
    margin: 0.35rem 0 0 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 0.6rem;
}

.chart-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.chart-card-header span {
    font-size: 0.82rem;
    color: #6b7280;
    background: #f8fafc;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.chart-body {
    min-height: 360px;
}

.chart-card--wide .chart-body {
    min-height: 420px;
}

.indicator-card small {
    display: block;
    margin-top: 0.35rem;
    color: #6b7280;
    font-size: 0.8rem;
}

.indicators-grid--fiscal {
    margin-top: 10px;
}

.indicator-card--fiscal {
    border-left: 5px solid var(--mhe-black-800);
}

.indicator-card--gas {
    border-left: 5px solid var(--mhe-blue-800);
}

.indicator-card--petroleo {
    border-left: 5px solid var(--mhe-red-800);
}

.indicator-card--glp {
    border-left: 5px solid var(--mhe-green-800);
}

.indicator-card--fiscal strong,
.indicator-card--gas strong,
.indicator-card--petroleo strong,
.indicator-card--glp strong {
    font-size: 1.6rem;
}

.indicator-sub{
    margin-top:4px;
    font-size:0.85rem;
    color:#6b7280;
}

.indicator-sub span{
    font-weight:600;
    color:#111827;
}

.chart-footnote{
    margin-top:8px;
    padding-top:6px;
    border-top:1px solid #e5e7eb;
    font-size:0.78rem;
    color:#6b7280;
    line-height:1.35;
}