/* Relatório de custo — layout alinhado ao tema "budget control light" (escopo: .budget-cost-report-root) */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap");

.budget-cost-report-root {
  /* Alinhado ao restante do app: fundo branco e superfícies neutras */
  --bcr-bg: #ffffff;
  --bcr-bg2: #f8fafc;
  --bcr-surface: #ffffff;
  --bcr-surface2: #f8fafc;
  --bcr-surface3: #f1f5f9;
  --bcr-border: rgba(0, 0, 0, 0.08);
  --bcr-border2: rgba(0, 0, 0, 0.05);
  --bcr-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
  --bcr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);

  --bcr-gold: #9a6f1e;
  --bcr-gold-light: #b8882a;
  --bcr-gold-bg: rgba(154, 111, 30, 0.08);
  --bcr-gold-border: rgba(154, 111, 30, 0.2);

  --bcr-green: #1a7a3c;
  --bcr-green-bg: rgba(26, 122, 60, 0.08);
  --bcr-green-border: rgba(26, 122, 60, 0.2);

  --bcr-red: #c0392b;
  --bcr-red-bg: rgba(192, 57, 43, 0.08);
  --bcr-red-border: rgba(192, 57, 43, 0.2);

  --bcr-amber: #b35900;
  --bcr-amber-bg: rgba(179, 89, 0, 0.08);
  --bcr-amber-border: rgba(179, 89, 0, 0.2);

  --bcr-blue: #1a5fa8;
  --bcr-blue-bg: rgba(26, 95, 168, 0.08);
  --bcr-blue-border: rgba(26, 95, 168, 0.2);

  --bcr-text: #1c1a16;
  --bcr-text-mid: #5a5550;
  --bcr-text-dim: #9a9590;
  --bcr-radius: 10px;

  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13.5px;
  color: var(--bcr-text);
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 28px 32px;
  margin: 0 -4px;
  box-sizing: border-box;
}

.budget-cost-report-root *,
.budget-cost-report-root *::before,
.budget-cost-report-root *::after {
  box-sizing: border-box;
}

/* Header */
.bcr-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--bcr-border);
  gap: 16px;
  flex-wrap: wrap;
}
.bcr-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bcr-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #c9a84c, #8a6010);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 12px rgba(154, 111, 30, 0.25);
  color: #fff;
  font-weight: 700;
}
.bcr-logo-text .bcr-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  color: var(--bcr-gold);
  letter-spacing: 0.04em;
}
.bcr-logo-text .bcr-module {
  font-size: 11px;
  color: var(--bcr-text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.bcr-project-info {
  text-align: right;
  min-width: 0;
  flex: 1;
}
.bcr-project-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  color: var(--bcr-text);
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}
.bcr-project-meta {
  font-size: 11.5px;
  color: var(--bcr-text-dim);
  margin-top: 6px;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.bcr-project-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bcr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.bcr-dot-amber {
  background: var(--bcr-amber);
}
.bcr-dot-green {
  background: var(--bcr-green);
}
.bcr-dot-red {
  background: var(--bcr-red);
}

/* Status bar */
.bcr-status-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  background: var(--bcr-surface);
  border: 1px solid var(--bcr-border);
  border-radius: var(--bcr-radius);
  padding: 12px 18px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--bcr-shadow-sm);
}
.bcr-status-label {
  font-size: 11px;
  color: var(--bcr-text-dim);
  margin-right: 2px;
}
.bcr-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.bcr-chip-amber {
  background: var(--bcr-amber-bg);
  color: var(--bcr-amber);
  border: 1px solid var(--bcr-amber-border);
}
.bcr-chip-green {
  background: var(--bcr-green-bg);
  color: var(--bcr-green);
  border: 1px solid var(--bcr-green-border);
}
.bcr-chip-red {
  background: var(--bcr-red-bg);
  color: var(--bcr-red);
  border: 1px solid var(--bcr-red-border);
}
.bcr-chip-blue {
  background: var(--bcr-blue-bg);
  color: var(--bcr-blue);
  border: 1px solid var(--bcr-blue-border);
}
.bcr-chip-gold {
  background: var(--bcr-gold-bg);
  color: var(--bcr-gold);
  border: 1px solid var(--bcr-gold-border);
}
.bcr-status-sep {
  width: 1px;
  height: 18px;
  background: var(--bcr-border);
  margin: 0 4px;
}
.bcr-spacer {
  flex: 1;
  min-width: 8px;
}
.bcr-report-date {
  font-size: 11.5px;
  color: var(--bcr-text-dim);
  font-family: "DM Mono", ui-monospace, monospace;
}

/* Section label */
.bcr-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bcr-text-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bcr-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bcr-border);
}

/* KPI cards */
.bcr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
  overflow: visible;
  position: relative;
}
@media (max-width: 1400px) {
  .bcr-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .bcr-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bcr-kpi-card {
  background: var(--bcr-surface);
  border: 1px solid var(--bcr-border);
  border-radius: var(--bcr-radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bcr-shadow-sm);
  transition: box-shadow 0.2s;
}
.bcr-kpi-card--tipped {
  overflow: visible;
  z-index: 1;
}
.bcr-kpi-card--tipped:hover,
.bcr-kpi-card--tipped:focus-within {
  z-index: 40;
}
/* Tooltips: também fora de .budget-cost-report-root (ex.: visão analítica do orçamento) */
.bcr-tip-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 25;
}
.bcr-tip-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--bcr-border, rgba(0, 0, 0, 0.1));
  background: var(--bcr-surface2, #f8fafc);
  color: var(--bcr-text-mid, #5a5550);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-family: "DM Sans", system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--bcr-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}
.bcr-tip-btn:hover,
.bcr-tip-btn:focus-visible {
  background: var(--bcr-blue-bg, rgba(26, 95, 168, 0.08));
  border-color: var(--bcr-blue-border, rgba(26, 95, 168, 0.2));
  color: var(--bcr-blue, #1a5fa8);
  outline: none;
}
.bcr-tip-bubble {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(300px, 78vw);
  max-height: min(220px, 40vh);
  overflow-y: auto;
  padding: 10px 12px;
  background: var(--bcr-text, #1e293b);
  color: #f8fafc;
  font-size: 11px;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    visibility 0.12s;
  pointer-events: none;
  text-align: left;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  hyphens: auto;
}
.bcr-tip-wrap:hover .bcr-tip-bubble,
.bcr-tip-wrap:focus-within .bcr-tip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.bcr-mini-card--tipped {
  overflow: visible !important;
  z-index: 1;
}
.bcr-mini-card--tipped:hover,
.bcr-mini-card--tipped:focus-within {
  z-index: 40;
}
.bcr-wbs-explode-table .bcr-wbs-total-row td {
  background: var(--bcr-surface2);
  border-top: 2px solid var(--bcr-border);
  font-size: 12px;
}
@media print {
  .bcr-tip-wrap {
    display: none !important;
  }
}
.bcr-kpi-card:hover {
  box-shadow: var(--bcr-shadow);
}
.bcr-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 10px 10px 0 0;
}
.bcr-kpi-gold::before {
  background: linear-gradient(90deg, var(--bcr-gold-light), transparent);
}
.bcr-kpi-blue::before {
  background: linear-gradient(90deg, var(--bcr-blue), transparent);
}
.bcr-kpi-green::before {
  background: linear-gradient(90deg, var(--bcr-green), transparent);
}
.bcr-kpi-red::before {
  background: linear-gradient(90deg, var(--bcr-red), transparent);
}
.bcr-kpi-amber::before {
  background: linear-gradient(90deg, var(--bcr-amber), transparent);
}

.bcr-kpi-label {
  font-size: 10px;
  color: var(--bcr-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bcr-kpi-acronym {
  font-family: "DM Mono", monospace;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bcr-surface3);
  color: var(--bcr-text-mid);
}
.bcr-kpi-value {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 5px;
  word-break: break-word;
}
.bcr-kpi-sub {
  font-size: 10.5px;
  color: var(--bcr-text-dim);
  line-height: 1.3;
}

/* Panel */
.bcr-panel {
  background: var(--bcr-surface);
  border: 1px solid var(--bcr-border);
  border-radius: var(--bcr-radius);
  overflow: hidden;
  box-shadow: var(--bcr-shadow-sm);
}
.bcr-panel-header {
  padding: 13px 18px 12px;
  border-bottom: 1px solid var(--bcr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bcr-surface2);
}
.bcr-panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bcr-text-mid);
  font-weight: 600;
}
.bcr-panel-body {
  padding: 16px 18px;
}

.bcr-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
}
.bcr-badge-green {
  background: var(--bcr-green-bg);
  color: var(--bcr-green);
  border: 1px solid var(--bcr-green-border);
}
.bcr-badge-red {
  background: var(--bcr-red-bg);
  color: var(--bcr-red);
  border: 1px solid var(--bcr-red-border);
}
.bcr-badge-amber {
  background: var(--bcr-amber-bg);
  color: var(--bcr-amber);
  border: 1px solid var(--bcr-amber-border);
}
.bcr-badge-blue {
  background: var(--bcr-blue-bg);
  color: var(--bcr-blue);
  border: 1px solid var(--bcr-blue-border);
}

/* Progress */
.bcr-progress-wrap {
  margin-bottom: 12px;
}
.bcr-progress-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 8px;
}
.bcr-progress-name {
  font-size: 12px;
  color: var(--bcr-text-mid);
}
.bcr-progress-track {
  height: 7px;
  background: var(--bcr-surface3);
  border-radius: 4px;
  overflow: hidden;
}
.bcr-progress-fill {
  height: 100%;
  border-radius: 4px;
  max-width: 100%;
}
.bcr-fill-gold {
  background: linear-gradient(90deg, #b8882a, #d4a040);
}
.bcr-fill-green {
  background: linear-gradient(90deg, #1a7a3c, #28a050);
}
.bcr-fill-blue {
  background: linear-gradient(90deg, #1a5fa8, #2878c8);
}
.bcr-fill-red {
  background: linear-gradient(90deg, #c0392b, #e04030);
}
.bcr-fill-amber {
  background: linear-gradient(90deg, #b35900, #d47010);
}

/* Index bars */
.bcr-index-bar-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.bcr-index-bar-name {
  font-size: 11px;
  color: var(--bcr-text-mid);
  width: 44px;
  flex-shrink: 0;
  font-family: "DM Mono", monospace;
}
.bcr-index-bar-track {
  flex: 1;
  height: 18px;
  background: var(--bcr-surface3);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--bcr-border2);
}
.bcr-index-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 10px;
  font-family: "DM Mono", monospace;
  font-weight: 600;
  color: #fff;
  min-width: 0;
}
.bcr-index-bar-fill.bcr-fill-amber {
  background: linear-gradient(90deg, #b35900, #d47010);
}
.bcr-index-bar-fill.bcr-fill-red {
  background: linear-gradient(90deg, #c0392b, #e04030);
}
.bcr-index-bar-label {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  width: 44px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

/* Mini CV/SV under chart */
.bcr-mini-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.bcr-mini-metric {
  background: var(--bcr-surface2);
  border: 1px solid var(--bcr-border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.bcr-mini-metric.bcr-neg {
  background: var(--bcr-red-bg);
  border-color: var(--bcr-red-border);
}
.bcr-mini-metric.bcr-pos {
  background: var(--bcr-green-bg);
  border-color: var(--bcr-green-border);
}
.bcr-mini-lbl {
  font-size: 10px;
  color: var(--bcr-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bcr-mini-val {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  margin-top: 3px;
}
.bcr-mini-hint {
  font-size: 10px;
  color: var(--bcr-text-dim);
}
.bcr-mini-metric.bcr-neg {
  background: var(--bcr-red-bg);
  border: 1px solid var(--bcr-red-border);
}
.bcr-mini-metric.bcr-pos {
  background: var(--bcr-green-bg);
  border: 1px solid var(--bcr-green-border);
}

/* Curva S em largura total + faixa de índices + previsão/variância */
.bcr-scurve-section {
  margin-bottom: 18px;
}
.bcr-post-curve-row {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .bcr-post-curve-row {
    grid-template-columns: 1fr;
  }
}
.bcr-post-curve-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.bcr-wbs-full-row {
  margin-bottom: 20px;
}
.bcr-wbs-explode-table {
  min-width: 1120px;
}

/* P&L por voz (details) */
.bcr-pl-voices-wrap {
  padding: 0 4px 12px;
}
.bcr-pl-voice-details {
  border: 1px solid var(--bcr-border);
  border-radius: var(--bcr-radius);
  margin-bottom: 10px;
  background: var(--bcr-surface);
  overflow: hidden;
}
.bcr-pl-voice-details[open] .bcr-pl-chevron {
  transform: rotate(90deg);
}
.bcr-pl-voice-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--bcr-surface2);
  border-bottom: 1px solid var(--bcr-border2);
  font-family: "DM Sans", system-ui, sans-serif;
}
.bcr-pl-voice-summary::-webkit-details-marker {
  display: none;
}
.bcr-pl-voice-summary-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  flex: 1;
}
.bcr-pl-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
  color: var(--bcr-text-dim);
  font-size: 12px;
}
.bcr-pl-voice-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bcr-text-mid);
}
.bcr-pl-voice-summary-totals {
  font-size: 11.5px;
  font-family: "DM Mono", ui-monospace, monospace;
  color: var(--bcr-text-mid);
}
.bcr-pl-voice-sep {
  opacity: 0.45;
  margin: 0 4px;
}
.bcr-pl-spark-wrap {
  flex-shrink: 0;
  margin-left: auto;
}
.bcr-pl-spark-svg {
  width: 120px;
  height: 36px;
  vertical-align: middle;
}
.bcr-pl-voice-table-wrap {
  overflow: auto;
}
.bcr-pl-inner-table {
  min-width: 880px;
}
.bcr-pl-voice-subtotal td {
  background: var(--bcr-surface3) !important;
  font-weight: 600 !important;
  border-top: 1px solid var(--bcr-border) !important;
}
.bcr-ptd-gloss {
  font-size: 10.5px;
  color: var(--bcr-text-dim);
  font-weight: 400;
  max-width: 720px;
  line-height: 1.35;
}
.bcr-pl-ptd-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 4px;
}
.bcr-pl-ptd-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bcr-surface3);
  border: 1px solid var(--bcr-border2);
}
.bcr-pl-ptd-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bcr-text-dim);
}
.bcr-pl-ptd-val {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--bcr-blue);
}

/* Two column layout */
.bcr-two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .bcr-two-col {
    grid-template-columns: 1fr;
  }
}

.bcr-two-col-balanced {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .bcr-two-col-balanced {
    grid-template-columns: 1fr;
  }
}

/* Data tables */
.bcr-data-table {
  width: 100%;
  border-collapse: collapse;
}
.bcr-data-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bcr-text-dim);
  padding: 0 12px 10px;
  text-align: right;
  font-weight: 600;
  border-bottom: 1.5px solid var(--bcr-border);
}
.bcr-data-table th:first-child {
  text-align: left;
}
.bcr-data-table td {
  padding: 9px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--bcr-border2);
  text-align: right;
  font-family: "DM Mono", ui-monospace, monospace;
  color: var(--bcr-text-mid);
}
.bcr-data-table td:first-child {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--bcr-text);
  text-align: left;
}
.bcr-data-table tbody tr:last-child td {
  border-bottom: none;
}
.bcr-data-table tbody tr:hover td {
  background: var(--bcr-surface2);
}
.bcr-val-green {
  color: var(--bcr-green) !important;
  font-weight: 600;
}
.bcr-val-red {
  color: var(--bcr-red) !important;
  font-weight: 600;
}
.bcr-val-amber {
  color: var(--bcr-amber) !important;
  font-weight: 600;
}
.bcr-val-muted {
  color: var(--bcr-text-dim) !important;
  font-weight: 500;
}

/* P&L: agrupamento por voz (receita, custos fixos, etc.) */
.bcr-pl-voice td {
  background: var(--bcr-surface2) !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--bcr-text-mid) !important;
  padding: 10px 12px !important;
  text-align: left !important;
  border-top: 1px solid var(--bcr-border) !important;
  border-bottom: 1px solid var(--bcr-border) !important;
}
.bcr-pl-line td:first-child {
  padding-left: 18px !important;
}

/* Variance */
.bcr-variance-box {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.bcr-var-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bcr-var-row .bcr-var-split {
  flex: 1;
  min-width: 0;
}
.bcr-var-label {
  font-size: 11.5px;
  color: var(--bcr-text-mid);
  width: 130px;
  flex-shrink: 0;
}
.bcr-var-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bcr-surface3);
  border-radius: 4px;
  position: relative;
  border: 1px solid var(--bcr-border2);
}
.bcr-var-center {
  position: absolute;
  left: 50%;
  top: -2px;
  width: 2px;
  height: 12px;
  background: var(--bcr-border);
  z-index: 1;
}
.bcr-var-fill {
  position: absolute;
  height: 8px;
  border-radius: 4px;
  top: 0;
  max-width: 50%;
}
.bcr-var-positive {
  background: var(--bcr-green);
  right: 50%;
}
.bcr-var-negative {
  background: var(--bcr-red);
  left: 50%;
}
.bcr-var-value {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  width: 88px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

/* Barra de variância: centro = zero; vermelho à esquerda (desfavorável), verde à direita (favorável) */
.bcr-var-split {
  display: flex;
  flex: 1;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--bcr-border2);
  min-width: 0;
}
.bcr-var-split-half {
  flex: 1;
  position: relative;
  background: var(--bcr-surface3);
}
.bcr-var-split-half:first-child {
  border-right: 1px solid rgba(0, 0, 0, 0.07);
}
.bcr-var-split-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
}
.bcr-var-split-fill.neg {
  right: 0;
  background: var(--bcr-red);
}
.bcr-var-split-fill.pos {
  left: 0;
  background: var(--bcr-green);
}

/* Forecast grid */
.bcr-forecast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bcr-fc-item {
  background: var(--bcr-surface2);
  border: 1px solid var(--bcr-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.bcr-fc-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bcr-text-dim);
  margin-bottom: 5px;
}
.bcr-fc-val {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}
.bcr-fc-sub {
  font-size: 10.5px;
  color: var(--bcr-text-dim);
  margin-top: 3px;
  line-height: 1.35;
}

.bcr-etc-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bcr-gold-bg);
  border: 1px solid var(--bcr-gold-border);
}
.bcr-etc-lbl {
  font-size: 10px;
  color: var(--bcr-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.bcr-etc-val {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--bcr-gold);
}
.bcr-etc-sub {
  font-size: 11px;
  color: var(--bcr-text-dim);
  margin-top: 3px;
}

/* Toolbar / actions */
.bcr-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.bcr-toolbar .bcr-page-header {
  flex: 1;
  min-width: 220px;
  margin: 0;
  padding: 0;
  border: none;
}
.bcr-toolbar-actions .btn {
  border-radius: 10px;
}

/* Footnote */
.bcr-footnote {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--bcr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--bcr-text-dim);
}
.bcr-footnote-mono {
  font-family: "DM Mono", monospace;
}

/* SVG curve container */
.bcr-scurve-wrap {
  padding: 8px 4px 4px;
}
.bcr-scurve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--bcr-text-mid);
  align-items: center;
}
.bcr-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bcr-legend-swatch {
  width: 10px;
  height: 3px;
  border-radius: 1.5px;
  flex-shrink: 0;
}

@media print {
  .budget-cost-report-root {
    background: #fff;
    box-shadow: none;
    margin: 0;
    padding: 12px;
  }
  .bcr-kpi-card,
  .bcr-panel {
    box-shadow: none;
  }
}
