/* ==========================================================================
   DokterDietku — Design System
   Tokens only. No component styles here (see components.css).
   ========================================================================== */

:root {
  /* --- Brand / primary: deep teal medical green --- */
  --c-primary-900: #073B36;
  --c-primary-800: #0A4A43;
  --c-primary-700: #0E5A52;
  --c-primary-600: #14766B;
  --c-primary-500: #1B8F81;
  --c-primary-200: #A9D6CF;
  --c-primary-100: #D6EAE6;
  --c-primary-50:  #E6F2F0;

  /* --- Accent: restrained saffron (ratings, highlights) --- */
  --c-accent-600: #C9861F;
  --c-accent-500: #E8A33D;
  --c-accent-100: #FBEFD9;

  /* --- Neutrals --- */
  --c-bg:          #F7F8F7;
  --c-bg-alt:      #F0F3F2;
  --c-surface:     #FFFFFF;
  --c-surface-sunk:#FAFBFA;
  --c-text:        #1B2A2E;
  --c-text-soft:   #46585D;
  --c-text-muted:  #64767B;
  --c-text-faint:  #93A2A6;
  --c-border:      #E3E8E7;
  --c-border-strong:#CFD8D6;

  /* --- Semantic --- */
  --c-success:     #1E7D5A;
  --c-success-bg:  #E4F3EC;
  --c-warning:     #B5761A;
  --c-warning-bg:  #FBF0DC;
  --c-danger:      #B23B3B;
  --c-danger-bg:   #FAEAEA;
  --c-info:        #2C6A9E;
  --c-info-bg:     #E7F1F9;

  /* --- Typography --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-38: 2.375rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;

  --lh-tight: 1.16;
  --lh-heading: 1.28;
  --lh-body: 1.6;

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

  --ls-tight: -0.02em;
  --ls-tighter: -0.03em;
  --ls-wide: 0.04em;

  /* --- Spacing scale (4px base) --- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* --- Radii --- */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* --- Shadows (soft, low contrast) --- */
  --sh-xs: 0 1px 2px rgba(16, 40, 37, 0.05);
  --sh-sm: 0 1px 3px rgba(16, 40, 37, 0.06), 0 1px 2px rgba(16, 40, 37, 0.04);
  --sh-md: 0 4px 14px rgba(16, 40, 37, 0.07);
  --sh-lg: 0 12px 32px rgba(16, 40, 37, 0.10);
  --sh-xl: 0 24px 60px rgba(16, 40, 37, 0.14);
  --sh-focus: 0 0 0 3px rgba(20, 118, 107, 0.22);

  /* --- Layout --- */
  --w-page: 1200px;
  --w-page-wide: 1360px;
  --w-sidebar: 248px;
  --w-sidebar-collapsed: 76px;
  --h-topbar: 68px;
  --h-tabbar: 66px;

  /* --- Motion --- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 130ms;
  --t-base: 220ms;
  --t-slow: 420ms;

  --z-base: 1;
  --z-sticky: 100;
  --z-tabbar: 200;
  --z-overlay: 900;
  --z-modal: 1000;
  --z-toast: 1100;
  --z-rolebar: 1200;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-base: 0ms; --t-slow: 0ms; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--c-text);
}

p { margin: 0; }

a { color: var(--c-primary-700); text-decoration: none; }
a:hover { color: var(--c-primary-600); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

img { max-width: 100%; display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--c-primary-600);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--c-primary-100); }

/* Thin, unobtrusive scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--c-border-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--c-border-strong);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: var(--c-text-faint); background-clip: content-box; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: var(--sp-4); z-index: var(--z-toast);
  background: var(--c-primary-700); color: #fff; padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm); font-weight: var(--fw-semibold); transition: top var(--t-base);
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

.container { width: 100%; max-width: var(--w-page); margin-inline: auto; padding-inline: var(--sp-5); }
.container--wide { max-width: var(--w-page-wide); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-8); }

.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.row-wrap { flex-wrap: wrap; }
.grid { display: grid; gap: var(--sp-5); }

.text-muted { color: var(--c-text-muted); }
.text-faint { color: var(--c-text-faint); }
.text-center { text-align: center; }
.text-primary { color: var(--c-primary-700); }
.text-danger { color: var(--c-danger); }
.text-success { color: var(--c-success); }

.fs-12 { font-size: var(--fs-12); }
.fs-13 { font-size: var(--fs-13); }
.fs-14 { font-size: var(--fs-14); }
.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: -0.01em; }
