/* ============================================================================================
   dark.css — the DARK theme (v305, css-import.txt S4): a PURE-TOKEN theme, the proof of the M3
   token system. No selectors against component internals — it only redefines the --tp-* vocabulary
   (documented in webroot\styles\classic.css) under the theme's body scope; every tokenized comp
   (page/form, TButton/TEdit/TLabel/TPanel/TMemo/TGroupBox, THeader, TDBGrid) flips coherently.
   Comps not yet tokenized keep their classic look (M3 is progressive — see css-import.txt S4).
   Explicit component props (inline {Style}) still beat the theme, as everywhere else.
   ============================================================================================ */

.tp-theme-dark {
  /* page / form */
  --tp-page-bg: #1e1e1e;
  --tp-form-bg: #252526;
  --tp-fg: #e4e4e4;
  --tp-fg-muted: #9d9d9d;

  /* surfaces / borders */
  --tp-surface: #2d2d30;
  --tp-surface-2: #333338;
  --tp-border: #555555;
  --tp-grid-line: #3f3f46;

  /* inputs */
  --tp-input-bg: #1f1f22;
  --tp-input-border: #5a5a60;

  /* buttons (base + the classic gradient sheen, darkened) */
  --tp-btn-bg: #3a3a3f;
  --tp-btn-fg: #e4e4e4;
  --tp-btn-ring: #5a5a60;
  --tp-grad-button: linear-gradient(to bottom, #45454b, #333338);
  --tp-grad-button-hover: linear-gradient(to bottom, #50505a, #3c3c44);
  --tp-grad-button-active: linear-gradient(to bottom, #3c3c44, #50505a);

  /* accent / highlights */
  --tp-accent: #3794ff;
  --tp-accent-fg: #ffffff;
  --tp-accent-soft: #264f78;
  --tp-hover: rgba(255, 255, 255, 0.08);
  --tp-tint: #2a3340;
  --tp-grid-row-alt: #26262a;

  /* per-class DEFAULT-surface opt-ins. The renderer emits a fill surface's UNSET backgroundColor /
     borderColor through var(--tp-def-<class>-bg / -border-color, <manifest-default literal>) — inline
     style is unreachable for normal theme CSS, so these tokens are the only door. An instance-SET prop
     emits the bare literal and stays untouched (explicit prop beats theme). Add more classes freely. */
  --tp-def-tedit-bg: var(--tp-input-bg);
  --tp-def-tedit-border-color: var(--tp-input-border);
  --tp-def-tmemo-bg: var(--tp-input-bg);
  --tp-def-tmemo-border-color: var(--tp-input-border);
  --tp-def-tpanel-bg: var(--tp-surface-2);
  --tp-def-tpanel-border-color: var(--tp-border);
}
