/* Shared surfaces inherit the selected CBB theme on every application page. */
/* Notifications must remain above the sticky navigation in either theme. */
.toast-stack { z-index: 200; }
body.cbb-classic-mode {
  --bg: #fff;
  --bg-surface: #f8f9fa;
  --panel: #fff;
  --panel-card: #fff;
  --panel-elevated: #e9ecef;
  --panel-border: #dee2e6;
  --panel-border-hover: #adb5bd;
  --line: #dee2e6;
  --line-strong: #ced4da;
  --text: #212529;
  --text-muted: #495057;
  --text-dim: #6c757d;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.14);
}
body.cbb-classic-mode :is(.kpi-card, .order-stat, .filter-bar, .entity-card, .panel, .settings-panel, .modal, .toast) {
  color: #212529;
  background: #fff;
  border-color: #dee2e6;
  box-shadow: var(--shadow-sm);
}
body.cbb-classic-mode :is(.kpi-highlight, .order-stat.kpi-highlight) { background: #edf7f1; }
body.cbb-classic-mode :is(.kpi-card strong, .kpi-val, .order-stat strong, .order-rule-name, .pnl-directions, .pnl-amount, .cycle-period strong, .cycle-position strong, .num, .status-primary) { color: #212529; }
body.cbb-classic-mode :is(.kpi-label, .kpi-card > span, .order-stat > span, .cycle-id, .cycle-subline, .cycle-period, .cycle-position, .pnl-explanation-note, .order-scope-note, .order-cell-stack, .pnl-amount.pending, .num.muted) { color: #495057; }
body.cbb-classic-mode :is(.filter-bar input, .filter-bar select, .field input, .field select, .field textarea, .pnl-date-input) {
  color: #212529;
  background: #fff;
  border-color: #ced4da;
  color-scheme: light;
}
body.cbb-classic-mode input::placeholder { color: #6c757d; }
body.cbb-classic-mode :is(.table-box, .dense-table-shell) { background: #fff; border-color: #dee2e6; box-shadow: var(--shadow-sm); }
body.cbb-classic-mode .dense-table thead tr:is(.th-main,.th-sub) th { color: #343a40; background: #e9ecef; border-color: #dee2e6; }
body.cbb-classic-mode .dense-table td { color: #212529; background: #fff; border-color: #dee2e6; }
body.cbb-classic-mode .dense-table tbody tr + tr td { border-top-color: #dee2e6; }
body.cbb-classic-mode .dense-table .pnl-parent-row td { background: #e9ecef; }
body.cbb-classic-mode .dense-table .pnl-child-row td { background: #fff; }
body.cbb-classic-mode .dense-table tbody tr:hover td { background: #e7f1fb; }
body.cbb-classic-mode .dense-table tbody tr:is(.cycle-warning,.row-warning) td { background: #fff3cd; }
body.cbb-classic-mode :is(.btn-sub, .pnl-cycle-toggle, .ghost-button, .entity-card .card-action, .settings-tab) { color: #495057; background: #f8f9fa; border-color: #ced4da; }
body.cbb-classic-mode .cycle-status-pill.closed { color: #168342; background: #e5f4e9; border-color: #a3d5b2; }
body.cbb-classic-mode .cycle-status-pill.open { color: #0069b3; background: #e5f2ff; border-color: #a9cfea; }
body.cbb-classic-mode .cycle-status-pill.warning { color: #856404; background: #fff3cd; border-color: #e6cf8b; }
body.cbb-classic-mode :is(.positive, .num.green) { color: #168342 !important; }
body.cbb-classic-mode :is(.negative, .num.red) { color: #dc3545 !important; }
