/* Clinai — Paramatik-calibre design tokens (light-first) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Syne:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

  --bg-0: #f4f4f5;
  --bg-1: #ffffff;
  --bg-2: #f4f4f7;
  --bg-3: #e4e4e7;
  --bg-4: #d4d4d8;

  --text-0: #09090b;
  --text-1: #18181b;
  --text-2: #3f3f46;
  --text-3: #71717a;
  --text-4: #a1a1aa;

  --brand: #14b8a6;
  --brand-dim: rgba(20, 184, 166, 0.1);
  --brand-hover: #0d9488;
  --brand-glow: rgba(20, 184, 166, 0.22);
  --brand-border: rgba(20, 184, 166, 0.28);
  --on-brand: #ffffff;

  --red: #e11d48;
  --red-dim: rgba(225, 29, 72, 0.08);
  --amber: #d97706;
  --amber-dim: rgba(217, 119, 6, 0.1);
  --blue: #2563eb;

  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --glass: rgba(255, 255, 255, 0.92);
  --overlay: rgba(15, 23, 42, 0.38);

  --font: 'Inter', system-ui, sans-serif;
  --display: 'Syne', var(--font);
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 220ms;

  --shell-max: 1440px;
  --content-max: 720px;
  --sidebar-w: 280px;
  --page-pad: clamp(20px, 5vw, 28px);
  --section-gap: 32px;
  --card-pad: 24px;
  --card-radius: 16px;

  /* Legacy shadcn bridge (klinia-ui.css compatibility) */
  --background: 240 5% 96%;
  --foreground: 240 10% 4%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 4%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 4%;
  --primary: 173 58% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 5% 96%;
  --secondary-foreground: 240 6% 10%;
  --muted: 240 5% 96%;
  --muted-foreground: 240 4% 46%;
  --accent-hsl: 173 40% 96%;
  --accent-foreground: 173 58% 25%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 98%;
  --input: 240 6% 90%;
  --ring: 173 58% 40%;
  --radius: 0.625rem;
  --sidebar: 0 0% 100%;
  --sidebar-foreground: 240 6% 10%;
  --sidebar-border: 240 6% 90%;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
}

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

  --bg-0: #050506;
  --bg-1: #08090c;
  --bg-2: #0e1116;
  --bg-3: #141a22;
  --bg-4: #1c2430;

  --text-0: #fafafa;
  --text-1: #e4e4e7;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-4: #52525b;

  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-hover: #5eead4;
  --accent-glow: rgba(45, 212, 191, 0.18);
  --accent-border: rgba(45, 212, 191, 0.32);
  --on-accent: #042f2e;

  --red: #fb7185;
  --red-dim: rgba(251, 113, 133, 0.12);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.12);
  --blue: #60a5fa;

  --border: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --glass: rgba(5, 5, 6, 0.88);
  --overlay: rgba(0, 0, 0, 0.55);

  --background: 240 10% 4%;
  --foreground: 0 0% 98%;
  --card: 240 10% 6%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 6%;
  --popover-foreground: 0 0% 98%;
  --primary: 173 58% 45%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 4% 16%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 4% 16%;
  --muted-foreground: 240 5% 65%;
  --accent-hsl: 173 30% 12%;
  --accent-foreground: 173 58% 65%;
  --destructive: 0 62% 50%;
  --border: 240 4% 16%;
  --input: 240 4% 16%;
  --ring: 173 58% 45%;
  --sidebar: 240 10% 5%;
  --sidebar-foreground: 0 0% 98%;
  --sidebar-border: 240 4% 16%;
}

html {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
}
