/*
 * Modern UI tokens.
 *
 * Light is the default and maps to the legacy BlueWhite build.
 * Dark is the Midnight Slate palette: a deep blue-black canvas, surfaces that
 * rise in lightness, and one azure accent.
 */

:root {
  color-scheme: light;

  --tb-bg: #f5f5f5;
  --tb-bg-alt: #fafafa;
  --tb-surface: #ffffff;
  --tb-surface-alt: #f8f9fa;
  --tb-surface-raised: #ffffff;

  --tb-text: #272727;
  --tb-text-muted: #5c6770;
  --tb-heading: #1f2d3a;

  --tb-border: #dfe3e8;
  --tb-border-strong: #c8d0d8;

  --tb-primary: #375a7f;
  --tb-primary-hover: #2e4b6a;
  --tb-primary-fg: #ffffff;
  --tb-accent: #57a7fc;
  --tb-link: #2c5f8f;

  --tb-success: #00bc8c;
  --tb-success-bg: #d8f5ec;
  --tb-warning: #e6a700;
  --tb-warning-bg: #fff3cd;
  --tb-danger: #bd2a2a;
  --tb-danger-bg: #f8d7da;
  --tb-info: #2f86d6;
  --tb-info-bg: #d7ecfb;

  /* Stage marker colour. Deliberately not retuned in the dark block, so the
     same hue reads as a foreign element in both themes. Prod never uses it. */
  --tb-stage: #e6a700;

  --tb-btn-secondary-bg: #e9edf2;
  --tb-btn-secondary-bg-hover: #dde4eb;
  --tb-btn-secondary-bg-active: #d3dbe4;
  --tb-btn-secondary-border: #c3ccd6;
  --tb-btn-secondary-fg: #1f2d3a;

  --tb-sidebar-bg: #375a7f;
  --tb-sidebar-fg: #f5f5f5;
  --tb-sidebar-muted: #d3e0ea;
  --tb-sidebar-hover-bg: #f5f5f5;
  --tb-sidebar-hover-fg: #375a7f;
  --tb-sidebar-submenu-bg: #2f4d6c;
  --tb-sidebar-active-bg: #ffffff;
  --tb-sidebar-active-fg: #375a7f;

  --tb-navbar-bg: rgba(255, 255, 255, 0.92);
  --tb-navbar-solid: #ffffff;
  --tb-navbar-fg: #272727;
  --tb-navbar-border: #e3e7eb;

  --tb-input-bg: #ffffff;
  --tb-input-fg: #272727;
  --tb-input-border: #c8d0d8;
  --tb-input-placeholder: #7b8794;

  --tb-table-header-bg: #dfe5ec;
  --tb-table-stripe-bg: #f5f8fb;
  --tb-table-hover-bg: #e7eef6;
  --tb-table-border: #d5dce3;

  --tb-cell-neutral-bg: #ffffff;

  --tb-focus: #57a7fc;
  --tb-selection-bg: rgba(87, 167, 252, 0.3);

  --tb-radius-sm: 8px;
  --tb-radius: 12px;
  --tb-radius-lg: 16px;

  --tb-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --tb-shadow: 0 4px 14px rgba(15, 23, 42, 0.10);
  --tb-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.16);

  --tb-fab-bg: #375a7f;
  --tb-fab-fg: #ffffff;

  --tb-nav-trigger-bg: #ffffff;
  --tb-nav-trigger-fg: #1f2d3a;
  --tb-nav-trigger-border: #c8d0d8;

  --tb-footer-bg: var(--tb-sidebar-bg);
  --tb-footer-fg: var(--tb-sidebar-fg);

  --tb-transition: 160ms ease;

  --schedule-accent-width: 6px;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --tb-bg: #0b0f14;
  --tb-bg-alt: #0f141a;
  --tb-surface: #141a21;
  --tb-surface-alt: #1a222b;
  --tb-surface-raised: #202934;

  --tb-text: #e6edf3;
  --tb-text-muted: #9ba7b4;
  --tb-heading: #f3f8fc;

  --tb-border: #2a3440;
  --tb-border-strong: #3a4654;

  --tb-primary: #3a6ea5;
  --tb-primary-hover: #32608f;
  --tb-primary-fg: #ffffff;
  --tb-accent: #58a6ff;
  --tb-link: #79c0ff;

  --tb-success: #447a5d;
  --tb-success-bg: #1b2a24;
  --tb-success-text: #a9d6c4;
  --tb-success-border: #355447;
  --tb-warning: #8f6f2c;
  --tb-warning-bg: #2f2a1e;
  --tb-warning-text: #d8c58f;
  --tb-warning-border: #5a4e34;
  --tb-danger: #9d4f53;
  --tb-danger-bg: #302224;
  --tb-danger-text: #dba9ad;
  --tb-danger-border: #5a3a3e;
  --tb-info: #457a9f;
  --tb-info-bg: #182a3d;
  --tb-info-text: #a3c9ec;
  --tb-info-border: #315f85;

  --tb-btn-secondary-bg: #26303b;
  --tb-btn-secondary-bg-hover: #303c49;
  --tb-btn-secondary-bg-active: #384656;
  --tb-btn-secondary-border: #44515f;
  --tb-btn-secondary-fg: #e6edf3;

  --tb-neutral-bg: #1d242b;
  --tb-neutral-border: #303b46;
  --tb-neutral-text: #9ba7b4;

  /* Schedule tints. Consumed by dark.css only; the light palette lives in
     tables.css and is not tokenized. */
  --tb-tint-sand-bg: #34302a;
  --tb-tint-sand-fg: #e7dbcb;
  --tb-tint-sand-accent: #b09677;
  --tb-tint-brown-bg: #3b271d;
  --tb-tint-brown-fg: #efd1ba;
  --tb-tint-brown-accent: #b06f50;
  --tb-tint-red-bg: #3a2527;
  --tb-tint-red-fg: #f0caca;
  --tb-tint-red-accent: #c1787d;
  --tb-tint-orange-bg: #362b22;
  --tb-tint-orange-fg: #ebd5c0;
  --tb-tint-orange-accent: #c08a5f;
  --tb-tint-amber-bg: #363024;
  --tb-tint-amber-fg: #ecdfb7;
  --tb-tint-amber-accent: #b5974f;
  --tb-tint-yellow-bg: #373120;
  --tb-tint-yellow-fg: #f0e3b3;
  --tb-tint-yellow-accent: #c1a558;
  --tb-tint-lime-bg: #2d3324;
  --tb-tint-lime-fg: #dbe6b7;
  --tb-tint-lime-accent: #8ca45c;
  --tb-tint-olive-bg: #333324;
  --tb-tint-olive-fg: #e6e2ae;
  --tb-tint-olive-accent: #a09a55;
  --tb-tint-green-bg: #1f3428;
  --tb-tint-green-fg: #c4e4cb;
  --tb-tint-green-accent: #679a76;
  --tb-tint-emerald-bg: #21332a;
  --tb-tint-emerald-fg: #c3e0d0;
  --tb-tint-emerald-accent: #62957a;
  --tb-tint-teal-bg: #2c3730;
  --tb-tint-teal-fg: #d6e6d5;
  --tb-tint-teal-accent: #7ea58a;
  --tb-tint-cyan-bg: #1c3339;
  --tb-tint-cyan-fg: #c4e6ea;
  --tb-tint-cyan-accent: #5fa2ad;
  --tb-tint-sky-bg: #1e2e36;
  --tb-tint-sky-fg: #bfdbe6;
  --tb-tint-sky-accent: #5b93a6;
  --tb-tint-steel-bg: #242e38;
  --tb-tint-steel-fg: #cbd6e1;
  --tb-tint-steel-accent: #7a8ea3;
  --tb-tint-cobalt-bg: #232a46;
  --tb-tint-cobalt-fg: #c9d2ec;
  --tb-tint-cobalt-accent: #7086c4;
  --tb-tint-violet-bg: #2e283c;
  --tb-tint-violet-fg: #dcd3ea;
  --tb-tint-violet-accent: #9c8bbd;
  --tb-tint-fuchsia-bg: #342737;
  --tb-tint-fuchsia-fg: #e8d2eb;
  --tb-tint-fuchsia-accent: #b782bd;
  --tb-tint-pink-bg: #382635;
  --tb-tint-pink-fg: #f0cbe3;
  --tb-tint-pink-accent: #bd7fae;
  --tb-tint-rose-bg: #36282c;
  --tb-tint-rose-fg: #e9cdd3;
  --tb-tint-rose-accent: #bd7f8d;

  --tb-sidebar-bg: #0f141a;
  --tb-sidebar-fg: #e6edf3;
  --tb-sidebar-muted: #8e9aa8;
  --tb-sidebar-hover-bg: #141a21;
  --tb-sidebar-hover-fg: #f3f8fc;
  --tb-sidebar-submenu-bg: #0b0f14;
  --tb-sidebar-active-bg: rgba(88, 166, 255, 0.16);
  --tb-sidebar-active-fg: #f3f8fc;

  --tb-navbar-bg: rgba(11, 15, 20, 0.88);
  --tb-navbar-solid: #0b0f14;
  --tb-navbar-fg: #e6edf3;
  --tb-navbar-border: #2a3440;

  --tb-input-bg: #0f141a;
  --tb-input-fg: #e6edf3;
  --tb-input-border: #34404d;
  --tb-input-placeholder: #74808d;

  --tb-table-header-bg: #26323f;
  --tb-table-stripe-bg: #1a222b;
  --tb-table-hover-bg: #212c38;
  --tb-table-border: #2a3440;

  --tb-cell-neutral-bg: #1d242b;

  --tb-focus: #58a6ff;
  --tb-selection-bg: rgba(88, 166, 255, 0.25);

  --tb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --tb-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --tb-shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);

  --tb-fab-bg: #3a6ea5;
  --tb-fab-fg: #ffffff;

  --tb-nav-trigger-bg: #1d242b;
  --tb-nav-trigger-fg: #e6edf3;
  --tb-nav-trigger-border: #2a3440;

  --tb-footer-bg: #0f141a;
  --tb-footer-fg: #e6edf3;
}
