.page-shell{min-height:100vh;background:linear-gradient(135deg,#071027,#0b122a);}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.topbar-left{display:flex;gap:14px;align-items:center}
.topbar-logo{height:44px;width:auto}
.topbar-title{color:#e9eefc;font-weight:800;font-size:18px;line-height:1}
.topbar-sub{color:rgba(233,238,252,.7);font-size:12px;margin-top:4px}
.content{max-width:1100px;margin:0 auto;padding:18px;display:flex;flex-direction:column;gap:14px}
.card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);border-radius:16px;padding:16px}
.card h2{margin:0 0 10px 0;color:#e9eefc;font-size:16px}
.muted{color:rgba(233,238,252,.7);font-size:12px}
.filters{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr)) 160px;gap:12px;align-items:end}
.filters label{display:block;color:rgba(233,238,252,.8);font-size:12px;margin-bottom:6px}
.filters input,.filters select{
  width:100%;
  /* 🔧 Mais visível no tema escuro */
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.22);
  border-radius:12px;
  padding:10px;
  color:#e9eefc;
}

/* 🔧 Opções do <select> (quando aberto) */
.filters select option{ color:#111827; }
.filters-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-top:12px}
.kpi{background:rgba(0,0,0,.12);border:1px solid rgba(255,255,255,.10);border-radius:14px;padding:12px}
.kpi-label{color:rgba(233,238,252,.7);font-size:12px}
.kpi-value{color:#e9eefc;font-size:22px;font-weight:800;margin-top:6px}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid rgba(255,255,255,.10);padding:10px 8px;color:#e9eefc;font-size:13px}
.table th{color:rgba(233,238,252,.75);font-weight:700;text-align:left}

.charts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.chart-card{background:rgba(0,0,0,.12);border:1px solid rgba(255,255,255,.10);border-radius:14px;padding:12px}
.chart-title{color:rgba(233,238,252,.85);font-weight:800;font-size:13px;margin-bottom:10px}

@media(max-width:900px){.filters{grid-template-columns:1fr;}.kpis{grid-template-columns:1fr 1fr}.charts-grid{grid-template-columns:1fr}}

/* Dashboard header + quick actions */
.dash-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.dash-head h2{margin:0}
.dash-quick{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
@media (max-width: 760px){
  .dash-head{flex-direction:column;align-items:flex-start}
  .dash-quick{justify-content:flex-start}
}

/* PDF mode: high contrast on white background */
body.pdf-mode .page-shell{background:#ffffff !important;}
body.pdf-mode .topbar{border-bottom:1px solid #e5e7eb !important;}
body.pdf-mode .topbar-title, body.pdf-mode .topbar-sub{color:#111827 !important;}
body.pdf-mode #dashArea{background:#ffffff !important;color:#111827 !important;border:1px solid #e5e7eb !important;box-shadow:none !important;}
body.pdf-mode #dashArea h2{color:#111827 !important;}
body.pdf-mode .filters label, body.pdf-mode .kpi-label{color:#374151 !important;}
body.pdf-mode .filters input, body.pdf-mode .filters select{background:#ffffff !important;color:#111827 !important;border:1px solid #d1d5db !important;}
body.pdf-mode .kpi{background:#f8fafc !important;border:1px solid #e5e7eb !important;}
body.pdf-mode .kpi-value{color:#111827 !important;font-weight:900 !important;}
body.pdf-mode .card{background:#ffffff !important;border:1px solid #e5e7eb !important;}
body.pdf-mode .chart-card{background:#ffffff !important;border:1px solid #e5e7eb !important;}
body.pdf-mode .chart-title{color:#111827 !important;}
body.pdf-mode .muted{color:#374151 !important;}
body.pdf-mode .table th{color:#111827 !important;}
body.pdf-mode .table td{color:#111827 !important;}
body.pdf-mode .table th, body.pdf-mode .table td{border-bottom-color:#e5e7eb !important;}
body.pdf-mode .panel{background:#ffffff !important;border:1px solid #e5e7eb !important;}
body.pdf-mode .tbl{background:#ffffff !important;}
body.pdf-mode .tbl th{color:#111827 !important;}
body.pdf-mode .tbl td{color:#111827 !important;}
body.pdf-mode .tbl tr{border-color:#e5e7eb !important;}
body.pdf-mode .btn{box-shadow:none !important;}
body.pdf-mode .dash-quick, body.pdf-mode #btnAtualizar{display:none !important;} /* hide actions in PDF */

/* PDF-only header/footer blocks (injected by JS) */
.pdf-only{display:none;}
body.pdf-mode .pdf-only{display:flex !important;}
.pdf-header{align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #e5e7eb;}
.pdf-header-left{display:flex;align-items:center;gap:10px;}
.pdf-logo{
  height:26px;
  width:auto;
  object-fit:contain;
}
.pdf-title{font-size:14px;font-weight:900;color:#111827;}
.pdf-meta{font-size:11px;color:#374151;margin-top:2px;}
.pdf-footer{justify-content:space-between;gap:12px;margin-top:10px;padding-top:10px;border-top:1px solid #e5e7eb;font-size:10px;color:#6b7280;}
