/**
 * SmartCare AI Design System — Token CSS
 *
 * BERKAS INI DIGENERATE. JANGAN DISUNTING TANGAN.
 * Sumber: packages/tokens/tokens.json · Generator: packages/tokens/build.ts
 * Perbarui dengan: node packages/tokens/build.ts
 */

@layer reset, tokens, base, components, utilities;

@layer tokens {
  :root {
    color-scheme: light dark;

    /* Pembantu deteksi dukungan interpolasi oklab */
    --in-oklab: ;
    --in-oklch: ;

    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --text-display-xl: clamp(2.125rem, 1.8rem + 1.2vw, 2.5rem);
    --text-display-lg: clamp(1.75rem, 1.5rem + 0.9vw, 2rem);
    --text-display-md: 1.625rem;
    --text-title-lg: 1.375rem;
    --text-title-md: 1.125rem;
    --text-title-sm: 1rem;
    --text-body-lg: 1.0625rem;
    --text-body-md: 1rem;
    --text-body-sm: 0.875rem;
    --text-label-lg: 0.9375rem;
    --text-label-md: 0.8125rem;
    --text-label-sm: 0.75rem;
    --text-eyebrow: 0.6875rem;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-tile: 18px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-pill: 9999px;
    --tap-min: 44px;
    --tap-comfort: 52px;
    --tap-lansia: 64px;
    --icon-sm: 16px;
    --icon-md: 20px;
    --icon-lg: 24px;
    --icon-service: 36px;
    --icon-lansia: 32px;
    --content-max: 680px;
    --z-base: 0;
    --z-raised: 10;
    --z-sticky: 20;
    --z-scrim: 40;
    --z-modal: 50;
    --z-toast: 60;
    --z-emergency: 70;
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --dur-tap: 120ms;
    --dur-state: 180ms;
    --dur-sheet-in: 280ms;
    --dur-sheet-out: 180ms;
    --dur-screen: 300ms;
    --surface-page: #f3f8fe;
    --surface-card: #ffffff;
    --surface-raised: #ffffff;
    --surface-sunken: #e7eef7;
    --surface-tile: #e9f3fe;
    --surface-tile-hover: #e2f0fe;
    --surface-glass: color-mix(in oklab, #ffffff 20%, transparent);
    --ink-strong: #0b1b33;
    --ink-base: #22354f;
    --ink-muted: #4a5d75;
    --ink-faint: #7c90ab;
    --brand-base: #016ac5;
    --brand-strong: #0158a6;
    --brand-bright: #0391fb;
    --brand-soft: #e2f0fe;
    --on-brand: #ffffff;
    --hero-start: #012955;
    --hero-mid: #016ac5;
    --hero-end: #0391fb;
    --hero-ink: #ffffff;
    --hero-ink-muted: rgba(255, 255, 255, 0.88);
    --accent-base: #0a7a82;
    --accent-strong: #065b61;
    --accent-soft: #d7f2f4;
    --on-accent: #ffffff;
    --line-field: #7488a3;
    --line-base: #e1eaf4;
    --focus-ring: #016ac5;
    --level-ok-bg: #e6f6ee;
    --level-ok-fg: #0d683b;
    --level-warn-bg: #fef3dc;
    --level-warn-fg: #8c5000;
    --level-urgent-bg: #fde9e1;
    --level-urgent-fg: #b23612;
    --level-critical-fill: #c81e2b;
    --on-level-critical: #ffffff;
    --level-none-bg: #e9eef5;
    --level-none-fg: #445770;
    --status-inti-bg: #e2f0fe;
    --status-inti-fg: #0158a6;
    --status-ai-bg: #d7f2f4;
    --status-ai-fg: #065b61;
    --status-soon-bg: #f1f4f9;
    --status-soon-fg: #4b5e77;
    --shadow-card: 0 2px 6px rgba(11, 27, 51, 0.04), 0 8px 24px rgba(11, 27, 51, 0.06);
    --shadow-sm: 0 1px 3px rgba(11, 27, 51, 0.06), 0 2px 6px rgba(11, 27, 51, 0.04);
    --shadow-float: 0 6px 16px rgba(8, 88, 189, 0.10), 0 18px 38px rgba(11, 27, 51, 0.12);
    --shadow-lg: 0 10px 24px rgba(11, 27, 51, 0.08), 0 24px 48px rgba(11, 27, 51, 0.14);
    --card-outline: 0 0 0 1px rgba(11, 27, 51, 0.03);
  }

  @supports (background: linear-gradient(in oklab, white, black)) {
    :root {
      --in-oklab: in oklab;
      --in-oklch: in oklch;
    }
  }

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

    --surface-page: #0a1018;
    --surface-card: #141e2b;
    --surface-raised: #1b2738;
    --surface-sunken: #0d1520;
    --surface-tile: #1a283b;
    --surface-tile-hover: #22344d;
    --surface-glass: color-mix(in oklab, #ffffff 12%, transparent);
    --ink-strong: #f4f8fd;
    --ink-base: #e2ecf7;
    --ink-muted: #b4c6dc;
    --ink-faint: #7d93ae;
    --brand-base: #5cabf5;
    --brand-strong: #8ec6f8;
    --brand-bright: #7ec2ff;
    --brand-soft: #142a45;
    --on-brand: #04213a;
    --hero-start: #092244;
    --hero-mid: #0d3870;
    --hero-end: #1659a8;
    --hero-ink: #f4f8fd;
    --hero-ink-muted: rgba(244, 248, 253, 0.85);
    --accent-base: #4ec5cd;
    --accent-strong: #7ed9df;
    --accent-soft: #0c3136;
    --on-accent: #032629;
    --line-field: #556e8c;
    --line-base: #253447;
    --focus-ring: #7cbaf7;
    --level-ok-bg: #103324;
    --level-ok-fg: #6ee7a8;
    --level-warn-bg: #362709;
    --level-warn-fg: #fcd368;
    --level-urgent-bg: #3d1c12;
    --level-urgent-fg: #fca58b;
    --level-none-bg: #1c2838;
    --level-none-fg: #a6b9d1;
    --status-inti-bg: #142a45;
    --status-inti-fg: #8ec6f8;
    --status-ai-bg: #0c3136;
    --status-ai-fg: #6bd9e0;
    --status-soon-bg: #1b2738;
    --status-soon-fg: #a6b9d1;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --card-outline: 0 0 0 1px #253447;
  }

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

    --text-title-lg: 1.5rem;
    --text-title-md: 1.25rem;
    --text-title-sm: 1.125rem;
    --text-body-md: 1.25rem;
    --text-body-sm: 1.0625rem;
    --text-label-lg: 1.1875rem;
    --text-label-md: 1.0625rem;
    --text-label-sm: 0.9375rem;
    --tap-min: 64px;
    --tap-comfort: 68px;
    --surface-page: #ffffff;
    --surface-sunken: #eef3f9;
    --surface-tile: #e6f0fa;
    --surface-tile-hover: #d3e5f8;
    --surface-glass: rgba(255, 255, 255, 0.22);
    --ink-strong: #00101f;
    --ink-base: #00101f;
    --ink-muted: #25374d;
    --ink-faint: #475a78;
    --brand-base: #01477f;
    --brand-strong: #012d57;
    --brand-bright: #0b6ee0;
    --brand-soft: #d9ebff;
    --hero-start: #013261;
    --hero-mid: #01477f;
    --hero-end: #055ea8;
    --hero-ink-muted: #eef5fc;
    --accent-base: #01474d;
    --accent-strong: #013136;
    --accent-soft: #cceaed;
    --line-field: #3d526e;
    --line-base: #9cb0c9;
    --focus-ring: #012d57;
    --level-ok-bg: #d9f2e4;
    --level-ok-fg: #064424;
    --level-warn-bg: #fde9be;
    --level-warn-fg: #5c3200;
    --level-urgent-bg: #fcd8cc;
    --level-urgent-fg: #751b00;
    --level-critical-fill: #a80d1a;
    --level-none-bg: #e1e8f0;
    --level-none-fg: #1b2d42;
    --status-inti-bg: #d9ebff;
    --status-inti-fg: #012d57;
    --status-ai-bg: #cceaed;
    --status-ai-fg: #013136;
    --status-soon-bg: #e1e8f0;
    --status-soon-fg: #1b2d42;
    --shadow-card: 0 0 0 1.5px #475a78;
    --shadow-sm: 0 0 0 1.5px #475a78;
    --shadow-float: 0 0 0 2px #01477f;
    --shadow-lg: 0 0 0 2.5px #012d57;
    --card-outline: 0 0 0 1.5px #475a78;
  }

  /* Forced Colors Mode Fallback (Windows High Contrast) */
  @media (forced-colors: active) {
    :root {
      --shadow-card: none;
      --shadow-float: none;
      --shadow-lg: none;
      --focus-ring: Highlight;
    }
  }
}
