/* Shared text roles and informational badges. */
:root {
 --text-primary:#23262d;
 --text-secondary:#4b5563;
 --text-muted:#6b7280;
 --ink:var(--text-primary);
 --muted:var(--text-muted);
 --option-ink:var(--text-secondary);
 --info-badge-height:30px;
 --info-badge-radius:9px;
 --info-badge-ink:#365ee8;
 --info-badge-surface:#eef2ff;
}
/* Mobile informational labels: less rounded than the 13px desktop reference. */
@media (max-width:800px) {
 :root {--info-badge-radius:9px;}
}
body {color:var(--text-primary)}
#app :is(h1,h2,h3,h4,h5,h6) {color:var(--text-primary)}
::placeholder {color:var(--text-muted);opacity:1}
#app :is(.period-badge,.panel-heading > .pill,.statement-statuses > .pill),
#app .nie-hero > .projection-safe-badge,
#app .projection-view .projection-scenario-head > .projection-safe-badge {
 display:inline-flex;
 align-items:center;
 justify-content:center;
 box-sizing:border-box;
 height:var(--info-badge-height);
 min-height:var(--info-badge-height);
 padding:0 12px;
 gap:6px;
 border:1px solid transparent;
 border-radius:var(--info-badge-radius);
 background:var(--info-badge-surface);
 color:var(--info-badge-ink);
 box-shadow:none;
 font-size:13px;
 font-weight:400;
 line-height:1;
 white-space:nowrap;
 flex:0 0 auto;
}
#app .panel-heading > .pill.debt-in-progress,
#app .nie-hero > .projection-safe-badge,
#app .projection-view .projection-scenario-head > .projection-safe-badge {
 background:#eff9f3;
 border-color:transparent;
 color:#367b54;
}
#app .nie-hero > .projection-safe-badge .nexo-icon,
#app .projection-view .projection-scenario-head > .projection-safe-badge .nexo-icon {
 width:15px;
 height:15px;
 flex:0 0 15px;
 color:inherit;
}
#app .panel-heading {flex-wrap:wrap;row-gap:10px}
#app .panel-heading .panel-title-with-info {min-width:0}
@media(max-width:360px) {
 :root {--info-badge-height:26px}
 #app :is(.period-badge,.panel-heading > .pill),
 #app .nie-hero > .projection-safe-badge,
#app .projection-view .projection-scenario-head > .projection-safe-badge {
  padding-inline:9px;
  font-size:12px;
 }
}

/* Invoice statuses follow the same geometry as the 'Neste mês' informational badge. */
#app .statement-statuses > .pill {
 display:inline-flex;
 align-items:center;
 justify-content:center;
 box-sizing:border-box;
 height:var(--info-badge-height);
 min-height:var(--info-badge-height);
 width:max-content;
 padding:0 12px;
 border:1px solid transparent;
 border-radius:var(--info-badge-radius);
 font-size:13px;
 font-weight:400;
 line-height:1;
 text-align:center;
 white-space:nowrap;
}

@media(max-width:360px) {
 #app .statement-statuses > .pill {padding-inline:9px;font-size:12px}
}

/* Statement cycle and settlement use distinct, equally soft status palettes. */
#app .statement-statuses > .pill.is-closed {
 background:#e7eef4;
 color:var(--text-secondary);
}
#app .statement-statuses > .pill.is-overdue {
 background:#ffe7e7;
 color:#a52020;
}
#app .statement-statuses > .statement-payment.is-paid {
 background:#eff9f3;
 color:#249477;
}
#app .statement-statuses > .statement-payment.is-partial {
 background:#fff4df;
 color:#98610e;
}
#app .statement-statuses > .statement-payment.is-open {
 background:#eef2ff;
 color:#365ee8;
}
#app .statement-statuses > .statement-payment.is-empty {
 background:#f1f3f5;
 color:var(--text-muted);
}

/* Override final: pagamento da fatura em vermelho sólido (modelo aprovado). */
#app .statement-card .statement-bottom button.secondary[data-pay-invoice]:not(:disabled),
#app .statement-card .statement-bottom button.secondary[data-pay-invoice]:not(:disabled):visited {
 background:#ec0000!important;
 background-color:#ec0000!important;
 border:1px solid #ec0000!important;
 border-radius:12px!important;
 color:#fff!important;
 box-shadow:none!important;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:12px;
 text-align:center;
}
#app .statement-card .statement-bottom button.secondary[data-pay-invoice]:not(:disabled) :is(span,svg,.nexo-icon) {color:#fff!important;stroke:currentColor!important}
#app .statement-card .statement-bottom button.secondary[data-pay-invoice]:not(:disabled):hover {background:#d60000!important;background-color:#d60000!important;border-color:#d60000!important;color:#fff!important}
#app .statement-card .statement-bottom button.secondary[data-pay-invoice]:not(:disabled):active {background:#c40000!important;background-color:#c40000!important;border-color:#c40000!important}

/* Pagar fatura: geometria medida do seletor Conta para débito. */
html body #modal#modal #form#form[data-finance-type="invoice-payment"] > label.invoice-debit-choice {
 box-sizing:border-box!important;
 height:45px!important;
 min-height:45px!important;
 max-height:45px!important;
 padding-top:0!important;
 padding-bottom:0!important;
 flex-shrink:0;
 display:flex!important;
 align-items:center!important;
 border-radius:15px!important;
}

/* Data do pagamento: o calendário é um SVG do seletor, não o indicador nativo do input. */
html body #modal#modal #form#form[data-finance-type="invoice-payment"]
 .date-picker > .control-trigger > .period-indicator {
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
}
html body #modal#modal #form#form[data-finance-type="invoice-payment"]
 .date-picker > .control-trigger > .period-indicator > svg.nexo-icon {
 display:block!important;
 margin:0!important;
 color:#607e9b!important;
 stroke:currentColor!important;
 vertical-align:initial!important;
}


/* Previsão de crédito: leitura compacta exclusiva para desktop (2026-11-21). */
@media (min-width: 801px) {
 #app .panel.monthly-forecast { padding-bottom: 16px; }
 #app .monthly-forecast > .panel-heading { margin-bottom: 10px; }
 #app .monthly-forecast-totals { padding-top: 2px; padding-bottom: 10px; }
 #app .monthly-forecast .forecast-sources { padding-top: 5px; }
 #app .monthly-forecast .forecast-sources > summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
 }
 #app .monthly-forecast .forecast-sources > summary > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
 }
 #app .monthly-forecast .forecast-source-groups {
  gap: 10px;
  margin-top: 8px;
 }
 #app .monthly-forecast .forecast-source-groups > section {
  padding: 10px 14px;
 }
 #app .monthly-forecast .forecast-source-groups h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
 }
 #app .monthly-forecast .forecast-source-groups li {
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  line-height: 1.35;
 }
 #app .monthly-forecast .forecast-source-groups li > span {
  font-size: 13px;
  line-height: 1.35;
 }
 #app .monthly-forecast .forecast-source-groups small {
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
 }
 #app .monthly-forecast .forecast-source-groups strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
 }
}

/* Consistent informational badge corners across all screens.
   Stronger than the 13px !important mobile form-control override. */
@media (max-width:800px) {
 #app :is(.period-badge,.panel-heading > .pill,.statement-statuses > .pill),
 #app .nie-hero > .projection-safe-badge,
#app .projection-view .projection-scenario-head > .projection-safe-badge {
  border-radius:9px!important;
 }
}
@media (min-width:801px) {
 #app :is(.period-badge,.panel-heading > .pill,.statement-statuses > .pill),
 #app .nie-hero > .projection-safe-badge,
#app .projection-view .projection-scenario-head > .projection-safe-badge {
  border-radius:9px!important;
 }
}
