/*
 * TNVORA V10.43 — THEMES
 * Plik generowany przez kontrolowaną refaktoryzację CSS.
 * Kolejność kaskady wynika z jawnej kolejności plików w index.html.
 */

body.cms-ui-preview.dark-mode {
  --mui-surface: #111d2b;
  --mui-surface-2: #162438;
  --mui-text: #f5f8fc;
  --mui-text-muted: #b7c4d6;
  --mui-border: #33445f;
  --mui-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-primary-grid {
  --opsui-text: #12243b;
  --opsui-muted: #53677f;
  --opsui-border: #c8d7e8;
  --opsui-surface: #ffffff;
  --opsui-surface-muted: #f3f7fc;
  color: #12243b;
  background:
    linear-gradient(135deg, rgba(22, 119, 242, .06), transparent 42%),
    #ffffff;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-permit-option {
  color: #12243b !important;
  background: #f3f7fc !important;
  box-shadow: 0 8px 20px rgba(38, 69, 106, .08);
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-permit-option:has(input:checked) {
  color: #12243b !important;
  background:
    linear-gradient(145deg, rgba(22, 119, 242, .12), transparent 72%),
    #f3f7fc !important;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-permit-option small {
  color: #53677f !important;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-primary-grid :is(input, select, textarea) {
  color: #12243b !important;
  border-color: #b8cbe0 !important;
  background: #ffffff !important;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-permit-number {
  color: #165fae;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-permit-option:has(input:checked) .work-order-permit-number {
  color: #ffffff;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-safety-profile {
  color: #10663f;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) .work-order-safety-profile.is-critical {
  color: #8c4e00;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .project-manager-box,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .project-rate-fieldset,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-urgent-contact {
  color: #f5f8fc;
  border-color: #33445f;
  background: #162438;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) #projectPanel #projectList .admin-farm-row {
  color: #12243b;
  border-color: #c7d7e8;
  background: #ffffff;
}

html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) #projectPanel #projectList .admin-farm-row small {
  color: #52677f;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #projectPanel #projectList .admin-farm-row {
  color: #f5f8fc !important;
  border-color: #405873 !important;
  background: #142238 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #projectPanel #projectList .admin-farm-row :is(h4, small) {
  color: #f5f8fc !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #projectPanel #projectList .admin-farm-row small {
  color: #c1cede !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #projectPanel #projectList .status-badge {
  color: #e9f5ff !important;
  border-color: #3d6f98 !important;
  background: #183a58 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-urgent-contact strong {
  color: #7ab7ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-phone-copy {
  color: #9acbff;
  background: #0d1b2d;
  border-color: #77b7ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-session-banner {
  color: #fff4cf;
  border-color: #e69b34;
  background: #4b310b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-session-banner small { color: #f6d991; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .boss-work-order-info {
  color: #eafff1;
  border-color: #2d8a5b;
  background: #123b2b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .boss-work-order-info :is(b, span, small) {
  color: #eafff1 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-code-card,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-support-access-card {
  color: #f5fbff;
  border-color: #3d7188;
  border-left-color: #38c5d4;
  background: #132637;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-code-card p,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-support-access-card p,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-code-actions small { color: #bed0df; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-code-value {
  color: #e8fbff;
  border-color: #47c3d3;
  background: #0d1e2b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-age {
  color: #ffe6a6;
  background: #5b3d08;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-logo-light-theme {
  display: none;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-logo-dark-theme {
  display: block;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-consent-brand img {
  content: url("tnvora-logo-light.svg?v=20260808-v1005-brand");
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) {
  background-color: #071c27;
  background-image:
    radial-gradient(circle at 9% 4%, rgba(20, 157, 148, 0.19), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(24, 111, 150, 0.18), transparent 38rem),
    linear-gradient(145deg, #071925 0%, #0a2731 52%, #09232d 100%);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"])::before {
  opacity: 0.36;
  background-image:
    linear-gradient(115deg, transparent 0 46%, rgba(53, 206, 192, 0.09) 46% 47%, transparent 47% 100%),
    linear-gradient(25deg, transparent 0 49%, rgba(84, 176, 215, 0.08) 49% 50%, transparent 50% 100%);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-dialog,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-consent-dialog {
  color: #edf9fb;
  border-color: rgba(75, 209, 197, 0.32);
  background: #0c2532;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .startup-recovery {
  background: #071a25;
  color: #f3f8fb;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .startup-recovery-card {
  border-color: #2d5f6c;
  background: #102837;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .startup-recovery-card h1 {
  color: #ffffff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .startup-recovery-card p:not(.eyebrow) {
  color: #d6e5ed;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .startup-recovery-card small {
  color: #b9d0dd;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-product-name,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-consent-brand,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-consent-copy h2,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-preference-row strong {
  color: #efffff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-legal-links {
  border-top-color: #2b4a58;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-legal-links a,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-legal-links button,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-consent-footer a {
  color: #67d8d0;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-consent-copy > p:last-child,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-preference-row small {
  color: #bfd3dc;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-preferences {
  border-color: #2d5260;
  background: #102f3c;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .cookie-preference-row {
  border-bottom-color: #2b4a58;
}

body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu {
  --side-menu-bg: #101c2b;
  --side-menu-border: #314961;
  --side-menu-shadow: 22px 0 48px rgba(0, 0, 0, 0.48);
  --side-menu-text: #edf5ff;
  --side-menu-muted: #adc0d4;
  --side-menu-label: #d9e7f4;
  --side-menu-divider: #314961;
  --side-menu-button-text: #dce8f5;
  --side-menu-button-bg: transparent;
  --side-menu-hover-text: var(--tnvora-white);
  --side-menu-hover-bg: #1d3650;
  --side-menu-active-text: var(--tnvora-white);
  --side-menu-active-bg: #126fce;
  --side-menu-active-border: #54a7ff;
  --side-menu-active-shadow: 0 8px 20px rgba(18, 111, 206, 0.36);
  --side-menu-disabled-text: #aebdd0;
  --side-menu-disabled-bg: #1a2a3c;
  --side-menu-utility-text: #edf5ff;
  --side-menu-utility-bg: #182a3e;
  --side-menu-warning-text: #ffbcc4;
  --side-menu-warning-bg: #48202a;
  --side-menu-logout-bg: #a92434;
  --side-menu-logout-border: #f06a78;
  color-scheme: dark;
}

@media (min-width: 980px) {
  .app-shell.desktop-layout #historyPanel.app-route-active {
    grid-column: 2 / -1;
  }

  .app-shell.desktop-layout #historyPanel.app-route-active .history-calendar {
    width: min(100%, 1240px);
    max-width: none;
  }

  .app-shell.desktop-layout #historyPanel.app-route-active .entries-list {
    width: 100%;
  }
}

body.dark-theme #workOrderCancelDialog,
[data-theme="dark"] #workOrderCancelDialog {
  background: #111d2c;
  color: #f5f8fc;
  border-color: #40556f;
}

body.dark-theme #workOrderCancelDialog textarea,
[data-theme="dark"] #workOrderCancelDialog textarea {
  background: #18283b;
  color: var(--tnvora-white);
  border-color: #607690;
}

body.dark-theme .cancelled-work-order-card,
[data-theme="dark"] .cancelled-work-order-card {
  background: #35171d !important;
  color: #ffe8eb !important;
  border-color: #ff6872 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #bottomNav button.bottom-nav-item[data-app-route="workOrder"].active:not(.work-order-state-pending):not(.work-order-state-signature) {
  border: 1px solid #42e19a !important;
  color: var(--tnvora-white) !important;
  background-color: #08784d !important;
  background-image: linear-gradient(145deg, #10a366, #06613e) !important;
  box-shadow: 0 10px 24px rgba(16, 163, 102, .38), inset 0 1px 0 rgba(255, 255, 255, .16) !important;
  opacity: 1 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #bottomNav button.bottom-nav-item[data-app-route="workOrder"].active:not(.work-order-state-pending):not(.work-order-state-signature) :is(span, svg) {
  color: var(--tnvora-white) !important;
  stroke: var(--tnvora-white) !important;
  opacity: 1 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.employees-picker-card, .employees-terms-form, .employees-terms-form fieldset) {
  border-color: #40566e;
  background: #142235;
  color: #f5f8fc;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.employees-picker-card label, .employees-terms-form label, .employees-terms-form legend, .employee-terms-heading h3) {
  color: #f5f8fc;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.employees-picker-card select, .employees-picker-card input, .employees-terms-form input, .employees-terms-form select, .employee-indefinite-option) {
  border-color: #607895;
  background: #1c3048;
  color: var(--tnvora-white);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-payment-cards .checkbox-card {
  border-color: #607895;
  background: #1c3048;
  color: var(--tnvora-white);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-payment-cards .checkbox-card small {
  color: #cbd9e8;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employees-terms-heading .status-badge {
  border-color: #e7b541;
  background: #4b3914;
  color: #ffe8a3;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employees-terms-heading .status-badge.is-saved {
  border-color: #40d990;
  background: #123e2d;
  color: #bdf7d9;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.readonly-rates-note, .employee-own-contract) {
  border-color: #4e7194;
  background: #182b41;
  color: #dbeeff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .qualification-readonly-note {
  border-color: rgba(80, 221, 200, 0.34);
  color: #d9f5ef;
  background: linear-gradient(135deg, rgba(12, 93, 78, 0.3), rgba(7, 42, 39, 0.58));
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .qualification-readonly-note strong {
  color: #7df0cf;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .qualification-readonly-note span {
  color: #c7e7e1;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.work-hours-download-toolbar, .work-hours-project-card) {
  border-color: #344f6c;
  background: #111b29;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.work-hours-download-copy strong, .work-hours-rates-heading strong, .work-hours-projects-heading strong, .work-hours-project-card h3) {
  color: #eef7ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.work-hours-download-copy small, .work-hours-project-rate-grid span) {
  color: #afc2d8;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.work-hours-projects-heading small, .work-hours-project-rate-grid > div) {
  border-color: #344b65;
  background: #172538;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-hours-projects-heading small {
  color: #cfe2f6;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-hours-project-card header {
  border-bottom-color: #34465f;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-hours-project-card header > strong {
  color: #cce6ff;
  background: #173552;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-hours-project-rate-grid strong {
  color: #f2f8ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.work-hours-rates input[readonly], .employees-terms-form input[readonly]) {
  border-color: #506983;
  background: #101d2c;
  color: #e9f4ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .duty-delegation-card.status-awaiting {
  border-color: #c64d58;
  border-left-color: #ff6571;
  background: #351921;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .duty-delegation-card.status-awaiting > strong { color: #ffb7bd; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .duty-delegation-card.status-active,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .duty-delegation-card.status-planned {
  background: #123326;
  border-color: #2b7e56;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .duty-delegation-acceptance { color: #c7d7e8; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-operations-card {
  color: #f1f6fc;
  border-color: #2c634c;
  border-left-color: #35c47d;
  background: #112b22;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-operations-card.is-disabled {
  border-color: #783743;
  border-left-color: #ff6674;
  background: #351a21;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-operation-status-copy small {
  color: #c8d7e7;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-operation-actions .danger-action {
  color: var(--tnvora-white);
  border-color: #ff7380;
  background: #b92733;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-operation-actions .danger-action:disabled {
  color: #f2b9bf;
  border-color: #74434a;
  background: #51272e;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-preview,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-preview.is-empty {
  border-color: #41627d;
  background: #172b3a;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-preview-heading h4,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-copy strong,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-copy p {
  color: #f2f7fc;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-item {
  border-color: #39566f;
  background: #102331;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-copy small {
  color: #b9cad9;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-position {
  background: #2387bd;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-pending-count {
  color: #2b1900;
  background: #ffd978;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-dialog {
  color: #edf9fb;
  border-color: rgba(75, 209, 197, 0.34);
  background: #0c2532;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 7%, rgba(28, 173, 163, 0.24), transparent 30rem),
    linear-gradient(145deg, rgba(4, 20, 29, 0.96), rgba(6, 43, 52, 0.98));
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-product-name {
  color: #efffff;
}

html body:is(.dark-mode, .theme-dark, [data-theme="dark"]) .login-logo img.login-logo-light-theme {
  display: none;
}

html body:is(.dark-mode, .theme-dark, [data-theme="dark"]) .login-logo img.login-logo-dark-theme {
  display: block;
}

html body:is(.dark-mode, .theme-dark, [data-theme="dark"]) .cookie-consent-brand img {
  content: url("tnvora-logo-light.svg?v=20260808-v1005-brand");
}

html body:is(.dark-mode, .theme-dark, [data-theme="dark"]) .login-product-name {
  color: #efffff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-presence-banner {
  color: #ffe2a1; border-color: #9d6b17; background: #3e2d12;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .support-presence-banner small { color: #f4d48b; }

/* V11.14 - one authoritative theme state for DATOP and its modal forms. */
html[data-theme="dark"] body,
html[data-theme="dark"] body.theme-dark {
  --surface: #121c2a;
  --ink: #eef5ff;
  --muted: #a8b7ca;
  --background: #0f1722;
  --line: #34465f;
  --opsui-surface: #121c2a;
  --opsui-surface-muted: #172234;
  --opsui-surface-raised: #1b293a;
  --opsui-border: #33445c;
  --opsui-border-strong: #40536d;
  --opsui-text: #eef5ff;
  --opsui-muted: #a8b7ca;
  color-scheme: dark;
}

html[data-theme="light"] body,
html[data-theme="light"] body.theme-light {
  --surface: #ffffff;
  --ink: #101722;
  --muted: #526274;
  --background: #eef2f6;
  --line: #cbd7e5;
  --opsui-surface: #ffffff;
  --opsui-surface-muted: #f6f9fd;
  --opsui-surface-raised: #edf3f9;
  --opsui-border: #d4deea;
  --opsui-border-strong: #b9c9da;
  --opsui-text: #101722;
  --opsui-muted: #526274;
  color-scheme: light;
}

html[data-theme="dark"] body :is(.toa-dialog, #toaPanel, .toa-calendar, .toa-detail-panel, .toa-list-view) {
  color: var(--opsui-text);
  border-color: var(--opsui-border);
  background: var(--opsui-surface);
}

html[data-theme="dark"] body .toa-dialog :is(.toa-question, .toa-comment-block, .toa-numbered-field, label) {
  color: var(--opsui-text);
  border-color: var(--opsui-border);
}

html[data-theme="dark"] body .toa-dialog .toa-numbered-title,
body.theme-dark .toa-dialog .toa-numbered-title {
  color: #f4f8fc;
}

html[data-theme="dark"] body .toa-dialog .toa-numbered-field label,
body.theme-dark .toa-dialog .toa-numbered-field label {
  border-color: #4d6c88;
  background: #19344d;
  color: #f4f8fc;
}

html[data-theme="dark"] body .toa-dialog .toa-numbered-field input[type="checkbox"],
body.theme-dark .toa-dialog .toa-numbered-field input[type="checkbox"] {
  border-color: #c8d8e6;
  background: #0d2133;
}

html[data-theme="dark"] body .toa-dialog .toa-numbered-field input[type="checkbox"]:checked,
body.theme-dark .toa-dialog .toa-numbered-field input[type="checkbox"]:checked {
  border-color: #29c47b;
  background: #168b52;
}

html[data-theme="dark"] body .toa-dialog :is(input, textarea, select) {
  color: var(--opsui-text);
  border-color: var(--opsui-border-strong);
  background: var(--opsui-surface-muted);
}

html[data-theme="light"] body .app-shell > .side-menu,
html[data-theme="light"] body .app-shell > .topbar {
  color-scheme: light;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.business-data-toolbar, .business-analysis-card, .employee-costs-workspace, .business-cost-list article) {
  color: #eef6ff; border-color: #31465f; background: #132237;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-kpi-grid article {
  color: #eef6ff; border-color: #31465f; background: #192c43;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-kpi-grid article.positive { border-color: #287d56; background: #123827; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-kpi-grid article.negative { border-color: #8f4148; background: #3c1f26; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .positive-text { color: #77dda8; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .negative-text { color: #ff9ba3; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-gateway-card .sms-gateway-grid :is(input, select, textarea) {
  border-color: #526b86 !important;
  color: #f5f9ff !important;
  background: #16263a !important;
  opacity: 1;
  -webkit-text-fill-color: #f5f9ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-gateway-card .sms-gateway-grid :is(input, textarea)::placeholder {
  color: #b6c5d8 !important;
  -webkit-text-fill-color: #b6c5d8;
  opacity: 1;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .sms-gateway-card .sms-gateway-grid select option {
  color: #f5f9ff !important;
  background: #16263a !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-cost-form { border-color: #31465f; background: #101d2e; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-cost-form label { color: #eaf2fb; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-cost-form :is(input, select) { color: #f4f8fc; border-color: #3b526c; background: #18283c; }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .certificate-template-control {
  color: #eef6ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .certificate-template-control select {
  border-color: #405874;
  color: #f5f9ff;
  background: #18283c;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .certificate-template-status.available {
  border-color: #287d56;
  color: #9ae6bd;
  background: #123827;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .certificate-template-status.missing {
  border-color: #9d6b17;
  color: #ffe0a0;
  background: #3e2d12;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-support-row .remember-password {
  color: #e2edf5;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-help-link {
  color: #7fc4ff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-help-link:hover,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .login-help-link:focus-visible {
  color: #b9e1ff;
}

/* UMOWA — czytelna karta Koordynującego w ciemnym motywie. */
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-leader-card.active {
  border-color: #63b3ff;
  box-shadow: 0 0 0 2px rgba(99, 179, 255, 0.2), 0 12px 30px rgba(0, 0, 0, 0.28);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-leader-card header > b.accepted {
  border: 1px solid #2d8a60;
  color: #b9f4d2;
  background: #123c2a;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-leader-card header > b.pending {
  border: 1px solid #a87417;
  color: #ffe2a3;
  background: #3d2d12;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-counterparty-readonly {
  border-color: #3a526b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-counterparty-readonly span,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-technician-chips > p,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-add-technician {
  color: #b8c9da;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-technician-chips > span {
  border-color: #47739a;
  color: #f4f8ff;
  background: #1c3550;
  box-shadow: inset 0 0 0 1px rgba(127, 196, 255, 0.08);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-technician-chips button {
  border: 1px solid #a94c57;
  color: #ffd7dc;
  background: #55232b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-technician-chips button:hover,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-technician-chips button:focus-visible {
  color: #ffffff;
  background: #7a2d38;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .tnvora-add-technician select {
  border-color: #405d79;
  color: #f2f7ff;
  background: #17283c;
}

/* POMOC — pełny status nawigacji pozostaje czytelny po zastosowaniu motywu. */
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"].support-status-pending,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"].support-status-pending.active {
  border-color: #f05c67;
  color: #ffffff;
  background: #b4232c;
  box-shadow: 0 8px 20px rgba(180, 35, 44, 0.42);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"].support-status-accepted,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"].support-status-accepted.active {
  border-color: #ffd76a;
  color: #3d2a00;
  background: #f4b942;
  box-shadow: 0 8px 20px rgba(244, 185, 66, 0.34);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"].support-status-resolved,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"].support-status-resolved.active {
  border-color: #55d79b;
  color: #ffffff;
  background: #16865c;
  box-shadow: 0 8px 20px rgba(22, 134, 92, 0.34);
}

/* V10.79 — czytelność nowych kart centralnego panelu w ciemnym motywie. */
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .problem-report-notes {
  border-color: #3d5268;
  color: #f2f7ff;
  background: #152537;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .problem-report-notes small {
  color: #b8c9da;
}

/*
 * V10.89 — domknięcie wizualne bez zmiany układu i nawigacji.
 * Zachowujemy dotychczasową kolorystykę powierzchni, poprawiamy kontrast
 * semantycznych kart i uspokajamy cienie w obu motywach.
 */
html body:not(.theme-dark):not(.dark-theme):not([data-theme="dark"]) :is(
  .admin-work-order,
  .entry-card,
  .technician-alert-card,
  .technician-finance-section,
  .technician-kpi-grid article,
  .tenant-card,
  .tenant-kpi,
  .work-order-database-card
) {
  box-shadow: var(--shadow-card-light);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(
  .admin-work-order,
  .entry-card,
  .technician-alert-card,
  .technician-finance-section,
  .technician-kpi-grid article,
  .tenant-card,
  .tenant-kpi,
  .work-order-database-card
) {
  box-shadow: var(--shadow-card-dark);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-quick strong {
  color: #f8fbff;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-quick small {
  color: #c7d4e3;
}

/* EIP w aktywnym poleceniu: spójny kontrast w obu motywach. */
html body:is(.theme-light, [data-theme="light"]) .work-order-eip-gate.required {
  border-color: #d59600;
  background: #fff7dc;
  color: #172033;
}

html body:is(.theme-light, [data-theme="light"]) .work-order-eip-gate.required .work-order-eip-gate-head p {
  color: #5b4a1b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-gate.required {
  border-color: #d99a08;
  background: #332b16;
  color: #fff8df;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-gate.required .work-order-eip-gate-head strong {
  color: #fff4c6;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-gate.required .work-order-eip-gate-head p {
  color: #e5d8aa;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-gate.complete {
  border-color: #28a868;
  background: #153628;
  color: #f3fff8;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-eip-gate.complete .work-order-eip-gate-head p {
  color: #bfe4cf;
}

/* Podpisane polecenie: zielony nagłówek pozostaje czytelny także w jasnym motywie. */
body .signed-work-order > .user-work-order-summary {
  padding: 14px;
  border: 1px solid #2bb673;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #13784d 0%, #075c3a 100%);
}

body .signed-work-order > .user-work-order-summary .user-work-order-info > :is(span, small) {
  color: #e6fff1;
}

body .signed-work-order > .user-work-order-summary .user-work-order-info > strong:first-child {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid #8ff0bd;
  border-radius: 999px;
  color: #064c31;
  background: #c8f7dc;
}

body .signed-work-order > .user-work-order-summary .work-order-copy-reference {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

body .signed-work-order > .user-work-order-summary .work-order-copy-reference :is(span, b, small),
body .signed-work-order > .user-work-order-summary .work-order-permit-badge {
  color: #ffffff;
}

body .signed-work-order > .user-work-order-summary .work-order-permit-badge {
  border-color: #8ff0bd;
  background: rgba(255, 255, 255, 0.12);
}

/*
 * V10.89 — głębia nawigacji inspirowana zatwierdzonymi kierunkami 5/6/8.
 * Układ i znaczenie kolorów pozostają bez zmian; wzmacniamy wyłącznie powierzchnię.
 */
body .side-menu {
  --side-menu-bg:
    radial-gradient(circle at 12% 0%, rgba(32, 201, 176, 0.2), transparent 34%),
    linear-gradient(155deg, #0a2d34 0%, #09212b 38%, #07131c 72%, #02070c 100%);
  --side-menu-border: rgba(80, 221, 200, 0.22);
  --side-menu-shadow:
    22px 0 54px rgba(1, 9, 14, 0.42),
    inset -1px 0 0 rgba(98, 237, 216, 0.08);
  --side-menu-text: #f1fbff;
  --side-menu-muted: #a8c7cf;
  --side-menu-label: #91b9c2;
  --side-menu-divider: rgba(121, 207, 198, 0.16);
  --side-menu-button-text: #d4e8ec;
  --side-menu-hover-text: #ffffff;
  --side-menu-hover-bg: rgba(49, 197, 174, 0.12);
  --side-menu-active-text: #ffffff;
  --side-menu-active-bg: linear-gradient(135deg, #11966f 0%, #08756d 55%, #075263 100%);
  --side-menu-active-border: #44d7bb;
  --side-menu-active-shadow:
    0 10px 24px rgba(1, 15, 19, 0.42),
    0 0 0 1px rgba(79, 229, 203, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --side-menu-disabled-text: #88a0aa;
  --side-menu-disabled-bg: rgba(255, 255, 255, 0.04);
  --side-menu-utility-text: #e6f5f7;
  --side-menu-utility-bg: rgba(255, 255, 255, 0.055);
  color-scheme: dark;
}

body .side-menu::before,
body .app-shell > .topbar::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

body .side-menu::before {
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.045), transparent 22%),
    radial-gradient(circle at 72% 18%, rgba(18, 119, 119, 0.13), transparent 34%);
}

body .side-menu-list button.active,
body .side-admin-shortcuts button.active {
  background: var(--side-menu-active-bg);
}

body .app-shell > .topbar {
  isolation: isolate;
  overflow: hidden;
  border-bottom-color: rgba(78, 222, 201, 0.2);
  background:
    radial-gradient(circle at 72% -120%, rgba(47, 218, 191, 0.24), transparent 38%),
    linear-gradient(108deg, #071820 0%, #092b33 48%, #07141d 76%, #02070c 100%);
  box-shadow:
    0 15px 34px rgba(1, 10, 16, 0.28),
    inset 0 -1px 0 rgba(90, 229, 208, 0.11);
}

body .app-shell > .topbar::before {
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.045), transparent 22%),
    radial-gradient(circle at 18% 120%, rgba(18, 128, 124, 0.16), transparent 35%);
}

@media (min-width: 980px) {
  body .app-shell.desktop-layout > .topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: calc(var(--desktop-sidebar-width) + var(--desktop-grid-gap));
    width: auto;
    max-width: none;
    margin: 0;
  }

  body .app-shell.desktop-layout > .side-menu,
  body.desktop-layout-active:not(.desktop-menu-collapsed) .app-shell.desktop-layout > .side-menu[hidden] {
    background: var(--side-menu-bg);
    box-shadow: var(--side-menu-shadow);
  }
}

@media (max-width: 979px) {
  body .app-shell > .topbar {
    box-sizing: border-box;
    width: 100vw;
    width: 100dvw;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-right: calc(50% - 50dvw);
    margin-left: calc(50% - 50vw);
    margin-left: calc(50% - 50dvw);
    border-radius: 0;
  }
}

/* Zielone i granatowe karty zawsze używają jasnego tekstu. */
.leader-available-technicians-list article:not(.is-vacation):not(.is-available),
.available-workers-list article:not(.is-inactive):not(.is-vacation),
.available-workers-list .boss-technician-card.is-assigned,
#historyPanel .entries-list .closed-work-order-card {
  color: var(--status-success-foreground);
}

.leader-available-technicians-list article:not(.is-vacation):not(.is-available) :is(strong, b),
.available-workers-list article:not(.is-inactive):not(.is-vacation) :is(strong, b),
.available-workers-list .boss-technician-card.is-assigned :is(strong, b),
#historyPanel .entries-list .closed-work-order-card :is(strong, b) {
  color: #ffffff;
}

.leader-available-technicians-list article:not(.is-vacation):not(.is-available) small,
.available-workers-list article:not(.is-inactive):not(.is-vacation) :is(span, small),
.available-workers-list .boss-technician-card.is-assigned small {
  color: #d9fbe8;
}

/* Żółty status pozostaje ciemny, czerwony i zielony pozostają białe. */
body :is(.bottom-nav-item, .side-menu-list button)[data-app-route="workOrder"].work-order-state-signature,
.available-workers-list .boss-technician-card.is-signature-pending .boss-technician-status,
#leaderOperationsPanel .leader-technician-location.is-signature-pending .leader-technician-status,
.side-menu-list button[data-app-route="problem"].support-status-accepted {
  color: var(--status-warning-foreground) !important;
}

body :is(.bottom-nav-item, .side-menu-list button)[data-app-route="workOrder"]:is(.work-order-state-pending, .work-order-state-signed),
.side-menu-list button[data-app-route="problem"]:is(.support-status-pending, .support-status-resolved) {
  color: var(--status-danger-foreground) !important;
}

/* Delikatniejsze cienie statusów i kart — kolory oraz znaczenie bez zmian. */
.leader-available-technicians-list article,
.available-workers-list article,
#historyPanel .entries-list .closed-work-order-card {
  box-shadow: 0 6px 16px rgba(6, 78, 59, 0.14);
}

.available-workers-list .boss-technician-card.is-signature-pending,
#leaderOperationsPanel .leader-technician-location.is-signature-pending {
  box-shadow: 0 7px 18px rgba(133, 77, 14, 0.16);
}

body :is(.bottom-nav-item, .side-menu-list button)[data-app-route="workOrder"].work-order-state-pending {
  box-shadow: 0 0 0 1px rgba(255, 72, 88, 0.26), 0 7px 18px rgba(185, 28, 28, 0.24) !important;
}

body :is(.bottom-nav-item, .side-menu-list button)[data-app-route="workOrder"].work-order-state-signature {
  box-shadow: 0 0 0 1px rgba(255, 214, 92, 0.24), 0 7px 18px rgba(202, 138, 4, 0.2) !important;
}

body :is(.bottom-nav-item, .side-menu-list button)[data-app-route="workOrder"].work-order-state-signed {
  box-shadow: 0 0 0 1px rgba(45, 212, 140, 0.22), 0 7px 18px rgba(5, 96, 61, 0.22) !important;
}

.side-menu-list button[data-app-route="problem"]:is(.support-status-pending, .support-status-accepted, .support-status-resolved),
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .side-menu-list button[data-app-route="problem"]:is(.support-status-pending, .support-status-accepted, .support-status-resolved) {
  box-shadow: 0 6px 16px rgba(8, 20, 32, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  body :is(.bottom-nav-item, .side-menu-list button)[data-app-route="workOrder"],
  .side-menu-list button[data-app-route="problem"] {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Końcowa warstwa powierzchni nawigacji — wspólna dla jasnego i ciemnego motywu. */
html body .app-shell > .side-menu {
  border-right: 0 !important;
  background-image:
    radial-gradient(circle at 58% -20%, rgba(35, 171, 126, 0.15), transparent 42%),
    linear-gradient(90deg, #010d0b 0%, #03251f 6%, #075044 12%, #08614f 55%, #0a6955 100%) !important;
  background-attachment: fixed !important;
  background-position: 0 0 !important;
  background-size: 100vw 100vh !important;
  background-repeat: no-repeat !important;
  box-shadow:
    inset 0 1px 0 rgba(111, 238, 198, 0.1),
    inset 0 -34px 60px rgba(0, 5, 5, 0.18) !important;
}

html body .app-shell > .topbar {
  border-left: 0 !important;
  border-bottom-color: rgba(79, 224, 203, 0.22) !important;
  background-image:
    radial-gradient(circle at 58% -20%, rgba(35, 171, 126, 0.15), transparent 42%),
    linear-gradient(90deg, #010d0b 0%, #03251f 6%, #075044 12%, #08614f 55%, #0a6955 100%) !important;
  background-attachment: fixed !important;
  background-position: 0 0 !important;
  background-size: 100vw 100vh !important;
  background-repeat: no-repeat !important;
  box-shadow:
    0 14px 32px rgba(1, 10, 12, 0.28),
    inset 0 -1px 0 rgba(91, 222, 181, 0.1) !important;
}

html body .side-menu-list button.active:not([data-app-route="workOrder"]):not([data-app-route="problem"]),
html body .side-admin-shortcuts button.active:not([data-app-route="workOrder"]):not([data-app-route="problem"]),
html body .side-menu-list button[data-app-route="problem"].active:not(.support-status-pending):not(.support-status-accepted):not(.support-status-resolved) {
  border-color: #42e19a !important;
  color: #ffffff;
  background: linear-gradient(135deg, #1dbd78 0%, #08784d 100%) !important;
  box-shadow:
    0 10px 24px rgba(8, 120, 77, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

html body .side-menu-list button.nav-warning:not(.active):not(.nav-critical-alert) {
  border-color: transparent !important;
  color: #d4e8ec !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .side-menu-list button:not(.active):not(:disabled):is(:hover, :focus-visible),
html body .side-admin-shortcuts button:not(.active):not(:disabled):is(:hover, :focus-visible) {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(37, 165, 119, 0.16), rgba(16, 70, 61, 0.08));
}

html body .side-menu::before,
html body .app-shell > .topbar::before {
  background: none !important;
}

html body .side-menu-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html body .side-menu-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Jasny motyw — spokojna, wspólna powierzchnia biało-turkusowa na komputerze i telefonie. */
html body.theme-light .app-shell > .side-menu {
  --side-menu-text: #0b2f35;
  --side-menu-muted: #466b70;
  --side-menu-label: #315f66;
  --side-menu-divider: rgba(23, 117, 111, 0.18);
  --side-menu-button-text: #173f45;
  --side-menu-hover-text: #083e3b;
  --side-menu-hover-bg: rgba(24, 173, 145, 0.12);
  --side-menu-utility-text: #123f45;
  --side-menu-utility-bg: rgba(255, 255, 255, 0.58);
  color-scheme: light;
  color: var(--side-menu-text);
  background-image:
    radial-gradient(circle at 58% -20%, rgba(64, 211, 185, 0.2), transparent 42%),
    linear-gradient(90deg, #fbfffe 0%, #f0fbf8 6%, #e2f7f2 12%, #d5f2eb 55%, #c9ede4 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -34px 60px rgba(52, 145, 132, 0.07) !important;
}

html body.theme-light .app-shell > .topbar {
  color: #0b2f35;
  border-bottom-color: rgba(23, 117, 111, 0.2) !important;
  background-image:
    radial-gradient(circle at 58% -20%, rgba(64, 211, 185, 0.2), transparent 42%),
    linear-gradient(90deg, #fbfffe 0%, #f0fbf8 6%, #e2f7f2 12%, #d5f2eb 55%, #c9ede4 100%) !important;
  box-shadow:
    0 14px 30px rgba(20, 81, 76, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.72) !important;
}

html body.theme-light .app-shell .topbar-title h1 {
  color: #082d33;
}

html body.theme-light .app-shell .topbar-title .user-button {
  color: #42666b;
}

html body.theme-light .app-shell .topbar :is(.theme-toggle-button, .sound-toggle-button, .hamburger-button) {
  color: #0b514f;
  border-color: rgba(23, 117, 111, 0.28);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 7px 18px rgba(20, 81, 76, 0.12);
}

html body.theme-light .app-shell .side-menu-list button.nav-warning:not(.active):not(.nav-critical-alert) {
  color: #173f45 !important;
}

html body.theme-light .app-shell .side-menu-list button:not(.active):not(:disabled):is(:hover, :focus-visible),
html body.theme-light .app-shell .side-admin-shortcuts button:not(.active):not(:disabled):is(:hover, :focus-visible) {
  color: #083e3b;
  background: rgba(24, 173, 145, 0.12);
}

/* V10.97 — przycisk świadomej zgody pozostaje jednoznaczny w ciemnym motywie. */
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #acceptSupportLiveShare.primary-button {
  border-color: #2f90ff !important;
  color: #ffffff !important;
  background: #1269d7 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) #acceptSupportLiveShare.primary-button:is(:hover, :focus-visible) {
  border-color: #6bb0ff !important;
  background: #0b55b4 !important;
}

/* V10.98 — czytelne Polecenia Pracy w ciemnym motywie także na telefonie. */
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order {
  border-color: #6f4d16 !important;
  border-left-color: #f6ad18 !important;
  color: #f4f8ff !important;
  background: linear-gradient(145deg, #241b0e 0%, #121e2d 72%) !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order :is(.user-work-order-info, .user-work-order-info span, .user-work-order-info small) {
  color: #dce9f6 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order .user-work-order-info > strong:first-child {
  color: #ffe29b !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.signed-work-order {
  border-color: #28724b !important;
  border-left-color: #31d27f !important;
  background: linear-gradient(145deg, #102c21 0%, #111f30 72%) !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.signed-work-order > .user-work-order-summary .user-work-order-info > strong:first-child {
  border-color: #8ff0bd !important;
  color: #064c31 !important;
  background: #c8f7dc !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.coordinator-work-order {
  border-color: #8c620f !important;
  border-left-color: #f6ad18 !important;
  background: linear-gradient(145deg, #30230d 0%, #111f30 72%) !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.work-order-action-required {
  border-color: #b98213 !important;
  border-left-color: #ffc43d !important;
  color: #fff5cf !important;
  background: linear-gradient(145deg, #35270d 0%, #182335 72%) !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.work-order-action-required :is(strong,span,small,b) {
  color: #fff1ba !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.work-order-action-required .boss-sign-direct {
  border-color: #526b87 !important;
  color: #f7fbff !important;
  background: #1a3048 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.work-order-action-required .boss-sign-direct :is(strong, span, small, b) {
  color: #f7fbff !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.work-order-action-required.work-order-attention {
  border-color: #ff5d70 !important;
  border-left-color: #ff5d70 !important;
  color: #ffe8eb !important;
  background: #2b1015 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-readiness-alert {
  border-color: #f5b82e;
  color: #fff0bd;
  background: #33270b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-readiness-alert :is(strong,span) {
  color: #fff0bd;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-readiness-alert.is-approved {
  border-color: #41c69b;
  color: #e6fff7;
  background: #15362f;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-readiness-alert.is-approved :is(strong,span) {
  color: #e6fff7;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-active-task.gated-task {
  border-color: #48586c;
  color: #cbd5e1;
  background: #1e293b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-coordinator-confirmation {
  color: #7ee9c5;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order .work-order-active-details,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order .work-order-guests,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order .work-order-guest {
  border-color: #3d5268 !important;
  color: #eef6ff !important;
  background: #132235 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.user-work-order, #workOrderForm) .guest-qualification-confirmation {
  border-color: #52816e !important;
  color: #edfdf6 !important;
  background: #16352c !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.user-work-order, #workOrderForm) .guest-qualification-confirmation span {
  color: #edfdf6 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order .work-order-change-approval.is-pending :is(strong, span, small) {
  color: #fff0bd !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order .work-order-change-approval.is-approved :is(strong, span, small) {
  color: #e6fff7 !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order .work-order-change-approval.is-rejected :is(strong, span, small) {
  color: #ffe7eb !important;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-change-approval.is-pending {
  border-color: #f5b82e;
  color: #fff0bd;
  background: #33270b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order.suspended-work-order {
  border-color: #94a3b8;
  background: #1f2937;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order.suspended-work-order > .user-work-order-summary {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #475569, #334155);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order.suspended-work-order > .user-work-order-summary :is(strong,span,small,b),
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-suspension :is(strong,span,small),
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .issuer-pre-sign-review :is(strong,span,small,b) {
  color: #f8fafc;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order.suspended-work-order.work-order-action-required,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .admin-work-order.user-work-order.suspended-work-order.work-order-action-required {
  border-color: #facc15;
  background: linear-gradient(145deg, #4a3510, #241f17);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .user-work-order.suspended-work-order.work-order-action-required > .user-work-order-summary {
  border-color: #facc15;
  background: linear-gradient(135deg, #713f12, #422006);
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.work-order-suspension,.issuer-pre-sign-review) {
  border-color: #94a3b8;
  color: #f8fafc;
  background: #1e293b;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .issuer-review-list > span {
  border-color: #64748b;
  background: #0f172a;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .work-order-task-optional {
  border-color: #60a5fa;
  color: #dbeafe;
  background: #173a61;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .team-change-hint {
  border-color: #fda4af;
  color: #fff1f2;
  background: #9f1239;
}

/* V10.99: jedna szeroka karta na wiersz zapobiega obcinaniu danych zespołu. */
#availableWorkersList,
#leaderOperationsPanel .leader-available-technicians-list {
  grid-template-columns: minmax(0, 1fr);
}

html body .work-order-change-actions .danger-button {
  border-color: #991b1b;
  color: #fff;
  background: #b91c1c;
}

/* V11.08: readable guide expand/collapse labels in the dark theme. */
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .guide-expand-label {
  color: #93c5fd;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .guide-animation-card {
  border-color: #4679a8;
  background:
    radial-gradient(circle at top right, rgba(58, 145, 236, 0.2), transparent 42%),
    #111c2a;
}

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .guide-animation-safety {
  color: #c2d3e7;
}

/* Availability labels must retain status contrast after global theme rules. */
html body #vacationCalendar :is(.vacation-own-state, .vacation-person-state).is-available { color: #106b3e !important; }
html body #vacationCalendar :is(.vacation-own-state, .vacation-person-state).is-unavailable { color: #a51f2b !important; }
html body #vacationCalendar :is(.vacation-own-state, .vacation-person-state) :is(b, em, i) {
  color: inherit !important;
}
html body.theme-dark #vacationCalendar :is(.vacation-own-state, .vacation-person-state).is-available {
  color: #bdffd4 !important; background: #153d2e; border-color: #68ce94;
}
html body.theme-dark #vacationCalendar :is(.vacation-own-state, .vacation-person-state).is-unavailable {
  color: #ffd8de !important; background: #55212d; border-color: #ff91a5;
}
html body.theme-dark #vacationPanel :is(.vacation-person-avatar, .vacation-person-count) {
  background: #203f67; color: #d8eaff !important;
}
html body.theme-dark #vacationPanel .vacation-person-count :is(strong, small) { color: inherit !important; }
/* V11.08: translated inventory labels must remain readable on mobile cards. */
html body.theme-dark #eipPanel .eip-assignment-card,
html body.theme-dark #eipPanel .eip-assigned-list .empty-state {
  background: #14243a;
  color: #d3e2f3;
  border-color: #486480;
}
html body.theme-dark #eipPanel .eip-assignment-card :is(h3, label, strong) { color: #f5f9ff; }
html body.theme-dark #eipPanel .eip-assignment-card :is(p, small, .form-hint) { color: #c7d9ed; }
html body.theme-dark #eipPanel .eip-assignment-card .eyebrow { color: #8bc3ff; }
html body.theme-dark #eipPanel .eip-assignment-card select,
html body.theme-dark #eipPanel .eip-format-button {
  background: #20354e;
  color: #f5f9ff;
  border-color: #6885a6;
}
html body.theme-dark #eipPanel .eip-format-button small { color: #c7d9ed; }
body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-hours-sort-label { color: #b8ddff; background: #173554; }
:lang(en) .admin-user-create-disclosure > summary::after { content: "Expand"; }
:lang(es) .admin-user-create-disclosure > summary::after { content: "Desplegar"; }
:lang(en) .admin-user-create-disclosure[open] > summary::after { content: "Collapse"; }
:lang(es) .admin-user-create-disclosure[open] > summary::after { content: "Contraer"; }
#clientOrganizationSummary > article { display: grid; align-content: start; gap: 6px; padding: 14px; min-width: 0; }
#clientOrganizationSummary > article > :is(span, strong, small) { display: block; overflow-wrap: anywhere; }
#clientPanel .admin-farm-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
#clientPanel .admin-farm-row > small { display: block; margin: 8px 0; }
#clientPanel .admin-farm-row :is(label, select) { min-width: 0; max-width: 100%; }
@media (max-width: 900px) {
  body.theme-dark .inventory-table td::before {
    color: #cad9e9;
  }
}
/* Printable agreements keep a paper surface in both application themes. */
body .tnvora-document .tnvora-signature-grid small {
  color: #526170 !important;
}
body .tnvora-document .tnvora-signature-grid strong {
  color: #17212b !important;
}
/* Recorded EIP values remain readable after the form is locked. */
body.theme-dark .eip-procedure-actions > h6 { color: #9bd0ff; }
body.theme-dark .eip-procedure-action :is(input, select, textarea):disabled {
  opacity: 1;
  color: #edf5ff;
  -webkit-text-fill-color: #edf5ff;
}
body:not(.theme-dark) .eip-procedure-action :is(input, select, textarea):disabled {
  opacity: 1;
  color: #26384b;
  -webkit-text-fill-color: #26384b;
}
body.theme-dark .eip-procedure-action .active-time-button:disabled {
  opacity: 1;
  color: #edf5ff;
  background: #203c49;
}
body:not(.theme-dark) .eip-procedure-action .active-time-button:disabled {
  opacity: 1;
  color: #26384b;
  background: #eef5f7;
}
/* Flota: ten sam kontrast kart i kontrolek w obu motywach. */
.fleet-transfer-cards { display: grid; gap: 12px; margin-top: 16px; }
.fleet-transfer-card, .fleet-transfer-history {
  padding: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink);
}
.fleet-transfer-card h3 { margin: 0 0 12px; font-size: 1rem; }
.fleet-transfer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.fleet-transfer-kind, .fleet-assignment { display: grid; gap: 8px; min-width: 0; }
.fleet-transfer-card label { display: grid; gap: 5px; font-weight: 600; }
.fleet-transfer-card select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.fleet-assignment-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.fleet-assignment-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; }
.fleet-assignment-chip button, .fleet-transfer-history button { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); padding: 5px 8px; cursor: pointer; }
.fleet-transfer-history { margin-top: 14px; }
.fleet-transfer-history summary { cursor: pointer; font-weight: 700; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .fleet-transfer-card,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .fleet-transfer-history {
  --surface: #13243a; --ink: #f4f8ff; --line: #40546b;
}
@media (max-width: 700px) { .fleet-transfer-grid { grid-template-columns: 1fr; } }

/* Niebieski, nieedytowalny podgląd raportu; niezależny kontrast dla obu motywów. */
.report-preview-dialog {
  width: min(680px, calc(100vw - 28px)); max-height: min(84vh, 900px);
  padding: 0; border: 1px solid #7ab8ed; border-radius: 18px;
  background: #eaf5ff; color: #102944; overflow: auto;
}
.report-preview-dialog::backdrop { background: rgba(7, 24, 46, .68); }
.report-preview-shell { padding: clamp(18px, 3vw, 30px); }
.report-preview-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.report-preview-heading :is(h3, p) { margin: 0; color: #102944; }
.report-preview-heading .eyebrow { color: #12609f; font-weight: 800; letter-spacing: .07em; }
.report-preview-heading h3 { margin-top: 6px; line-height: 1.2; }
.report-preview-heading button { flex: 0 0 auto; border-color: #83b4dc; background: #fff; color: #143453; }
.report-preview-content { display: grid; gap: 8px; }
.report-preview-row { display: grid; grid-template-columns: minmax(130px, 35%) minmax(0, 1fr); gap: 14px; padding: 11px 13px; border: 1px solid #bbdaf1; border-radius: 10px; background: #f8fcff; }
.report-preview-row span { color: #315a7c; }
.report-preview-row strong { color: #102944; overflow-wrap: anywhere; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-dialog {
  border-color: #407ba8; background: #10314c; color: #f0f8ff;
}
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-heading :is(h3, p),
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-row strong { color: #f0f8ff; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-heading .eyebrow,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-row span { color: #a9d7ff; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-row { border-color: #3a698b; background: #173d5b; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .report-preview-heading button { border-color: #719fc0; background: #244c6b; color: #f0f8ff; }
@media (max-width: 540px) { .report-preview-row { grid-template-columns: 1fr; gap: 3px; } }

html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.employee-rate-toolbar, .employee-rate-table-shell, .employee-rate-advanced) { border-color: #40566e; background: #142235; color: #f5f8fc; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.employee-rate-toolbar label, .employee-rate-advanced > summary, .employee-rate-table) { color: #f5f8fc; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) :is(.employee-rate-toolbar input, .employee-rate-toolbar select, .employee-rate-table input, .employee-rate-table select) { border-color: #607895; background: #1c3048; color: #fff; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table th { border-color: #506780; background: #213650; color: #fff; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table td { border-color: #354c66; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table tbody tr:nth-child(even) { background: #17283c; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table tbody tr:hover { background: #203a55; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table td:first-child small,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-money b,
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-pagination { color: #c9d8e7; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-card-toggles label { color: #f5f8fc; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-status.is-saved { border-color: #40d990; background: #123e2d; color: #bdf7d9; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-status.is-missing { border-color: #e7b541; background: #4b3914; color: #ffe8a3; }
@media (max-width: 760px) {
  html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table tbody tr { border-color: #40566e; background: #18283c; }
  html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-rate-table td:nth-child(n+3):not(:last-child)::before { color: #c9d8e7; }
}

/* Failed/loading finance data must remain legible, never resemble zero totals. */
html body .employee-missing-rate { color: #713f12; background: #fef3c7; border-color: #a16207; }
html body .analytics-percent-pill { color: #14532d; background: #dcfce7; }
html body .analytics-percent-pill.is-danger { color: #991b1b; background: #fee2e2; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .employee-missing-rate { color: #fef3c7; background: #422006; border-color: #ca8a04; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .analytics-percent-pill { color: #bbf7d0; background: #14532d; }
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .analytics-percent-pill.is-danger { color: #fecaca; background: #7f1d1d; }

html body .business-data-status {
  margin: 0; padding: 16px; border: 1px solid #94a3b8; border-radius: 12px;
  background: #f1f5f9; color: #334155; line-height: 1.5; overflow-wrap: anywhere;
}
html body:is(.theme-dark, .dark-theme, [data-theme="dark"]) .business-data-status {
  background: #1c3048; color: #e2e8f0; border-color: #607895;
}
