/* Shared by the workspace and PHP sign-in / installation pages. */
:root[data-theme] {
  color-scheme: light;
  --background: #f3f5fa;
  --foreground: #1c2940;
  --card: #ffffff;
  --card-foreground: #1c2940;
  --popover: #ffffff;
  --popover-foreground: #1c2940;
  --primary: #654bc4;
  --primary-foreground: #ffffff;
  --secondary: #eef0f7;
  --secondary-foreground: #35445d;
  --muted: #eef1f6;
  --muted-foreground: #526078;
  --accent: #ede8fa;
  --accent-foreground: #573bac;
  --border: #dbe1ec;
  --input: #b8c3d4;
  --ring: #7658d1;
  --destructive: #a82e42;
  --sidebar: #14203a;
  --sidebar-foreground: #d6deef;
  --sidebar-primary: #beacff;
  --sidebar-accent: #2c3655;
  --sidebar-accent-foreground: #eee7ff;
  --sidebar-border: #34415e;
  --sidebar-muted: #b6c3de;
  --lm-heading: #17243b;
  --lm-soft: #f6f8fc;
  --lm-hover: #e9edf5;
  --lm-purple: #5e40b3;
  --lm-purple-bg: #f0ecfb;
  --lm-purple-border: #d8ccef;
  --lm-green: #176043;
  --lm-green-bg: #edf7f2;
  --lm-green-border: #c8e2d5;
  --lm-amber: #775018;
  --lm-amber-bg: #fff5dc;
  --lm-amber-border: #e5d1a0;
  --lm-red: #a12f45;
  --lm-red-bg: #fcecf0;
  --lm-red-border: #eac6ce;
  --lm-blue: #245989;
  --lm-blue-bg: #eaf2fe;
  --lm-button: #654bc4;
  --lm-button-hover: #533baa;
  --lm-on-button: #ffffff;
  --lm-selection: #dcd2fa;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --background: #101827;
  --foreground: #e4eaf4;
  --card: #192438;
  --card-foreground: #e4eaf4;
  --popover: #202d43;
  --popover-foreground: #e4eaf4;
  --primary: #b5a0ff;
  --primary-foreground: #1b1234;
  --secondary: #26334b;
  --secondary-foreground: #dce5f6;
  --muted: #233047;
  --muted-foreground: #b5c2d8;
  --accent: #332a4d;
  --accent-foreground: #d7c8ff;
  --border: #34435c;
  --input: #62738d;
  --ring: #b5a0ff;
  --destructive: #ffafbc;
  --sidebar: #0c1424;
  --sidebar-foreground: #d6e0f2;
  --sidebar-primary: #c1aeff;
  --sidebar-accent: #2d2b49;
  --sidebar-accent-foreground: #eee5ff;
  --sidebar-border: #2d3b52;
  --sidebar-muted: #afbed9;
  --lm-heading: #f0f4fc;
  --lm-soft: #1d2a3f;
  --lm-hover: #2b3952;
  --lm-purple: #d1bfff;
  --lm-purple-bg: #2d2946;
  --lm-purple-border: #54436f;
  --lm-green: #9ce2c0;
  --lm-green-bg: #1b3433;
  --lm-green-border: #36574e;
  --lm-amber: #f4d08a;
  --lm-amber-bg: #392f22;
  --lm-amber-border: #655237;
  --lm-red: #ffb4c1;
  --lm-red-bg: #3d2939;
  --lm-red-border: #704152;
  --lm-blue: #aed5ff;
  --lm-blue-bg: #233955;
  --lm-button: #b5a0ff;
  --lm-button-hover: #c9b8ff;
  --lm-on-button: #1b1234;
  --lm-selection: #514171;
}
.theme-switch {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  padding: 4px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--muted); color: var(--muted-foreground);
}
.theme-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: auto; min-width: 44px; min-height: 36px; margin: 0; padding: 7px 11px;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: var(--muted-foreground); font: 600 14px/1.4 Tahoma,Arial,sans-serif;
  cursor: pointer; white-space: nowrap; box-shadow: none;
}
.theme-switch button:hover { background: var(--lm-hover); color: var(--foreground); }
:root[data-theme=light] .theme-switch [data-theme-set=light],
:root[data-theme=dark] .theme-switch [data-theme-set=dark] {
  background: var(--card); color: var(--lm-purple); border-color: var(--border);
  box-shadow: 0 1px 3px #0000000d;
}
.theme-switch svg { width: 17px; height: 17px; flex-shrink: 0; }
.theme-switch button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: var(--lm-selection); color: var(--foreground); }
