/* MAKAM Portal v0.9.5 — wspólny przełącznik motywu i tryb ciemny */
.mk-theme-toggle{appearance:none;border:1px solid #d9e3e6;background:#f7f9fa;color:#173552;border-radius:10px;min-height:36px;padding:6px 10px;display:inline-flex;align-items:center;gap:8px;font:800 11px/1 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;cursor:pointer;white-space:nowrap;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
.mk-theme-toggle:hover{background:#eef3f5;border-color:#cbd8dd}.mk-theme-toggle:active{transform:translateY(1px)}.mk-theme-toggle:focus-visible{outline:2px solid #69be28;outline-offset:2px}
.mk-theme-toggle-icon{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:#eaf0f2;color:#0b1f3a;font-size:13px;line-height:1}.mk-theme-toggle-label{display:inline-block}
html[data-mk-theme="dark"]{color-scheme:dark;background:#0a1119}html[data-mk-theme="dark"] body{background:#0a1119!important;color:#e6edf3!important}
html[data-mk-theme="dark"] .mk-theme-toggle{background:#151f2a;border-color:#2b3a49;color:#dce7f0}html[data-mk-theme="dark"] .mk-theme-toggle:hover{background:#1b2835;border-color:#385064}html[data-mk-theme="dark"] .mk-theme-toggle-icon{background:#223143;color:#f3f7fa}

/* ADMIN / BIURO */
html[data-mk-theme="dark"] .mkpa-app{--mk-bg:#0a1119;--mk-card:#111a24;--mk-line:#283542;--mk-text:#e5edf3;--mk-muted:#91a0ab;--mk-soft:#17222d;background:#0a1119;color:#e5edf3}
html[data-mk-theme="dark"] .mkpa-work{background:#0a1119}
html[data-mk-theme="dark"] .mkpa-side{background:#07182b;border-right:1px solid #162b3d}
html[data-mk-theme="dark"] .mkpa-side nav a{color:#a9bbc8}html[data-mk-theme="dark"] .mkpa-side nav a:hover,html[data-mk-theme="dark"] .mkpa-side nav a.is-active{background:#15334d;color:#fff}
html[data-mk-theme="dark"] .mkpa-top{background:#0f1822;border-color:#283542;color:#d9e3ea}html[data-mk-theme="dark"] .mkpa-top a{color:#9babb7}html[data-mk-theme="dark"] .mkpa-top strong{color:#eef4f7}html[data-mk-theme="dark"] .mkpa-top-actions>a{background:#111d28;border-color:#30404f;color:#dbe7ef}html[data-mk-theme="dark"] .mkpa-avatar{background:#1b2a37;color:#eaf2f6}
html[data-mk-theme="dark"] .mkpa-page-head h1,html[data-mk-theme="dark"] .mkpa-project-card h2,html[data-mk-theme="dark"] .mkpa-project-meta b,html[data-mk-theme="dark"] .mkpa-empty-card b,html[data-mk-theme="dark"] .mkpa-import-card h2,html[data-mk-theme="dark"] .mkpa-dialog h2,html[data-mk-theme="dark"] .mkpa-stat-grid strong,html[data-mk-theme="dark"] .mkpa-section-title,html[data-mk-theme="dark"] .mkpa-module-tile h2,html[data-mk-theme="dark"] .mkpa-module-tile b,html[data-mk-theme="dark"] .mkpa-action-grid b,html[data-mk-theme="dark"] .mkpa-table-head h2,html[data-mk-theme="dark"] .mkpa-plan-summary strong,html[data-mk-theme="dark"] .mkpa-plan-card-head h2,html[data-mk-theme="dark"] .mkpa-plan-import h2,html[data-mk-theme="dark"] .mkpa-control-bridge h2,html[data-mk-theme="dark"] .mkpa-control-next h2,html[data-mk-theme="dark"] .mkpa-plan-admin-point-row b,html[data-mk-theme="dark"] .mkpa-plan-points-head b,html[data-mk-theme="dark"] .mkpa-settings-card h2,html[data-mk-theme="dark"] .mkpa-info-card h2,html[data-mk-theme="dark"] .mkpa-editor-card h2,html[data-mk-theme="dark"] .mkpa-manager-card h2,html[data-mk-theme="dark"] .mkpa-control-device h3,html[data-mk-theme="dark"] .mkpa-control-room-head h2,html[data-mk-theme="dark"] .mkpa-control-editor-card h2{color:#e8f0f5!important}
html[data-mk-theme="dark"] .mkpa-page-head p,html[data-mk-theme="dark"] .mkpa-project-card p,html[data-mk-theme="dark"] .mkpa-import-card p,html[data-mk-theme="dark"] .mkpa-plan-import p,html[data-mk-theme="dark"] .mkpa-plan-reimport p,html[data-mk-theme="dark"] .mkpa-control-bridge p,html[data-mk-theme="dark"] .mkpa-control-next p{color:#91a0ab!important}
html[data-mk-theme="dark"] .mkpa-project-card,html[data-mk-theme="dark"] .mkpa-empty-card,html[data-mk-theme="dark"] .mkpa-stat-grid>div,html[data-mk-theme="dark"] .mkpa-module-tile,html[data-mk-theme="dark"] .mkpa-action-grid a,html[data-mk-theme="dark"] .mkpa-plan-summary>div,html[data-mk-theme="dark"] .mkpa-plan-import,html[data-mk-theme="dark"] .mkpa-plan-reimport,html[data-mk-theme="dark"] .mkpa-control-bridge,html[data-mk-theme="dark"] .mkpa-control-next,html[data-mk-theme="dark"] .mkpa-plan-card,html[data-mk-theme="dark"] .mkpa-plan-admin-points,html[data-mk-theme="dark"] .mkpa-table-card,html[data-mk-theme="dark"] .mkpa-settings-card,html[data-mk-theme="dark"] .mkpa-info-card,html[data-mk-theme="dark"] .mkpa-editor-card,html[data-mk-theme="dark"] .mkpa-manager-card,html[data-mk-theme="dark"] .mkpa-control-device,html[data-mk-theme="dark"] .mkpa-control-editor-card,html[data-mk-theme="dark"] .mkpa-library-help,html[data-mk-theme="dark"] .mkpa-docs-help,html[data-mk-theme="dark"] .mkpa-document-editor,html[data-mk-theme="dark"] .mkpa-panel-library-card,html[data-mk-theme="dark"] .mkpa-system-din-card{background:#111a24!important;border-color:#283542!important;box-shadow:0 8px 28px rgba(0,0,0,.14)!important}
html[data-mk-theme="dark"] .mkpa-project-card:hover{border-color:#3b5062!important;box-shadow:0 12px 32px rgba(0,0,0,.26)!important}
html[data-mk-theme="dark"] .mkpa-import-card,html[data-mk-theme="dark"] .mkpa-import-grid article,html[data-mk-theme="dark"] .mkpa-control-summary,html[data-mk-theme="dark"] .mkpa-control-progress,html[data-mk-theme="dark"] .mkpa-model-summary{background:#15212c!important;border-color:#2a3947!important}
html[data-mk-theme="dark"] .mkpa-primary,html[data-mk-theme="dark"] .mkpa-import-card button,html[data-mk-theme="dark"] .mkpa-import-grid button{background:#173b5c!important;color:#fff!important}html[data-mk-theme="dark"] .mkpa-primary:hover{background:#1d496f!important}
html[data-mk-theme="dark"] .mkpa-secondary{background:#18242f!important;border-color:#314252!important;color:#dce7ef!important}
html[data-mk-theme="dark"] .mkpa-tabs{background:#15212c!important}html[data-mk-theme="dark"] .mkpa-tabs a{color:#9eacb6!important}html[data-mk-theme="dark"] .mkpa-tabs a.is-active{background:#223142!important;color:#fff!important;box-shadow:none!important}
html[data-mk-theme="dark"] .mkpa-dialog{background:#111a24;color:#e6edf3}html[data-mk-theme="dark"] .mkpa-dialog::backdrop{background:rgba(2,8,14,.72)}html[data-mk-theme="dark"] .mkpa-dialog-x{background:#1d2a35;color:#cbd7df}
html[data-mk-theme="dark"] .mkpa-dialog input,html[data-mk-theme="dark"] .mkpa-dialog select,html[data-mk-theme="dark"] .mkpa-dialog textarea,html[data-mk-theme="dark"] .mkpa-settings-card input,html[data-mk-theme="dark"] .mkpa-settings-card select,html[data-mk-theme="dark"] .mkpa-settings-card textarea,html[data-mk-theme="dark"] .mkpa-table-card input,html[data-mk-theme="dark"] .mkpa-table-card select,html[data-mk-theme="dark"] .mkpa-table-card textarea,html[data-mk-theme="dark"] .mkpa-control-bridge input,html[data-mk-theme="dark"] .mkpa-document-editor input,html[data-mk-theme="dark"] .mkpa-document-editor select,html[data-mk-theme="dark"] .mkpa-document-editor textarea,html[data-mk-theme="dark"] .mkpa-editor-card input,html[data-mk-theme="dark"] .mkpa-editor-card select,html[data-mk-theme="dark"] .mkpa-editor-card textarea,html[data-mk-theme="dark"] .mkpa-manager-card input,html[data-mk-theme="dark"] .mkpa-manager-card select,html[data-mk-theme="dark"] .mkpa-manager-card textarea{background:#0d1620!important;border-color:#344655!important;color:#e5edf3!important}
html[data-mk-theme="dark"] input::placeholder,html[data-mk-theme="dark"] textarea::placeholder{color:#6f808d!important}
html[data-mk-theme="dark"] .mkpa-table-card table{color:#dfe7ed}html[data-mk-theme="dark"] .mkpa-table-card thead th{background:#17232e!important;color:#99a9b5!important;border-color:#293844!important}html[data-mk-theme="dark"] .mkpa-table-card tbody td{border-color:#24323e!important}html[data-mk-theme="dark"] .mkpa-table-card tbody tr:hover td{background:#141f29!important}
html[data-mk-theme="dark"] .mkpa-plan-canvas{background:#0d1620!important}html[data-mk-theme="dark"] .mkpa-plan-admin-viewport{background:#0d1620!important;border-color:#2f404d!important}html[data-mk-theme="dark"] .mkpa-plan-card-head,html[data-mk-theme="dark"] .mkpa-plan-list,html[data-mk-theme="dark"] .mkpa-plan-points-head,html[data-mk-theme="dark"] .mkpa-plan-admin-point-row{border-color:#25333f!important}html[data-mk-theme="dark"] .mkpa-plan-card-head>span,html[data-mk-theme="dark"] .mkpa-plan-points-head span,html[data-mk-theme="dark"] .mkpa-plan-list code{background:#1b2a36!important;color:#a9b8c2!important}
html[data-mk-theme="dark"] .mkpa-notice.is-success{background:#142617;color:#a7d88b;border-color:#31552b}html[data-mk-theme="dark"] .mkpa-notice.is-error{background:#2a1719;color:#f0a2a5;border-color:#5b3035}
html[data-mk-theme="dark"] .mkpa-doc-permission-note,html[data-mk-theme="dark"] .mkpa-help,html[data-mk-theme="dark"] .mkpa-mini,html[data-mk-theme="dark"] .mkpa-panel-card-meta,html[data-mk-theme="dark"] .mkpa-system-din-meta{color:#91a0ab!important}

/* PORTAL KLIENTA */
html[data-mk-theme="dark"] .makam-portal-app{--navy:#e5edf4;--navy2:#b9cada;--green:#79c943;--bg:#0a1119;--card:#111a24;--line:#283542;--text:#e5edf3;--muted:#91a0ab;color:#e5edf3}
html[data-mk-theme="dark"] .mkp-header{border-color:#273542}html[data-mk-theme="dark"] .mkp-brand img{background:rgba(255,255,255,.96);border-radius:9px;padding:5px 8px}html[data-mk-theme="dark"] .mkp-brand div{border-color:#2b3945}html[data-mk-theme="dark"] .mkp-header nav a{color:#a7b5bf}html[data-mk-theme="dark"] .mkp-header nav a:hover,html[data-mk-theme="dark"] .mkp-header nav a.is-active{background:#172532;color:#eef4f7}
html[data-mk-theme="dark"] .mkp-module-card{background:#111a24;border-color:#283542;box-shadow:0 8px 28px rgba(0,0,0,.16)}html[data-mk-theme="dark"] .mkp-module-card:is(a):hover{border-color:#3b5062;box-shadow:0 16px 36px rgba(0,0,0,.28)}html[data-mk-theme="dark"] .mkp-module-icon{background:#182632}
html[data-mk-theme="dark"] .mkp-summary>div{background:#14212c;border:1px solid #263642}
html[data-mk-theme="dark"] .mkp-back{background:#111a24;border-color:#30414f;color:#e5edf4}
html[data-mk-theme="dark"] .mkp-search,html[data-mk-theme="dark"] .mkp-search-results,html[data-mk-theme="dark"] .mkp-search-result{background:#111a24!important;border-color:#30404e!important;color:#e5edf3}html[data-mk-theme="dark"] .mkp-search-result:hover{background:#18252f!important}html[data-mk-theme="dark"] .mkp-search-result{border-bottom-color:#24323d!important}html[data-mk-theme="dark"] .mkp-search input{color:#e5edf3!important}
html[data-mk-theme="dark"] .mkp-board-tabs button{background:#111a24;border-color:#30404e;color:#abb9c3}html[data-mk-theme="dark"] .mkp-board-tabs button.is-active{background:#173b5c;border-color:#285779;color:#fff}
/* Elewacja i aparaty pozostają jasne — mają przypominać fizyczną rozdzielnicę. */
html[data-mk-theme="dark"] .mkp-board-shell{background:#18242d;border-color:#30404c}html[data-mk-theme="dark"] .mkp-board{background:#eef1f2;border-color:#aebbc0;box-shadow:inset 0 0 0 6px #dde3e5;color:#17212b}html[data-mk-theme="dark"] .mkp-board-name,html[data-mk-theme="dark"] .mkp-board-name strong{color:#173552!important}html[data-mk-theme="dark"] .mkp-board-name small{color:#64747d!important}
html[data-mk-theme="dark"] .mkp-apparatus-panel{background:#111a24!important;border-color:#30404e!important;color:#e5edf3!important}html[data-mk-theme="dark"] .mkp-panel-close,html[data-mk-theme="dark"] .mkp-panel-dismiss{background:#1b2935!important;border-color:#334552!important;color:#d9e4eb!important}html[data-mk-theme="dark"] .mkp-panel-circuits,html[data-mk-theme="dark"] .mkp-panel-circuit,html[data-mk-theme="dark"] .mkp-panel-footer{border-color:#293844!important}html[data-mk-theme="dark"] .mkp-panel-heading>strong,html[data-mk-theme="dark"] .mkp-panel-explanation,html[data-mk-theme="dark"] .mkp-panel-facts>div{background:#17232e!important;border-color:#2b3b48!important;color:#dce7ed!important}html[data-mk-theme="dark"] .mkp-panel-facts b{color:#e4edf2!important}
html[data-mk-theme="dark"] .mkp-board-empty,html[data-mk-theme="dark"] .mkp-empty>div,html[data-mk-theme="dark"] .mkp-control-empty,html[data-mk-theme="dark"] .mkp-room-panel,html[data-mk-theme="dark"] .mkp-control-card,html[data-mk-theme="dark"] .mkp-control-panel-card,html[data-mk-theme="dark"] .mkp-control-editor-layout,html[data-mk-theme="dark"] .mkp-control-button-editor,html[data-mk-theme="dark"] .mkp-control-preview,html[data-mk-theme="dark"] .mkp-doc-card,html[data-mk-theme="dark"] .mkp-doc-group,html[data-mk-theme="dark"] .mkp-plan-points,html[data-mk-theme="dark"] .mkp-plan-toolbar{background:#111a24!important;border-color:#293844!important;color:#e5edf3!important}
html[data-mk-theme="dark"] .mkp-plan-toolbar button,html[data-mk-theme="dark"] .mkp-plan-tabs a,html[data-mk-theme="dark"] .mkp-room-option,html[data-mk-theme="dark"] .mkp-unused-toggle,html[data-mk-theme="dark"] .mkp-front-edit-toggle{background:#17232e!important;border-color:#30414f!important;color:#d9e4eb!important}html[data-mk-theme="dark"] .mkp-plan-tabs a.is-active{background:#173b5c!important;color:#fff!important;border-color:#285779!important}
html[data-mk-theme="dark"] .mkp-plan-image-wrap{background:#0d1620!important;border-color:#2c3d4a!important}html[data-mk-theme="dark"] .mkp-plan-stage{background:transparent!important}html[data-mk-theme="dark"] .mkp-plan-stage img{filter:none!important}
html[data-mk-theme="dark"] .mkp-plan-point-row,html[data-mk-theme="dark"] .mkp-plan-points-head,html[data-mk-theme="dark"] .mkp-doc-group-head{border-color:#293844!important}html[data-mk-theme="dark"] .mkp-plan-point-row:hover{background:#16232d!important}
html[data-mk-theme="dark"] .mkp-control-form,html[data-mk-theme="dark"] .mkp-control-fields,html[data-mk-theme="dark"] .mkp-control-page-tabs,html[data-mk-theme="dark"] .mkp-control-buttons,html[data-mk-theme="dark"] .mkp-smart-page-config,html[data-mk-theme="dark"] .mkp-smart-thermostat-settings,html[data-mk-theme="dark"] .mkp-engraving,html[data-mk-theme="dark"] .mkp-icon-picker-compact{background:#111a24!important;border-color:#293844!important}
html[data-mk-theme="dark"] .mkp-control-fields select,html[data-mk-theme="dark"] .mkp-control-fields input,html[data-mk-theme="dark"] .mkp-control-fields textarea,html[data-mk-theme="dark"] .mkp-event-field input,html[data-mk-theme="dark"] .mkp-event-field select,html[data-mk-theme="dark"] .mkp-label-field input,html[data-mk-theme="dark"] .mkp-smart-thermostat-inputs input{background:#0d1620!important;border-color:#344655!important;color:#e5edf3!important}
html[data-mk-theme="dark"] .mkp-icon-choice>span,html[data-mk-theme="dark"] .mkp-touch-icon-card,html[data-mk-theme="dark"] .mkp-oled-icon-card{background:#15212b!important;border-color:#30414f!important;color:#c8d5dd!important}html[data-mk-theme="dark"] .mkp-icon-choice input:checked+span{background:#1a321d!important;border-color:#5f9940!important;color:#bfe7a5!important}
html[data-mk-theme="dark"] .mkp-control-savebar{background:rgba(17,26,36,.96)!important;border-color:#314352!important;box-shadow:0 14px 36px rgba(0,0,0,.28)!important}html[data-mk-theme="dark"] .mkp-control-savebar button,html[data-mk-theme="dark"] .mkp-search-nav-primary{background:#173b5c!important;border-color:#285779!important;color:#fff!important}
html[data-mk-theme="dark"] .mkp-touch-icons-dialog,html[data-mk-theme="dark"] .mkp-plan-dialog{background:#111a24!important;border-color:#30404e!important;color:#e5edf3!important}html[data-mk-theme="dark"] .mkp-plan-dialog::backdrop,html[data-mk-theme="dark"] .mkp-touch-icons-dialog::backdrop{background:rgba(2,8,14,.72)!important}
html[data-mk-theme="dark"] .mkp-doc-icon{background:#182632!important;color:#bcd0dc!important}html[data-mk-theme="dark"] .mkp-doc-copy h3,html[data-mk-theme="dark"] .mkp-doc-group-head h2,html[data-mk-theme="dark"] .mkp-control-room-head h2,html[data-mk-theme="dark"] .mkp-control-panel-title h2,html[data-mk-theme="dark"] .mkp-control-detail-head h2{color:#e8f0f5!important}
html[data-mk-theme="dark"] .mkp-doc-copy p,html[data-mk-theme="dark"] .mkp-doc-copy small,html[data-mk-theme="dark"] .mkp-control-help,html[data-mk-theme="dark"] .mkp-panel-note,html[data-mk-theme="dark"] .mkp-control-locked-note{color:#91a0ab!important}

@media(max-width:850px){.mk-theme-toggle-label{display:none}.mk-theme-toggle{padding:6px;min-width:36px;justify-content:center}.mk-theme-toggle-icon{width:22px;height:22px}.mkp-header>.mk-theme-toggle{margin-top:12px}}

/* v0.9.6 — dark mode polish + turkus MAKAM */
html[data-mk-theme="dark"]{
  --mk-accent:#2b8798;
  --mk-accent-strong:#36a3b6;
  --mk-accent-soft:rgba(43,135,152,.16);
  --mk-surface-0:#07131d;
  --mk-surface-1:#0d1924;
  --mk-surface-2:#122230;
  --mk-surface-3:#162a39;
  --mk-border:#233847;
  --mk-text-strong:#eef5f8;
  --mk-text:#dce7ee;
  --mk-muted-2:#95aab5;
}
html[data-mk-theme="dark"] body.makam-portal-client-shell,
html[data-mk-theme="dark"] body.makam-portal-standalone,
html[data-mk-theme="dark"] body.makam-portal-admin-shell{
  background:var(--mk-surface-0)!important;
}
html[data-mk-theme="dark"] .makam-portal-app{
  --navy:var(--mk-text-strong);
  --navy2:#b3c8d5;
  --green:var(--mk-accent-strong);
  --bg:var(--mk-surface-0);
  --card:var(--mk-surface-1);
  --line:var(--mk-border);
  --text:var(--mk-text);
  --muted:var(--mk-muted-2);
  background:linear-gradient(180deg,#07131d 0%,#091723 100%)!important;
  color:var(--mk-text)!important;
  min-height:100vh;
  max-width:none;
}
html[data-mk-theme="dark"] .mkp-main,
html[data-mk-theme="dark"] .mkp-header{max-width:1320px;margin-left:auto;margin-right:auto}
html[data-mk-theme="dark"] .mkp-header{padding-top:8px}
html[data-mk-theme="dark"] .mkp-brand-mark,
html[data-mk-theme="dark"] .mkp-brand-project{
  border-color:rgba(255,255,255,.08)!important;
}
html[data-mk-theme="dark"] .mkp-brand-mark img{
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(241,246,248,.9));
  border-radius:12px;
  padding:6px 10px;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}
html[data-mk-theme="dark"] .mkp-brand-tagline,
html[data-mk-theme="dark"] .mkp-brand-project small{color:#97abb6!important}
html[data-mk-theme="dark"] .mkp-brand-project b,
html[data-mk-theme="dark"] .mkp-brand b{color:var(--mk-text-strong)!important}
html[data-mk-theme="dark"] .mkp-header nav a{
  color:#a9bbc5!important;
  border:1px solid transparent;
}
html[data-mk-theme="dark"] .mkp-header nav a:hover,
html[data-mk-theme="dark"] .mkp-header nav a.is-active{
  background:linear-gradient(180deg,rgba(43,135,152,.18),rgba(17,35,46,.98))!important;
  border-color:rgba(54,163,182,.32)!important;
  color:#f4fbfd!important;
  box-shadow:inset 0 0 0 1px rgba(54,163,182,.08);
}
html[data-mk-theme="dark"] .mk-theme-toggle{
  background:#10202c!important;
  border-color:#2a4552!important;
  color:#ecf5f8!important;
}
html[data-mk-theme="dark"] .mk-theme-toggle:hover{background:#142735!important;border-color:#356170!important}
html[data-mk-theme="dark"] .mk-theme-toggle-icon{background:rgba(43,135,152,.18)!important;color:#7ed4e0!important}
html[data-mk-theme="dark"] .mkp-eyebrow,
html[data-mk-theme="dark"] .mkpa-page-head small,
html[data-mk-theme="dark"] .mkpa-module-kicker,
html[data-mk-theme="dark"] .mkp-panel-kicker{color:#74c7d6!important}
html[data-mk-theme="dark"] .mkp-hero h1,
html[data-mk-theme="dark"] .mkp-section-title h1,
html[data-mk-theme="dark"] .mkp-control-title h1,
html[data-mk-theme="dark"] .mkp-board-title h1,
html[data-mk-theme="dark"] .mkp-doc-group-head h2,
html[data-mk-theme="dark"] .mkp-control-room-head h2,
html[data-mk-theme="dark"] .mkp-control-panel-title h2,
html[data-mk-theme="dark"] .mkp-control-detail-head h2,
html[data-mk-theme="dark"] .mkp-board-empty h2,
html[data-mk-theme="dark"] .mkp-empty strong,
html[data-mk-theme="dark"] .mkp-apparatus-panel h2,
html[data-mk-theme="dark"] .mkp-doc-copy h3,
html[data-mk-theme="dark"] .mkp-module-card h2,
html[data-mk-theme="dark"] .mkp-summary strong{color:var(--mk-text-strong)!important}
html[data-mk-theme="dark"] .mkp-hero p,
html[data-mk-theme="dark"] .mkp-section-title p,
html[data-mk-theme="dark"] .mkp-board-title p,
html[data-mk-theme="dark"] .mkp-doc-copy p,
html[data-mk-theme="dark"] .mkp-doc-copy small,
html[data-mk-theme="dark"] .mkp-module-card p,
html[data-mk-theme="dark"] .mkp-summary span,
html[data-mk-theme="dark"] .mkp-panel-meta,
html[data-mk-theme="dark"] .mkp-control-help,
html[data-mk-theme="dark"] .mkp-control-locked-note,
html[data-mk-theme="dark"] .mkp-control-no-icons,
html[data-mk-theme="dark"] .mkp-plan-toolbar small,
html[data-mk-theme="dark"] .mkp-plan-point-row small,
html[data-mk-theme="dark"] .mkp-doc-group-head span,
html[data-mk-theme="dark"] .mkp-button-state small,
html[data-mk-theme="dark"] .mkp-control-preview-copy,
html[data-mk-theme="dark"] .mkp-brand small{color:var(--mk-muted-2)!important}
html[data-mk-theme="dark"] .mkp-module-card,
html[data-mk-theme="dark"] .mkp-summary>div,
html[data-mk-theme="dark"] .mkp-board-empty,
html[data-mk-theme="dark"] .mkp-empty>div,
html[data-mk-theme="dark"] .mkp-control-empty,
html[data-mk-theme="dark"] .mkp-room-panel,
html[data-mk-theme="dark"] .mkp-control-card,
html[data-mk-theme="dark"] .mkp-control-panel-card,
html[data-mk-theme="dark"] .mkp-control-details,
html[data-mk-theme="dark"] .mkp-control-editor-layout,
html[data-mk-theme="dark"] .mkp-control-button-editor,
html[data-mk-theme="dark"] .mkp-control-preview,
html[data-mk-theme="dark"] .mkp-doc-card,
html[data-mk-theme="dark"] .mkp-doc-group,
html[data-mk-theme="dark"] .mkp-docs-main .mkp-doc-group,
html[data-mk-theme="dark"] .mkp-plan-points,
html[data-mk-theme="dark"] .mkp-plan-toolbar,
html[data-mk-theme="dark"] .mkp-control-form,
html[data-mk-theme="dark"] .mkp-control-fields,
html[data-mk-theme="dark"] .mkp-control-page-tabs,
html[data-mk-theme="dark"] .mkp-control-buttons,
html[data-mk-theme="dark"] .mkp-smart-page-config,
html[data-mk-theme="dark"] .mkp-smart-thermostat-settings,
html[data-mk-theme="dark"] .mkp-engraving,
html[data-mk-theme="dark"] .mkp-icon-picker-compact,
html[data-mk-theme="dark"] .mkp-search,
html[data-mk-theme="dark"] .mkp-search-results,
html[data-mk-theme="dark"] .mkp-search-result,
html[data-mk-theme="dark"] .mkp-apparatus-panel,
html[data-mk-theme="dark"] .mkp-touch-icons-dialog,
html[data-mk-theme="dark"] .mkp-plan-dialog{
  background:var(--mk-surface-1)!important;
  border-color:var(--mk-border)!important;
  color:var(--mk-text)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.18);
}
html[data-mk-theme="dark"] .mkp-doc-group{
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg,rgba(18,34,48,.94),rgba(13,25,36,.96))!important;
}
html[data-mk-theme="dark"] .mkp-doc-group-head{margin-bottom:16px}
html[data-mk-theme="dark"] .mkp-doc-card,
html[data-mk-theme="dark"] .mkp-control-panel-card,
html[data-mk-theme="dark"] .mkp-control-details,
html[data-mk-theme="dark"] .mkp-control-button-detail,
html[data-mk-theme="dark"] .mkp-control-preview,
html[data-mk-theme="dark"] .mkp-plan-points,
html[data-mk-theme="dark"] .mkp-plan-toolbar,
html[data-mk-theme="dark"] .mkp-board-tools{
  background:linear-gradient(180deg,rgba(18,34,48,.98),rgba(13,25,36,.98))!important;
}
html[data-mk-theme="dark"] .mkp-module-icon,
html[data-mk-theme="dark"] .mkp-doc-icon,
html[data-mk-theme="dark"] .mk-theme-toggle-icon,
html[data-mk-theme="dark"] .mkp-control-preview-button,
html[data-mk-theme="dark"] .mkp-plan-point-row>span,
html[data-mk-theme="dark"] .mkp-room-option.is-active,
html[data-mk-theme="dark"] .mkp-front-edit-toggle.is-active{
  background:rgba(43,135,152,.16)!important;
  color:#84d9e4!important;
  border-color:rgba(54,163,182,.34)!important;
}
html[data-mk-theme="dark"] .mkp-module-card strong,
html[data-mk-theme="dark"] .mkp-module-card strong i,
html[data-mk-theme="dark"] .mkp-plan-point-row b,
html[data-mk-theme="dark"] .mkp-panel-circuit b,
html[data-mk-theme="dark"] .mkp-control-card-progress b,
html[data-mk-theme="dark"] .mkp-control-product-line b,
html[data-mk-theme="dark"] .mkp-control-panel-title b,
html[data-mk-theme="dark"] .mkp-doc-actions a,
html[data-mk-theme="dark"] .mkp-search-wrap>label{color:var(--mk-text-strong)!important}
html[data-mk-theme="dark"] .mkp-back,
html[data-mk-theme="dark"] .mkp-doc-actions a:last-child,
html[data-mk-theme="dark"] .mkp-control-savebar button,
html[data-mk-theme="dark"] .mkp-search-nav-primary,
html[data-mk-theme="dark"] .mkp-plan-toolbar button.is-active,
html[data-mk-theme="dark"] .mkp-plan-tabs a.is-active,
html[data-mk-theme="dark"] .mkp-board-tabs button.is-active,
html[data-mk-theme="dark"] .mkp-control-page-tabs button.is-active{
  background:linear-gradient(180deg,#17354a,#102434)!important;
  border-color:#2b8798!important;
  color:#f5fbfd!important;
  box-shadow:inset 0 0 0 1px rgba(126,212,224,.1);
}
html[data-mk-theme="dark"] .mkp-back:hover,
html[data-mk-theme="dark"] .mkp-doc-actions a:last-child:hover,
html[data-mk-theme="dark"] .mkp-control-savebar button:hover,
html[data-mk-theme="dark"] .mkp-search-nav-primary:hover{
  background:linear-gradient(180deg,#1a4159,#123045)!important;
}
html[data-mk-theme="dark"] .mkp-plan-toolbar button,
html[data-mk-theme="dark"] .mkp-plan-tabs a,
html[data-mk-theme="dark"] .mkp-room-option,
html[data-mk-theme="dark"] .mkp-unused-toggle,
html[data-mk-theme="dark"] .mkp-front-edit-toggle,
html[data-mk-theme="dark"] .mkp-board-tabs button,
html[data-mk-theme="dark"] .mkp-doc-actions a,
html[data-mk-theme="dark"] .mkp-control-page-tabs button,
html[data-mk-theme="dark"] .mkp-panel-close,
html[data-mk-theme="dark"] .mkp-panel-dismiss{
  background:#13202b!important;
  border-color:#2a3f4b!important;
  color:#dce7ee!important;
}
html[data-mk-theme="dark"] .mkp-search input,
html[data-mk-theme="dark"] .mkp-control-fields select,
html[data-mk-theme="dark"] .mkp-control-fields input,
html[data-mk-theme="dark"] .mkp-control-fields textarea,
html[data-mk-theme="dark"] .mkp-event-field input,
html[data-mk-theme="dark"] .mkp-event-field select,
html[data-mk-theme="dark"] .mkp-label-field input,
html[data-mk-theme="dark"] .mkp-smart-thermostat-inputs input,
html[data-mk-theme="dark"] .mkp-touch-dialog-filters select,
html[data-mk-theme="dark"] .mkp-touch-dialog-search,
html[data-mk-theme="dark"] .mkp-touch-dialog-search input{
  background:#0c1620!important;
  border-color:#314b59!important;
  color:#edf4f8!important;
}
html[data-mk-theme="dark"] .mkp-search>span,
html[data-mk-theme="dark"] .mkp-search button,
html[data-mk-theme="dark"] .mkp-touch-dialog-head p,
html[data-mk-theme="dark"] .mkp-touch-dialog-count,
html[data-mk-theme="dark"] .mkp-touch-dialog-meta,
html[data-mk-theme="dark"] .mkp-engraving-head p,
html[data-mk-theme="dark"] .mkp-control-panel-title span,
html[data-mk-theme="dark"] .mkp-real-panel-zone small{color:#8fa4af!important}
html[data-mk-theme="dark"] .mkp-control-help,
html[data-mk-theme="dark"] .mkp-control-locked-note,
html[data-mk-theme="dark"] .mkp-control-no-icons,
html[data-mk-theme="dark"] .mkp-panel-explanation,
html[data-mk-theme="dark"] .mkp-panel-facts>div,
html[data-mk-theme="dark"] .mkp-button-state,
html[data-mk-theme="dark"] .mkp-plan-points-head span,
html[data-mk-theme="dark"] .mkp-touch-dialog-tab,
html[data-mk-theme="dark"] .mkp-icon-choice>span,
html[data-mk-theme="dark"] .mkp-touch-icon-card,
html[data-mk-theme="dark"] .mkp-oled-icon-card{
  background:#132431!important;
  border-color:#284654!important;
  color:#dce8ef!important;
}
html[data-mk-theme="dark"] .mkp-control-detail-head,
html[data-mk-theme="dark"] .mkp-engraving,
html[data-mk-theme="dark"] .mkp-panel-circuits,
html[data-mk-theme="dark"] .mkp-panel-circuit,
html[data-mk-theme="dark"] .mkp-panel-footer,
html[data-mk-theme="dark"] .mkp-plan-point-row,
html[data-mk-theme="dark"] .mkp-plan-points-head,
html[data-mk-theme="dark"] .mkp-doc-group-head,
html[data-mk-theme="dark"] .mkp-doc-card,
html[data-mk-theme="dark"] .mkp-control-button-detail,
html[data-mk-theme="dark"] .mkp-control-editor-layout,
html[data-mk-theme="dark"] .mkp-board-title,
html[data-mk-theme="dark"] .mkp-header{
  border-color:#223745!important;
}
html[data-mk-theme="dark"] .mkp-plan-image-wrap{background:#0b141b!important;border-color:#243847!important}
html[data-mk-theme="dark"] .mkp-plan-point-row:hover,
html[data-mk-theme="dark"] .mkp-search-result:hover{background:#152430!important}
html[data-mk-theme="dark"] .mkp-doc-actions a:last-child,
html[data-mk-theme="dark"] .mkp-plan-toolbar .mkp-export-pdf,
html[data-mk-theme="dark"] .mkp-plan-cta{background:linear-gradient(180deg,#17354a,#102434)!important;color:#f5fbfd!important;border-color:#2b8798!important}

/* Rozdzielnica klienta — ciemne otoczenie, jasna tylko sama elewacja */
html[data-mk-theme="dark"] .mkp-board-shell{background:#101c25!important;border-color:#273d4a!important;padding:22px}
html[data-mk-theme="dark"] .mkp-board-tools,
html[data-mk-theme="dark"] .mkp-board-workspace,
html[data-mk-theme="dark"] .mkp-board-title,
html[data-mk-theme="dark"] .mkp-search-wrap{color:var(--mk-text)!important}

/* ADMIN — kontrast tabel, filtrow i modułu rozdzielnicy */
html[data-mk-theme="dark"] .mkpa-app{--mk-green:#2b8798;--mk-line:#243847;--mk-soft:#122230}
html[data-mk-theme="dark"] .mkpa-page-head h1,
html[data-mk-theme="dark"] .mkpa-page-head p,
html[data-mk-theme="dark"] .mkpa-page-head small,
html[data-mk-theme="dark"] .mkpa-section-head h2,
html[data-mk-theme="dark"] .mkpa-section-head p,
html[data-mk-theme="dark"] .mkpa-import-grid h3,
html[data-mk-theme="dark"] .mkpa-import-grid p,
html[data-mk-theme="dark"] .mkpa-project-meta span,
html[data-mk-theme="dark"] .mkpa-project-card small,
html[data-mk-theme="dark"] .mkpa-module-tile p,
html[data-mk-theme="dark"] .mkpa-empty-card p,
html[data-mk-theme="dark"] .mkpa-docs-help p,
html[data-mk-theme="dark"] .mkpa-document-editor label,
html[data-mk-theme="dark"] .mkpa-table-head p,
html[data-mk-theme="dark"] .mkpa-mini,
html[data-mk-theme="dark"] .mkpa-help,
html[data-mk-theme="dark"] .mkpa-smart-icon-help,
html[data-mk-theme="dark"] .mkpa-plan-admin-point-row small,
html[data-mk-theme="dark"] .mkpa-plan-opt-report span,
html[data-mk-theme="dark"] .mkpa-plan-opt-report code,
html[data-mk-theme="dark"] .mkpa-plan-position-editor .mkpa-section-head p{color:var(--mk-muted-2)!important}
html[data-mk-theme="dark"] .mkpa-table-card,
html[data-mk-theme="dark"] .mkpa-import-grid article,
html[data-mk-theme="dark"] .mkpa-import-card,
html[data-mk-theme="dark"] .mkpa-dialog,
html[data-mk-theme="dark"] .mkpa-export-grid article,
html[data-mk-theme="dark"] .mkpa-docs-help,
html[data-mk-theme="dark"] .mkpa-document-editor,
html[data-mk-theme="dark"] .mkpa-plan-floor-form,
html[data-mk-theme="dark"] .mkpa-plan-position-editor,
html[data-mk-theme="dark"] .mkpa-plan-floor-nav,
html[data-mk-theme="dark"] .mkpa-panel-upload article,
html[data-mk-theme="dark"] .mkpa-system-din-card{background:linear-gradient(180deg,#122230,#0f1c27)!important;border-color:#243847!important}
html[data-mk-theme="dark"] .mkpa-table-card table,
html[data-mk-theme="dark"] .mkpa-table-card tbody td,
html[data-mk-theme="dark"] .mkpa-table-card tbody th,
html[data-mk-theme="dark"] .mkpa-table-card tbody td b,
html[data-mk-theme="dark"] .mkpa-table-card tbody td strong,
html[data-mk-theme="dark"] .mkpa-table-card tbody td a,
html[data-mk-theme="dark"] .mkpa-table-card tbody td code,
html[data-mk-theme="dark"] .mkpa-table-card tbody td span,
html[data-mk-theme="dark"] .mkpa-export-grid h3,
html[data-mk-theme="dark"] .mkpa-system-din-body h3{color:#e7f0f4!important}
html[data-mk-theme="dark"] .mkpa-table-card thead th{background:#152736!important;color:#9db2bd!important;border-color:#274150!important}
html[data-mk-theme="dark"] .mkpa-table-card tbody td{border-color:#213543!important}
html[data-mk-theme="dark"] .mkpa-table-card tbody tr:hover td{background:#142430!important}
html[data-mk-theme="dark"] .mkpa-table-card tbody tr:nth-child(even) td{background:rgba(255,255,255,.012)}
html[data-mk-theme="dark"] .mkpa-table-card .mkpa-secondary,
html[data-mk-theme="dark"] .mkpa-top-actions>a,
html[data-mk-theme="dark"] .mkpa-plan-admin-zoom button,
html[data-mk-theme="dark"] .mkpa-tabs a,
html[data-mk-theme="dark"] .mkpa-secondary{background:#14222c!important;border-color:#28404d!important;color:#e0ebf2!important}
html[data-mk-theme="dark"] .mkpa-primary,
html[data-mk-theme="dark"] .mkpa-tabs a.is-active,
html[data-mk-theme="dark"] .mkpa-import-grid button,
html[data-mk-theme="dark"] .mkpa-import-card button{background:linear-gradient(180deg,#17354a,#102434)!important;border-color:#2b8798!important;color:#f6fbfd!important}
html[data-mk-theme="dark"] .mkpa-table-card input,
html[data-mk-theme="dark"] .mkpa-table-card select,
html[data-mk-theme="dark"] .mkpa-table-card textarea,
html[data-mk-theme="dark"] .mkpa-dialog input,
html[data-mk-theme="dark"] .mkpa-dialog select,
html[data-mk-theme="dark"] .mkpa-dialog textarea,
html[data-mk-theme="dark"] .mkpa-document-editor input,
html[data-mk-theme="dark"] .mkpa-document-editor select,
html[data-mk-theme="dark"] .mkpa-document-editor textarea,
html[data-mk-theme="dark"] .mkpa-plan-place-controls select,
html[data-mk-theme="dark"] .mkpa-plan-admin-zoom button,
html[data-mk-theme="dark"] .mkpa-search input{background:#0c1620!important;border-color:#304b59!important;color:#e7f0f4!important}
html[data-mk-theme="dark"] .mkpa-doc-permission-note,
html[data-mk-theme="dark"] .mkpa-plan-svg-rules,
html[data-mk-theme="dark"] .mkpa-plan-admin-toolbar,
html[data-mk-theme="dark"] .mkpa-panel-card-meta code,
html[data-mk-theme="dark"] .mkpa-system-din-meta code{background:#122431!important;border-color:#284654!important;color:#dce7ef!important}
html[data-mk-theme="dark"] .mkpa-plan-admin-viewport{background:#0b141b!important;border-color:#243847!important}
html[data-mk-theme="dark"] .mkpa-plan-points-head span,
html[data-mk-theme="dark"] .mkpa-plan-card-head>span,
html[data-mk-theme="dark"] .mkpa-plan-list code{background:#132431!important;color:#dce7ee!important}
