:root {
  --dashboard-navy: #12283b;
  --dashboard-teal: #137b82;
  --dashboard-teal-light: #e7f5f3;
  --dashboard-blue: #4779ba;
  --dashboard-lilac: #7666aa;
  --dashboard-gold: #b87c26;
}

#dashboardSection { display: grid; gap: 20px; }

.dashboard-period-filter { position: relative; min-width: 220px; }
.period-filter-label { display: block; margin: 0 0 5px 2px; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.period-filter-trigger { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); cursor: pointer; font-weight: 650; text-align: left; }
.period-filter-menu { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: max-content; min-width: 100%; max-width: min(355px, 92vw); max-height: 340px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); box-shadow: var(--shadow); }
.period-filter-option { display: flex; align-items: flex-start; gap: 9px; padding: 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 12.5px; font-weight: 550; line-height: 1.35; cursor: pointer; }
.period-filter-option:hover { background: var(--soft); }
.period-filter-option input { width: 15px; height: 15px; margin-top: 1px; accent-color: var(--primary); flex: 0 0 auto; }
.period-filter-all { margin-bottom: 5px; border-bottom: 1px solid var(--line); border-radius: 0; padding-bottom: 10px; font-weight: 750; }
.dashboard-intro, .panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dashboard-intro { padding: 2px 2px 0; }
.eyebrow { display: block; color: var(--dashboard-teal); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-intro h3, .panel-heading h3 { margin: 3px 0 0; color: var(--dashboard-navy); font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.dashboard-link { border-color: #cce3e4; color: var(--primary2); box-shadow: none; }

.dashboard-kpis { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; }
.metric-card { min-height: 148px; padding: 20px; display: flex; align-items: flex-start; gap: 13px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: 0 5px 16px rgba(23, 45, 70, .045); }
.metric-card-featured { background: linear-gradient(136deg, #11394a, #126d7a); border-color: transparent; box-shadow: 0 12px 25px rgba(18, 109, 122, .2); }
.metric-icon { width: 35px; height: 35px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; background: rgba(255,255,255,.17); color: #fff; font-size: 18px; font-weight: 750; }
.metric-card:not(.metric-card-featured) .metric-icon { color: var(--dashboard-teal); background: var(--dashboard-teal-light); }
.metric-icon-company { color: var(--dashboard-blue)!important; background: #edf3fd!important; }
.metric-icon-service { color: var(--dashboard-lilac)!important; background: #f1effa!important; }
.metric-icon svg { width: 19px; height: 19px; }
.metric-copy { min-width: 0; display: flex; flex-direction: column; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .045em; line-height: 1.2; text-transform: uppercase; }
.metric-card-featured .metric-label, .metric-card-featured .metric-description { color: rgba(255,255,255,.74); }
.metric-copy strong { margin: 8px 0 5px; color: var(--dashboard-navy); font-size: clamp(24px, 2.1vw, 31px); font-weight: 800; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.metric-card-featured .metric-copy strong { color: #fff; }
.metric-description { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

.dashboard-grid { display: grid; gap: 20px; }
.dashboard-grid-primary { grid-template-columns: minmax(0, 1.5fr) minmax(295px, .85fr); }
.dashboard-grid-detail { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: 0 5px 16px rgba(23, 45, 70, .045); }
.panel-note { padding-top: 2px; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.trend-controls { display: flex; align-items: center; gap: 9px; }
.trend-year-control select { height: 29px; padding: 3px 25px 3px 9px; border: 1px solid #d7e2e7; border-radius: 7px; background-color: #f8fbfb; color: var(--dashboard-navy); font: inherit; font-size: 11.5px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.panel-explainer { max-width: 300px; margin: 15px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.panel-action { color: var(--dashboard-teal); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.panel-action:hover { color: var(--primary2); text-decoration: underline; }

.trend-chart { height: 220px; display: flex; align-items: end; gap: clamp(10px, 3vw, 30px); padding: 22px 5px 0; border-bottom: 1px solid #e8eef2; }
.trend-item { position: relative; height: 100%; flex: 1; min-width: 34px; display: flex; flex-direction: column; justify-content: end; align-items: center; }
.trend-bar { width: min(100%, 56px); border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #75b4b4, #2a8e93); cursor: default; transition: height .3s ease, transform .2s ease; }
.trend-bar.is-zero { background: transparent; }
.trend-bar:hover { transform: translateY(-3px); background: linear-gradient(180deg, #4d9ca1, #126d7a); }
.trend-bar.is-current { background: linear-gradient(180deg, #1d536a, #122c42); }
.trend-amount { position: absolute; bottom: calc(var(--bar-height) + 7px); display: none; }
.trend-item:hover .trend-amount { display: block; bottom: auto; top: -18px; color: var(--dashboard-navy); font-size: 10px; font-weight: 700; white-space: nowrap; }
.trend-label { margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 650; }

.unit-summary { display: grid; gap: 9px; }
.unit-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 1px solid #edf0f3; border-radius: 10px; background: #fbfcfd; }
.unit-item > div { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 12px; }
.unit-item span:not(.unit-accent) { color: var(--muted); font-size: 12px; font-weight: 600; }
.unit-item strong { color: var(--dashboard-navy); font-size: 16px; font-weight: 760; }
.unit-accent { width: 7px; height: 26px; flex: 0 0 auto; border-radius: 99px; background: var(--dashboard-teal); }
.unit-accent-1 { background: var(--dashboard-blue); }.unit-accent-2 { background: var(--dashboard-lilac); }.unit-accent-3 { background: var(--dashboard-gold); }

.ranking-list { display: grid; gap: 15px; margin-top: 20px; }
.rank-item { display: grid; gap: 4px; }
.rank-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rank-title-wrap { display: flex; align-items: center; min-width: 0; gap: 9px; }
.rank-number { color: #9aabb6; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.rank-title-wrap strong { overflow: hidden; color: #23384a; font-size: 12.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rank-value { flex: 0 0 auto; color: var(--dashboard-navy); font-size: 12px; font-weight: 750; }
.rank-detail { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 6px; overflow: hidden; border-radius: 99px; background: #edf1f3; }
.rank-fill { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, #4ea1a1, var(--dashboard-teal)); }

.company-list { display: grid; margin-top: 14px; }
.company-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf0f3; }
.company-item:last-child { border-bottom: 0; }
.company-marker { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: #eaf5f4; color: var(--dashboard-teal); font-size: 11px; font-weight: 800; }
.company-marker-1 { background: #edf3fd; color: var(--dashboard-blue); }.company-marker-2 { background: #f1effa; color: var(--dashboard-lilac); }.company-marker-3 { background: #fcf1df; color: var(--dashboard-gold); }.company-marker-4 { background: #eff1f5; color: #697789; }
.company-copy { min-width: 0; display: grid; gap: 2px; }.company-copy strong { overflow: hidden; color: #23384a; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }.company-copy span { color: var(--muted); font-size: 11px; }.company-amount { color: var(--dashboard-navy); font-size: 12px; font-weight: 750; white-space: nowrap; }

.estamento-panel { padding-bottom: 15px; }.estamento-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; row-gap: 16px; margin-top: 21px; }.estamento-list .rank-item { gap: 5px; }.estamento-list .rank-number { display: none; }.estamento-list .rank-title-wrap { gap: 0; }
.dashboard-empty { margin: 18px 0; color: var(--muted); font-size: 12px; }

@media (max-width: 1060px) { .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }.dashboard-grid-primary, .dashboard-grid-detail { grid-template-columns: 1fr; }.estamento-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .dashboard-intro { align-items: center; }.dashboard-intro h3 { font-size: 15px; }.dashboard-link { padding: 7px 10px; font-size: 12px; }.dashboard-kpis, .estamento-list { grid-template-columns: 1fr; }.metric-card { min-height: 120px; }.metric-copy strong { font-size: 27px; }.panel { padding: 17px; }.panel-heading { gap: 10px; }.panel-note { display: none; }.trend-chart { height: 180px; gap: 9px; }.trend-label { font-size: 10px; }.company-amount { font-size: 11px; }.dashboard-period-filter { min-width: 175px; }.period-filter-label { display: none; } }
