:root {
  --bg: #0b0f14;
  --panel: #121821;
  --text: #e9eef5;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --soft: #1e293b;
  --border: #223047;
}

/* Base styles are not scoped, as they are general resets */
* { box-sizing: border-box; }

/* The container itself needs to be scoped */
#cash-flow-page {
    /* The original body background/color/font rules for cash_flow are moved here */
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}
#cash-flow-page .container { max-width: 1200px; padding: 24px; margin: 0 auto; }
#cash-flow-page h1 { margin: 0 0 8px; font-weight: 700; letter-spacing: .2px; }
#cash-flow-page .subtitle { margin: 0 0 16px; color: var(--muted); }
#cash-flow-page .user-block { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
/* Horizontal scroll area for wide week tables */
#cash-flow-page .cashflow-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  border-radius: 12px;
}
#cash-flow-page .ft-table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--soft);
}
#cash-flow-page .ft-table th, #cash-flow-page .ft-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
#cash-flow-page .ft-table th:last-child, #cash-flow-page .ft-table td:last-child { border-right: none; }
#cash-flow-page .ft-table thead th {
  background: #132033;
  position: sticky;
  top: 0;
  z-index: 2;
}
/* Optional: chart container consistent with standalone look */
#cash-flow-page .cashflow-chart {
  margin-top: 20px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
#cash-flow-page .cashflow-chart h2 { margin: 0 0 10px; }
#cash-flow-page .week-col { text-align: center; }
#cash-flow-page .subhead th { font-weight: 500; color: var(--muted); }
#cash-flow-page .sticky-col {
  position: sticky; left: 0; z-index: 3;
  background: #0f1724;
}
#cash-flow-page .category { font-weight: 600; }
#cash-flow-page .num { text-align: right; font-variant-numeric: tabular-nums; }

#cash-flow-page .empty { background: #1a2638; border: 1px dashed var(--border); border-radius: 12px; padding: 16px; color: var(--muted); }
#cash-flow-page .footer { color: var(--muted); }
#cash-flow-page code { background: #0f1724; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); }