/* ============================================================
   Dashboard, KPIs, BDO, fotos e impressão
   Paleta categórica: ordem fixa (validada na referência do dataviz)
   ============================================================ */
:root {
  --s1: #3987e5;   /* azul     -> preventiva / série principal */
  --s2: #d95926;   /* laranja  -> corretiva / 2ª série */
  --s3: #199e70;   /* verde-água */
  --s4: #c98500;   /* amarelo */
  --s5: #d55181;
  --s-neutral: #898781;
  --st-good: #0ca30c;
  --st-bad: #ec835a;
  --ink-2: #b8c2d1;
}

.content { max-width: 1760px; }

/* ------------------------------------------------------- Barra de filtros */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: rgba(18, 24, 38, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: 76px;
  z-index: 4;
  box-shadow: var(--shadow-sm);
}

.filterbar .grow { flex: 1; }
.range-box { align-items: center; gap: 8px; }

:root { --s6: #008300; --s7: #9085e9; --s8: #e66767; }

/* ------------------------------------------------- Seletor de lagoa */
.lagoa-row { flex: 1 0 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.lagoa-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.lagoa-row .seg { flex-wrap: wrap; }
.ldot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }

.lagoa-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.lagoa-card {
  --cor: var(--s1);
  position: relative; cursor: pointer; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 14px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-panel-2));
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.lagoa-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cor); }
.lagoa-card:hover { border-color: var(--cor); transform: translateY(-2px); }
.lagoa-card.sel { border-color: var(--cor); box-shadow: 0 0 0 1px var(--cor) inset, var(--shadow-sm); }
.lagoa-card .lc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.lagoa-card .lc-head b { font-size: 0.95rem; }
.lagoa-card .lc-vol { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.lagoa-card .lc-vol small { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.lagoa-card .lc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 8px 0 12px; }
.lagoa-card .lc-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 16px; font-size: 0.74rem; color: var(--text-muted); }
.lagoa-card .lc-stats b { display: block; color: var(--text); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.mini-stack { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--bg-panel-2); }
.mini-stack i { display: block; height: 100%; }
.lagoa-card .lc-par { font-size: 0.74rem; color: var(--text-muted); margin: 10px 0 12px; }
.lagoa-card .lc-par .lc-par-top { display: flex; justify-content: space-between; margin-bottom: 5px; }
.lagoa-card .meter-track { height: 8px; }
.lagoa-card .meter-legend { margin-top: 5px; }

/* coluna de ações sempre visível em tabelas largas */
.table-app .col-acoes {
  position: sticky;
  right: 0;
  background: var(--bg-panel);
  box-shadow: -10px 0 10px -10px rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.table-app tbody tr:hover .col-acoes { background: #171f2f; }

.seg {
  display: inline-flex;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.seg button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}

.seg a {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 7px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg a:hover { color: var(--text); }
.seg a.active { background: var(--accent-dim); color: var(--accent); }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent-dim); color: var(--accent); }
.seg.sm button { padding: 4px 10px; font-size: 0.74rem; }

.ctl {
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 0.83rem;
  font-weight: 500;
}

.ctl:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.live .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-faint);
}

.live.on .dot {
  background: var(--st-good);
  box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.6);
  animation: pulso 1.8s infinite;
}

@keyframes pulso {
  70% { box-shadow: 0 0 0 8px rgba(12, 163, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); }
}

.menu-wrap { position: relative; }

.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 250px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 20;
  max-height: 60vh;
  overflow: auto;
}

.menu-pop.open { display: block; }

.menu-pop label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.83rem;
  color: var(--ink-2);
  cursor: pointer;
}

.menu-pop label:hover { background: rgba(255, 255, 255, 0.04); }

/* --------------------------------------------------------- Grid de widgets */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  grid-auto-flow: row dense;
  transition: opacity .2s ease;
}

.dash-grid.loading { opacity: 0.6; }

.widget {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.widget.is-hidden { display: none; }

.w-2 { grid-column: span 2; }
.w-3 { grid-column: span 3; }
.w-4 { grid-column: span 4; }
.w-5 { grid-column: span 5; }
.w-6 { grid-column: span 6; }
.w-7 { grid-column: span 7; }
.w-8 { grid-column: span 8; }
.w-12 { grid-column: span 12; }

@media (max-width: 1700px) {
  .w-2 { grid-column: span 4; }
}

.brand { flex-direction: column; align-items: flex-start; gap: 10px; }
.brand { align-items: stretch; }
.brand .brand-logo { height: auto; width: 100%; max-width: 178px; display: block; margin: 0 auto; }

/* Logo com fundo transparente, na cor de destaque do tema (versão azul original só na impressão) */
.brand-logo-link { display: block; padding: 2px 2px 4px; }
.brand-logo-link .brand-logo {
  filter: drop-shadow(0 0 16px rgba(98, 168, 240, 0.22));
  transition: filter .2s ease, transform .2s ease;
}
.brand-logo-link:hover .brand-logo { filter: drop-shadow(0 0 20px rgba(98, 168, 240, 0.4)); transform: translateY(-1px); }
.brand .brand-title { margin-top: 2px; }

.bdo-logo { width: 190px; flex-shrink: 0; }
.bdo-logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 14px rgba(98, 168, 240, 0.2)); }
.bdo-logo .logo-impressao { display: none; }
.brand .brand-title { font-size: 0.86rem; letter-spacing: .14em; }
@media (max-width: 1280px) {
  .w-4, .w-5 { grid-column: span 6; }
  .w-7, .w-8 { grid-column: span 12; }
  .w-3 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .w-2 { grid-column: span 6; }
  .w-4, .w-5, .w-6, .w-3 { grid-column: span 12; }
}
@media (max-width: 560px) {
  .w-2 { grid-column: span 12; }
  .filterbar { position: static; }
}

.widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.widget-title { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.widget-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.widget-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.widget-body { position: relative; flex: 1; min-height: 0; }

.icon-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  height: 30px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn:hover, .icon-btn.active { color: var(--text); border-color: var(--accent-2); background: rgba(53, 208, 200, 0.06); }

.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 360px; }
.chart-box.short { height: 230px; }

.empty-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-panel);
  z-index: 3;
  padding: 16px;
}

.empty-overlay i { font-size: 1.8rem; color: var(--text-faint); }
.widget.is-empty .empty-overlay { display: flex; }

.table-view {
  display: none;
  max-height: 300px;
  overflow: auto;
}
.widget.show-table .table-view { display: block; }
.widget.show-table .chart-box { display: none; }

/* --------------------------------------------------------------- KPI tile */
.kpi-tile { padding: 16px 18px 14px; gap: 2px; }
.kpi-tile .kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-tile .kpi-label { margin: 0; }
.kpi-tile .kpi-value { font-size: 1.95rem; line-height: 1.15; margin-top: 8px; font-variant-numeric: proportional-nums; }
.kpi-tile .kpi-unit { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-left: 4px; }
.kpi-tile .kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; min-height: 34px; }
.kpi-tile .kpi-note { font-size: 0.74rem; color: var(--text-muted); }
.kpi-tile svg.spark { flex-shrink: 1; max-width: 100%; }
.kpi-tile .kpi-foot { flex-wrap: wrap; }
.bdo-head .bdo-date span { text-transform: none; }
.kpi-tile .kpi-icon { margin: 0; width: 30px; height: 30px; font-size: 0.9rem; }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
}
.delta.good { background: rgba(12, 163, 12, 0.14); color: #2bd42b; }
.delta.bad { background: rgba(236, 131, 90, 0.15); color: var(--st-bad); }

/* ------------------------------------------------------------- Legendas */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.78rem; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend .ln { width: 16px; height: 0; border-top: 2px solid; flex-shrink: 0; }
.legend .ln.dash { border-top-style: dashed; }

.dot-tipo { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; }
.dot-tipo.preventiva { background: var(--s1); }
.dot-tipo.corretiva { background: var(--s2); }
.dot-tipo.outras { background: var(--s-neutral); }

.tipo-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-2);
  white-space: nowrap;
}
.tipo-badge .dot-tipo { margin-right: 6px; }

/* --------------------------------------------------------- Listas/ranking */
.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item .rank-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.83rem; margin-bottom: 5px; }
.rank-item .rank-name { color: var(--text); display: flex; align-items: center; min-width: 0; }
.rank-item .rank-name span.txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item .rank-val { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-bar { height: 8px; background: var(--bg-panel-2); border-radius: 999px; overflow: hidden; }
.rank-bar > div { height: 100%; border-radius: 999px; transition: width .5s ease; }

.stat-rows { display: flex; flex-direction: column; margin-top: 10px; }
.stat-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 0.83rem;
}
.stat-row .n { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.stat-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }

.meter { margin-bottom: 18px; }
.meter .meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 0.84rem; }
.meter .meter-top b { font-size: 1.35rem; letter-spacing: -0.01em; }
.meter-track { height: 12px; background: rgba(57, 135, 229, 0.16); border-radius: 999px; position: relative; overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 999px; transition: width .6s ease; }
.meter-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .75; }
.meter-legend { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.05); color: var(--ink-2);
}

.usage-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1100px) { .usage-cols { grid-template-columns: 1fr; } }
.usage-col h6 { font-size: 0.82rem; font-weight: 700; margin: 0 0 2px; display: flex; align-items: center; gap: 7px; }
.usage-col .extremos { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 8px; min-height: 34px; }
.usage-col .extremos b { color: var(--text); font-weight: 600; }

.feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--border-soft); font-size: 0.83rem;
}
.feed-item:first-child { border-top: 0; }
.feed-item .when { font-size: 0.72rem; color: var(--text-muted); text-align: center; line-height: 1.25; min-width: 44px; }
.feed-item .what b { display: block; font-weight: 600; }
.feed-item .what span { color: var(--text-muted); font-size: 0.76rem; }
.feed-item .vol { font-weight: 700; font-variant-numeric: tabular-nums; }
.feed-item a { color: inherit; }
.feed-item a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ Mapa */
.map-frame { height: 440px; }
.map-total {
  position: absolute; right: 12px; top: 12px; z-index: 500;
  background: rgba(11, 15, 22, 0.85); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: 0.76rem; color: var(--ink-2);
}
.map-total b { display: block; font-size: 1.3rem; color: var(--text); line-height: 1.1; }
.cava-marker { background: transparent !important; border: 0 !important; }
.cava-pin { transition: transform .15s ease; margin: 0 auto; }
.cava-pin.zero { background: #2c3546; box-shadow: none; color: var(--text-muted); }
.cava-marker:hover .cava-pin { transform: scale(1.1); }
.cava-pin-label { top: calc(100% + 4px); }
.cava-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 140px; margin-left: -70px; }
.cava-wrap .cava-pin-label { position: static; transform: none; margin-top: 5px; }

/* ------------------------------------------------------------ Formulários */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.upload-fase {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg-panel-2);
  transition: border-color .15s ease, background .15s ease;
}
.upload-fase:hover, .upload-fase.drag { border-color: var(--accent); background: rgba(255, 138, 30, 0.04); }
.upload-fase .up-title { font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.upload-fase .up-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 14px 8px; border-radius: 9px; font-size: 0.8rem; color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}
.upload-fase .up-btn:hover { color: var(--text); }
.upload-fase input[type=file] { display: none; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-top: 8px; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }

.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.foto-thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-panel-2); margin: 0;
}
.foto-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform .25s ease; }
.foto-thumb:hover img { transform: scale(1.04); }
.foto-thumb figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px;
  font-size: 0.7rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.foto-thumb .foto-del {
  position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .15s ease;
}
.foto-thumb:hover .foto-del { opacity: 1; }
.foto-del button {
  border: 0; width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  background: rgba(11, 15, 22, 0.85); color: #fff; font-size: 0.8rem;
}

.lightbox {
  position: fixed; inset: 0; z-index: 3000; background: rgba(5, 8, 12, 0.92);
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox .lb-cap { color: var(--ink-2); font-size: 0.85rem; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.1); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; }
.lightbox .lb-next { right: 20px; top: 50%; }

.cam-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: rgba(53, 208, 200, 0.12); color: var(--accent-2);
}

/* -------------------------------------------------------------------- BDO */
.bdo-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
  padding: 20px 24px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255, 138, 30, 0.10), rgba(53, 208, 200, 0.05)), var(--bg-panel);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.bdo-head h2 { font-size: 1.35rem; margin: 0 0 4px; }
@media (max-width: 900px) {
  .bdo-head { grid-template-columns: 1fr; }
  .bdo-head .bdo-date { text-align: left; }
}
.bdo-head .meta { color: var(--text-muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.bdo-head .bdo-date { text-align: right; }
.bdo-head .bdo-date b { display: block; font-size: 1.6rem; letter-spacing: -0.02em; }
.bdo-head .bdo-date span { color: var(--text-muted); font-size: 0.82rem; text-transform: capitalize; }

.bdo-section { margin-bottom: 18px; break-inside: avoid; }
.bdo-section > h5 {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-2); margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
}
.bdo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bdo-kpi { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.bdo-kpi .l { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); font-weight: 700; }
.bdo-kpi .v { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.bdo-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.bdo-charts .card-panel { padding: 14px 16px; }
.bdo-charts h6 { font-size: 0.82rem; font-weight: 700; margin-bottom: 10px; }
.bdo-charts .wide { grid-column: 1 / -1; }
.bdo-sub { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--text-muted); margin: 18px 0 8px; }
.bdo-sub:first-of-type { margin-top: 0; }
.bdo-charts .chart-box { height: 220px; }
.efetivo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pessoa-check {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; background: var(--bg-panel-2); font-size: 0.85rem;
}
.pessoa-check:hover { border-color: var(--accent-2); }
.pessoa-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.pessoa-check small { display: block; color: var(--text-muted); font-size: 0.72rem; }
.assinaturas { display: none; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 46px; }
.assinaturas div { border-top: 1px solid #333; padding-top: 6px; text-align: center; font-size: 0.78rem; }
.print-only { display: none; }

/* ------------------------------------------------------------- Indicadores */
.trend-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }
.trend-note b { color: var(--text); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.proj-grid .p { padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-panel-2); }
.proj-grid .p .l { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 700; }
.proj-grid .p .v { font-size: 1.25rem; font-weight: 800; margin-top: 3px; }

/* ----------------------------------------------------- Metas / utilitários */
.hint { font-size: 0.78rem; color: var(--text-muted); }
.select-tipo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tipo-opt input { display: none; }
.tipo-opt > span {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 9px 6px; border: 1px solid var(--border); border-radius: 9px; font-size: 0.78rem;
  font-weight: 600; color: var(--text-muted); cursor: pointer; background: var(--bg-panel-2); line-height: 1.2;
}
.tipo-opt > span:hover { color: var(--text); }
.tipo-opt .dot-tipo { margin: 0; flex-shrink: 0; }
.tipo-opt input:checked + span { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }

/* ---------------------------------------------------------------- Impressão */
@media print {
  :root {
    --bg: #fff; --bg-panel: #fff; --bg-panel-2: #f5f6f8; --bg-elevated: #fff;
    --border: #cfd4dc; --border-soft: #e3e6eb; --text: #111; --text-muted: #555; --text-faint: #666;
    --ink-2: #333; --shadow: none; --shadow-sm: none; --accent: #c25e00; --accent-2: #0b7f7a;
    --accent-dim: transparent; --accent-2-dim: transparent;
  }
  html, body { background: #fff !important; color: #111 !important; font-size: 11px; }
  .sidebar, .topbar, .no-print, .flash-box, .filterbar { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; }
  .print-only { display: block; }
  .assinaturas { display: grid; }
  .card-panel, .widget, .bdo-kpi, .bdo-head { break-inside: avoid; box-shadow: none !important; background: #fff !important; }
  .bdo-head { background: #fff !important; border: 1px solid #999; grid-template-columns: auto 1fr auto !important; gap: 16px; padding: 12px 16px; }
  .bdo-head .bdo-date { text-align: right !important; }
  .bdo-logo { width: 150px; }
  .bdo-logo .logo-tela { display: none; }
  .bdo-logo .logo-impressao { display: block; filter: none; }
  .table-app th, .table-app td { padding: 5px 8px; white-space: normal; }
  .table-app th { color: #444; }
  .foto-thumb img { cursor: default; }
  .foto-del { display: none; }
  .bdo-charts { grid-template-columns: repeat(2, 1fr); }
  a { color: inherit; }
  @page { size: A4; margin: 12mm; }
}
