/* ==========================================================================
   IT-Suite design tokens (v4) – copied 1:1 from the prototype, keep in sync

   CD Kreis Lippe (as of 2022-01-13) shows through:
     red #d51317 · yellow #f7a600 · grey #646163 · logo · ray shapes
   the modern part: current type, calm neutrals,
     color only where it means something (action, status, brand), lots of space.
   ========================================================================== */

:root {
  /* CD colors (fixed) */
  --cd-red: #d51317;
  --cd-red-hover: #ab130f;
  --cd-yellow: #f7a600;
  --cd-yellow-hover: #d18e00;
  --cd-grey: #646163;
  --cd-blue: #004899;
  --cd-green: #7ab929;

  /* type: system font for now, maybe self-host later */
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, ui-monospace, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem);

  /* spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --gap: 24px;

  /* radii: badges square-ish, surfaces slightly rounded */
  --r-xs: 3px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-full: 999px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t: 220ms;

  --sidebar-w: 304px;
  --topbar-h: 64px;
  --content-max: 1320px;
}

/* --------------------------------------------------------------------------
   Light (default)
   -------------------------------------------------------------------------- */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f5f5f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --surface-hover: #f2f1f0;
  --surface-sunken: #efeeed;
  --border: #e7e5e4;
  --border-strong: #d4d2d0;

  --text: #1c1a1a;
  --text-2: #57534e;
  --text-3: #8a8580;
  --heading: #1c1a1a;

  --red-ink: #b81014;
  --red-soft: #fdeceb;
  --yellow-ink: #9a6400;
  --yellow-soft: #fef4de;
  --grey-ink: #4a4847;
  --grey-soft: #f0efee;
  --blue-ink: #004899;
  --blue-soft: #e8eff8;
  --green-ink: #3f7212;
  --green-soft: #eef6e4;

  --ok: #3f7212;   --ok-dot: #5fa020;  --ok-soft: #eef6e4;
  --warn: #9a6400; --warn-dot: var(--cd-yellow); --warn-soft: #fef4de;
  --crit: #b81014; --crit-dot: var(--cd-red);  --crit-soft: #fdeceb;
  --info: #004899; --info-dot: #2f6fc0;        --info-soft: #e8eff8;
  /* solid buttons (white text) */
  --ok-solid: #3f7212;   --ok-solid-hover: #335d0e;
  --crit-solid: #b81014; --crit-solid-hover: #9a0d10;
  --info-solid: #004899; --info-solid-hover: #003b7d;

  --shadow-sm: 0 1px 2px rgba(28, 26, 26, .04);
  --shadow: 0 1px 2px rgba(28, 26, 26, .04), 0 4px 12px -4px rgba(28, 26, 26, .06);
  --shadow-lg: 0 2px 4px rgba(28, 26, 26, .04), 0 16px 32px -12px rgba(28, 26, 26, .16);
}

/* --------------------------------------------------------------------------
   Dark
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #121111;
  --surface: #1b1a19;
  --surface-2: #201f1e;
  --surface-hover: #262524;
  --surface-sunken: #161515;
  --border: #2c2a29;
  --border-strong: #3d3a39;

  --text: #f2f1f0;
  --text-2: #bfbab5;
  --text-3: #8c8781;
  --heading: #ffffff;

  --red-ink: #ff7b7b;
  --red-soft: rgba(213, 19, 23, .18);
  --yellow-ink: #ffc34d;
  --yellow-soft: rgba(247, 166, 0, .15);
  --grey-ink: #d6d3d0;
  --grey-soft: rgba(255, 255, 255, .07);
  --blue-ink: #82b2ef;
  --blue-soft: rgba(47, 111, 192, .2);
  --green-ink: #a6d86a;
  --green-soft: rgba(122, 185, 41, .15);

  --ok: #a6d86a;   --ok-dot: #7ab929;  --ok-soft: rgba(122, 185, 41, .15);
  --warn: #ffc34d; --warn-dot: var(--cd-yellow); --warn-soft: rgba(247, 166, 0, .15);
  --crit: #ff7b7b; --crit-dot: #ff4a4e; --crit-soft: rgba(213, 19, 23, .2);
  --info: #82b2ef; --info-dot: #4d8ad6; --info-soft: rgba(47, 111, 192, .2);
  --ok-solid: #4e8a17;   --ok-solid-hover: #5d9e1f;
  --crit-solid: #c8272b; --crit-solid-hover: #d93a3e;
  --info-solid: #2f6fc0; --info-solid-hover: #3d7fd2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -4px rgba(0, 0, 0, .5);
  --shadow-lg: 0 16px 36px -12px rgba(0, 0, 0, .75);
}

/* --------------------------------------------------------------------------
   Zones
   portal  = light nav, Lippe red accent
   zentrale = dark nav, CD blue accent
   -------------------------------------------------------------------------- */
body[data-zone="portal"] {
  --accent: var(--cd-red);
  --accent-hover: var(--cd-red-hover);
  --accent-ink: var(--red-ink);
  --accent-soft: var(--red-soft);

  --nav-bg: var(--surface);
  --nav-text: var(--text-2);
  --nav-text-strong: var(--text);
  --nav-label: var(--text-3);
  --nav-hover: var(--surface-hover);
  --nav-active: var(--red-soft);
  --nav-active-text: var(--red-ink);
  --nav-border: var(--border);
  --nav-chip: var(--surface-sunken);
}

/* zentrale: colors from the IT dashboard favicon
   #1f66be (blue) and #0f3077 (navy) */
body[data-zone="zentrale"] {
  --it-blue: #1f66be;
  --it-navy: #0f3077;

  /* darker than the favicon on purpose */
  --accent: #14498c;
  --accent-hover: #0f3a72;
  --accent-ink: #14498c;
  --accent-soft: #e7edf6;
  --blue-ink: #14498c;
  --blue-soft: #e7edf6;

  --nav-bg: #081a42;
  --nav-text: #b9c5df;
  --nav-text-strong: #ffffff;
  --nav-label: #7487b3;
  --nav-hover: #0f2554;
  --nav-active: #153063;
  --nav-active-text: #ffffff;
  --nav-border: #061536;
  --nav-chip: rgba(255, 255, 255, .08);
  --nav-marker: #4c8de0;
}
:root[data-theme="dark"] body[data-zone="zentrale"] {
  --accent: #2a63ad;
  --accent-hover: #3571bd;
  --accent-ink: #86b0e8;
  --accent-soft: rgba(20, 73, 140, .3);
  --blue-ink: #86b0e8;
  --blue-soft: rgba(20, 73, 140, .3);
  --nav-bg: #061331;
  --nav-hover: #0c1e47;
  --nav-active: #112855;
  --nav-border: #040e26;
}
