/* ==============================================================================
   🏛️ AMS HOLDING ENTERPRISE™ — EDUCAÇÃO FINANCEIRA & 5 BALDES (ESTILOS)
   Tema Executivo (Cinza Claro, Cinza Escuro Grafite, Laranja & Branco)
   ============================================================================== */

.fin-viewport-fullscreen {
  height: calc(100vh - 56px) !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  width: 100vw !important;
  max-width: 100vw !important;
  gap: 0 !important;
  background: var(--bg-app) !important;
  overflow: hidden !important;
}

.fin-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
}

.fin-content-full {
  width: 100%;
  min-width: 0;
  padding: 18px 24px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  background: var(--bg-app);
}

/* Os 5 Baldes Oficiais */
.baldes-header-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}
@media (max-width: 1300px) {
  .baldes-header-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .baldes-header-grid { grid-template-columns: 1fr; }
}

.balde-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-card);
}
.balde-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.balde-scott { border-top: 3px solid #F97316; background: var(--bg-surface); }
.balde-scott .balde-badge { background: var(--accent-orange-soft); border: 1px solid #FDBA74; color: #EA580C; }
.balde-scott .balde-val { color: var(--text-primary); }
.balde-scott .balde-dest { color: var(--text-muted); }

.balde-prolabore { border-top: 3px solid #EA580C; background: var(--bg-surface); }
.balde-prolabore .balde-badge { background: var(--bg-app); border: 1px solid var(--border-medium); color: var(--text-primary); }
.balde-prolabore .balde-val { color: var(--text-primary); }
.balde-prolabore .balde-dest { color: var(--text-muted); }

.balde-trafego { border-top: 3px solid #9CA3AF; background: var(--bg-surface); }
.balde-trafego .balde-badge { background: var(--bg-app); border: 1px solid var(--border-medium); color: var(--text-secondary); }
.balde-trafego .balde-val { color: var(--text-secondary); }
.balde-trafego .balde-dest { color: var(--text-muted); }

.balde-guerra { border-top: 3px solid #1F2937; background: var(--bg-surface); }
.balde-guerra .balde-badge { background: #1F2937; border: 1px solid #1F2937; color: #FFFFFF; }
.balde-guerra .balde-val { color: var(--text-primary); }
.balde-guerra .balde-dest { color: var(--text-muted); }

.balde-caixa { border-top: 3px solid #4B5563; background: var(--bg-surface); }
.balde-caixa .balde-badge { background: var(--bg-app); border: 1px solid var(--border-medium); color: var(--text-primary); }
.balde-caixa .balde-val { color: var(--text-primary); }
.balde-caixa .balde-dest { color: var(--text-muted); }

.balde-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.balde-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.balde-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.balde-val {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  margin-top: 6px;
  line-height: 1.1;
}
.balde-dest {
  font-size: 10.5px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Painéis Executivos de Educação Financeira */
.edu-panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1024px) {
  .edu-panel-grid { grid-template-columns: 1fr; }
}

.edu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.edu-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.edu-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Barras de Distribuição Percentual */
.bar-dist-row {
  margin-bottom: 12px;
}
.bar-dist-info {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
}
.bar-dist-track {
  height: 10px;
  border-radius: 100px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.bar-dist-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
}

/* Tabela DRE de Ganhos e Gastos */
.dre-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dre-table th {
  background: var(--bg-app);
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
}
.dre-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.dre-table tr:hover td {
  background: var(--bg-app);
}
.dre-total-row td {
  background: var(--bg-app);
  font-weight: 800;
  font-size: 13px;
  color: var(--text-primary);
  border-top: 2px solid var(--border-medium);
}

/* ==============================================================================
   TABS DE NAVEGAÇÃO EXECUTIVA (GOVERNANÇA PJ vs PESSOAL PF)
   ============================================================================== */
.edu-nav-tabs {
  display: inline-flex;
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
  box-shadow: var(--shadow-card);
}

.edu-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.edu-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.edu-tab-btn.active {
  background: #1F2937;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.15);
}

.edu-aba-pane {
  display: none;
}

.edu-aba-pane.active {
  display: block;
  animation: fadeInEdu 0.25s ease-in-out;
}

@keyframes fadeInEdu {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   🏛️ 3 JANELAS CANÔNICAS DE GESTÃO DO PRÓ-LABORE (50 / 30 / 20)
   ============================================================================== */
.pro-janelas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1150px) {
  .pro-janelas-grid { grid-template-columns: 1fr; }
}

.pro-janela-card {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}
.pro-janela-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.janela-essencial {
  border-top: 3px solid #1F2937;
  background: var(--bg-surface);
}
.janela-essencial .janela-badge {
  background: #1F2937;
  border: 1px solid #1F2937;
  color: #FFFFFF;
}

.janela-patrimonio {
  border-top: 3px solid #F97316;
  background: var(--bg-surface);
}
.janela-patrimonio .janela-badge {
  background: var(--accent-orange-soft);
  border: 1px solid #FDBA74;
  color: #EA580C;
}

.janela-luxos {
  border-top: 3px solid #EA580C;
  background: var(--bg-surface);
}
.janela-luxos .janela-badge {
  background: var(--bg-app);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.janela-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.janela-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}
.janela-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.janela-metric-box {
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
}
.janela-val-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.janela-val-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.janela-val-num {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
}

.janela-progress-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.janela-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.janela-info-box {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.janela-sec-o-que-e, .janela-sec-diretriz {
  background: var(--bg-app);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}
.janela-sec-title {
  font-weight: 800;
  font-size: 10.5px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

/* Gráficos Pessoais PF */
.pro-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1150px) {
  .pro-charts-grid { grid-template-columns: 1fr; }
}

.pro-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pro-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.pro-chart-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pro-chart-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-orange-soft);
  border: 1px solid #FDBA74;
  color: #EA580C;
}

.regua-alocacao-track {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}
.regua-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}
.regua-seg-50 { width: 50%; background: #1F2937; }
.regua-seg-30 { width: 30%; background: #F97316; }
.regua-seg-20 { width: 20%; background: #4B5563; }

.regua-legendas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  font-size: 11px;
}
.regua-legenda-item {
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 6px 4px;
}
.regua-legenda-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
