/* LOGDESK: tokeny przeniesione 1:1 z FlowHuba (Wms24.FlowHub.Web/wwwroot/css/theme-solarized.css) — przy zmianach we FlowHubie
   kopiować część z tokenami, a przełożenie na LogDesk trzymać w sekcji „LOGDESK" na końcu. Reguły placu FlowHuba (yard-*)
   pominięte — LogDesk ich nie ma. Wspólne reguły powierzchni: theme-palette-base.css. Wpis palety: ThemeCatalog.cs. */

/* =====================================================================
   Pkt 164: PALETA SOLARIZED (Ethan Schoonover) – jeden motyw podążający za trybem (ciemny / jasny / automatycznie).
   Aktywna przy html[data-palette="solarized"]; tryb z html[data-theme].
   Odstępstwa od kanonu (prospekt, decyzja 28.10): tekst ciemny base1 rozjaśniony (#a7b4b4), drugorzędny #8fa0a1,
   tło o ton ciemniejsze od base03 (#00212b); tekst jasny base02, drugorzędny przyciemniony base01 (#52676e);
   akcent z tekstem #4ba3e3 (ciemny) / #1d6fa8 (jasny), statusy: opóźniona = orange, odmowa = red.
   Plik nadpisuje tylko zmienne – reguły powierzchni są w theme-dark.css / theme-tokens.css.
   ===================================================================== */

/* ----- Solarized ciemny: tokeny ----- */
html[data-palette="solarized"][data-theme="dark"] {
    --fh-bg: #00212b;
    --fh-surface: #002b36;
    --fh-surface-2: #073642;
    --fh-surface-3: #0e4351;
    --fh-border: #124654;
    --fh-text: #a7b4b4;
    --fh-heading: #eee8d5;
    --fh-text-muted: #9aabab; /* pkt 164 (audyt): ≥ 4,5:1 także na --fh-surface-3 (plakietki, chipy) */
    --fh-shadow: rgba(0, 0, 0, 0.45);
    --fh-on-main: #002b36;
    --fh-link: #6db5ea; /* pkt 164 (audyt): jaśniejszy od akcentu – ≥ 4,5:1 także na --fh-surface-3 i tintach akcentu */
    --fh-danger: #ec6f6c;
    --fh-danger-subtle: rgba(236, 111, 108, 0.14);
    --fh-tile: #073642;
    --fh-selection: #0b3f52;
    --fh-input: #00212b;
    /* akcent aplikacji (_variables.css) i Bootstrapa */
    --main-color: #4ba3e3;
    --main-color-rgb: 75, 163, 227;
    --main-color-hover: #73b7e9;
    --main-color-subtle: #0b3f52;
    --row-focus-color: #4ba3e3;
    --bs-primary-rgb: 75, 163, 227;
    --grid-color: #002b36;
    --group-panel-color: #073642;
    --header-color: #073642;
    --row-hover: #0a3a47;
    /* statusy i pola kalendarza (status-palette.css) – te same rodziny barw, kontrast pasków ≥ 3:1 */
    --fh-status-created: #b58900;
    --fh-status-reserved: #7f84d6;
    --fh-status-delayed: #e2693a;
    --fh-status-arrived: #268bd2;
    --fh-status-accepted: #2aa198;
    --fh-status-completed: #859900;
    --fh-status-refused: #e05552;
    --fh-status-cancelled: #9aabab; /* #418: Anulowana – stonowana jak tekst pomocniczy */
    --fh-status-refused-subtle: rgba(224, 85, 82, 0.14);
    --fh-status-refused-border: rgba(224, 85, 82, 0.4);
    --fh-status-refused-tile: #3d5560;
    --fh-cal-closed: #073642;
    --fh-cal-closed-stripe: #0e4351;
    --fh-cal-reserved-base: #073642;
    --fh-cal-reserved: #0b2f45;
    --fh-cal-reserved-stripe: #1d3d5e;
    --fh-cal-off: #04303b;
    --fh-cal-off-stripe: #12495a;
    --fh-cal-block: #0e4351;
    --fh-cal-block-stripe: #073642;
    --fh-cal-block-edge: #8fa0a1;
    --fh-cal-block-border: #1d5566;
    --fh-cal-block-text: #a7b4b4;
    --fh-cal-block-muted: #b9c4c4;
    --fh-cal-reschedule: #ec6f6c;
    /* DevExpress Fluent: akcent (accents/*.min.css czyta --dxbl-accent-color-*) i szarości trybu w odcieniu palety */
    --dxbl-accent-color-10: #f1f8fd; --dxbl-accent-color-20: #e2f0fb; --dxbl-accent-color-30: #d0e7f8; --dxbl-accent-color-40: #bbdcf4; --dxbl-accent-color-50: #a5d1f1; --dxbl-accent-color-60: #8cc4ed; --dxbl-accent-color-70: #73b7e9; --dxbl-accent-color-80: #5dace6; --dxbl-accent-color-90: #4ba3e3; --dxbl-accent-color-100: #4596d1; --dxbl-accent-color-110: #3c82b6; --dxbl-accent-color-120: #336f9a; --dxbl-accent-color-130: #2a5b7f; --dxbl-accent-color-140: #214864; --dxbl-accent-color-150: #19364b; --dxbl-accent-color-160: #112432; --dxbl-accent-color-170: #09141b;
    --dxds-neutral-10: #eee8d5; --dxds-neutral-20: #e3e0cf; --dxds-neutral-30: #d7d6c8; --dxds-neutral-40: #cbcdc2; --dxds-neutral-50: #bfc4bb; --dxds-neutral-60: #b2bbb4; --dxds-neutral-70: #a6b2ae; --dxds-neutral-80: #9ba9a8; --dxds-neutral-90: #8fa0a1; --dxds-neutral-100: #839799; --dxds-neutral-110: #768e92; --dxds-neutral-120: #6a858a; --dxds-neutral-130: #5d7c83; --dxds-neutral-140: #51737b; --dxds-neutral-150: #456a73; --dxds-neutral-160: #3a626c; --dxds-neutral-170: #2e5a65; --dxds-neutral-180: #23525e; --dxds-neutral-190: #184a57; --dxds-neutral-200: #0e4351; --dxds-neutral-210: #0a3c49; --dxds-neutral-220: #073642; --dxds-neutral-230: #002b36; --dxds-neutral-240: #00212a; --dxds-neutral-250: #001820;
    /* pkt 164 (audyt): barwy kafelków (8 akcentów Solarized), ikony (filtr czarnej ikony SVG -> kolor), Bootstrap secondary */
    --fh-hue-yellow: #b58900; --fh-hue-orange: #cb4b16; --fh-hue-red: #dc322f; --fh-hue-magenta: #d33682;
    --fh-hue-violet: #6c71c4; --fh-hue-blue: #268bd2; --fh-hue-cyan: #2aa198; --fh-hue-green: #859900;
    --fh-icon-accent-filter: invert(75%) sepia(44%) saturate(5600%) hue-rotate(178deg) brightness(97%) contrast(83%);
    --bs-secondary-rgb: 143, 160, 161;
    color-scheme: dark;
}

/* ----- Solarized jasny: tokeny ----- */
html[data-palette="solarized"][data-theme="light"] {
    --fh-bg: #eee8d5;
    --fh-surface: #fdf6e3;
    --fh-surface-2: #f5efdc;
    --fh-surface-3: #e6dfc8;
    --fh-border: #d9d2bc;
    --fh-text: #073642;
    --fh-heading: #002b36;
    --fh-text-muted: #4a5f66; /* pkt 164 (audyt): o ton ciemniej – 4,5:1 także na --fh-surface-3 */
    --fh-shadow: rgba(0, 43, 54, 0.12);
    --fh-on-main: #ffffff;
    --fh-link: #175986;
    --fh-danger: #b52a27;
    --fh-danger-subtle: rgba(181, 42, 39, 0.08);
    --fh-tile: #fffaf0;
    --fh-selection: #e3eef4;
    --fh-input: #fffcf4;
    /* akcent aplikacji (_variables.css) i Bootstrapa */
    --main-color: #1d6fa8;
    --main-color-rgb: 29, 111, 168;
    --main-color-hover: #175986;
    --main-color-subtle: #e3eef4;
    --row-focus-color: #1d6fa8;
    --bs-primary-rgb: 29, 111, 168;
    --grid-color: #fdf6e3;
    --group-panel-color: #f5efdc;
    --header-color: #f5efdc;
    --row-hover: #f3ecd8;
    /* statusy i pola kalendarza (status-palette.css) – te same rodziny barw, kontrast pasków ≥ 3:1 */
    --fh-status-created: #9a7500;
    --fh-status-reserved: #6c71c4;
    --fh-status-delayed: #cb4b16;
    --fh-status-arrived: #268bd2;
    --fh-status-accepted: #1f8a82;
    --fh-status-completed: #6f8000;
    --fh-status-refused: #dc322f;
    --fh-status-cancelled: #4a5f66; /* #418: Anulowana – stonowana jak tekst pomocniczy */
    --fh-status-refused-subtle: rgba(220, 50, 47, 0.08);
    --fh-status-refused-border: rgba(220, 50, 47, 0.35);
    --fh-status-refused-tile: #586e75;
    --fh-cal-closed: #f5efdc;
    --fh-cal-closed-stripe: #e6dfc8;
    --fh-cal-reserved-base: #ecebf7;
    --fh-cal-reserved: #ecebf7;
    --fh-cal-reserved-stripe: #dcdcf0;
    --fh-cal-off: #e9e3cf;
    --fh-cal-off-stripe: #d9d2bc;
    --fh-cal-block: #e6dfc8;
    --fh-cal-block-stripe: #f5efdc;
    --fh-cal-block-edge: #586e75;
    --fh-cal-block-border: #cfc8b0;
    --fh-cal-block-text: #073642;
    --fh-cal-block-muted: #3f545b;
    --fh-cal-reschedule: #b52a27;
    /* DevExpress Fluent: akcent (accents/*.min.css czyta --dxbl-accent-color-*) i szarości trybu w odcieniu palety */
    --dxbl-accent-color-10: #edf3f8; --dxbl-accent-color-20: #dbe8f1; --dxbl-accent-color-30: #c4dae8; --dxbl-accent-color-40: #a9c8de; --dxbl-accent-color-50: #8eb7d4; --dxbl-accent-color-60: #6ea3c7; --dxbl-accent-color-70: #4f8fbb; --dxbl-accent-color-80: #347db1; --dxbl-accent-color-90: #1d6fa8; --dxbl-accent-color-100: #1b669b; --dxbl-accent-color-110: #175986; --dxbl-accent-color-120: #144b72; --dxbl-accent-color-130: #103e5e; --dxbl-accent-color-140: #0d314a; --dxbl-accent-color-150: #0a2537; --dxbl-accent-color-160: #061825; --dxbl-accent-color-170: #030d14;
    --dxds-neutral-10: #fdf6e3; --dxds-neutral-20: #f5efdc; --dxds-neutral-30: #e6dfc8; --dxds-neutral-40: #e0d9c2; --dxds-neutral-50: #d9d2bc; --dxds-neutral-60: #cbc7b4; --dxds-neutral-70: #bcbbab; --dxds-neutral-80: #afb1a4; --dxds-neutral-90: #a1a59b; --dxds-neutral-100: #949b94; --dxds-neutral-110: #86918c; --dxds-neutral-120: #798685; --dxds-neutral-130: #6c7c7d; --dxds-neutral-140: #5f7176; --dxds-neutral-150: #52676e; --dxds-neutral-160: #496168; --dxds-neutral-170: #405a62; --dxds-neutral-180: #37535c; --dxds-neutral-190: #2f4d56; --dxds-neutral-200: #274851; --dxds-neutral-210: #1f414b; --dxds-neutral-220: #173c46; --dxds-neutral-230: #0e3540; --dxds-neutral-240: #07303b; --dxds-neutral-250: #002b36;
    /* pkt 164 (audyt): barwy kafelków (8 akcentów Solarized), ikony (filtr czarnej ikony SVG -> kolor), Bootstrap secondary */
    --fh-hue-yellow: #b58900; --fh-hue-orange: #cb4b16; --fh-hue-red: #dc322f; --fh-hue-magenta: #d33682;
    --fh-hue-violet: #6c71c4; --fh-hue-blue: #268bd2; --fh-hue-cyan: #2aa198; --fh-hue-green: #859900;
    --fh-icon-accent-filter: invert(30%) sepia(97%) saturate(803%) hue-rotate(173deg) brightness(95%) contrast(84%);
    --fh-icon-filter: invert(14%) sepia(14%) saturate(6278%) hue-rotate(162deg) brightness(96%) contrast(95%);
    --bs-secondary-rgb: 82, 103, 110;
    color-scheme: light;
}


/* ----- Solarized ciemny: ikony icon-bs-* po odwróceniu nie bielsze od tekstu ----- */
html[data-palette="solarized"][data-theme="dark"] [class*="icon-bs-"]:not([class*="icon-bs-primary"]) {
    filter: invert(100%) brightness(80%) sepia(15%) !important;
}

html[data-palette="solarized"][data-theme="dark"] .dxbl-scheduler-disabled-color,
html[data-palette="solarized"][data-theme="dark"] .dxbl-sc-time-cell.dxbl-scheduler-disabled-color {
    background-color: var(--fh-cal-closed) !important;
}

/* =====================================================================
   LOGDESK — odcienie palety, których FlowHub nie ma (LogDesk czyta je w komponentach i w theme-palette-base.css).
   --brand-300…700 = skala akcentu DevExpressa z bloków wyżej; 700 w ciemnym jaśniejszy (tekst na tle, jak --fh-link).
   ===================================================================== */
html[data-palette="solarized"][data-theme="light"] {
    --brand-300: #8eb7d4;
    --brand-400: #4f8fbb;
    --brand-500: #347db1;
    --brand-600: #1d6fa8;
    --brand-700: #175986;
    --pd-ck-line: #cfc8b0;
}

html[data-palette="solarized"][data-theme="dark"] {
    --brand-300: #a5d1f1;
    --brand-400: #73b7e9;
    --brand-500: #4ba3e3;
    --brand-600: #4ba3e3;
    --brand-700: #6db5ea;
    --pd-ck-line: #1d5566;
    --ld-border-soft: rgba(154, 171, 171, 0.14);
}
