/*
 * Panel design tokens. Single source of colors, type, spacing, radii and shadows.
 * New CSS uses these variables only (no raw hex). See docs/frontend.md.
 * The Bootstrap mapping lives in bootstrap-map.css.
 */

:root {
    /* Palette: Tailwind scales, the only raw colors. Sections use the --c-* tokens below; --p-* only when no token has the meaning. */
    --p-gray-50: #f9fafb; --p-gray-100: #f3f4f6; --p-gray-200: #e5e7eb; --p-gray-300: #d1d5db; --p-gray-400: #9ca3af; --p-gray-500: #6b7280; --p-gray-600: #4b5563; --p-gray-700: #374151; --p-gray-800: #1f2937; --p-gray-900: #111827; --p-gray-950: #030712;
    --p-slate-50: #f8fafc; --p-slate-100: #f1f5f9; --p-slate-200: #e2e8f0; --p-slate-300: #cbd5e1; --p-slate-400: #94a3b8; --p-slate-500: #64748b; --p-slate-600: #475569; --p-slate-700: #334155; --p-slate-800: #1e293b; --p-slate-900: #0f172a; --p-slate-950: #020617;
    --p-blue-50: #eff6ff; --p-blue-100: #dbeafe; --p-blue-200: #bfdbfe; --p-blue-300: #93c5fd; --p-blue-400: #60a5fa; --p-blue-500: #3b82f6; --p-blue-600: #2563eb; --p-blue-700: #1d4ed8; --p-blue-800: #1e40af; --p-blue-900: #1e3a8a; --p-blue-950: #172554;
    --p-sky-50: #f0f9ff; --p-sky-100: #e0f2fe; --p-sky-200: #bae6fd; --p-sky-300: #7dd3fc; --p-sky-400: #38bdf8; --p-sky-500: #0ea5e9; --p-sky-600: #0284c7; --p-sky-700: #0369a1; --p-sky-800: #075985; --p-sky-900: #0c4a6e; --p-sky-950: #082f49;
    --p-teal-50: #f0fdfa; --p-teal-100: #ccfbf1; --p-teal-200: #99f6e4; --p-teal-300: #5eead4; --p-teal-400: #2dd4bf; --p-teal-500: #14b8a6; --p-teal-600: #0d9488; --p-teal-700: #0f766e; --p-teal-800: #115e59; --p-teal-900: #134e4a; --p-teal-950: #042f2e;
    --p-green-50: #f0fdf4; --p-green-100: #dcfce7; --p-green-200: #bbf7d0; --p-green-300: #86efac; --p-green-400: #4ade80; --p-green-500: #22c55e; --p-green-600: #16a34a; --p-green-700: #15803d; --p-green-800: #166534; --p-green-900: #14532d; --p-green-950: #052e16;
    --p-red-50: #fef2f2; --p-red-100: #fee2e2; --p-red-200: #fecaca; --p-red-300: #fca5a5; --p-red-400: #f87171; --p-red-500: #ef4444; --p-red-600: #dc2626; --p-red-700: #b91c1c; --p-red-800: #991b1b; --p-red-900: #7f1d1d; --p-red-950: #450a0a;
    --p-amber-50: #fffbeb; --p-amber-100: #fef3c7; --p-amber-200: #fde68a; --p-amber-300: #fcd34d; --p-amber-400: #fbbf24; --p-amber-500: #f59e0b; --p-amber-600: #d97706; --p-amber-700: #b45309; --p-amber-800: #92400e; --p-amber-900: #78350f; --p-amber-950: #451a03;
    --p-orange-50: #fff7ed; --p-orange-100: #ffedd5; --p-orange-200: #fed7aa; --p-orange-300: #fdba74; --p-orange-400: #fb923c; --p-orange-500: #f97316; --p-orange-600: #ea580c; --p-orange-700: #c2410c; --p-orange-800: #9a3412; --p-orange-900: #7c2d12; --p-orange-950: #431407;
    --p-violet-50: #f5f3ff; --p-violet-100: #ede9fe; --p-violet-200: #ddd6fe; --p-violet-300: #c4b5fd; --p-violet-400: #a78bfa; --p-violet-500: #8b5cf6; --p-violet-600: #7c3aed; --p-violet-700: #6d28d9; --p-violet-800: #5b21b6; --p-violet-900: #4c1d95; --p-violet-950: #2e1065;
    --p-yellow-50: #fefce8; --p-yellow-100: #fef9c3; --p-yellow-200: #fef08a; --p-yellow-300: #fde047; --p-yellow-400: #facc15; --p-yellow-500: #eab308; --p-yellow-600: #ca8a04; --p-yellow-700: #a16207; --p-yellow-800: #854d0e; --p-yellow-900: #713f12; --p-yellow-950: #422006;
    --p-lime-50: #f7fee7; --p-lime-100: #ecfccb; --p-lime-200: #d9f99d; --p-lime-300: #bef264; --p-lime-400: #a3e635; --p-lime-500: #84cc16; --p-lime-600: #65a30d; --p-lime-700: #4d7c0f; --p-lime-800: #3f6212; --p-lime-900: #365314; --p-lime-950: #1a2e05;
    --p-cyan-50: #ecfeff; --p-cyan-100: #cffafe; --p-cyan-200: #a5f3fc; --p-cyan-300: #67e8f9; --p-cyan-400: #22d3ee; --p-cyan-500: #06b6d4; --p-cyan-600: #0891b2; --p-cyan-700: #0e7490; --p-cyan-800: #155e75; --p-cyan-900: #164e63; --p-cyan-950: #083344;
    --p-indigo-50: #eef2ff; --p-indigo-100: #e0e7ff; --p-indigo-200: #c7d2fe; --p-indigo-300: #a5b4fc; --p-indigo-400: #818cf8; --p-indigo-500: #6366f1; --p-indigo-600: #4f46e5; --p-indigo-700: #4338ca; --p-indigo-800: #3730a3; --p-indigo-900: #312e81; --p-indigo-950: #1e1b4b;
    --p-purple-50: #faf5ff; --p-purple-100: #f3e8ff; --p-purple-200: #e9d5ff; --p-purple-300: #d8b4fe; --p-purple-400: #c084fc; --p-purple-500: #a855f7; --p-purple-600: #9333ea; --p-purple-700: #7e22ce; --p-purple-800: #6b21a8; --p-purple-900: #581c87; --p-purple-950: #3b0764;
    --p-pink-50: #fdf2f8; --p-pink-100: #fce7f3; --p-pink-200: #fbcfe8; --p-pink-300: #f9a8d4; --p-pink-400: #f472b6; --p-pink-500: #ec4899; --p-pink-600: #db2777; --p-pink-700: #be185d; --p-pink-800: #9d174d; --p-pink-900: #831843; --p-pink-950: #500724;
    --p-white: #ffffff; --p-black: #000000;

    /* Moscow metro line colours (official), for clinic addresses. */
    --metro-1: #ef1e25; --metro-2: #029a55; --metro-6: #f58220; --metro-7: #943e90;

    /* Chart series, in this order. Canvas charts read them with Panel.chartColors(). */
    --chart-1: #4e79a7; --chart-2: #f28e2b; --chart-3: #e15759; --chart-4: #76b7b2; --chart-5: #59a14f; --chart-6: #edc948; --chart-7: #b07aa1; --chart-8: #ff9da7; --chart-9: #9c755f; --chart-10: #bab0ac;

    /* Surfaces and text */
    --c-bg: #f5f6f8;
    --c-surface: var(--p-white);
    --c-surface-subtle: var(--p-slate-50);
    --c-surface-hover: var(--p-slate-100);
    --c-skeleton: var(--p-slate-200);
    --c-surface-sunken: #eef1f5;
    --c-border: var(--p-gray-200);
    --c-border-strong: var(--p-gray-300);
    --c-text: var(--p-gray-800);
    --c-text-rgb: 31, 41, 55;
    --c-text-secondary: var(--p-gray-600);
    --c-text-muted: var(--p-gray-500);
    --c-text-subtle: var(--p-gray-400);
    --c-text-inverse: var(--p-white);

    /* Brand */
    --c-primary: var(--p-blue-600);
    --c-primary-rgb: 37, 99, 235;
    --c-primary-hover: var(--p-blue-700);
    --c-primary-active: var(--p-blue-800);
    --c-primary-soft: var(--p-blue-50);
    --c-primary-border: var(--p-blue-200);
    --c-primary-text: var(--p-blue-700);
    --c-primary-frame: var(--p-blue-300); /* thick frame around an emphasised group */
    --c-primary-selected: var(--p-blue-200); /* muted fill of a selected tile or slot; border is --c-primary */
    --c-primary-selected-text: var(--p-blue-900);
    --c-accent: var(--p-teal-700);
    --c-accent-hover: #0d5f59;
    --c-accent-subtle: #f6fbfa; /* accent-tinted panel background */
    --c-accent-border: #d8e8e6;
    --c-accent-soft: #e6f4f2;

    /* Semantic: solid (fills), text (on soft), soft (backgrounds), border */
    --c-success: var(--p-green-600);
    --c-success-rgb: 22, 163, 74;
    --c-success-text: var(--p-green-800);
    --c-success-soft: var(--p-green-100);
    --c-success-border: var(--p-green-200);
    --c-danger: var(--p-red-600);
    --c-danger-rgb: 220, 38, 38;
    --c-danger-text: var(--p-red-700);
    --c-danger-soft: var(--p-red-100);
    --c-danger-border: var(--p-red-200);
    --c-warning: var(--p-amber-600);
    --c-warning-rgb: 217, 119, 6;
    --c-warning-text: var(--p-amber-800);
    --c-warning-soft: var(--p-amber-100);
    --c-warning-border: var(--p-amber-200);
    --c-info: var(--p-sky-600);
    --c-info-rgb: 2, 132, 199;
    --c-info-text: var(--p-sky-800);
    --c-info-soft: var(--p-sky-100);
    --c-info-border: var(--p-sky-200);
    /* Violet: status «на приёме» (in progress with the doctor) */
    --c-violet: var(--p-violet-600);
    --c-violet-text: var(--p-violet-700);
    --c-violet-soft: var(--p-violet-100);
    --c-violet-border: var(--p-violet-200);
    --c-neutral-text: var(--p-slate-600);
    --c-neutral-soft: var(--p-slate-100);
    --c-neutral-border: var(--p-slate-200);

    /* Sidebar */
    --c-sidebar-bg: #1b2636;
    --c-sidebar-surface: #233044;
    --c-sidebar-text: #c3cedb;
    --c-sidebar-text-strong: var(--p-white);
    --c-sidebar-muted: #8494a8;
    --c-sidebar-hover: rgba(255, 255, 255, 0.06);
    --c-sidebar-active: rgba(255, 255, 255, 0.1);
    --c-sidebar-border: rgba(255, 255, 255, 0.08);
    --c-sidebar-indicator: var(--p-blue-400);

    /* Typography */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --fs-xs: 0.75rem;     /* 12px: captions, table headers, badges */
    --fs-sm: 0.8125rem;   /* 13px: labels, secondary text */
    --fs-base: 0.875rem;  /* 14px: body, controls, tables */
    --fs-md: 1rem;        /* 16px: card titles, modal titles */
    --fs-lg: 1.25rem;     /* 20px: section titles, KPI values on mobile */
    --fs-xl: 1.5rem;      /* 24px: page title, KPI values */
    --fs-code: 0.9em;
    --code-padding: 0.1em 0.35em;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --lh-tight: 1.25;
    --lh-base: 1.5;

    /* Spacing */
    --sp-1: 0.25rem;  /* 4px */
    --sp-2: 0.5rem;   /* 8px */
    --sp-3: 0.75rem;  /* 12px */
    --sp-4: 1rem;     /* 16px */
    --sp-5: 1.5rem;   /* 24px */
    --sp-6: 2rem;     /* 32px */

    /* Radii */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;   /* framed groups inside a page */
    --r-full: 999px;

    /* Shadows: sh-1 hover/sticky, sh-2 dropdowns/popovers, sh-3 modals */
    --sh-1: 0 1px 2px rgba(15, 23, 42, 0.06);
    --sh-2: 0 8px 24px rgba(15, 23, 42, 0.12);
    --sh-3: 0 20px 48px rgba(15, 23, 42, 0.2);

    /* Controls */
    --ctl-h: 36px;
    --ctl-h-sm: 30px;
    --ctl-h-touch: 44px;
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.25);

    /* Shell */
    --shell-sidebar-w: 15rem;
    --shell-pad: 1.5rem;
    --shell-pad-mobile: 1rem;
    --z-sidebar: 1020;
}
