/* Scanet-AI design tokens. One source for the Admin Console, the chat theme and the sign-in theme. */

:root {
  /* Brand — taken from the logo */
  --sc-ink: #0B1726;
  --sc-teal: #0E9F9A;
  --sc-paper: #F4F3EE;

  /* Ink scale (dark surfaces) */
  --sc-ink-2: #101F33;
  --sc-ink-3: #16283F;
  --sc-ink-4: #1E3450;
  --sc-line-dark: #22364F;

  /* Paper scale (light surfaces) */
  --sc-paper-2: #EBE9E1;
  --sc-paper-3: #FFFFFF;
  --sc-line-light: #DAD7CC;

  /* Teal for text: --sc-teal is 2.9:1 on paper, so text on light uses the deeper step (4.7:1) */
  --sc-teal-text-light: #0A7A76;
  --sc-teal-text-dark: #2DD4CF;

  /* Verdict colours: one per verdict, used everywhere a verdict is shown */
  --v-allow: #3DBE7A;
  --v-mask: var(--sc-teal);
  --v-warn: #E5A93B;
  --v-approve: #8B7CF6;
  --v-block: #E5484D;
  --v-quarantine: #C2410C;

  /* Type */
  --font-ui: "Sora", "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --fs-xs: 0.75rem;  --fs-sm: 0.8125rem;  --fs-md: 0.9375rem;
  --fs-lg: 1.125rem; --fs-xl: 1.5rem;     --fs-2xl: 2.25rem;

  /* Shape and space */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;

  /* Motion: the scan sweep is the product's signature */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --scan-duration: 900ms;
}

/* Dark is the default identity */
:root, :root[data-theme="dark"] {
  --bg: var(--sc-ink);
  --surface: var(--sc-ink-2);
  --surface-raised: var(--sc-ink-3);
  --surface-hover: var(--sc-ink-4);
  --border: var(--sc-line-dark);
  --text: var(--sc-paper);
  --text-muted: #9FB0C4;
  --accent: var(--sc-teal);
  --accent-text: var(--sc-teal-text-dark);
  --on-accent: var(--sc-ink);
  --shadow: 0 10px 30px rgb(0 0 0 / .35);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: var(--sc-paper);
  --surface: var(--sc-paper-3);
  --surface-raised: var(--sc-paper-2);
  --surface-hover: #E3E0D6;
  --border: var(--sc-line-light);
  --text: var(--sc-ink);
  --text-muted: #5B6B7F;
  --accent: var(--sc-teal);
  --accent-text: var(--sc-teal-text-light);
  --on-accent: var(--sc-ink);
  --shadow: 0 10px 30px rgb(11 23 38 / .10);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: var(--sc-paper); --surface: var(--sc-paper-3); --surface-raised: var(--sc-paper-2);
    --surface-hover: #E3E0D6; --border: var(--sc-line-light); --text: var(--sc-ink);
    --text-muted: #5B6B7F; --accent-text: var(--sc-teal-text-light);
    --shadow: 0 10px 30px rgb(11 23 38 / .10); color-scheme: light;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --scan-duration: 1ms; }
}
