/* ============================================================================
   FINANCEIRO tab — founder-only financial overview
   ========================================================================== */

.fin-restricted {
  padding: 32px;
  text-align: center;
  font-style: italic;
  color: var(--text-muted, #6b6b6b);
  background: var(--bg-soft, #fafafa);
  border-radius: 6px;
  margin: 16px 0;
}

.fin-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fin-subnav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #e5e5e5);
  margin-bottom: 16px;
  padding-bottom: 0;
}
.fin-subnav-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted, #6b6b6b);
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.fin-subnav-btn:hover {
  color: var(--text-fg, #1a1a1a);
}
.fin-subnav-btn.is-active {
  color: var(--brand, #e60074);
  border-bottom-color: var(--brand, #e60074);
  font-weight: 600;
}

.fin-body {
  min-height: 100px;
}

.fin-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
}

.fin-helper {
  font-size: 12px;
  margin-bottom: 12px;
}

.fin-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted, #6b6b6b);
  font-style: italic;
  background: var(--bg-soft, #fafafa);
  border-radius: 6px;
}
.fin-empty-good {
  color: var(--success, #15803d);
  background: rgba(21, 128, 61, 0.06);
  font-style: normal;
}

/* RESUMO ------------------------------------------------------ */

.fin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.fin-kpi-card {
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 6px;
  padding: 14px 16px;
}
.fin-kpi-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #6b6b6b);
  font-weight: 500;
  margin-bottom: 6px;
}
.fin-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-fg, #1a1a1a);
  line-height: 1.1;
}
.fin-kpi-sublabel {
  font-size: 11px;
  margin-top: 4px;
}

.fin-period-detail {
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 6px;
  padding: 12px 16px;
}
.fin-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
}
.fin-detail-row.is-emphasis {
  border-top: 1px solid var(--border, #e5e5e5);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 700;
  font-size: 14px;
}
.fin-detail-label {
  color: var(--text-muted, #6b6b6b);
}
.fin-detail-value {
  color: var(--text-fg, #1a1a1a);
}
.fin-detail-row.is-emphasis .fin-detail-label,
.fin-detail-row.is-emphasis .fin-detail-value {
  color: var(--text-fg, #1a1a1a);
}

/* TABLES (ledger + transações + discrepancias) ----------------- */

.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}
.fin-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--bg-soft, #fafafa);
  border-bottom: 2px solid var(--border, #e5e5e5);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted, #6b6b6b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.fin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e5e5e5);
  vertical-align: middle;
}
.fin-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}
.fin-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.fin-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}
.fin-strong {
  font-weight: 700;
}
.fin-actions {
  text-align: right;
}

/* STATUS BADGES ------------------------------------------------ */

.fin-status, .fin-tx-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.fin-status-open { background: #fff3cd; color: #856404; }
.fin-status-locked { background: #d1ecf1; color: #0c5460; }
.fin-status-paid { background: #d4edda; color: #155724; }
.fin-status-reversed { background: #f8d7da; color: #721c24; }

.fin-tx-status-paid { background: #d4edda; color: #155724; }
.fin-tx-status-pending { background: #fff3cd; color: #856404; }
.fin-tx-status-expired { background: #e2e3e5; color: #383d41; }
.fin-tx-status-failed { background: #f8d7da; color: #721c24; }
.fin-tx-status-refunded { background: #d1ecf1; color: #0c5460; }

.fin-tx-summary {
  font-size: 12px;
  margin-bottom: 10px;
}

.text-success { color: var(--success, #15803d); }

/* PAYOUT MODAL ------------------------------------------------- */

.fin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.fin-modal {
  background: white;
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.fin-modal-title {
  margin: 0 0 6px;
  font-size: 18px;
}
.fin-modal-period {
  font-size: 12px;
  color: var(--text-muted, #6b6b6b);
  margin-bottom: 16px;
}
.fin-modal-summary {
  background: var(--bg-soft, #fafafa);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 16px;
}
.fin-modal-warning {
  background: #fff3cd;
  border-left: 3px solid #ffc107;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 8px;
  border-radius: 2px;
}
.fin-modal-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  text-align: center;
  margin-bottom: 8px;
}
.fin-modal-input:focus {
  outline: none;
  border-color: var(--brand, #e60074);
}
.fin-modal-error {
  color: var(--danger, #dc2626);
  font-size: 12px;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(220, 38, 38, 0.06);
  border-radius: 2px;
}
.fin-modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
