/* ============================================================
   SIAKAD Design Token System — black & white premium theme
   ============================================================ */

:root {
  /* ---- Color palette (monochrome) ---- */
  --color-black: #000000;
  --color-ink: #0d0d0d;
  --color-ink-2: #161616;
  --color-ink-3: #1f1f1f;
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e9e9e9;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;
  --color-white: #ffffff;

  /* Brand */
  --color-primary: #0a0a0a;
  --color-primary-hover: #262626;
  --color-primary-soft: #f2f2f2;
  --color-on-primary: #ffffff;

  /* Semantic — used sparingly, low saturation */
  --color-success: #15803d;
  --color-success-soft: #f0fdf4;
  --color-warning: #a16207;
  --color-warning-soft: #fefce8;
  --color-danger: #b91c1c;
  --color-danger-soft: #fef2f2;
  --color-info: #1e40af;
  --color-info-soft: #eff6ff;

  /* ---- Typography ---- */
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --fs-xs: 0.72rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9rem;
  --fs-md: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.65rem;
  --fs-3xl: 2.1rem;
  --fs-4xl: 2.75rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.2;
  --lh-normal: 1.55;
  --lh-relaxed: 1.75;

  /* ---- Spacing ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* ---- Border radius ---- */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.9rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;

  /* ---- Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);

  /* ---- Layout metrics ---- */
  --sidebar-width: 264px;
  --sidebar-width-collapsed: 78px;
  --navbar-height: 68px;
  --container-max: 1320px;
  --content-gutter: clamp(1rem, 3vw, 2rem);

  /* ---- Transitions ---- */
  --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 380ms cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- Focus ---- */
  --focus-ring: 0 0 0 3px rgba(10, 10, 10, 0.18);

  /* ---- Misc ---- */
  --blur: blur(12px);
  --z-sidebar: 1040;
  --z-navbar: 1030;
  --z-modal: 1080;
  --z-toast: 1090;

  /* Dark mode (semantic statuses stay visible) */
  --bg-body: var(--color-gray-50);
  --bg-surface: var(--color-white);
  --bg-surface-muted: var(--color-gray-100);
  --color-border: var(--color-gray-200);
  --color-text: var(--color-gray-900);
  --color-text-soft: var(--color-gray-600);
  --color-text-muted: var(--color-gray-500);

  color-scheme: light;
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
  letter-spacing: -0.015em;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

::selection {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}