/*
 * Tokeny motywu (SPEC 8.1, DECISIONS P-14). Komponenty używają wyłącznie tych zmiennych; kolorów, krojów i kształtów
 * nie wpisujemy w komponentach. Tu są wartości wspólne i domyślne; style (dark.css, silver.css, light.css; P-198)
 * nadpisują je. Zasady wyglądu: skill `wyglad` (.claude/skills/wyglad).
 */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --transition-fast: 120ms ease;
  /* Rozwijanie drzewa: na tyle wolno, żeby było widać ruch, na tyle szybko, żeby nie czekać (uwaga właściciela 2026-11-08). */
  --motion-expand: 240ms;
  --motion-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --motion-stagger: 18ms;
  /* Przesunięcie pasków Gantta po zmianie dat (Przelicz daty, Cofnij…); ta sama wartość w DATE_MOTION_MS (dateMotion.ts). */
  --motion-dates: 280ms;
  /* Ruch po ‹ › (P-139, makieta zatwierdzona 2026-11-20); ta sama wartość w PERIOD_MOTION_MS (ui/PeriodSlide.tsx). */
  --motion-period: 280ms;

  /* Typografia (wartości nadpisują kierunki). */
  --font-body: ui-sans-serif, system-ui, sans-serif;
  --font-heading: var(--font-body);
  --font-mono: ui-monospace, monospace;
  --font-numeric: var(--font-body);
  --font-label: var(--font-body);
  --text-xs: 11px;
  --text-sm: 12.5px;
  --text-md: 13.5px;
  --text-lg: 16px;
  --text-xl: 20px;
  /* Grubość zwykłego tekstu (pola i przyciski dziedziczą ją przez `font: inherit`). */
  --body-weight: 400;
  --heading-weight: 650;
  --heading-tracking: -0.01em;
  --label-size: var(--text-xs);
  --label-weight: 600;
  --label-transform: uppercase;
  --label-tracking: 0.06em;
  --label-style: normal;

  /* Gęstość i kształty. */
  --topbar-height: 52px;
  --row-height: 36px;
  --tree-indent: 20px;
  --nav-indent: 14px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Tryb Edit (wartości motywu w theme/dark.css). */
  --color-on-accent: #000;
  --color-accent-hover: var(--color-accent);
  --color-danger: #d00;
  --color-danger-soft: transparent;
  --color-notice-info: var(--color-text);
  --field-bg: transparent;
  --field-border: var(--color-border);
  --field-radius: var(--radius-sm);
  --popover-bg: var(--color-surface);
  --popover-shadow: none;
  --overlay-bg: rgb(0 0 0 / 50%);
  --row-selected-bg: var(--color-surface-active);
  --color-changed: var(--color-accent);

  /* Nawigacja, przełączniki, statusy (P-19; wartości motywu w theme/dark.css). */
  --color-text-strong: var(--color-text);
  --color-nav: var(--color-accent);
  --color-nav-soft: transparent;
  --color-nav-glow: transparent;
  --brand-color: var(--color-text);
  --nav-size: var(--text-sm);
  --nav-transform: none;
  --nav-tracking: 0;
  --nav-color: var(--color-text-muted);
  --nav-line-width: 2px;
  --tab-color: var(--color-text-muted);
  --tab-active-bg: transparent;
  --side-color: var(--color-text-muted);
  --side-active-color: var(--color-text);
  --side-all-icon: currentColor;
  --toggle-active-border: var(--color-accent);
  --toggle-active-bg: transparent;
  --toggle-active-color: var(--color-text);
  --button-radius: var(--radius-sm);
  --button-height: 30px;
  --button-bg: transparent;
  --button-border: var(--color-border);
  --button-color: var(--color-text-muted);
  --button-primary-bg: var(--color-accent);
  --button-primary-shadow: none;
  --brand-slash-color: var(--color-text);
  --color-accent-line: var(--color-accent);
  --color-accent-glow: transparent;
  --app-bg-image: none;
  --app-bg-size: auto;
  --icon-chip-border: none;
  --icon-chip-pad-small: 0;
  --icon-chip-radius-small: 0;
  --time-card-bg: var(--color-surface);
  --time-card-track-bg: var(--color-bg);
  --time-card-shadow: none;
  --accent-card-bg: var(--popover-bg);
  --accent-card-border: var(--color-border);
  --accent-card-field: var(--field-bg);
  --status-dot-glow: none;
  --status-weight: 500;
  --status-label-color: inherit;
  --status-compact-size: 10px;
  --status-compact-padding: 1px 6px;
  --status-compact-weight: 500;
  --status-compact-transform: none;
  --status-compact-tracking: 0;
  --status-compact-label-color: inherit;
  --status-compact-bg-strength: 0%;

  /* Gantt (wartości motywu w theme/dark.css). */
  --color-warning: #b58900;

  /* Zegary w karcie „Koszty” (P-106); wartości motywu w theme/dark.css. */
  --gauge-green: #1a8f5c;
  --gauge-orange: #c76a00;
  --gauge-red-mild: #a8404e;
  --gauge-red-hard: #d0112b;
  --gauge-needle: var(--color-text-strong);
  --gauge-gap: var(--color-surface);
  --gantt-header-bg: var(--color-surface);
  --gantt-tick-color: var(--color-text-muted);
  --gantt-major-color: var(--color-text);
  --gantt-tick-line: var(--color-border);
  --gantt-major-line: var(--color-border);
  --gantt-nonworking-bg: rgb(128 128 128 / 8%);
  --gantt-nonworking-text: var(--color-text-muted);
  --gantt-today: var(--color-nav);
  --gantt-today-glow: none;
  --gantt-bar-radius: var(--radius-sm);
  --gantt-bar-fill-strength: 30%;
  --gantt-bar-glow: 0%;
  --gantt-rail: transparent;
  --gantt-summary-project: var(--color-text);
  --gantt-summary-group: var(--color-text-muted);
  --gantt-summary-stage: var(--color-text-muted);
  --gantt-milestone: var(--color-text);
  --gantt-label-color: var(--color-text-muted);
  --gantt-row-hover-bg: var(--color-surface-hover);
  --gantt-link-width: 1.5px;
  --gantt-link: var(--color-text-muted);
  --gantt-link-rule: var(--color-text-muted);
  --gantt-link-violated: var(--color-warning);
  --gantt-splitter: var(--color-border);
  /* Poprzednie położenie po optymalizacji obciążeń (P-130): przerywana ramka. */
  --gantt-ghost-border: rgb(0 0 0 / 35%);
  /* Raporty (SPEC 8.8, P-121): odstęp między tabelami osób, przerwa przed kolejną częścią tabeli, suma części, udział. */
  --report-table-gap: 53px;
  --report-first-gap: 34px;
  --report-band-gap: 62px;
  --report-subtotal-bg: var(--color-surface-active);
  --report-subtotal-off-bg: var(--color-surface-active);
  --report-share-bg: var(--color-surface-hover);
  --report-share-track: var(--color-border-strong);
  --report-share-fill: var(--color-text);
  /* Licznik spraw do decyzji (SDK 0.1.29) i nieobecność (urlopy, P-124); wartości motywu w theme/dark.css. */
  --badge-bg: var(--color-warning);
  --badge-color: #ffffff;
  --color-absence: #1592a8;
  --color-absence-text: #0d6f80;
  --color-absence-fill: rgb(21 146 168 / 30%);
}
