/*
 * FiFlow Design System — "Minimal Confidente"
 * Camada visual consolidada. Mantém estrutura e comportamento existentes.
 *
 * Paleta:
 * #0C4F41 — verde-petróleo sólido: único acento (ação principal, receita, progresso)
 * #083A30 — estrutura, títulos, navegação e contraste institucional
 * #3FBFA0 — foco, seleção e destaque de apoio
 * #F6FAF7 — base neutra e áreas de respiro
 * #12211C — texto principal e alto contraste
 * #A23B2E — crítico: déficit, saída atípica, ações destrutivas
 * #9C6B1F — atenção: alertas não-críticos
 */

:root {
  --bg: #F6FAF7;
  --bg2: #FFFFFF;
  --bg3: #FFFFFF;
  --bg4: #EFF5F1;
  --bg5: #E3EEE8;
  --surface: #FFFFFF;

  --text: #12211C;
  --text2: #5C6E66;
  --text3: #8A9A93;

  --brand: #0C4F41;
  --brand2: #083A30;
  --brand3: #062A22;
  --brand-accent: #3FBFA0;
  --brand-light: rgba(12, 79, 65, .10);
  --brand-strong-light: rgba(8, 58, 48, .10);
  --brand-border: rgba(12, 79, 65, .28);
  --accent-light: rgba(63, 191, 160, .20);

  --green: #0C4F41;
  --green2: #083A30;
  --green-light: rgba(12, 79, 65, .10);
  --red: #A23B2E;
  --red2: #7E2E23;
  --red-light: rgba(162, 59, 46, .11);
  --red-border: rgba(162, 59, 46, .28);
  --amber: #9C6B1F;
  --amber2: #7A5518;
  --amber-light: rgba(156, 107, 31, .11);
  --cyan: #0C4F41;
  --cyan2: #083A30;
  --cyan-light: rgba(12, 79, 65, .18);
  --purple: #0C4F41;
  --purple2: #083A30;
  --purple-light: rgba(12, 79, 65, .10);

  --border: #DFE7E1;
  --border2: #C7D5CD;
  --border3: #B0C2B8;

  --radius-panel: 16px;
  --radius-card: 10px;
  --radius-control: 6px;
  --radius-full: 999px;
  --radius-lg: var(--radius-panel);
  --radius: var(--radius-card);
  --radius-sm: var(--radius-control);
  --radius-xs: 4px;

  --shadow: 0 1px 2px rgba(18, 33, 28, .05), 0 1px 1px rgba(18, 33, 28, .04);
  --shadow-lg: 0 6px 20px -8px rgba(18, 33, 28, .16), 0 2px 6px -2px rgba(18, 33, 28, .08);
  --focus-ring: 0 0 0 3px rgba(63, 191, 160, .35);

  /* Únicas definições de --sidebar-w/--header-h no CSS ativo — styles.css:.main (regra viva,
     fora dos :root mortos) depende de --sidebar-w para o margin-left que evita a sidebar fixa
     sobrepor o conteúdo. Valores batem com o .sidebar/.header reais de v3.css (224px/72px). */
  --sidebar-w: 224px;
  --header-h: 72px;
}

/* Números monetários e tabulares: alinhamento perfeito em colunas */
.num,
.v3-metric-value,
.v3-table td.amount,
.v3-table td.num,
.dre-table td:not(:first-child),
.v3-account-card .balance,
.v3-goal-financials,
.ai-kpi-grid .value,
.overview-kpi-card .kpi-value,
.kpi-card .kpi-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

body {
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring) !important;
}

/* Landing */
#app-landing {
  background:
    radial-gradient(ellipse 65% 55% at 8% 0%, rgba(82, 242, 184, .16), transparent 70%),
    radial-gradient(ellipse 55% 50% at 100% 100%, rgba(55, 166, 134, .13), transparent 70%),
    #F2F2F2;
}

.landing-shell {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: 0 24px 64px rgba(44, 64, 58, .14);
}

.landing-left {
  border-right-color: var(--border);
}

.landing-right {
  background: rgba(242, 242, 242, .58);
}

.landing-logo,
.logo-mark,
.user-avatar {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 8px 20px rgba(55, 166, 134, .22);
}

.landing-brand-name,
.logo-text {
  color: var(--brand2);
  background: none;
  -webkit-text-fill-color: initial;
}

.landing-h1 {
  color: var(--text);
  background: none;
  -webkit-text-fill-color: initial;
}

.landing-h1 span {
  background: linear-gradient(100deg, var(--brand), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-pill {
  background: #FFFFFF;
  border-color: var(--border);
  border-radius: var(--radius-control);
}

.pill-icon {
  border-radius: 8px;
}

.lf-input,
.lf-btn {
  border-radius: var(--radius-control);
}

.lf-input {
  background: #FFFFFF;
  border-color: var(--border2);
  color: var(--text);
}

.lf-input:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.lf-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(55, 166, 134, .22);
}

.lf-btn:hover {
  box-shadow: 0 12px 30px rgba(44, 64, 58, .25);
}

/* Estrutura principal */
.sidebar {
  background: #FFFFFF;
  border-color: var(--border);
  border-radius: var(--radius-panel);
}

.main {
  background: var(--bg4);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 0 0 1px rgba(44, 64, 58, .04);
}

.header {
  background: var(--bg4);
  border-bottom-color: var(--border);
}

.nav-item {
  border-radius: var(--radius-control);
}

.nav-item:hover {
  background: var(--brand-strong-light);
  color: var(--brand2);
}

.nav-item.active {
  background: var(--brand-light);
  color: var(--brand2);
  box-shadow: inset 3px 0 0 var(--brand);
}

.nav-item-accent {
  color: var(--amber) !important;
}

.nav-item-accent.active {
  background: var(--amber-light);
  box-shadow: inset 3px 0 0 var(--amber);
}

.btn-ai-cfg,
.btn-reset {
  border-radius: var(--radius-control);
}

.btn-reset {
  color: var(--amber);
}

.btn-reset:hover {
  background: var(--amber-light);
}

/* Superfícies e blocos */
.card,
.kpi-card,
.account-card,
.overview-kpi-card,
.money-stats-card,
.recent-txs-card,
.daily-limit-card,
.savings-plans-card,
.ai-side-block,
.ai-kpi,
.import-stat,
.file-queue-item,
.budget-goal-card,
.budget-row {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.card:hover,
.kpi-card:hover,
.account-card:hover {
  border-color: var(--brand-border);
}

.premium-credit-card {
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand2) 72%);
  border: 1px solid rgba(82, 242, 184, .28);
  border-radius: var(--radius-panel);
  box-shadow: 0 16px 34px rgba(44, 64, 58, .24);
}

.premium-credit-card-chip {
  background: linear-gradient(135deg, var(--brand-accent), var(--brand));
  border-radius: 8px;
}

.card-badge,
.badge,
.tag,
.overview-kpi-badge,
.recent-tx-cat-pill,
.recent-tx-status,
.budget-badge,
.ai-status-chip {
  border-radius: var(--radius-full) !important;
}

.card-badge,
.badge-neutral {
  background: var(--bg4);
  border-color: var(--border);
  color: var(--text2);
}

.badge-income,
.badge-brand,
.badge-transfer,
.tag-debit,
.badge-green,
.status-success {
  background: var(--brand-light) !important;
  border-color: var(--brand-border) !important;
  color: var(--brand2) !important;
}

.badge-expense,
.badge-amber,
.status-pending,
.tag-credit {
  background: var(--amber-light) !important;
  border-color: rgba(250, 132, 1, .28) !important;
  color: var(--amber2) !important;
}

.badge-red {
  background: var(--red-light) !important;
  border-color: var(--red-border) !important;
  color: var(--red2) !important;
}

.badge-teal {
  background: var(--accent-light) !important;
  color: var(--brand2) !important;
}

/* Controles */
.btn-icon,
.btn-icon-sm,
.ms-button,
.header-user,
.hero-action-btn,
.ai-quick-btn,
.savings-plans-add,
.modal-close,
.file-remove {
  border-radius: var(--radius-control);
}

.btn,
.btn-sm {
  border-radius: var(--radius-full);
}

.btn {
  border: 1px solid transparent;
  font-weight: 700;
}

.btn-primary,
.btn-success {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 7px 18px rgba(12, 79, 65, .20);
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--brand2);
  border-color: var(--brand2);
}

.btn-warning {
  background: var(--amber);
  border-color: var(--amber);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(156, 107, 31, .18);
}

.btn-warning:hover {
  background: var(--amber2);
  border-color: var(--amber2);
  color: #FFFFFF;
}

.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(162, 59, 46, .18);
}

.btn-danger:hover {
  background: var(--red2);
  border-color: var(--red2);
  color: #FFFFFF;
}

.btn-secondary,
.btn-ghost,
.btn-icon,
.btn-icon-sm,
.ms-button,
.header-user,
.hero-action-btn,
.ai-quick-btn {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text2);
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-icon:hover,
.btn-icon-sm:hover,
.ms-button:hover,
.header-user:hover,
.hero-action-btn:hover,
.ai-quick-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-border);
  color: var(--brand2);
}

.form-input,
.tx-search,
.tx-select,
.ai-input,
.lf-input {
  background: #FFFFFF;
  border: 1px solid var(--border2);
  border-radius: var(--radius-control);
  color: var(--text);
}

.form-input:focus,
.tx-search:focus,
.tx-select:focus,
.ai-input:focus,
.lf-input:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.ms-menu,
.modal,
.drop-zone,
.import-preview-list,
.ai-chat-history {
  border-radius: var(--radius-card) !important;
  border-color: var(--border);
}

.modal {
  background: #FFFFFF;
  box-shadow: 0 26px 70px rgba(44, 64, 58, .22);
}

.modal-backdrop {
  background: rgba(13, 13, 13, .46);
}

/* Estados semânticos */
.alert {
  border-radius: var(--radius-card);
}

.alert-brand,
.alert-green {
  background: var(--brand-light);
  border-color: var(--brand-border);
}

.alert-brand .alert-title,
.alert-green .alert-title {
  color: var(--brand2);
}

.alert-amber {
  background: var(--amber-light);
  border-color: rgba(250, 132, 1, .30);
}

.alert-amber .alert-title {
  color: var(--amber2);
}

.alert-red {
  background: var(--red-light);
  border-color: var(--red-border);
}

.alert-red .alert-title,
.val-neg {
  color: var(--red2);
}

.val-pos {
  color: var(--brand2);
}

.daily-limit-fill,
.saving-plan-fill,
.budget-bar-inner,
.kpi-bar-fill,
.merch-fill {
  border-radius: var(--radius-full);
}

.daily-limit-bar,
.saving-plan-bar,
.budget-bar-outer,
.kpi-bar,
.merch-track {
  background: var(--bg5);
  border-radius: var(--radius-full);
}

.drop-zone {
  background: var(--bg4);
  border: 2px dashed var(--border2);
}

.drop-zone:hover,
.drop-zone.drag-over {
  background: var(--brand-light);
  border-color: var(--brand);
}

.dre-table th {
  background: var(--bg4);
  border-bottom-color: var(--border);
  color: var(--text2);
}

.dre-table td,
.tx-row,
.ai-list-item,
.action-item,
.insight-item {
  border-bottom-color: var(--border);
}

.dre-section-row td,
.dre-total td {
  background: var(--brand-light);
  color: var(--brand2);
}

.tx-row:hover {
  background: var(--brand-light);
}

.action-rank,
.kpi-icon {
  background: var(--brand-light) !important;
  color: var(--brand2);
}

.kpi-icon svg {
  stroke: var(--brand2);
}

#txSummaryGrid .kpi-card:nth-child(2) .kpi-icon,
#txSummaryGrid .kpi-card:nth-child(3) .kpi-icon,
#predictKpis .kpi-card:nth-child(2) .kpi-icon {
  background: var(--amber-light) !important;
  color: var(--amber2);
}

#txSummaryGrid .kpi-card:nth-child(2) .kpi-icon svg,
#txSummaryGrid .kpi-card:nth-child(3) .kpi-icon svg,
#predictKpis .kpi-card:nth-child(2) .kpi-icon svg {
  stroke: var(--amber2);
}

#txSummaryGrid .kpi-card:nth-child(2) .kpi-value,
#txSummaryGrid .kpi-card:nth-child(3) .kpi-value,
#predictKpis .kpi-card:nth-child(2) .kpi-value {
  color: var(--amber2) !important;
}

/* Predição */
#pane-predict {
  padding-bottom: 8px;
}

.predict-empty-state {
  min-height: 390px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.predict-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--brand2);
  background: var(--brand-light);
  border-radius: var(--radius-card);
}

.predict-empty-state h2 {
  color: var(--text);
  font-size: 18px;
  letter-spacing: -.25px;
}

.predict-empty-state p {
  max-width: 520px;
  margin-top: 6px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.6;
}

.predict-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.predict-summary-card {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.predict-summary-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--brand2);
  background: var(--brand-light);
  border-radius: var(--radius-control);
}

.predict-summary-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.predict-summary-expense .predict-summary-icon,
.risk-alto .predict-summary-icon {
  color: var(--amber2);
  background: var(--amber-light);
}

.predict-summary-label {
  overflow: hidden;
  color: var(--text3);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.predict-summary-card > strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.2;
  text-transform: capitalize;
}

.predict-summary-card > span:last-child {
  margin-top: auto;
  padding-top: 7px;
  color: var(--text3);
  font-size: 9.5px;
  line-height: 1.3;
}

.predict-summary-card .value-warning,
.risk-alto > strong {
  color: var(--amber2);
}

.risk-médio > strong {
  color: var(--amber);
}

.confidence-alta .predict-summary-icon {
  color: var(--brand2);
  background: var(--accent-light);
}

.confidence-baixa .predict-summary-icon {
  color: var(--amber2);
  background: var(--amber-light);
}

#pane-predict .predict-chart-card,
#pane-predict .predict-panel {
  padding: 0;
  overflow: hidden;
}

.predict-chart-card {
  margin-bottom: 14px;
}

.predict-panel-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.predict-panel-header .card-title {
  font-size: 14px;
  font-weight: 750;
}

.predict-panel-subtitle {
  margin-top: 2px;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.4;
}

.predict-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.predict-confidence-badge {
  padding: 4px 9px;
  color: var(--brand2);
  font-size: 9.5px;
  font-weight: 700;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.predict-confidence-badge.confidence-alta {
  background: var(--accent-light);
}

.predict-confidence-badge.confidence-baixa {
  color: var(--amber2);
  background: var(--amber-light);
  border-color: rgba(250, 132, 1, .28);
}

.predict-chart-wrap {
  position: relative;
  height: 250px;
  padding: 12px 14px 0;
}

.predict-method-note {
  padding: 10px 16px 13px;
  color: var(--text3);
  font-size: 10px;
  line-height: 1.5;
  background: var(--bg4);
  border-top: 1px solid var(--border);
}

.predict-method-note strong {
  color: var(--text2);
}

.predict-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

.predict-scenarios,
.predict-actions,
.predict-opportunities,
#anomalyPanel {
  padding: 14px 16px;
}

.predict-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.predict-scenario-card {
  padding: 12px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.predict-scenario-card.scenario-conservative {
  background: var(--amber-light);
  border-color: rgba(250, 132, 1, .24);
}

.predict-scenario-card.scenario-optimistic {
  background: var(--brand-light);
  border-color: var(--brand-border);
}

.predict-scenario-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.predict-scenario-header strong {
  color: var(--text2);
  font-size: 10.5px;
}

.predict-scenario-header span {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.predict-scenario-metrics {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  color: var(--text3);
  font-size: 9px;
}

.predict-scenario-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.predict-scenario-metrics strong {
  color: var(--text2);
}

.predict-action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.predict-action-item:first-child {
  padding-top: 0;
}

.predict-action-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.predict-action-item > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand2);
  font-size: 9px;
  font-weight: 800;
  background: var(--brand-light);
  border-radius: 8px;
}

.predict-action-item p {
  color: var(--text2);
  font-size: 11px;
  line-height: 1.5;
}

.predict-anomaly-row,
.predict-opportunity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.predict-anomaly-row:first-child,
.predict-opportunity-row:first-child {
  padding-top: 0;
}

.predict-anomaly-row:last-child,
.predict-opportunity-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.predict-anomaly-row > div,
.predict-opportunity-row > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.predict-anomaly-row > div:last-child,
.predict-opportunity-row > div:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.predict-anomaly-row strong,
.predict-opportunity-row strong {
  color: var(--text);
  font-size: 11.5px;
}

.predict-anomaly-row > div:last-child strong {
  color: var(--amber2);
}

.predict-opportunity-row > div:last-child strong {
  color: var(--brand2);
}

.predict-anomaly-row span,
.predict-opportunity-row span {
  margin-top: 2px;
  color: var(--text3);
  font-size: 9.5px;
}

.predict-compact-empty {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.predict-compact-empty > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand2);
  font-weight: 800;
  background: var(--brand-light);
  border-radius: var(--radius-control);
}

.predict-compact-empty strong {
  color: var(--text2);
  font-size: 11.5px;
}

.predict-compact-empty p {
  margin-top: 3px;
  color: var(--text3);
  font-size: 10px;
  line-height: 1.4;
}

.predict-disclaimer {
  padding: 12px 14px;
  color: var(--text3);
  font-size: 10px;
  line-height: 1.5;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.predict-disclaimer strong {
  color: var(--text2);
}

@media (max-width: 1180px) {
  .predict-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .predict-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .predict-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .predict-summary-grid,
  .predict-scenarios {
    grid-template-columns: 1fr;
  }

  .predict-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .predict-header-badges {
    flex-wrap: wrap;
  }
}

/* Metas e Orçamento */
#pane-budget {
  padding-bottom: 8px;
}

.budget-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.budget-summary-card {
  min-height: 108px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.budget-summary-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand2);
  background: var(--brand-light);
  border-radius: var(--radius-control);
}

.budget-summary-card-budget .budget-summary-icon {
  color: var(--amber2);
  background: var(--amber-light);
}

.budget-summary-content {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.budget-summary-label {
  color: var(--text3);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.budget-summary-value {
  margin-top: 2px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.35px;
  line-height: 1.25;
}

.budget-summary-meta {
  margin-top: 5px;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.3;
}

.budget-summary-progress {
  width: 100%;
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  background: var(--bg5);
  border-radius: var(--radius-full);
}

.budget-summary-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transition: width .25s ease;
}

.budget-summary-card-budget .budget-summary-progress span {
  background: var(--amber);
}

.budget-workspace {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: 14px;
  align-items: start;
}

#pane-budget .budget-panel {
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.budget-panel-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.budget-panel-header .card-title {
  font-size: 14px;
  font-weight: 750;
}

.budget-panel-subtitle {
  margin-top: 2px;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.4;
}

.budget-panel-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.budget-goals-list,
.budget-category-list {
  display: flex;
  flex-direction: column;
}

.budget-category-list {
  max-height: 410px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.budget-goal-card,
.budget-row {
  gap: 0;
  box-shadow: none;
}

.budget-goal-card {
  position: relative;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0 !important;
}

.budget-goal-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  background: var(--goal-color, var(--brand));
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.budget-goal-card:last-child,
.budget-row:last-child {
  border-bottom: 0;
}

.budget-goal-card:hover,
.budget-row:hover {
  background: var(--bg4);
}

.budget-goal-main,
.budget-goal-identity,
.budget-goal-actions,
.budget-goal-progress-meta,
.budget-row-header,
.budget-row-progress-meta {
  display: flex;
  align-items: center;
}

.budget-goal-main,
.budget-goal-progress-meta,
.budget-row-header,
.budget-row-progress-meta {
  justify-content: space-between;
}

.budget-goal-identity {
  min-width: 0;
  gap: 10px;
}

.budget-goal-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 18px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.budget-goal-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.budget-goal-copy strong,
.budget-row-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-goal-copy span,
.budget-row-copy span {
  margin-top: 1px;
  color: var(--text3);
  font-size: 10.5px;
}

.budget-goal-actions {
  gap: 5px;
  flex: 0 0 auto;
}

.budget-goal-actions .btn {
  color: var(--brand2);
}

.budget-goal-progress {
  margin-top: 12px;
}

.budget-goal-progress-meta,
.budget-row-progress-meta {
  margin-bottom: 5px;
  color: var(--text3);
  font-size: 10px;
}

.budget-goal-progress-meta strong {
  color: var(--text2);
  font-weight: 700;
}

.budget-goal-card .budget-bar-inner {
  background: var(--goal-color, var(--brand));
}

.budget-row {
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0 !important;
}

.budget-row-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.budget-row-progress-meta {
  margin-top: 10px;
}

.budget-row-progress-meta strong {
  color: var(--budget-color, var(--brand2));
  font-size: 10.5px;
}

.budget-row .budget-bar-inner {
  background: var(--budget-color, var(--brand2));
}

.budget-badge {
  flex: 0 0 auto;
  font-size: 8.5px;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.budget-empty-state {
  padding: 42px 20px;
  color: var(--text3);
  text-align: center;
}

@media (max-width: 1100px) {
  .budget-workspace {
    grid-template-columns: 1fr;
  }

  .budget-category-list {
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 980px) {
  .budget-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-summary-card-budget {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .budget-summary-grid {
    grid-template-columns: 1fr;
  }

  .budget-summary-card-budget {
    grid-column: auto;
  }

  .budget-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .budget-panel-actions {
    width: 100%;
  }

  .budget-panel-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .budget-goal-main {
    align-items: flex-start;
    gap: 10px;
  }

  .budget-goal-actions {
    flex-direction: column;
  }
}

.color-swatch {
  border-radius: 8px;
}

.color-swatch.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--brand-accent);
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .landing-shell,
  .sidebar,
  .main {
    border-radius: var(--radius-card);
  }
}
