/* Finances: editorial overview, compact weekly flow and a readable season ledger.
   Loaded after the site-wide theme and scoped to the authenticated app. */
.stadium-app .board .main .finance-columns {
  gap: 18px;
}

.stadium-app .board .main .finance-columns > :is(.fin-cash, .fin-weekly, .fin-ledger) {
  min-width: 0;
  padding: clamp(20px, 2vw, 30px);
  overflow: hidden;
}

.stadium-app .board .main:not(.dashboard) .finance-columns > .fin-cash {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 24px;
  min-height: 0;
  padding: 12px 20px;
  border-color: rgba(166, 217, 148, .48);
  background:
    linear-gradient(105deg, #113a33 0%, #0e302c 58%, #112f30 100%);
  box-shadow: inset 3px 0 var(--color-accent);
}

.stadium-app .board .main .fin-cash::before {
  content: none;
}

.stadium-app .board .main .fin-cash-details,
.stadium-app .board .main .fin-cash-side {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.stadium-app .board .main .fin-cash-details {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.stadium-app .board .main .fin-cash h2 {
  margin: 0;
  color: #bbdabd;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.stadium-app .board .main .fin-cash .finance-amount {
  color: #f4ffe9;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1.07;
  white-space: nowrap;
  overflow-wrap: normal;
}

.stadium-app .board .main .fin-cash .fin-cash-weekly {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.stadium-app .board .main .fin-cash .cash-split {
  max-width: 600px;
  gap: 6px;
  margin: 0;
}

.stadium-app .board .main .fin-cash .cash-flow-row {
  justify-content: space-between;
  padding: 7px 0;
  border-color: rgba(172, 213, 178, .2);
  text-align: left;
}

.stadium-app .board .main .fin-cash .cash-available {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 800;
}

.stadium-app .board .main .fin-cash-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.stadium-app .board .main .fin-cash .cash-actions {
  justify-content: flex-end;
  gap: 10px;
}

.stadium-app .board .main .fin-cash .cash-actions .btn {
  min-width: 104px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 760;
  white-space: nowrap;
}

.stadium-app .board .main .fin-cash .wallet-line {
  max-width: 380px;
  margin: 0;
  color: #b8d5c4;
  font-size: .82rem;
  line-height: 1.5;
  text-align: right;
  overflow-wrap: anywhere;
}

.stadium-app .board .main .fin-cash .wallet-line a { color: var(--color-accent-light); }

.stadium-app .board .main .finance-columns > :is(.fin-weekly, .fin-ledger) {
  display: flex;
  flex-direction: column;
  background: #102b29;
}

.stadium-app .board .main .fin-panel-heading {
  display: flex;
  align-items: center;
  min-height: 33px;
  margin: 0 0 21px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(143, 183, 154, .22);
}

.stadium-app .board .main .fin-panel-heading::before {
  width: 4px;
  height: 21px;
  margin-right: 12px;
  border-radius: 4px;
  background: var(--color-accent);
  content: '';
  flex: none;
}

.stadium-app .board .main .fin-panel-heading h2 {
  margin: 0;
  color: #eef8ed;
  font-size: clamp(1.05rem, 1.05rem + .35vw, 1.32rem);
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.stadium-app .board .main .fin-weekly-figure {
  margin-bottom: 24px;
  font-size: clamp(1.85rem, 2.3vw, 2.7rem);
  font-weight: 850;
  letter-spacing: -.055em;
  line-height: 1.13;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stadium-app .board .main .fin-positive { color: var(--color-pos); }
.stadium-app .board .main .fin-negative { color: var(--color-neg); }

.stadium-app .board .main .fin-weekly-breakdown,
.stadium-app .board .main .fin-ledger-lines {
  display: grid;
  margin: 0;
  padding: 0;
}

.stadium-app .board .main .fin-weekly-line,
.stadium-app .board .main .fin-ledger-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 18px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(143, 183, 154, .16);
  line-height: 1.35;
}

.stadium-app .board .main .fin-ledger-line { align-items: center; }   /* a two-line label stays centred against its one-line amount */

.stadium-app .board .main :is(.fin-weekly-line, .fin-ledger-line) dt {
  min-width: 0;
  color: #b5cfc1;
  font-size: .91rem;
}

.stadium-app .board .main .fin-weekly-line:nth-child(n + 2) dt::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--color-neg);
  content: '';
  vertical-align: 1px;
}

.stadium-app .board .main .fin-weekly-line:nth-child(3) dt::before { background: var(--color-warn); }

.stadium-app .board .main :is(.fin-weekly-line, .fin-ledger-line) dd {
  min-width: 0;
  margin: 0;
  font-size: .97rem;
  font-weight: 710;
  font-variant-numeric: tabular-nums;
  text-align: right;
  /* The amount ("$GMS 13.570.574") is never split: it keeps its natural width in the right-hand column and it is the LABEL (dt, min-width 0) that wraps when the room is short. */
  flex: none;
  white-space: nowrap;
}

.stadium-app .board .main .fin-ledger-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.stadium-app .board .main .fin-ledger-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.stadium-app .board .main .fin-ledger-groups.fin-ledger-single { grid-template-columns: minmax(0, 1fr); }

.stadium-app .board .main .fin-ledger-group { min-width: 0; }

.stadium-app .board .main .fin-ledger-group h3 {
  margin: 0 0 9px;
  color: #c7dfcc;
  font-size: .73rem;
  font-weight: 820;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.stadium-app .board .main .fin-ledger-group h3::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--color-pos);
  content: '';
  vertical-align: 1px;
}

.stadium-app .board .main .fin-ledger-group:nth-child(2) h3::before { background: var(--color-neg-text); }

.stadium-app .board .main .fin-ledger-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: auto;
  padding: 22px 0 1px;
  border-top: 1px solid rgba(143, 183, 154, .3);
  color: #e1f0d7;
  font-size: 1rem;
  font-weight: 780;
}

.stadium-app .board .main .fin-ledger-result strong {
  font-size: clamp(1.35rem, 1.8vw, 1.9rem);
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 1190px) {
  .stadium-app .board .main .finance-columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .stadium-app .board .main .finance-columns { gap: 12px; }

  .stadium-app .board .main .finance-columns > :is(.fin-cash, .fin-weekly, .fin-ledger) {
    padding: 19px 16px;
  }

  .stadium-app .board .main:not(.dashboard) .finance-columns > .fin-cash,
  .stadium-app .board .main .finance-columns > .fin-cash {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px;
    min-width: 0;
  }

  .stadium-app .board .main .fin-cash-details,
  .stadium-app .board .main .fin-cash-side {
    width: 100%;
    min-width: 0;
  }

  .stadium-app .board .main .fin-cash .finance-amount {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    font-size: clamp(1.4rem, 6.5vw, 2.3rem);
  }

  .stadium-app .board .main .fin-cash-side { align-items: stretch; }
  .stadium-app .board .main .fin-cash .cash-actions {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 10px;
    justify-content: stretch;
    min-width: 0;
  }
  .stadium-app .board .main .fin-cash .cash-actions .btn {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  .stadium-app .board .main .fin-cash .wallet-line { max-width: none; text-align: left; }
  .stadium-app .board .main .fin-ledger-groups { grid-template-columns: minmax(0, 1fr); gap: 19px; }
  .stadium-app .board .main .fin-ledger-result { padding-top: 19px; }
}

/* ==========================================================================
   Composicao (01/11): a caixa e uma barra de saldo com as acoes ao lado;
   abaixo, fluxo semanal e balanco dividem a linha. Cada cartao tem a altura
   do seu conteudo.
   ========================================================================== */
.stadium-app .board .main .finance-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 16px;
}
.stadium-app .board .main .finance-columns > .fin-cash,
.stadium-app .board .main .finance-columns > .fin-weekly,
.stadium-app .board .main .finance-columns > .fin-ledger {
  padding: 16px 24px;
}
.stadium-app .board .main:not(.dashboard) .finance-columns > .fin-cash {
  gap: 12px 24px;
  padding: 12px 24px;
}
.stadium-app .board .main .fin-cash .cash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.stadium-app .board .main .fin-cash .wallet-line {
  margin: 0;
  font-size: .8rem;
}
.stadium-app .board .main .fin-ledger-result strong {
  font-size: 1.35rem;
}
.stadium-app .board .main .fin-ledger-result {
  padding: 16px 0 0;
  font-size: .9rem;
}
.stadium-app .board .main .fin-weekly-figure {
  margin-bottom: 16px;
  font-size: 2rem;
}
@media (max-width: 900px) {
  .stadium-app .board .main .finance-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .stadium-app .board .main .finance-columns > .fin-cash {
    grid-column: auto;
  }
}
@media (max-width: 560px) {
  .stadium-app .board .main .finance-columns > .fin-cash,
  .stadium-app .board .main .finance-columns > .fin-weekly,
  .stadium-app .board .main .finance-columns > .fin-ledger {
    padding: 16px;
  }
}
