/*
 * EsaSim theme: "Default".
 * Every colour, font, radius and shadow used by the website and the dashboard is defined here and nowhere else.
 * To make a new theme, copy this file to assets/themes/<name>.css, change the values, and set it in Admin → System.
 *
 * Light and dark: each colour is written as light-dark(<light>, <dark>).
 *   <html data-theme="light"> or "dark" forces a mode; without the attribute the operating system decides.
 * "Night" tokens are for surfaces that stay dark in both modes (sidebar, hero bands, code, footer).
 */

@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

:root {
  /* type and shape */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-lg: 16px;

  /* surfaces and text (switch with the mode) */
  --bg:          light-dark(#f4f5f7, #0d0f14);
  --panel:       light-dark(#ffffff, #151820);
  --panel-2:     light-dark(#f9fafb, #191d26);
  --ink:         light-dark(#14171f, #e8ebf2);
  --ink-2:       light-dark(#4a5160, #b2b9c7);
  --ink-3:       light-dark(#7a8191, #848c9c);
  --line:        light-dark(#e3e6ec, #262b36);
  --line-2:      light-dark(#d3d7df, #333947);

  /* brand and state */
  --accent:      light-dark(#2f4ae0, #6b82ff);
  --accent-ink:  light-dark(#ffffff, #0d0f14);
  --accent-soft: light-dark(#eaeefe, #1d2340);
  --signal:      #19c3d6;                       /* secondary brand colour (cyan) */
  --good:        light-dark(#137a4b, #4cc38a);
  --good-soft:   light-dark(#e5f5ec, #12271d);
  --warn:        light-dark(#9a5b00, #f0b04f);
  --warn-soft:   light-dark(#fff3df, #2a2010);
  --bad:         light-dark(#b42318, #ff7b70);
  --bad-soft:    light-dark(#fdecea, #2e1513);
  --on-accent:   #ffffff;                       /* text on solid accent buttons and badges */
  --brand-grad:  linear-gradient(135deg, #2f4ae0, #18b6c9);

  /* elevation */
  --shadow:      light-dark(0 1px 2px rgba(16, 19, 26, .06), 0 0 #0000);
  --shadow-lg:   light-dark(0 24px 60px -24px rgba(16, 19, 26, .35), 0 24px 60px -24px rgba(0, 0, 0, .6));
  --overlay:     rgba(0, 0, 0, .4);

  /* night surfaces: stay dark in both modes */
  --night:       #07090d;
  --night-2:     #0d1017;
  --night-3:     #10141c;
  --night-line:  #1c2130;
  --night-line-2:#2a3142;
  --night-ink:   #e6e9f0;
  --night-ink-2: #9aa3b5;
  --night-ink-3: #6c7588;
  --night-accent:#8fa2ff;
  --night-glow:  rgba(59, 91, 255, .22);
  --night-grid:  rgba(120, 140, 255, .07);
  --footer:      #05070a;

  /* dashboard sidebar */
  --side:        light-dark(#10131a, #0a0c10);
  --side-ink:    #c9cfdb;
  --side-ink-2:  #8a92a3;
  --side-active: light-dark(#1f2533, #181c26);
  --side-line:   #222837;

  /* code, logs and console */
  --code-bg:     #0b0d12;
  --code-ink:    #c9d1e0;
  --code-dim:    #5d6678;
  --code-key:    #8fa2ff;
  --code-hl:     #5fe0ef;
  --code-ok:     #4cc38a;
  --code-err:    #ff8f86;

  /* preview banner */
  --notice-bg:   #1d2340;
  --notice-ink:  #c9d2ff;
  --notice-line: #2a3360;
}

/* Logos: black logo on light surfaces, white logo on dark ones. */
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light { display: none; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block; }
}
