/*
 * Satsang UI — design tokens (shared by the TSF and MEPL apps; keep this file identical in both repos).
 * Source: TSF Brand Guidelines v1.0 (May 2019). MEPL magenta sampled from the MEPL logo (to confirm).
 * The app is chosen by <html data-app="tsf|mepl">, set by app2/bootstrap.php.
 */
:root {
  /* Brand palette (exact guideline values) */
  --s-root: #33202A;
  --s-tree: #775144;
  --s-leaf: #63A375;
  --s-earth: #D57A66;
  --s-sandal: #E9C289;
  --s-m-bright: #E4177E;
  --s-m-deep: #AD2669;

  /* Neutrals, biased toward Root */
  --s-ink: #33202A;
  --s-ink-2: #4A3740;
  --s-muted: #6F5C62;
  --s-line: #E9DED3;
  --s-line-strong: #DCCFC3;
  --s-paper: #FBF6EF;
  --s-surface: #FFFFFF;
  --s-surface-2: #F6EFE7;

  /* Status (darkened brand hues so white text and small text pass WCAG AA) */
  --s-ok: #3F7F53;      --s-ok-strong: #346B45;  --s-ok-bg: #E4F1E7;
  --s-warn: #9A6A12;    --s-warn-bg: #FBEFD6;
  --s-bad: #B3473A;     --s-bad-strong: #963A2F; --s-bad-bg: #F8E3DF;
  --s-info: #2F6F8A;    --s-info-strong: #275C73; --s-info-bg: #E2EFF4;

  /* Role tokens (TSF default) */
  --s-primary: var(--s-tree);
  --s-primary-hover: #5F4036;
  --s-primary-soft: #F3E9E2;
  --s-on-primary: #FFFFFF;
  --s-accent: var(--s-earth);
  --s-chrome: var(--s-root);
  --s-chrome-ink: #EADFE3;
  --s-focus: rgb(119 81 68 / .28);

  /* Tile colours for legacy dashboards (white text stays readable) */
  --s-tile-green: #4E8A5F;
  --s-tile-red: #B3473A;
  --s-tile-orange: #B85F4B;
  --s-tile-purple: #6B3A55;
  --s-tile-cyan: #3C7A86;
  --s-tile-brown: var(--s-tree);
  --s-tile-pink: var(--s-m-deep);
  --s-tile-blue: var(--s-primary);

  /* Type */
  --s-font-display: "Lora", Georgia, "Times New Roman", serif;
  --s-font-body: "Lato", "Helvetica Neue", Arial, sans-serif;

  /* Shape */
  --s-radius: 10px;
  --s-radius-lg: 16px;
  --s-shadow: 0 1px 2px rgb(51 32 42 / .06), 0 6px 20px rgb(51 32 42 / .07);

  /* Form fields: light, quiet borders that firm up on hover and focus */
  --s-field-bg: #FFFFFF;
  --s-field-bg-disabled: #F8F4EF;
  --s-field-line: #E8DFD6;
  --s-field-line-hover: #D6C8BB;
  --s-field-ink: var(--s-ink);
  --s-field-placeholder: #A8979D;
}

[data-app="mepl"] {
  --s-primary: var(--s-m-deep);
  --s-primary-hover: #8E1F56;
  --s-primary-soft: #FBE3EF;
  --s-accent: var(--s-m-bright);
  --s-paper: #FCF7FA;
  --s-surface-2: #F8EEF3;
  --s-line: #EEDDE6;
  --s-line-strong: #E2CBD7;
  --s-focus: rgb(173 38 105 / .25);
  --s-tile-blue: var(--s-m-deep);
  --s-field-line: #EFE1E8;
  --s-field-line-hover: #DFC8D4;
  --s-field-bg-disabled: #FAF4F7;
}

/* All screens stay light, whatever the device's dark-mode setting (decided 2026-11-16), so the
 * rebuilt screens match the legacy ones. Dark colours remain available only as an explicit
 * opt-in: <html data-theme="dark">. */
[data-shell="app2"]:not([data-theme="dark"]) { color-scheme: light; }
[data-shell="app2"][data-theme="dark"] {
  --s-ink: #F4EBE6; --s-ink-2: #E3D6D0; --s-muted: #BCA9AF; --s-line: #3E2E36; --s-line-strong: #4D3A43;
  --s-paper: #1B1216; --s-surface: #2B1F26; --s-surface-2: #241920;
  --s-ok: #8CCB9C; --s-ok-bg: #1F3527; --s-warn: #E8C072; --s-warn-bg: #3A2E14;
  --s-bad: #EE9A8C; --s-bad-bg: #3D211D; --s-info: #8CC3D9; --s-info-bg: #16303A;
  --s-primary: #C8957F; --s-primary-hover: #D9AC98; --s-primary-soft: #3A2A25; --s-on-primary: #1B1216;
  --s-field-bg: #45363D; --s-field-bg-disabled: #34282E; --s-field-line: #66525C; --s-field-line-hover: #7E6872; --s-field-placeholder: #A8959C;
  color-scheme: dark;
}
[data-shell="app2"][data-app="mepl"][data-theme="dark"] {
  --s-primary: #F06AA8; --s-primary-hover: #F58CBD; --s-primary-soft: #3D1A2B;
}
