#tab-painelGerencial {
  background: #edf2f6;
  padding: 0;
}

.ui-hint {
  max-width: 420px;
  line-height: 1.35;
  white-space: pre-line;
}

.pg-shell {
  --pg-ink: #172033;
  --pg-muted: #66758a;
  --pg-line: #d7e0e8;
  --pg-blue: #3269df;
  --pg-teal: #0f9f82;
  --pg-coral: #e06b3c;
  --pg-amber: #d79a16;
  color: var(--pg-ink);
  background:
    linear-gradient(90deg, rgba(50, 105, 223, .035) 1px, transparent 1px),
    linear-gradient(rgba(50, 105, 223, .035) 1px, transparent 1px),
    #edf2f6;
  background-size: 28px 28px;
  min-height: calc(100vh - 150px);
  padding: 12px;
  font-family: "Segoe UI", Arial, sans-serif;
}

.pg-shell *,
.pg-shell *::before,
.pg-shell *::after {
  box-sizing: border-box;
}

.pg-shell [data-hint] {
  cursor: help;
}

#pg-root[data-pg-hints="off"] [data-hint] {
  cursor: default;
}

#pg-root[data-pg-hints="off"] [data-hint]:focus-visible {
  outline: none;
}

.pg-shell button[data-hint],
.pg-shell input,
.pg-shell select {
  cursor: pointer;
}

.pg-shell [data-hint]:focus-visible {
  outline: 2px solid rgba(50, 105, 223, .65);
  outline-offset: 2px;
}

.pg-shell svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 10px 12px 10px 16px;
  background: #fff;
  border: 1px solid var(--pg-line);
  border-left: 5px solid var(--pg-teal);
  border-radius: 6px;
}

.pg-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 240px;
}

.pg-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--pg-teal);
  border-radius: 5px;
}

.pg-brand-mark svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.1;
}

.pg-brand h2 {
  margin: 1px 0 0;
  font-size: 1.22rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.pg-brand p {
  margin: 3px 0 0;
  color: var(--pg-muted);
  font-size: .69rem;
  font-weight: 600;
}

.pg-eyebrow {
  display: block;
  color: var(--pg-teal);
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pg-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.pg-controls label {
  display: grid;
  gap: 3px;
  color: var(--pg-muted);
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pg-controls input,
.pg-controls select {
  height: 31px;
  min-width: 136px;
  padding: 0 8px;
  color: var(--pg-ink);
  background: #f9fbfc;
  border: 1px solid #cbd6e1;
  border-radius: 4px;
  font: 700 .69rem "Segoe UI", Arial, sans-serif;
  outline: none;
}

.pg-controls input:focus,
.pg-controls select:focus {
  border-color: var(--pg-blue);
  box-shadow: 0 0 0 2px rgba(50, 105, 223, .12);
}

.pg-control-wide select {
  min-width: 205px;
  max-width: 250px;
}

.pg-export-buttons {
  display: flex;
  gap: 5px;
}

.pg-hints-toggle {
  min-width: 54px;
}

.pg-switch {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
}

.pg-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.pg-switch i {
  position: absolute;
  inset: 0;
  background: #cbd5df;
  border-radius: 10px;
  transition: background .16s ease;
}

.pg-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .16s ease;
}

.pg-switch input:checked + i {
  background: var(--pg-teal);
}

.pg-switch input:checked + i::after {
  transform: translateX(14px);
}

.pg-switch input:focus-visible + i {
  outline: 2px solid rgba(50, 105, 223, .65);
  outline-offset: 2px;
}

.pg-export-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 31px;
  min-width: 62px;
  padding: 0 8px;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font: 800 .66rem "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}

.pg-export-buttons .png { background: #147d69; }
.pg-export-buttons .pdf { background: #c24732; }
.pg-export-buttons button:hover { filter: brightness(.94); }
.pg-export-buttons svg { width: 15px; height: 15px; }

.pg-context {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 31px;
  padding: 5px 10px;
  color: var(--pg-muted);
  font-size: .63rem;
}

.pg-context span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pg-context svg { width: 13px; height: 13px; }
.pg-context b { color: var(--pg-ink); }

.pg-kpis {
  display: grid;
  grid-template-columns: 1.18fr repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.pg-kpi {
  position: relative;
  min-width: 0;
  height: 78px;
  padding: 11px 12px 9px 15px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--pg-line);
  border-radius: 5px;
}

.pg-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--pg-blue);
}

.pg-kpi > span {
  display: block;
  margin-bottom: 3px;
  color: var(--pg-muted);
  font-size: .59rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pg-kpi strong {
  display: block;
  overflow: hidden;
  font-size: 1.08rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-kpi small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--pg-muted);
  font-size: .61rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-kpi.financial strong,
.pg-kpi.billed strong {
  overflow: visible;
  font-size: .88rem;
  text-overflow: clip;
}

.pg-kpi.financial small,
.pg-kpi.billed small {
  overflow: visible;
  font-size: .57rem;
  text-overflow: clip;
}

.pg-kpi.status::before { background: var(--pg-teal); }
.pg-kpi.status.warn::before { background: var(--pg-amber); }
.pg-kpi.status.critical::before { background: #d64545; }
.pg-kpi.financial::before { background: var(--pg-teal); }
.pg-kpi.billed::before { background: var(--pg-coral); }
.pg-kpi.time::before { background: var(--pg-amber); }

.pg-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
}

.pg-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--pg-line);
  border-radius: 5px;
  overflow: hidden;
}

.pg-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid #e6edf3;
}

.pg-panel-head span {
  display: block;
  margin-bottom: 1px;
  color: var(--pg-muted);
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pg-panel-head h3 {
  margin: 0;
  font-size: .8rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.pg-panel-head em {
  max-width: 48%;
  padding: 3px 6px;
  overflow: hidden;
  color: #35506b;
  background: #eef3f7;
  border-radius: 3px;
  font-size: .58rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-panel-head em.ok { color: #08745f; background: #e5f6f1; }
.pg-panel-head em.warn { color: #92610a; background: #fff5d8; }
.pg-panel-head em.critical { color: #ad3030; background: #feecec; }

.pg-hist-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.pg-hist-scope {
  display: inline-flex;
  height: 25px;
  border: 1px solid #cbd6e1;
  border-radius: 4px;
  overflow: hidden;
}

.pg-hist-scope button {
  min-width: 48px;
  padding: 0 7px;
  color: #5d6c7f;
  background: #fff;
  border: 0;
  border-right: 1px solid #cbd6e1;
  font: 800 .58rem "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}

.pg-hist-scope button:last-child {
  min-width: 75px;
  border-right: 0;
}

.pg-hist-scope button.active {
  color: #fff;
  background: #3269df;
}

.pg-hist-month {
  width: 122px;
  height: 25px;
  padding: 0 5px;
  color: #25364a;
  background: #fff;
  border: 1px solid #cbd6e1;
  border-radius: 4px;
  font: 700 .61rem "Segoe UI", Arial, sans-serif;
}

.pg-hist-label-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 6px;
  color: #5d6c7f;
  background: #f8fafc;
  border: 1px solid #cbd6e1;
  border-radius: 4px;
  font: 800 .57rem "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.pg-hist-label-toggle input {
  appearance: none;
  width: 12px;
  min-width: 12px;
  height: 12px;
  margin: 0;
  background: #fff;
  border: 1px solid #9cafc1;
  border-radius: 2px;
  cursor: pointer;
}

.pg-hist-label-toggle input:checked {
  background: #3269df;
  border-color: #3269df;
  box-shadow: inset 0 0 0 2px #fff;
}

.pg-flow-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.pg-hist-panel-head em {
  max-width: none;
}

.pg-physical-panel { grid-column: span 5; min-height: 236px; }
.pg-financial-panel { grid-column: span 7; min-height: 236px; }
.pg-hist-panel { grid-column: span 9; min-height: 272px; }
.pg-staff-panel { grid-column: span 3; min-height: 272px; }
.pg-flow-panel { grid-column: 1 / -1; min-height: 310px; }
.pg-alert-panel { grid-column: 1 / -1; }

.pg-gauge-layout {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(150px, 1.1fr);
  align-items: center;
  height: 190px;
  padding: 5px 12px 8px;
}

.pg-gauge { height: 166px; min-width: 0; }

.pg-metric-list {
  display: grid;
  gap: 5px;
}

.pg-metric-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 35px;
  padding: 7px 9px;
  background: #f4f7f9;
  border-left: 3px solid #c4d0dc;
}

.pg-metric-list span { color: var(--pg-muted); font-size: .64rem; font-weight: 700; }
.pg-metric-list b { font-size: .78rem; }
.pg-metric-list div:nth-child(1) { border-left-color: var(--pg-blue); }
.pg-metric-list div:nth-child(2) { border-left-color: var(--pg-teal); }
.pg-metric-list div:nth-child(3) { border-left-color: var(--pg-amber); }

.pg-fin-chart { height: 132px; padding: 12px 14px 3px; }

.pg-fin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 3px 10px 10px;
}

.pg-fin-summary span {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 5px;
  min-width: 0;
  color: var(--pg-muted);
  font-size: .57rem;
  font-weight: 700;
}

.pg-fin-summary b {
  grid-column: 2;
  overflow: hidden;
  color: var(--pg-ink);
  font-size: .67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-fin-summary i {
  grid-row: span 2;
  width: 4px;
  height: 24px;
  border-radius: 2px;
}

.pg-fin-summary i.plan { background: var(--pg-blue); }
.pg-fin-summary i.earned { background: var(--pg-teal); }
.pg-fin-summary i.billed { background: var(--pg-coral); }

.pg-chart-lg { height: 220px; padding: 10px 12px 8px; }
.pg-chart-flow { height: 258px; padding: 10px 12px 8px; }

.pg-staff-panel .pg-panel-head > svg {
  width: 22px;
  height: 22px;
  color: var(--pg-teal);
}

.pg-staff-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 10px 12px;
  background: var(--pg-line);
  border: 1px solid var(--pg-line);
}

.pg-staff-compare div {
  padding: 12px 8px;
  text-align: center;
  background: #fff;
}

.pg-staff-compare span,
.pg-staff-compare small {
  display: block;
  color: var(--pg-muted);
  font-size: .57rem;
  font-weight: 700;
}

.pg-staff-compare strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 1.48rem;
}

.pg-staff-compare div:first-child strong { color: var(--pg-blue); }
.pg-staff-compare div:last-child strong { color: var(--pg-coral); }

.pg-staff-gap {
  padding: 7px 12px;
}

.pg-staff-gap > span {
  color: var(--pg-muted);
  font-size: .58rem;
  font-weight: 700;
}

.pg-staff-gap > b {
  float: right;
  font-size: .67rem;
}

.pg-staff-gap > div {
  clear: both;
  height: 10px;
  margin-top: 5px;
  overflow: hidden;
  background: #e5ebf0;
  border-radius: 5px;
}

.pg-staff-gap i {
  display: block;
  height: 100%;
  background: var(--pg-teal);
  border-radius: inherit;
}

.pg-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--pg-line);
}

.pg-alert {
  display: grid;
  grid-template-columns: 7px 1fr;
  gap: 8px;
  min-height: 64px;
  padding: 10px;
  background: #fff;
}

.pg-alert-dot {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  background: #8795a7;
  border-radius: 50%;
}

.pg-alert.ok .pg-alert-dot { background: var(--pg-teal); }
.pg-alert.warn .pg-alert-dot { background: var(--pg-amber); }
.pg-alert.critical .pg-alert-dot { background: #d64545; }
.pg-alert strong { display: block; font-size: .66rem; }
.pg-alert p { margin: 3px 0 0; color: var(--pg-muted); font-size: .59rem; line-height: 1.3; }

.pg-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px 1px;
  color: #7b8898;
  font-size: .56rem;
  font-weight: 600;
}

.pg-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 70px auto;
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid #0f9f82;
  border-radius: 6px;
}

.pg-empty strong { font-size: 1rem; }
.pg-empty span { color: #64748b; font-size: .75rem; }
.pg-empty button {
  padding: 7px 12px;
  color: #fff;
  background: #3269df;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.pg-export-host .pg-shell {
  min-height: 0;
}

.pg-export-clone .pg-head {
  align-items: center;
}

.pg-export-value {
  display: flex;
  align-items: center;
  min-width: 136px;
  height: 31px;
  padding: 0 8px;
  color: var(--pg-ink);
  background: #f9fbfc;
  border: 1px solid #cbd6e1;
  border-radius: 4px;
  font-size: .69rem;
  text-transform: none;
}

@media (max-width: 1200px) {
  .pg-head { align-items: flex-start; flex-direction: column; }
  .pg-controls { justify-content: flex-start; width: 100%; }
  .pg-kpis { grid-template-columns: repeat(3, 1fr); }
  .pg-physical-panel,
  .pg-financial-panel { grid-column: span 6; }
  .pg-hist-panel { grid-column: span 8; }
  .pg-staff-panel { grid-column: span 4; }
}

@media (max-width: 800px) {
  .pg-shell { padding: 7px; }
  .pg-controls label,
  .pg-control-wide { flex: 1 1 180px; }
  .pg-controls input,
  .pg-controls select,
  .pg-control-wide select { width: 100%; max-width: none; }
  .pg-kpis { grid-template-columns: repeat(2, 1fr); }
  .pg-kpi.status { grid-column: 1 / -1; }
  .pg-physical-panel,
  .pg-financial-panel,
  .pg-hist-panel,
  .pg-staff-panel { grid-column: 1 / -1; }
  .pg-alert-grid { grid-template-columns: repeat(2, 1fr); }
  .pg-context { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pg-hist-panel-head { align-items: flex-start; flex-direction: column; }
  .pg-hist-head-actions { justify-content: flex-start; width: 100%; }
}

@media (max-width: 520px) {
  .pg-kpis { grid-template-columns: 1fr; }
  .pg-kpi.status { grid-column: auto; }
  .pg-gauge-layout { grid-template-columns: 1fr; height: auto; }
  .pg-gauge { height: 160px; }
  .pg-fin-summary,
  .pg-alert-grid { grid-template-columns: 1fr; }
  .pg-footer { flex-direction: column; }
}
