/* Supply21 work surfaces shared by every portal tenant. Layout and visibility stay module-owned. */
:root{
  color-scheme:light;
  --suite-page:#edf0f2;--suite-surface:#fff;--suite-soft:#f5f7f8;--suite-control:#fff;
  --suite-text:#24292d;--suite-muted:#626d76;--suite-line:#dce2e5;
  --suite-accent:#25685d;--suite-accent-soft:#e8f2ee;--suite-accent-line:#bad1c8;
  --suite-success:#25685d;--suite-success-soft:#e8f2ee;--suite-warning:#835615;--suite-warning-soft:#faf0df;
  --suite-danger:#a54236;--suite-danger-soft:#faede9;--suite-shadow:0 12px 32px #26344009;
  --suite-sidebar:#252a2e;--suite-sidebar-text:#f4f6f7;--suite-sidebar-active:#414b50;
  --suite-radius:18px;--suite-control-radius:13px;--suite-grid:#2f6ca1;--suite-battery:#7355a8;
  --ink:var(--suite-text);--ink-soft:var(--suite-muted);--canvas:var(--suite-page);--line:var(--suite-line);--shadow:var(--suite-shadow);
  --surface:var(--suite-surface);--text:var(--suite-text);
  --q21-page:var(--suite-page);--q21-text:var(--suite-text);--q21-muted:var(--suite-muted);--q21-line:var(--suite-line);--q21-solid:var(--suite-surface);--q21-glass:var(--suite-surface);
  --q21-card:var(--suite-radius);--q21-control:var(--suite-control-radius);--q21-panel:22px;
  --flow-ink:var(--suite-text);--flow-muted:var(--suite-muted);--flow-line:var(--suite-line);--flow-page:var(--suite-page);--flow-surface:var(--suite-surface);
  --t21-text:var(--suite-text);--t21-text-soft:var(--suite-muted);--t21-muted:var(--suite-muted);--t21-line:var(--suite-line);--t21-shadow:var(--suite-shadow);--t21-shadow-hover:var(--suite-shadow);--t21-positive:var(--suite-success);--t21-negative:var(--suite-danger);
}
:root:not([data-theme=light]),:root[data-theme=dark]{
  color-scheme:dark;--suite-page:#171d22;--suite-surface:#222a30;--suite-soft:#2a333b;--suite-control:#222a30;
  --suite-text:#eef2f4;--suite-muted:#d2d9de;--suite-line:#3b464e;
  --suite-accent:#9cd3c1;--suite-accent-soft:#233e36;--suite-accent-line:#577e70;
  --suite-success:#9cd3c1;--suite-success-soft:#233e36;--suite-warning:#edc183;--suite-warning-soft:#3d3323;
  --suite-danger:#f0aaa0;--suite-danger-soft:#462e2b;--suite-shadow:0 12px 32px #00000016;
  --suite-grid:#87bde8;--suite-battery:#b9a2ed;
}
/* Supply21 uses these shorter token names, including inside dialogs. Keep both palettes aligned. */
:root,:root[data-theme=dark],:root[data-theme=light]{
  --ink:var(--suite-text);--muted:var(--suite-muted);--line:var(--suite-line);
  --page:var(--suite-page);--surface:var(--suite-surface);--soft:var(--suite-soft);
  --accent:var(--suite-accent);--accent-soft:var(--suite-accent-soft);
  --warning:var(--suite-warning);--warning-soft:var(--suite-warning-soft);
  --danger:var(--suite-danger);--danger-soft:var(--suite-danger-soft);
  --shadow:var(--suite-shadow);--glass:var(--suite-surface);--nav-selected:var(--suite-accent-soft);
}
body{color:var(--suite-text);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5}
body:not(.energy-view-active){background:var(--suite-page)}
body .workspace{background:transparent}
body::before{background:none}
body :is(.sidebar,.desktop-sidebar){background:var(--suite-sidebar);color:var(--suite-sidebar-text);box-shadow:none;border-right:1px solid #ffffff0d;-webkit-backdrop-filter:none;backdrop-filter:none}
body .sidebar :is(.brand,.portal-brand,.brand-text,.main-nav a,.sidebar-user,.sidebar-account,.sidebar-footer){color:var(--suite-sidebar-text)}
body .main-nav a{background:transparent;border:1px solid transparent;border-radius:13px;box-shadow:none}
body .main-nav a:is(:hover,.active,[aria-current=page]){background:var(--suite-sidebar-active);border-color:#ffffff13;color:#fff;box-shadow:none}
body .sidebar .main-nav{background:transparent;border:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
body .sidebar .main-nav a{background:transparent;border-color:transparent;box-shadow:none}
body .sidebar .main-nav a:is(:hover,.active,[aria-current=page]){background:var(--suite-sidebar-active);border-color:#ffffff13;color:#fff;box-shadow:none}
body :is(.mobile-app-header,.mobile-nav,.pm-bottom){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);box-shadow:var(--suite-shadow);-webkit-backdrop-filter:none;backdrop-filter:none}
body :is(.mobile-nav a.active,.mobile-nav a[aria-current=page],.pm-bottom button[aria-current=page]){color:var(--suite-accent);background:var(--suite-accent-soft)}
body :is(.module-card,.planner-link-card,.employee-tool-grid article,.settings-section,.integration-card,.service-card,.help-grid article,.account-password-card,.tenant-planner-card,.p21d-order-shell,.p21d-kpi,.p21-tenant-settings,.business-panel,.bi-card,.bi-panel,.erp-roe-widget,.dashboard-card,.system-overview){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);border-radius:var(--suite-radius);box-shadow:var(--suite-shadow);-webkit-backdrop-filter:none;backdrop-filter:none}
body :is(.module-card,.planner-link-card,.tenant-planner-card):hover{background:var(--suite-soft);box-shadow:none;border-color:var(--suite-accent-line)}
body :is(.module-card,.planner-link-card)::before,body :is(.module-card,.planner-link-card)::after{background:none;box-shadow:none}
body :is(.module-card,.planner-link-card,.employee-tool-grid,.help-grid,.service-card) a{color:var(--suite-accent)}
body :is(.module-status,.module-card .status-badge,.erp-tool-tag){background:var(--suite-soft);color:var(--suite-muted)}
body :is(.module-card,.planner-link-card,.employee-tool-grid article,.settings-section,.integration-card,.service-card,.help-grid article) :is(h2,h3,h4,strong){color:var(--suite-text)}
body :is(.topbar,.portal-view,.tenant-planner-dialog,.pm-sheet,.customize-panel,.roe-dialog,.documents-dialog) :is(h1,h2,h3,h4){color:var(--suite-text);letter-spacing:-.025em}
body :is(.module-card p,.planner-link-card p,.employee-tool-grid article p,.settings-section>p,.tenant-planner-card p,.tenant-planner-card>small,.planner-column-empty,.eyebrow,.section-description){color:var(--suite-muted)}
body :is(.primary-button,.secondary-button,.pm-sheet-action){border-radius:var(--suite-control-radius);box-shadow:none;font-weight:650;transition:background-color .15s,border-color .15s}
body .primary-button{background:var(--suite-text);color:var(--suite-surface);border-color:var(--suite-text)}
body .primary-button:hover:not(:disabled){background:var(--suite-accent);color:var(--suite-surface);border-color:var(--suite-accent)}
body :is(.secondary-button,.pm-sheet-action){background:var(--suite-surface);color:var(--suite-text);border:1px solid var(--suite-line)}
body :is(.secondary-button,.pm-sheet-action):hover:not(:disabled){background:var(--suite-soft);border-color:var(--suite-accent-line);color:var(--suite-text)}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select,textarea){color:var(--suite-text);background-color:var(--suite-control);border-color:var(--suite-line);border-radius:var(--suite-control-radius);box-shadow:none}
body :is(input,select,textarea)::placeholder{color:var(--suite-muted);opacity:.8}
body :is(input,select,textarea):disabled{color:var(--suite-muted);background-color:var(--suite-soft)}
body :is(input[type=checkbox],input[type=radio]){accent-color:var(--suite-accent)}
body :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--suite-accent);outline-offset:3px}
body :is(.tenant-planner-dialog,.pm-sheet,.roe-dialog,.documents-dialog,.customize-panel,.modal-dialog,.auth-card,.login-card){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);border-radius:22px;box-shadow:0 24px 64px #00000028;-webkit-backdrop-filter:none;backdrop-filter:none}
body :is(.tenant-planner-dialog-shell>header,.tenant-planner-dialog-shell>footer,.pm-sheet>header,.customize-header,.customize-footer,.roe-dialog>header,.roe-dialog>footer,.documents-dialog>header){color:var(--suite-text);background:var(--suite-soft);border-color:var(--suite-line)}
body :is(.tenant-planner-dialog,.pm-sheet,.roe-dialog,.documents-dialog,dialog)::backdrop{background:#10171d80;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
body :is(.tenant-planner-column,.tenant-planner-toolbar,.planner-form-panel,.planner-subtasks,.planner-workflow-panel,.planner-checklist,.planner-documents,.p21-date-toggle,.planner-subtask-row,.planner-form-block,.planner-order-summary,.planner-ai-summary,.p21-supply-section){color:var(--suite-text);background:var(--suite-soft);border-color:var(--suite-line);box-shadow:none}
body .tenant-planner-column>header{border-bottom:1px solid var(--suite-line)}
body .tenant-planner-column>header h3{color:var(--suite-text)}
body .tenant-planner-toolbar>div{background:var(--suite-soft);border-color:var(--suite-line)}
body .tenant-planner-toolbar button{color:var(--suite-muted)}
body .tenant-planner-toolbar button.active{color:var(--suite-text);background:var(--suite-surface);box-shadow:none}
body :is(.planner-form-grid label>span,.planner-notes-field>span,.planner-people-field>span,.planner-form-grid small,.planner-help){color:var(--suite-muted)}
body :is(.planner-pdf-link,.planner-people-field label span,.planner-card-copy,.planner-status-badge){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line)}
body .planner-people-field input:checked+span{color:var(--suite-surface);background:var(--suite-text);border-color:var(--suite-text)}
body :is(.roe-view,.roe-desktop-panel,.documents-view){background:transparent;color:var(--suite-text)}
body :is(.roe-app-header,.roe-table-wrap,.roe-metrics article,.roe-metric,.roe-panel,.roe-editor,.roe-settings,.roe-list-row,.documents-card,.documents-table-wrap,.documents-panel,.erp-panel,.erp-card,.erp-roe-panel){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);box-shadow:var(--suite-shadow);border-radius:var(--suite-radius)}
body :is(.roe-tabs,.roe-month-filter,.roe-panel-toolbar,.roe-about,.documents-toolbar,.documents-tabs,.erp-toolbar){color:var(--suite-text);background:var(--suite-soft);border-color:var(--suite-line)}
body :is(.roe-tabs button,.documents-tabs button){color:var(--suite-muted);border-radius:var(--suite-control-radius)}
body :is(.roe-tabs button.active,.documents-tabs button.active){color:var(--suite-accent);background:var(--suite-accent-soft);border-color:var(--suite-accent-line)}
body :is(.roe-data-table,.documents-table,.erp-table,.admin-table){color:var(--suite-text);background:var(--suite-surface)}
body :is(.roe-data-table,.documents-table,.erp-table,.admin-table) th{background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line)}
body :is(.roe-data-table,.documents-table,.erp-table,.admin-table) td{border-color:var(--suite-line)}
body :where(.roe-data-table,.documents-table,.erp-table,.admin-table) td:not(.positive):not(.negative):not(.roe-positive):not(.roe-negative){color:var(--suite-text)}
body :is(.roe-data-table,.documents-table,.erp-table,.admin-table) tbody tr:hover{background:var(--suite-soft)}
body .roe-selected-row{background:var(--suite-accent-soft)!important;outline-color:var(--suite-accent)}
body .roe-assigned-row{background:var(--suite-success-soft)}
body :is(.organization-company,.organization-department,.organization-person,.user-row,.user-card,.group-card,.system-stat,.storage-stat,.user-security-card,.user-security-details,.organization-card,.admin-section,.admin-card){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);border-radius:var(--suite-radius);box-shadow:none}
body :is(.admin-nav,.organization-company>header,.organization-department>header,.settings-header,.user-security-stat){color:var(--suite-text);background:var(--suite-soft);border-color:var(--suite-line)}
body :is(.admin-nav button,.customize-nav button){color:var(--suite-muted)}
body :is(.admin-nav button.active,.customize-nav button.active){color:var(--suite-accent);background:var(--suite-accent-soft);border-color:var(--suite-accent-line)}
body :is(.portal-alerts,.portal-alert-item,.portal-notice-digest,.portal-notice-list,.portal-session-card,.ms-reauth-card,.user-security-menu){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);border-radius:var(--suite-radius);box-shadow:none}
body :is(.portal-alert-item small,.portal-notice-digest small,.portal-notice-meta,.portal-session-card p,.ms-login-help){color:var(--suite-muted)}
body .portal-alert-item.urgent{background:var(--suite-danger-soft);border-color:var(--suite-danger)}
body .portal-alert-item.important{background:var(--suite-warning-soft);border-color:var(--suite-warning)}
body #portalAlerts{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #portalAlerts.has-critical{border-color:var(--suite-line)}
body #portalAlerts :is(header,.portal-alerts-header,.portal-alerts-empty,.portal-alert-digest-row){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #portalAlerts :is(h2,strong){color:var(--suite-text)}
body #portalAlerts :is(small,p,.portal-alert-digest-meta){color:var(--suite-muted)}
body #portalAlerts :is(.notice-preview-row,header){border-color:var(--suite-line)}
body :is(.notice-dialog,.notice-filters,.notice-dialog-list,.notice-dialog-status){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body :is(#portalAlerts,.notice-dialog) .notice-level{color:var(--suite-muted)}
body :is(#portalAlerts,.notice-dialog) .is-critical .notice-level{color:var(--suite-danger)}
body :is(#portalAlerts,.notice-dialog) .is-warning .notice-level{color:var(--suite-warning)}
body :is(#dashboardView,#roeView,#documentsView) .roe-money-negative{color:var(--suite-danger)!important}
body :is(#dashboardView,#roeView,#documentsView) .roe-money-positive{color:var(--suite-success)!important}
body #openPortalAlerts{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #dashboardView{--dash-ink:var(--suite-text);--dash-muted:var(--suite-muted);--dash-line:var(--suite-line);--dash-teal:var(--suite-success)}
body #dashboardView :is(.dashboard-roe-progress,.dashboard-live-card){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);box-shadow:var(--suite-shadow)}
body #dashboardView #dashboardEnergyCard{background:var(--suite-surface)!important;color:var(--suite-text)}
body #dashboardView :is(.dashboard-roe-scope,.dashboard-roe-worktime,.dashboard-roe-track,.dashboard-dynamics-powers,.dashboard-dynamics-kpis,.dashboard-forecast,.waste-event){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #dashboardView .dashboard-roe-month{background:var(--suite-surface);border-color:var(--suite-line)}
body #dashboardView :is(.dashboard-roe-progress-copy>span,.dashboard-roe-progress-copy strong small,.dashboard-roe-progress-value small){color:var(--suite-muted)}
body #dashboardView .dashboard-roe-progress-copy strong{color:var(--suite-text)}
body #dashboardView :is(.dashboard-live-card h2,.dashboard-live-card strong,.dashboard-live-card>header,.dashboard-roe-details>summary){color:var(--suite-text);border-color:var(--suite-line)}
body #dashboardView :is(.dashboard-live-card small,.dashboard-live-card p,.dashboard-live-card span,.dashboard-live-card dt,.dashboard-live-card dd){color:var(--suite-muted)}
body #dashboardView .waste-event.warning{background:var(--suite-warning-soft);color:var(--suite-warning)}
body #dashboardView .dashboard-live-card .live-state{background:var(--suite-success-soft);color:var(--suite-success)}
body :is(.connection-state,.connection-status,.connection-pill){background:var(--suite-success-soft);color:var(--suite-success);border-color:var(--suite-line)}
body #appView .connection{background:var(--suite-success-soft);color:var(--suite-success);border-color:var(--suite-line);box-shadow:none}
body #appView :is(.status-pill,.documents-connection,.badge){background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line);box-shadow:none}
body .notice-dialog .notice-group{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body .notice-dialog :is(.notice-detail span,header p,.notice-dialog-status){color:var(--suite-muted)}
body :is(.p21-workflow-form,.p21-access-matrix,.p21-access-department-choices label,.p21d-finances,.planner-roe-panel,.planner-ai-panel,.planner-checklist-panel){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body :is(.p21-workflow-form>label,.p21-workflow-form>small,.p21-workflow-form>p,.p21-workflow-actions span,.p21-access-departments>label,.p21-access-departments>small,.planner-card-financial){color:var(--suite-muted)}
/* Display-only contrast adapters. Stored department colors and status values stay unchanged. */
body #plannerView{--p21-ink:var(--suite-text);--p21-muted:var(--suite-muted);--p21-line:var(--suite-line)}
body #plannerView :is(.tenant-planner-toolbar,.planner-department-nav,.planner-department-navigation,.planner-tenant-select-shell){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #plannerView :is(.tenant-planner-toolbar label span,.tenant-planner-heading p,.planner-tenant-switcher>span,.p21-department-nav,.p21-department-nav label){color:var(--suite-muted)}
body #plannerView .tenant-planner-status{color:var(--suite-muted)}
body #plannerBoard .tenant-planner-column{background:var(--suite-soft);border-color:var(--suite-line)}
body #plannerBoard .tenant-planner-column>header{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerBoard .tenant-planner-column>header h3{color:var(--suite-text)}
body #plannerBoard .tenant-planner-column>header>span{background:var(--suite-soft);color:var(--suite-muted)}
body #plannerBoard :is(.p21-column-sort,.planner-card-sort-detail){color:var(--suite-muted)}
body #plannerBoard :is(.p21-column-sort select,.planner-column-add){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerView :is(.tenant-planner-toolbar input,.tenant-planner-toolbar button.active){background:var(--suite-control);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerView :is(.tenant-planner-toolbar button,.tenant-planner-card p,.tenant-planner-card small){color:var(--suite-muted)}
body #plannerBoard .tenant-planner-card{border-left:4px solid var(--suite-marker,var(--planner-card-color,#7c858d))}
body #plannerBoard .tenant-planner-card.status-waiting{border-left-color:var(--suite-warning)}
body #plannerBoard .tenant-planner-card.priority-urgent{border-left-color:var(--suite-danger)}
body #plannerBoard .tenant-planner-card.status-done{opacity:1}
body #plannerBoard .planner-card-roe{color:var(--suite-text);font-size:14px;font-weight:750}
body #plannerBoard .planner-card-activity{color:var(--suite-muted);font-size:13px}
body #plannerBoard :is(.planner-card-date,.planner-card-sort-detail,.planner-card-financial,.planner-card-progress>small){color:var(--suite-muted);font-size:12px}
body #plannerBoard .planner-card-top code{color:var(--suite-text);background:var(--suite-soft)}
body #plannerBoard .planner-card-progress>i{background:var(--suite-line)}
body #plannerBoard .planner-card-progress>i::after{background:var(--suite-marker,var(--planner-card-color,#7c858d))}
body #plannerBoard .planner-card-meta>span{background:var(--suite-soft);color:var(--suite-text);border:1px solid var(--suite-line);font-size:11px}
body #plannerBoard .status-in_progress .planner-card-meta>span{color:var(--suite-grid)}
body #plannerBoard .status-waiting .planner-card-meta>span{background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body #plannerBoard .status-done .planner-card-meta>span{background:var(--suite-success-soft);color:var(--suite-success);border-color:var(--suite-success)}
body #plannerBoard .planner-card-avatars b{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-muted)}
body #plannerBoard .pm-card-details{border-color:var(--suite-line)}
body #plannerBoard .pm-card-details summary{color:var(--suite-muted)}
body #plannerBoard .tenant-planner-column>header>div>i{background:var(--suite-marker,var(--planner-department-color,#7c858d));box-shadow:none;width:10px;height:10px}
body :is(.planner-department-card,#plannerDepartmentList article){border-left-color:var(--suite-marker,var(--planner-department-color,#7c858d))}
body .roe-department-dot{background:var(--suite-marker,var(--department-color,#7c858d))}
body #plannerOrderForm :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){background-color:var(--suite-control);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerOrderForm :is(label>span,small,.planner-notes-field>span){color:var(--suite-muted)}
body #plannerOrderForm :is(.p21-workflow-form,.p21-preparation-step,.planner-checklist-group,.planner-ai-summary,.planner-documents,.planner-subtasks){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body :is(.planner-personal-settings,.planner-settings-management nav button,.account-preference-card,.employee-account-card,.account-toggle,.erp-search-control,.erp-search-panel,.erp-insight-grid article,.erp-kpi-grid article,.erp-integration-card,.erp-customer-dialog,.documents-results,.documents-empty,.erp-search-result,.document-card,.roe-section,.roe-access-row,.admin-role-context,.activity-list,.user-account-menu>span){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:var(--suite-shadow)}
body :is(.documents-dialog-shell>header,.erp-customer-shell>header,.erp-tabs,.admin-tabs){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body :is(.erp-tabs button,.admin-tabs button){color:var(--suite-muted);background:transparent;box-shadow:none}
body :is(.erp-tabs button.active,.admin-tabs button.active){color:var(--suite-accent);background:var(--suite-accent-soft);box-shadow:none}
body :is(.erp-search-result:hover,.erp-search-result.is-best){background:var(--suite-soft);color:var(--suite-text);box-shadow:none}
body #plannerDepartmentNav{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #plannerDepartmentNav label{color:var(--suite-muted);border-color:var(--suite-line)}
body #plannerDepartmentNav label:has(input:checked){background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body #appView #plannerDepartmentNav button[aria-pressed=true]{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body #plannerDepartmentNav button small{color:var(--suite-muted)}
body #plannerBoard .planner-column-add,body #plannerBoard [data-planner-add-department]{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerView :is(.p21-summary>div,.p21-table-scroll,.p21-lower>section,.p21-order,.p21-milestones button){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerView :is(.p21-table th,.p21-table .is-weekend){background:var(--suite-soft)}
body #plannerView .p21-table .is-today{background:var(--suite-accent-soft)}
body #plannerView :is(.p21-summary .p21-warning,.p21-order.has-conflict){background:var(--suite-warning-soft);color:var(--suite-warning)}
body #roeView :is(.roe-metrics article,.roe-annual-metrics article){border-radius:var(--suite-radius);background:var(--suite-surface);border-color:var(--suite-line);box-shadow:none}
body #roeView :is(.roe-panel-toolbar p,.roe-panel-toolbar label,.roe-app-brand p,.roe-month-filter small,.roe-report-summary){color:var(--suite-muted)}
/* Reset the whole background: background-color alone leaves legacy pale gradients over the dark surface. */
body #appView .portal-view:not(.energy-statistics-view) :where(button:not(.primary-button):not(.tenant-planner-card):not(.danger):not(.p21-order):not(.dashboard-live-card):not(.module-card):not(.is-critical),.erp-refresh-button){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #appView .portal-view:not(.energy-statistics-view) :is(button.active,button[aria-pressed=true],button[aria-current=page]){background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line);box-shadow:none}
body :is(#appView,dialog) :is(label,legend){color:var(--suite-muted)}
body :is(.tenant-planner-dialog,.roe-dialog,.documents-dialog,.customize-panel) button:not(.primary-button):not(.danger):not([type=submit]){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
/* RoE chrome uses paired palette tokens; the rendered PDF page is intentionally not restyled. */
body :is(#roeView,#roeDialog) :is(.secondary-button,.roe-pdf-controls button,[id=roeQuickAssign]){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body :is(#roeView,#roeDialog) :is(.secondary-button,.roe-pdf-controls button,[id=roeQuickAssign]):hover:not(:disabled){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-accent-line)}
body :is(#roeView,#roeDialog) .primary-button{background:var(--suite-text);color:var(--suite-surface);border-color:var(--suite-text);box-shadow:none}
body :is(#roeView,#roeDialog) .primary-button:hover:not(:disabled){background:var(--suite-accent);color:var(--suite-surface);border-color:var(--suite-accent)}
body :is(#roeView,#roeDialog) button:disabled{background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line);box-shadow:none;opacity:1;cursor:not-allowed}
body :is(#roeView,#roeDialog) :is(.roe-quick-allocation,.roe-settings-block,.roe-share-head,.roe-calculated-row,.roe-cost-tabs){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body :is(#roeView,#roeDialog) :is(.roe-edit-card,.roe-pdf-preview){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body :is(#roeView,#roeDialog) :is(.roe-quick-allocation small,.roe-dialog-intro p,.roe-settings-block>p,.roe-central-api p,.roe-cost-footer span,.roe-potential-note,.roe-potential-legend,.roe-potential-legend small,.roe-potential-explanation,.roe-target-progress-head span){color:var(--suite-muted)}
body :is(#roeView,#roeDialog) :is(.roe-target-progress-head strong,.roe-potential-amount){color:var(--suite-text)}
body :is(#roeView,#roeDialog) :is(.roe-dialog-actions,.roe-share-section,.roe-cost-footer,.roe-annual-inline,.roe-share-table label){border-color:var(--suite-line)}
body #roeView .roe-monthly-table tbody tr{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #roeView .roe-monthly-table tbody tr:hover{background:var(--suite-soft)}
body #roeView .roe-monthly-table tbody tr.roe-selected-row{background:var(--suite-accent-soft)!important;outline-color:var(--suite-accent)}
body #roeView .roe-monthly-table td::before{color:var(--suite-muted)}
body #roeView .roe-monthly-table td{border-top-color:var(--suite-line)!important}
body #roeDialog .roe-cost-tabs button.active{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body #roeDialog .roe-settings-block summary{color:var(--suite-accent)}
body #roeView :is(.roe-target-progress-track,.roe-target-progress-bars){background:var(--suite-soft);border-color:var(--suite-line);box-shadow:none}
body #roeView .roe-target-progress-track::-webkit-progress-bar{background:var(--suite-soft)}
body #roeView .roe-target-progress-bars>.roe-target-progress-track,body #roeView .roe-target-progress-bars>.roe-target-progress-track::-webkit-progress-bar{background:transparent}
body #roeDialog .roe-pdf-preview>header{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #roeDialog .roe-pdf-preview>header strong{color:var(--suite-text)}
body #roeDialog :is(.roe-pdf-preview>header small,.roe-pdf-controls output,.roe-pdf-preview-placeholder){color:var(--suite-muted)}
body #roeDialog .roe-pdf-stage{background:var(--suite-page);color:var(--suite-text)}
body #roeDialog .roe-pdf-stage>p{background:var(--suite-surface);color:var(--suite-text);border:1px solid var(--suite-line)}
body #roeDialog .roe-pdf-stage>p.roe-pdf-error{background:var(--suite-danger-soft);color:var(--suite-danger);border-color:var(--suite-danger)}
body #documentsView :is(.erp-panel,.erp-chart-card,.erp-insight-grid article,.erp-kpi-grid article){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:var(--suite-shadow)}
body #erpRoeWidget :is(.erp-roe-eyebrow,.erp-roe-values span,.erp-roe-open,.erp-roe-footnote){color:var(--suite-muted)}
body #erpRoeWidget a,body #erpRoeWidget .erp-roe-link{color:var(--suite-accent)}
body #erpRoeWidget small,body #erpRoeWidget .erp-roe-note{color:var(--suite-muted)}
body #erpAnalyticsPanel{--biz-ink:var(--suite-text);--biz-muted:var(--suite-muted);--biz-border:var(--suite-line);--biz-teal:var(--suite-success)}
body #erpAnalyticsPanel :is(.biz-kpi,.biz-panel,.biz-card,.biz-list li,.biz-table-wrap,.biz-controls,.biz-chart-card){color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line);box-shadow:none}
body :is(.employee-panel,.employee-tool-grid>form,.account-preference-card,.employee-account-card,.user-security-dialog,.user-security-dialog>header,.user-security-event){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body :is(.employee-panel p,.user-security-card dt,.user-security-body>p,.user-security-body>section>p,.planner-settings-management p,.planner-settings-management nav button span,.planner-people-help){color:var(--suite-muted)}
/* Forecast details sit in a dialog outside #dashboardView, including on iOS. */
body .dashboard-info-dialog :is(.dashboard-info-body,.dashboard-info-weather){background:var(--suite-surface);color:var(--suite-text)}
body .dashboard-info-dialog .dashboard-info-shell{background:var(--suite-surface);color:var(--suite-text)}
body .dashboard-info-dialog .dashboard-info-shell>header{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none;gap:12px}
body .dashboard-info-dialog .dashboard-info-shell>header>div{min-width:0;flex:1}
body .dashboard-info-dialog .dashboard-info-shell>header h3{color:var(--suite-text)}
body .dashboard-info-dialog .dashboard-info-shell>header .eyebrow{color:var(--suite-muted)}
body .dashboard-info-dialog .dashboard-info-shell>header .ui-icon-close{background:var(--suite-surface);color:var(--suite-text);border:1px solid var(--suite-line);width:44px;height:44px;min-width:44px;min-height:44px;flex:none;font-size:28px}
body .dashboard-info-dialog .dashboard-info-body :is(section,article,.dashboard-pv-row,.dashboard-weather-warning){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body .dashboard-info-dialog .dashboard-info-body :is(h2,h3,h4,strong,b){color:var(--suite-text)}
body .dashboard-info-dialog .dashboard-info-body :is(small,p,span,em,.dashboard-info-note){color:var(--suite-muted)}
body .dashboard-info-dialog .dashboard-info-body .dashboard-weather-warning.is-warning{background:var(--suite-warning-soft);border-color:var(--suite-warning)}
body .dashboard-info-dialog .dashboard-info-body .dashboard-weather-warning.is-danger{background:var(--suite-danger-soft);border-color:var(--suite-danger)}
body .dashboard-info-dialog .dashboard-info-body .dashboard-weather-warning.is-danger strong{color:var(--suite-danger)}
body #dashboardView .weather-days>span{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #dashboardView .weather-days :is(small,em,i){color:var(--suite-muted)}
body #dashboardView .weather-days :is(b,strong){color:var(--suite-text)}
@media(max-width:680px){body .dashboard-info-dialog .dashboard-info-body{padding:14px;gap:12px}body .dashboard-info-dialog .dashboard-info-weather{grid-template-columns:repeat(2,minmax(0,1fr))}body .dashboard-info-dialog .dashboard-info-weather article{padding:14px 8px}body .dashboard-info-dialog .dashboard-info-weather article small{font-size:12px}body .dashboard-info-dialog .dashboard-info-weather article strong{font-size:18px}body .dashboard-info-dialog .dashboard-info-weather article span{font-size:12px}body .dashboard-info-dialog .dashboard-info-body :is(section p,.dashboard-weather-warning span,.dashboard-pv-row em,.dashboard-info-note){font-size:13px;line-height:1.5}body .dashboard-info-dialog .dashboard-info-body section h4{font-size:17px}}
@media(max-width:680px){body .dashboard-info-dialog .dashboard-info-shell>header{padding:12px;align-items:flex-start}body .dashboard-info-dialog .dashboard-info-shell>header h3{font-size:18px;line-height:1.3;margin:5px 0 0}body .dashboard-info-dialog .dashboard-info-shell>header .eyebrow{font-size:11px;line-height:1.4;letter-spacing:.08em}}
/* Complete widget surfaces: no legacy light footer, forecast or battery track. */
body #dashboardView #dashboardEnergyCard{border-top:1px solid var(--suite-line)}
body #dashboardView #dashboardEnergyCard>header,body #dashboardView #dashboardEnergyCard>footer{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #dashboardView #dashboardEnergyCard .live-state{background:var(--suite-success-soft);color:var(--suite-success);border:1px solid var(--suite-accent-line)}
body #dashboardView #dashboardEnergyCard .live-state.offline{background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body #dashboardView #dashboardEnergyCard :is(#dashboardDynamicsQuality,#dashboardDynamicsOwnQuality){color:var(--suite-warning)}
body #dashboardView #dashboardEnergyCard .pv :is(strong,dd){color:var(--suite-success)}
body #dashboardView #dashboardEnergyCard .grid :is(strong,dd){color:var(--suite-grid)}
body #dashboardView #dashboardEnergyCard #energyPvForecastCompact{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);border-radius:var(--suite-control-radius);box-shadow:none}
body #dashboardView #dashboardEnergyCard #energyPvForecastCompact :is(strong,summary){color:var(--suite-text)}
body #dashboardView #dashboardEnergyCard #energyPvForecastCompact small{color:var(--suite-accent)}
body #dashboardView #dashboardEnergyCard #energyPvForecastCompact :is(span,p){color:var(--suite-muted);border-color:var(--suite-line)}
body #dashboardView #dashboardEnergyCard #energyMessage{background:var(--suite-warning-soft);color:var(--suite-warning)}
body #dashboardView #dashboardEnergyCard>footer button{background:transparent;color:var(--suite-accent);border:0;box-shadow:none;padding:8px 0}
body #dashboardView #dashboardDynamicsBattery .dashboard-battery-ring{width:72px;height:72px}
body #dashboardView #dashboardDynamicsBattery svg circle:not([pathLength]){stroke:var(--suite-line)}
body #dashboardView #dashboardDynamicsBattery svg circle[pathLength][stroke="#8460ce"]{stroke:var(--suite-battery)}
body #dashboardView #dashboardDynamicsBattery svg circle[pathLength][stroke="#a397b9"]{stroke:var(--suite-muted)}
body #dashboardView #dashboardDynamicsBattery .dashboard-battery-ring strong{color:var(--suite-text);font-size:17px;font-variant-numeric:tabular-nums}
body #dashboardView :is(.weather-symbol,.waste-alert-state){background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line);box-shadow:none}
body #dashboardView .weather-current b{color:var(--suite-text)}
body #dashboardView :is(.weather-risk-compact,.dashboard-weather-warning){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #dashboardView :is(.weather-risk-compact,.dashboard-weather-warning).is-warning{background:var(--suite-warning-soft);border-color:var(--suite-warning)}
body #dashboardView :is(.weather-risk-compact,.dashboard-weather-warning).is-danger{background:var(--suite-danger-soft);border-color:var(--suite-danger)}
body #dashboardView :is(.weather-risk-compact,.dashboard-weather-warning).is-warning strong,body #dashboardView .waste-event.warning>b{color:var(--suite-warning)}
body #dashboardView :is(.weather-risk-compact,.dashboard-weather-warning).is-danger strong{color:var(--suite-danger)}
body #dashboardView .waste-event{background:transparent}
/* One navigation row and open work surface, not repeated card-within-card frames. */
body #appView #documentsView .erp-tabs{gap:6px;overflow-x:auto;scrollbar-width:thin;background:transparent;border:0;border-bottom:1px solid var(--suite-line);border-radius:0;box-shadow:none;padding:0 0 8px}
@media(min-width:1025px){body #appView #documentsView .erp-tabs{display:flex}}
/* Keep tool shortcuts at the top on phones; the existing bottom bar handles ERP areas. */
@media(max-width:1024px){
  body #appView #documentsView .erp-tabs{display:flex;margin-inline:0}
  body #appView #documentsView .erp-tabs button[data-erp-area]{display:none}
  body #appView #documentsView .erp-tabs button[data-erp-tool]{flex:1 0 auto;background:var(--suite-soft);border-color:var(--suite-line);text-align:center}
  body #appView #documentsView .erp-tabs:not(:has([data-erp-tool]:not([hidden]))){display:none}
}
body #appView #documentsView .erp-tabs button{flex:0 0 auto;min-height:44px;padding:10px 16px;background:transparent;color:var(--suite-muted);border:1px solid transparent;border-radius:10px;box-shadow:none;font-size:13px;font-weight:600;white-space:nowrap}
body #appView #documentsView .erp-tabs button:hover{background:var(--suite-soft);color:var(--suite-text)}
body #appView #documentsView .erp-tabs button.active{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body #appView #documentsView .documents-toolbar{background:transparent;color:var(--suite-muted);border-bottom:1px solid var(--suite-line);margin-inline:26px;padding:18px 0 24px}
body #appView #documentsView .documents-toolbar label>span,body #appView #documentsView .documents-toolbar label small{color:var(--suite-muted)}
body #appView #documentsView .erp-search-control{background:var(--suite-surface);border-color:var(--suite-line);box-shadow:none}
body #appView #documentsView .erp-search-control kbd{background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line);box-shadow:none}
body #appView #documentsView :is(.status-pill,.erp-supply-state){background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line);box-shadow:none}
body #appView #documentsView :is(#erpAnalyticsPanel,#erpSupplyPanel,#erpIntelligencePanel){background:transparent;border:0;box-shadow:none;border-radius:0}
body #appView #documentsView #erpRoeWidget{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);border-radius:var(--suite-radius);box-shadow:none}
body #appView #documentsView #erpRoeWidget .erp-roe-open{background:transparent;color:var(--suite-text);border:0;box-shadow:none;border-radius:0}
body #appView #documentsView #erpRoeWidget .erp-roe-open:hover{background:var(--suite-soft)}
body #appView #documentsView #erpRoeWidget .erp-roe-track{background:var(--suite-soft);box-shadow:none}
body #appView #documentsView #erpRoeWidget .erp-roe-track>span{background:var(--suite-success)}
body #appView #documentsView :is(.erp-supply-heading,.erp-supply-flow){background:transparent;color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #appView #documentsView .erp-supply-heading{padding:8px 0 24px;border:0}
body #appView #documentsView .erp-supply-grid{padding:0 0 24px}
body #appView #documentsView .erp-supply-card{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);border-radius:var(--suite-radius);box-shadow:none;transform:none}
body #appView #documentsView .erp-supply-card.primary{background:var(--suite-surface);border-color:var(--suite-accent-line)}
body #appView #documentsView .erp-supply-card:hover{background:var(--suite-soft);border-color:var(--suite-accent-line);box-shadow:none;transform:none}
body #appView #documentsView .erp-supply-card :is(em,small),body #appView #documentsView .erp-supply-flow small{color:var(--suite-muted)}
body #appView #documentsView .erp-supply-card strong,body #appView #documentsView .erp-supply-flow strong{color:var(--suite-text)}
body #appView #documentsView .erp-supply-mark,body #appView #documentsView .erp-supply-flow div>span{background:var(--suite-soft);color:var(--suite-text);border:1px solid var(--suite-line);box-shadow:none}
body #appView #documentsView .erp-supply-card.primary .erp-supply-mark{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body #appView #documentsView .erp-supply-flow{margin-inline:0;padding:18px 0;border:0;border-top:1px solid var(--suite-line);border-radius:0}
body #appView #documentsView .erp-supply-notice{margin-inline:0;background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body #appView #documentsView .erp-supply-notice span{color:var(--suite-muted)}
body #appView #documentsView #erpAnalyticsPanel{--biz-ink:var(--suite-text)}
body #appView #documentsView #businessIntelligence{--bai-ink:var(--suite-text);--bai-muted:var(--suite-muted);--bai-border:var(--suite-line);--bai-surface:var(--suite-surface);--bai-tint:var(--suite-soft);--bai-accent:var(--suite-accent)}
body #appView #documentsView :is(.biz-briefing,.biz-priority,.biz-aging>div,.biz-status-grid>div,.biz-quality,.biz-source-grid article,.biz-scenario-result,.biz-volume-totals>div,.biz-chart-detail,.biz-chart-modes,.biz-chart-empty){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #appView #documentsView .biz-kpi{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #appView #documentsView .biz-kpi.biz-primary{background:var(--suite-accent-soft);border-color:var(--suite-accent-line)}
body #appView #documentsView .biz-kpi.biz-primary>strong{color:var(--suite-accent)}
body #appView #documentsView :is(.biz-kpi>span,.biz-kpi>small,.biz-priority p,.biz-method,.biz-ai>p,.biz-volume-totals span,.biz-chart-pager,.biz-chart-data,.biz-rank-name>span,.biz-ranking-total span){color:var(--suite-muted)}
body #appView #documentsView :is(.biz-rank-name strong,.biz-rank-measure span,.biz-chart-detail strong,.biz-chart-detail b,.biz-volume-totals strong){color:var(--suite-text)}
body #appView #documentsView .biz-positive{color:var(--suite-success)}
body #appView #documentsView :is(.biz-negative,.biz-kpi:nth-child(7)>strong){color:var(--suite-danger)}
body #appView #documentsView .biz-rank-measure svg{background:var(--suite-soft)}
body #appView #documentsView .biz-axis-label{fill:var(--suite-muted)}
body #appView #documentsView .biz-chart-gridline{stroke:var(--suite-line)}
body #appView #documentsView .biz-chart-zero{stroke:var(--suite-muted)}
body #appView #documentsView #businessDashboard :is(.biz-chart-legend button,.biz-chart-modes button){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #appView #documentsView #businessDashboard .biz-chart-legend button[aria-pressed=false]{color:var(--suite-muted)}
@media(max-width:760px){body #appView #documentsView .documents-toolbar{margin-inline:0;padding:14px 0 18px}body #appView #documentsView .erp-tabs{margin-inline:0}body #appView #documentsView .erp-supply-grid{padding-bottom:18px}body #appView #documentsView .erp-supply-heading{padding-top:2px}}
@media(prefers-reduced-motion:reduce){body #appView #documentsView .erp-supply-card{transition:none}}
/* Energy remains a dark instrument panel; series and safety colors are intentionally untouched. */
body.energy-view-active{background:#171d22!important}
body .energy-statistics-view{
  --suite-page:#171d22;--suite-surface:#222a30;--suite-soft:#2a333b;--suite-control:#222a30;--suite-text:#eef2f4;--suite-muted:#d2d9de;--suite-line:#3b464e;
  --energy-panel:var(--suite-surface);--energy-line:var(--suite-line);--energy-muted:var(--suite-muted);
  --dyn-bg:var(--suite-page);--dyn-panel:var(--suite-surface);--dyn-panel-2:var(--suite-soft);--dyn-line:var(--suite-line);--dyn-text:var(--suite-text);--dyn-muted:var(--suite-muted);
  color:var(--suite-text);background:var(--suite-page);
}
body .energy-statistics-view .dynamics-app{--dyn-panel:var(--suite-surface);--dyn-panel-deep:var(--suite-page);--dyn-edge:var(--suite-line);--dyn-muted:var(--suite-muted)}
body .energy-statistics-view :is(.dynamics-tabs,.energy-range-buttons,.energy-date-picker>summary,.energy-chart-readout,.energy-analysis-details){background:var(--suite-soft);border-color:var(--suite-line);box-shadow:none}
body .energy-statistics-view :is(.dynamics-meter-panel,.dynamics-frequency-card,.dynamics-meter-grid article,.dynamics-flow-card,.dynamics-balance-card,.dynamics-section-head,.dynamics-placeholder-grid article,.dynamics-help-grid article,.dynamics-phase-grid article){background:var(--suite-surface);border-color:var(--suite-line);box-shadow:none}
body #sessionRecoveryDialog{color:var(--suite-text);background:var(--suite-surface);border-color:var(--suite-line)}
body #sessionRecoveryDialog :is(.session-recovery-status,.session-recovery-fallback){color:var(--suite-muted)}
body #sessionRecoveryDialog .session-recovery-note{background:var(--suite-success-soft);color:var(--suite-success)}
/* Geometric crosses do not depend on a font's baseline. Existing labels and actions are retained. */
body button.ui-icon-close{position:relative;isolation:isolate;align-items:center;justify-content:center;flex:none;padding:0!important;font-size:0!important;line-height:1!important;text-indent:0;letter-spacing:0;color:var(--suite-muted)!important;transform:none!important}
body button.ui-icon-close>span{font-size:0!important}
body button.ui-icon-close::before,body button.ui-icon-close::after{content:""!important;position:absolute!important;z-index:1!important;inset:auto!important;left:50%!important;top:50%!important;width:16px!important;height:2px!important;margin:0!important;border:0!important;border-radius:1px!important;background:currentColor!important;pointer-events:none!important;transform-origin:center!important}
body button.ui-icon-close::before{transform:translate(-50%,-50%) rotate(45deg)!important}
body button.ui-icon-close::after{transform:translate(-50%,-50%) rotate(-45deg)!important}
body button.ui-icon-close:hover::before,body button.ui-icon-close:hover::after{background:currentColor!important}
body button.ui-icon-close:disabled{opacity:.45}
/* Mobile controls keep their existing navigation and touch layout, not legacy white fills. */
body #appView :is(#plannerTenantSelect,#documentsCompanySelect,.pm-planner-selection select,.pm-erp-controls select){background:var(--suite-control);color:var(--suite-text);border-color:var(--suite-line)}
body #appView :is(#plannerSearch,#documentsSearch){background:var(--suite-control)!important;color:var(--suite-text)!important;border-color:var(--suite-line)!important}
body #appView :is(#plannerSearch,#documentsSearch)::placeholder{color:var(--suite-muted);opacity:1}
body #appView #pmPlannerSelection{background:var(--suite-page);color:var(--suite-text);border-color:var(--suite-line)}
body #appView .pm-department-bar small{background:var(--suite-soft);color:var(--suite-muted)}
body #appView .pm-bottom button{color:var(--suite-muted)}
body #appView .pm-bottom button[aria-current=page]{background:var(--suite-accent-soft);color:var(--suite-accent)}
body #appView :is(.pm-planner-selection label,.pm-erp-controls label,#pmErpRange,.pm-back,#documentsCompanyControl>span){color:var(--suite-muted)}
body #appView .pm-erp-controls>button,body #plannerOrderForm .pm-edit-order{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body .pm-order-summary details{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body .pm-order-summary :is(p,dt,.pm-order-notes){color:var(--suite-muted)}
/* Order details share complete surfaces, including legacy nested panels and hints. */
body #plannerOrderForm :is(.planner-attachments,.planner-checklist-field,.p21-customer-panel,.p21-fek-note,.p21-checklist-history){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #plannerOrderForm :is(.planner-intake-photo-rule,.planner-attachment-card,.planner-attachment-empty,.p21-preparation-step){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #plannerOrderForm :is(.planner-attachments>header h3,.planner-attachment-card strong,.planner-attachment-empty strong,.planner-checklist-copy>strong,.p21-customer-heading h3,.p21-customer-grid h4,.p21-customer-panel address){color:var(--suite-text)}
body #plannerOrderForm :is(.planner-attachments>header p,.planner-attachment-controls>label>span,.planner-attachment-status,.planner-attachment-card small,.planner-attachment-empty span,.planner-intake-photo-rule small,.planner-intake-photo-rule>b,.planner-checklist-copy>small,.p21-preparation-step small,.p21-fek-note p,.p21-customer-heading span,.p21-customer-way small,.p21-customer-source,.p21-customer-empty){color:var(--suite-muted)}
body #plannerOrderForm #plannerChecklistChoices label>span{color:var(--suite-text)}
body #plannerOrderForm #plannerChecklistChoices .p21-preparation-step small{color:var(--suite-muted)}
body #plannerOrderForm #plannerChecklistChoices label>i{background:var(--suite-surface);border-color:var(--suite-muted)}
body #plannerOrderForm #plannerChecklistChoices input:checked+i{background:var(--suite-accent);border-color:var(--suite-accent)}
body #plannerOrderForm #plannerChecklistChoices input:checked+i::after{color:var(--suite-page)}
body #plannerOrderForm #plannerChecklistChoices input:focus-visible+i{outline:3px solid var(--suite-accent);outline-offset:3px}
body #plannerOrderForm :is(.planner-attachment-count,.planner-checklist-progress,.planner-intake-photo-rule>span){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerOrderForm :is(.planner-checklist-progress.is-complete,.planner-intake-photo-rule.is-complete,.planner-attachment-card.is-pending){background:var(--suite-success-soft);border-color:var(--suite-accent-line)}
body #plannerOrderForm .planner-intake-photo-rule.is-complete>:is(span,b){background:var(--suite-success-soft);color:var(--suite-success)}
body #plannerOrderForm .planner-intake-photo-rule.is-required{background:var(--suite-warning-soft);border-color:var(--suite-warning)}
body #plannerOrderForm .planner-intake-photo-rule.is-required>:is(span,b){background:var(--suite-warning-soft);color:var(--suite-warning)}
body #plannerOrderForm .p21-fek-note .is-warning{color:var(--suite-warning)}
body #plannerOrderForm :is(.planner-attachment-picker,.planner-attachment-link-add){background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line);box-shadow:none}
body #plannerOrderForm .planner-attachment-picker:hover{background:var(--suite-soft);border-color:var(--suite-accent)}
body #plannerOrderForm .planner-attachment-picker>span{color:var(--suite-accent)}
body #plannerOrderForm .planner-attachment-picker>small{color:var(--suite-muted)}
body #plannerOrderForm .planner-attachment-controls :is(select,input):focus-visible{background:var(--suite-control);outline:3px solid var(--suite-accent);outline-offset:2px}
body #plannerOrderForm .planner-attachment-card :is(a:not(.planner-attachment-preview),button){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerOrderForm .planner-attachment-card .danger{color:var(--suite-danger)}
body #plannerOrderForm :is(.planner-ai-summary header p,.planner-ai-summary>p,.planner-ai-summary details p,.planner-subtasks header p,.planner-subtask-empty,.p21-workflow-form .p21-handover-roe-note){color:var(--suite-muted);border-color:var(--suite-line)}
body #plannerOrderForm #plannerScheduleHint{background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line)}
body #plannerOrderForm #plannerScheduleHint.is-warning{background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body #plannerOrderForm .planner-subtask-row.is-complete{background:var(--suite-success-soft);border-color:var(--suite-accent-line)}
body #plannerOrderForm .planner-subtask-row.is-complete input{color:var(--suite-muted)}
body #plannerOrderForm .planner-subtask-completed i{background:var(--suite-surface);border-color:var(--suite-muted)}
body #plannerOrderForm .planner-subtask-completed input:checked+i{background:var(--suite-accent);border-color:var(--suite-accent)}
body #plannerOrderForm .planner-subtask-completed input:checked+i::after{color:var(--suite-page)}
body #plannerOrderForm .planner-subtask-completed input:focus-visible+i{outline:3px solid var(--suite-accent);outline-offset:3px}
body #plannerOrderForm :is(.p21-customer-way a,.p21-fek-note a){color:var(--suite-accent)}
body #plannerOrderForm .planner-people-field input:checked+span{background:var(--suite-accent-soft);color:var(--suite-text);border-color:var(--suite-accent);box-shadow:none}
body #plannerOrderForm :is(.p21-customer-source,.planner-card-meta){border-color:var(--suite-line)}
body #plannerOrderDialog .planner-syntax-preview code{background:var(--suite-surface);color:var(--suite-muted);border-color:var(--suite-line)}
body #plannerOrderDialog .p21-order-shortcuts button{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerOrderDialog .p21-order-shortcuts a{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
/* The administration navigation needs its own labels, not only the button color. */
body #customizePanel :is(.customize-content,.admin-page-content){background:var(--suite-page);color:var(--suite-text)}
body #customizePanel .admin-tabs{background:var(--suite-surface);border-color:var(--suite-line)}
body #customizePanel :is(.admin-tabs button strong,.admin-menu-toggle strong,.user-identity strong,.user-department-section>header strong,.user-create-form>header strong){color:var(--suite-text)}
body #customizePanel :is(.admin-tabs>p,.admin-tabs button small,.admin-menu-toggle small,.admin-company-context>small,.admin-command-title>span,.user-admin-toolbar label>span,.user-identity>small,.user-department-section>header small,.user-create-form>header small){color:var(--suite-muted)}
body #customizePanel .admin-tabs button{background:transparent;border-color:transparent;box-shadow:none}
body #customizePanel .admin-tabs button:hover:not(:disabled){background:var(--suite-soft);border-color:var(--suite-line)}
body #customizePanel .admin-tabs button.active{background:var(--suite-accent-soft);border-color:var(--suite-accent-line)}
body #customizePanel .admin-tabs button.active strong{color:var(--suite-accent)}
body #customizePanel .admin-nav-icon{background:var(--suite-soft);color:var(--suite-text);border:1px solid var(--suite-line)}
body #customizePanel .admin-tabs button.active .admin-nav-icon{background:var(--suite-accent);color:var(--suite-page);border-color:var(--suite-accent)}
body #customizePanel :is(.admin-menu-toggle,.admin-company-context>span,.user-admin-toolbar,.user-department-section>header){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #customizePanel :is(.user-department-section,.user-account-menu>summary){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #customizePanel .user-memberships b{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body #customizePanel :is(.security-state,.settings-title-row>div>p,.user-admin-empty,.user-admin-empty span){color:var(--suite-muted)}
body #customizePanel .security-state{background:var(--suite-soft);border-color:var(--suite-line)}
body #customizePanel :is(.planner-config-body,.planner-department-body){background:var(--suite-page)}
/* Complete nested administration surfaces. Pair every fill with readable text;
   never change visibility, selected values, permissions or stored brand colors. */
body :is(.branding-live-preview,.upload-field,.waste-upload-field,.waste-import-status,.security-notice,
  .tool-card-editor,.planner-create-form,.planner-admin-card,.user-create-form,.inline-create-form,
  .role-choice-fieldset,.role-choice-list label,.api-endpoints div,.storage-rules div,.live-preview,
  .shelly-edge-console,.shelly-edge-panel,.shelly-edge-switch>label,.microsoft-compose,
  .backup-target-card,.backup-recovery-card,.backup-history-card,.backup-automatic-card,
  .backup-scope-grid article,.backup-coverage-strip>div,.backup-enable-control,.backup-progress,.backup-history-row,
  .planner-storage-control,.planner-storage-metrics>div,.storage-overview-strip>div,
  .organization-hierarchy-note,.organization-onboarding,.organization-admin-form,
  .person-editor-section,.organization-assignment-fieldset,.organization-assignment-row,.organization-person-assignments article,
  .tenant-access-panel,.tenant-access-item,.permission-module-list,.permission-module-detail,
  .permission-visibility-switch,.permission-detail-row,.permission-advanced-button,.permission-savebar,
  .permission-group-card,.permission-group-card>header,.permission-parent,.system-session-list,.system-kpi-grid article,
  .organization-tree-company,.organization-tree-company>header,.organization-tree-department,.organization-tree-person,
  .organization-unlinked-users,.organization-unlinked-users article){
  background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
body #customizePanel :where(label,legend,p,small,li,dt){color:var(--suite-muted)}
body #customizePanel :where(h2,h3,h4,strong,b,dd){color:var(--suite-text)}
body #customizePanel .admin-tabs button.active strong{color:var(--suite-text)}
body .organization-person-dialog .organization-assignment-fieldset,
body #customizePanel .permission-detail-row.parent{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body .system-session-list :is(header,article){border-color:var(--suite-line)}
body :is(.system-session-list,.system-kpi-grid) :is(small,time,span){color:var(--suite-muted)}
body :is(.organization-tree-company,.organization-tree-department,.organization-tree-person) :is(small,em,.organization-supervisor){color:var(--suite-muted)}
body :is(.organization-tree-branch,.organization-tree-branch::before){border-color:var(--suite-line)}
body #customizePanel .organization-tree-actions .organization-add-department{background:var(--suite-accent-soft);color:var(--suite-text);border-color:var(--suite-accent-line)}
body #customizePanel :is(.integration-consumers span,.tenant-access-panel>header>span){background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line)}
body #customizePanel :is(.settings-kicker,.api-endpoints span,.permission-module-button>i){color:var(--suite-muted)}
body #customizePanel .organization-hierarchy-note b{background:var(--suite-surface);color:var(--suite-text)}
body #customizePanel .organization-hierarchy-note i{color:var(--suite-muted)}
body #customizePanel .user-memberships b{color:var(--suite-text)}
body #customizePanel .user-memberships b.is-missing{background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body #customizePanel .organization-unlinked-users>header small{color:var(--suite-warning)}
body #customizePanel :is(.branding-live-preview small,.branding-live-preview span,.branding-upload small,
  .waste-upload-field small,.waste-import-status,.settings-help,.integration-card small,
  .shelly-edge-credentials>label,.shelly-edge-console>header small,.visibility-row small,
  .role-row small,.permission-detail-row small,.permission-module-button small,
  .permission-detail-identity p,.permission-detail-identity small,.tenant-access-notice,
  .tenant-access-item small,.storage-rules small,.storage-budget-progress>span,
  .planner-storage-metrics span,.planner-storage-metrics small,.storage-control-status,
  .planner-storage-control>footer,.backup-history-row>span,.backup-scope-grid span){color:var(--suite-muted)}
body #customizePanel :is(.branding-live-preview strong,.shelly-edge-switch strong,
  .permission-module-button strong,.permission-detail-row strong,.tenant-access-item strong){color:var(--suite-text)}
body .branding-live-preview::after{background:none;box-shadow:none}
body :is(input[type=color],input[type=file]){background:var(--suite-control);color:var(--suite-text);border:1px solid var(--suite-line);border-radius:var(--suite-control-radius);box-shadow:none}
body input[type=color]{min-height:44px;padding:5px;box-sizing:border-box}
body input[type=color]::-webkit-color-swatch-wrapper{padding:0}
body input[type=color]::-webkit-color-swatch{border:0;border-radius:7px}
body input[type=color]::-moz-color-swatch{border:0;border-radius:7px}
body input[type=file]::file-selector-button{margin-right:10px;padding:7px 10px;border:1px solid var(--suite-line);border-radius:8px;background:var(--suite-soft);color:var(--suite-text);font:inherit;cursor:pointer}
body input[type=file]::file-selector-button:hover{background:var(--suite-accent-soft);border-color:var(--suite-accent-line)}
body :is(.security-notice,.organization-hierarchy-note,.organization-assignment-fieldset,.role-choice-fieldset,.permission-detail-header,.shelly-edge-console>header,.visibility-row,.role-row,.permission-row,.security-toggle-list>label){border-color:var(--suite-line)}
body .security-notice{border-left-color:var(--suite-accent);color:var(--suite-muted)}
body :is(.shelly-edge-credentials button,.storage-budget-save,.row-action,.user-status-button){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body :is(.shelly-edge-credentials button,.storage-budget-save,.row-action,.user-status-button):hover:not(:disabled){background:var(--suite-accent-soft);border-color:var(--suite-accent-line)}
body :is(.shelly-edge-console>header>span,.shelly-edge-panel span,.backup-target-state){background:var(--suite-surface);color:var(--suite-muted);border-color:var(--suite-line)}
body :is(.shelly-edge-console>header>span.is-live,.backup-target-state.is-ready,.storage-backup-state){background:var(--suite-success-soft);color:var(--suite-success);border-color:var(--suite-accent-line)}
body :is(.shelly-edge-console>header>span.is-waiting,.backup-target-state.is-warning){background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body :is(.backup-target-state.is-error,.danger-button,.user-delete-button,.user-status-button.danger){background:var(--suite-danger-soft);color:var(--suite-danger);border-color:var(--suite-danger)}
body :is(.danger-button,.user-delete-button,.user-status-button.danger):hover:not(:disabled){background:var(--suite-danger-soft);color:var(--suite-danger);border-color:var(--suite-danger)}
body #customizePanel :is(.role-choice-list label:has(input:checked),.tenant-access-item.base,.permission-module-button.active){background:var(--suite-accent-soft);color:var(--suite-text);border-color:var(--suite-accent-line);box-shadow:none}
body #customizePanel .permission-module-button{color:var(--suite-text)}
body #customizePanel .permission-module-button:hover{background:var(--suite-soft)}
body #customizePanel .permission-checkbox-control i{background:var(--suite-surface);border-color:var(--suite-muted);box-shadow:none}
body #customizePanel .permission-checkbox-control input:is(:checked,:indeterminate)+i{background:var(--suite-accent);border-color:var(--suite-accent)}
body #customizePanel .permission-checkbox-control input:checked+i::after{border-color:var(--suite-page)}
body #customizePanel .permission-checkbox-control input:indeterminate+i::after{background:var(--suite-page)}
body #customizePanel .permission-checkbox-control input:focus-visible+i{outline:3px solid var(--suite-accent);outline-offset:3px}
body :is(.storage-budget-progress,.backup-progress) progress{background:var(--suite-line);color:var(--suite-accent);accent-color:var(--suite-accent)}
body :is(.storage-budget-progress,.backup-progress) progress::-webkit-progress-bar{background:var(--suite-line)}
body :is(.storage-budget-progress,.backup-progress) progress::-webkit-progress-value{background:var(--suite-accent)}
body :is(.storage-budget-progress,.backup-progress) progress::-moz-progress-bar{background:var(--suite-accent)}
body .organization-person-dialog{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:var(--suite-shadow)}
body .organization-person-dialog :is(header,footer){background:var(--suite-soft);border-color:var(--suite-line)}
body :is(.organization-person-dialog,.organization-person-detail) :is(label,p,small,span,legend){color:var(--suite-muted)}
body :is(.organization-person-dialog,.organization-person-detail) :is(h3,h4,strong){color:var(--suite-text)}
body .organization-company-description-text{color:var(--suite-muted)!important}
body :is(.organization-company-website,.organization-person-profile a){color:var(--suite-accent)}
body #customizePanel :is(.branding-live-preview,.tool-card-editor-fields,.shelly-edge-console,.shelly-edge-credentials>label,.planner-create-form,.role-choice-fieldset){min-width:0;overflow-wrap:anywhere}
body #customizePanel .branding-live-preview strong{white-space:normal;overflow-wrap:anywhere}
body #customizePanel :is(.branding-upload input,.waste-upload-field input){max-width:100%;min-width:0;box-sizing:border-box}
body :is(.planner-config-dialog,.planner-department-dialog) :is(.planner-config-presets,.planner-config-field,.planner-department-create,.planner-department-overview,#plannerDepartmentList article){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body :is(.planner-config-dialog,.planner-department-dialog) :is(p,label>span,small,.planner-config-index,.planner-config-flags>small,.planner-config-suggestions small){color:var(--suite-muted)}
body .planner-config-dialog .planner-config-body{background:var(--suite-page)}
body .planner-config-dialog .planner-config-field.is-hidden{background:var(--suite-soft)}
/* Complete the legacy material, account, totals and chart components, not just their outer cards. */
body :is(.p21-material-panel,.p21-material-line,.account-card,.dashboard-info-dialog,.roe-tenant-notice){background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
body :is(.p21-material-config-flow li,.p21-material-legacy,.roe-summary-time span,.roe-summary-values span){background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body .p21-material-state{background:var(--suite-accent-soft);color:var(--suite-muted);border-color:var(--suite-accent-line)}
body :is(.p21-material-state strong,.p21-material-config-flow span){color:var(--suite-text)}
body .p21-material-config-flow b{background:var(--suite-accent-soft);color:var(--suite-accent);border-color:var(--suite-accent-line)}
body .p21-material-line>button{background:var(--suite-danger-soft);color:var(--suite-danger);border-color:var(--suite-danger)}
body #plannerOrderForm #plannerMaterials .p21-material-line>button{background:var(--suite-danger-soft);color:var(--suite-danger);border-color:var(--suite-danger)}
body .p21-material-settings fieldset{background:var(--suite-surface);border-color:var(--suite-line)}
body :is(.p21-material-settings,.p21-material-panel) :is(input[type=checkbox],input[type=radio]){accent-color:var(--suite-accent)}
body #portalAlerts #portalAlertsSummary{color:var(--suite-muted)}
body #dashboardView :is(#dashboardRoePeriod,.dashboard-roe-worktime small,.dashboard-roe-worktime-title span,.dashboard-roe-total small){color:var(--suite-muted)}
body #dashboardView :is(.dashboard-roe-worktime strong,.dashboard-roe-total strong){color:var(--suite-text)}
body #dashboardView .dashboard-roe-total>a{color:var(--suite-accent)}
body .roe-summary-body :is(small,p){color:var(--suite-muted)}
body .roe-summary-body strong{color:var(--suite-text)}
body .roe-summary-link{background:var(--suite-soft);color:var(--suite-accent);border-color:var(--suite-line)}
body #toolsView .module-meta>span{background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line)}
body #toolsView .module-card>a,body #toolsView .module-card>a span{color:var(--suite-accent)}
body #toolsView .module-symbol,body #roeView .roe-app-mark{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line);box-shadow:none}
body #profileView .account-avatar{background:var(--suite-soft);color:var(--suite-text)}
body #profileView :is(.account-card small,.account-card div>span,.account-session-note,.account-preference-card p,.account-toggle small,.account-password-card p){color:var(--suite-muted)}
body #profileView .account-card strong{color:var(--suite-text)}
body #plannerOrderForm #plannerChecklistChoices>label{background:var(--suite-soft);color:var(--suite-text);border-color:var(--suite-line)}
body #plannerOrderForm #plannerChecklistChoices>label:has(input:checked){background:var(--suite-accent-soft);color:var(--suite-text);border-color:var(--suite-accent-line)}
body #documentsView .documents-readonly,body #roeView .roe-readonly{background:var(--suite-soft);color:var(--suite-muted);border-color:var(--suite-line)}
body #documentsView :is(.erp-chart-card header small,.erp-donut span,.erp-donut-layout li,.erp-donut-layout li span){color:var(--suite-muted)}
body #documentsView :is(.erp-donut strong,.erp-donut-layout li strong){color:var(--suite-text)}
body #documentsView .erp-donut::after{background:var(--suite-surface);box-shadow:none}
body #roeView :is(.roe-app-title p,.roe-tenant-switcher span,.roe-tab-panel>header p,.roe-tab-panel>p,.roe-tenant-notice p,.roe-annual-heading p){color:var(--suite-muted)}
body .energy-statistics-view #energyStatisticsLive{background:var(--suite-success-soft);color:var(--suite-success);border-color:var(--suite-accent-line)}
body .energy-statistics-view #energyStatisticsLive.is-offline{background:var(--suite-warning-soft);color:var(--suite-warning);border-color:var(--suite-warning)}
body .energy-statistics-view :is(.dynamics-flow-card>header small,.dynamics-balance-card>header small){color:var(--suite-muted)}
/* Use the available laptop space instead of oversized gutters and stretched single cards. */
@media(min-width:1025px) and (max-width:1600px){
  body #appView{grid-template-columns:216px minmax(0,1fr)}
  body #appView>.sidebar{width:216px;padding:22px 16px}
  body #appView>.sidebar .main-nav{margin-top:30px;gap:5px}
  body #appView>.sidebar .main-nav a{padding:10px 12px;min-height:44px;font-size:14px;gap:10px;white-space:nowrap}
  body #appView>.sidebar .main-nav a>span{flex:0 0 26px;width:26px}
  body #appView>.workspace{padding:22px 24px 48px}
  body #plannerView .tenant-planner-heading{grid-template-columns:minmax(220px,1fr) minmax(220px,270px) 284px;gap:16px;margin-bottom:16px}
  body #plannerView .tenant-planner-heading h2{font-size:28px;line-height:1.2}
  body #plannerView .tenant-planner-heading :is(p,.eyebrow){font-size:13px;line-height:1.45}
  body #plannerView .tenant-planner-heading .eyebrow{font-size:11px;letter-spacing:.1em}
  body #plannerView .tenant-planner-heading-actions{display:grid;grid-template-columns:1fr 1fr;grid-column:auto;gap:8px}
  body #plannerView .tenant-planner-heading-actions>button{width:100%;min-height:40px;padding:8px 10px;font-size:13px;white-space:nowrap}
  body #plannerView .planner-tenant-select-shell{min-height:44px}
  body #plannerView .planner-tenant-select-shell select{height:42px;font-size:14px}
  body #plannerView .tenant-planner-toolbar{gap:12px;padding:12px;align-items:center}
  body #plannerView .tenant-planner-toolbar>div{flex:none}
  body #plannerView .tenant-planner-toolbar button{padding:0 12px;min-height:38px;font-size:13px}
  body #plannerView .tenant-planner-toolbar input{min-height:42px;font-size:14px}
  body #plannerView .tenant-planner-toolbar label span{font-size:12px}
  body #plannerView .p21-workspace{grid-template-columns:156px minmax(0,1fr);gap:14px}
  body #plannerDepartmentNav{padding:10px;gap:4px}
  body #plannerDepartmentNav h3{font-size:11px;padding:3px 6px;margin:0 0 4px}
  body #plannerDepartmentNav button{padding:9px 8px;font-size:12px;min-height:40px}
  body #customizePanel{inset:12px}
  body #customizePanel .customize-content{grid-template-columns:224px minmax(0,1fr)}
  body #customizePanel .admin-tabs{padding:12px 10px 22px}
  body #customizePanel .admin-tabs button{gap:8px;padding:8px;min-height:52px}
  body #customizePanel .admin-tabs button strong{font-size:14px}
  body #customizePanel .admin-tabs button small{font-size:11px;font-weight:400}
  body #customizePanel .admin-tabs>p{font-size:11px}
  body #customizePanel .admin-page-content{padding:20px 22px 32px}
  body #customizePanel .user-admin-toolbar{grid-template-columns:minmax(180px,1.3fr) minmax(140px,1fr) minmax(140px,1fr) auto}
  body #customizePanel .user-department-section .user-row{grid-template-columns:minmax(180px,1fr) minmax(140px,.65fr) minmax(210px,1fr)}
}
@media(min-width:1025px){
  body #plannerView #plannerBoard:not(.is-list):not(.is-dashboard):not(.is-schedule){grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:14px}
  body #plannerView #plannerBoard:not(.is-dashboard):not(.is-schedule):has(>.tenant-planner-column:only-child){grid-template-columns:minmax(0,1fr)}
  body #plannerView #plannerBoard:not(.is-dashboard):not(.is-schedule)>.tenant-planner-column:only-child>.tenant-planner-cards{grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr));align-items:start}
  body #plannerView #plannerBoard.is-list .tenant-planner-cards{grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr));align-items:start}
  body #plannerBoard .tenant-planner-column>header{min-height:48px;padding:12px 14px}
  body #plannerBoard .p21-column-sort{gap:5px;margin:8px 12px 10px;padding:0;font-size:12px}
  body #plannerBoard .p21-column-sort select{min-height:40px;font-size:13px;padding:8px 10px}
  body #plannerBoard .p21-bucket-add{min-height:38px;padding:8px 12px;font-size:14px}
  body #plannerBoard .tenant-planner-card{min-height:0;gap:8px;padding:14px;transform:none}
  body #plannerBoard .tenant-planner-card>strong{min-height:0;font-size:15px;line-height:1.45}
  body #plannerBoard .tenant-planner-card .planner-card-activity{min-height:0;line-height:1.5}
  body #plannerBoard .p21-workflow-actions{margin-top:4px;gap:8px}
  body #plannerBoard .p21-workflow-actions button{min-height:34px;padding:6px 10px}
  body #plannerOrderDialog{width:min(1120px,calc(100vw - 40px));max-height:calc(100dvh - 32px)}
  body #plannerOrderForm{max-height:calc(100dvh - 34px)}
  body #plannerOrderForm>header{padding:16px 22px}
  body #plannerOrderForm>.tenant-planner-dialog-body{padding:20px 22px;gap:18px}
  body #plannerOrderForm>footer{padding:12px 22px}
}
@media(max-width:1024px){body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),body select,body textarea{font-size:16px!important}}
@media(max-width:600px){body :is(.tenant-planner-dialog,.customize-panel,.sheet){border-radius:0}body .pm-sheet{border-radius:22px 22px 0 0}}
@media(prefers-reduced-motion:reduce){body :is(.module-card,.primary-button,.secondary-button){transition:none;transform:none}}
@media print{
  :root{color-scheme:light;--suite-page:#fff;--suite-surface:#fff;--suite-soft:#fff;--suite-text:#000;--suite-muted:#333;--suite-line:#bbb;--suite-shadow:none}
  body{background:#fff!important;color:#000!important}
}
/* 21Dynamics: size the flow to its card, never to a fixed 760px canvas. */
body .energy-statistics-view .dynamics-main{min-width:0}
body .energy-statistics-view .dynamics-live-layout{grid-template-columns:minmax(0,1fr) minmax(260px,300px);gap:16px;align-items:stretch}
body .energy-statistics-view :is(.dynamics-flow-card,.dynamics-balance-card){min-width:0;min-height:0}
body .energy-statistics-view .dynamics-flow-card{container-type:inline-size;overflow:visible}
body .energy-statistics-view .dynamics-flow-stage{box-sizing:border-box;min-width:0;width:auto;min-height:440px;margin:14px 22px 0}
body .energy-statistics-view .dynamics-map-node{max-width:100%;overflow-wrap:anywhere}
body .energy-statistics-view .dynamics-map-node small{font-size:11px;line-height:1.4}
body .energy-statistics-view .dynamics-map-node strong{font-size:24px;line-height:1.25;font-variant-numeric:tabular-nums}
body .energy-statistics-view .dynamics-map-node span{font-size:12px;line-height:1.45}
body .energy-statistics-view .dynamics-map-node.node-pv{top:8%}
body .energy-statistics-view .dynamics-map-node.node-grid{bottom:8%}
body .energy-statistics-view .dynamics-map-node.node-hub{width:148px;height:148px}
body .energy-statistics-view .dynamics-map-node.node-hub strong{font-size:14px}
body .energy-statistics-view .dynamics-map-node.node-hub span{font-size:11px}
body .energy-statistics-view .dynamics-flow-label{font-size:11px;line-height:1.35;max-width:180px;white-space:normal}
body .energy-statistics-view .dynamics-flow-label.label-pv{top:5%;left:30%}
body .energy-statistics-view .dynamics-flow-label.label-grid{bottom:5%;left:30%}
body .energy-statistics-view .dynamics-flow-label.label-home{top:16%;right:4%}
body .energy-statistics-view .dynamics-flow-label.label-battery{bottom:8%;left:65%}
body .energy-statistics-view .dynamics-balance-card dl{min-width:0}
body .energy-statistics-view .dynamics-balance-card dl div{min-width:0;grid-template-columns:minmax(0,1fr) auto}
body .energy-statistics-view .dynamics-balance-card :is(dt,dd){overflow-wrap:anywhere}
@media(max-width:1280px){
  body .energy-statistics-view .dynamics-live-layout{grid-template-columns:minmax(0,1fr)}
  body .energy-statistics-view .dynamics-balance-card{margin-top:0;padding-bottom:18px}
  body .energy-statistics-view .dynamics-balance-card>header{padding:18px 22px 0}
  body .energy-statistics-view .dynamics-balance-card dl{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px;margin:16px 22px 0}
  body .energy-statistics-view .dynamics-balance-card dl div{display:block;padding:12px;border-bottom:0;background:var(--suite-soft);border-radius:10px}
  body .energy-statistics-view .dynamics-balance-card dt{font-size:13px;line-height:1.45}
  body .energy-statistics-view .dynamics-balance-card dd{margin:8px 0 0;font-size:20px;line-height:1.3}
  body .energy-statistics-view .dynamics-command-hero{min-height:0;padding:22px;gap:20px}
  body .energy-statistics-view .dynamics-command-hero h1{font-size:28px}
  body .energy-statistics-view .dynamics-command-hero>div:last-child strong{font-size:32px}
  body .energy-statistics-view .dynamics-tabs{margin-bottom:18px}
}
/* The same compact mode works inside the intranet's narrower content column. */
@container(max-width:720px){
  body .energy-statistics-view .dynamics-flow-stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"pv grid" "hub hub" "home battery";gap:12px;min-height:0;padding:18px 14px}
  body .energy-statistics-view :is(.dynamics-energy-routes,.dynamics-flow-label){display:none}
  body .energy-statistics-view .dynamics-map-node{position:relative!important;inset:auto!important;width:auto!important;height:auto;min-height:0;transform:none!important;padding:14px}
  body .energy-statistics-view .dynamics-map-node.node-pv{grid-area:pv}
  body .energy-statistics-view .dynamics-map-node.node-grid{grid-area:grid}
  body .energy-statistics-view .dynamics-map-node.node-hub{grid-area:hub;width:126px!important;height:126px;justify-self:center;margin:8px 0}
  body .energy-statistics-view .dynamics-map-node.node-home{grid-area:home}
  body .energy-statistics-view .dynamics-map-node.node-battery{grid-area:battery}
}
/* Fallback for browsers without container queries; keep every value readable. */
@media(max-width:900px){
  body .energy-statistics-view .dynamics-flow-stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"pv grid" "hub hub" "home battery";gap:12px;min-height:0;padding:18px 14px;margin:14px 0 0}
  body .energy-statistics-view :is(.dynamics-energy-routes,.dynamics-flow-label){display:none}
  body .energy-statistics-view .dynamics-flow-card{padding:18px 14px}
  body .energy-statistics-view .dynamics-flow-card>header{padding:0}
  body .energy-statistics-view .dynamics-map-node{position:relative!important;inset:auto!important;width:auto!important;height:auto;min-height:0;transform:none!important;padding:14px}
  body .energy-statistics-view .dynamics-map-node.node-pv{grid-area:pv}
  body .energy-statistics-view .dynamics-map-node.node-grid{grid-area:grid}
  body .energy-statistics-view .dynamics-map-node.node-hub{grid-area:hub;width:126px!important;height:126px;justify-self:center;margin:8px 0}
  body .energy-statistics-view .dynamics-map-node.node-home{grid-area:home}
  body .energy-statistics-view .dynamics-map-node.node-battery{grid-area:battery}
  body .energy-statistics-view .dynamics-flow-priority{margin:12px 0 0;max-width:100%;font-size:12px;white-space:normal;border-radius:12px}
  body .energy-statistics-view .dynamics-flow-explanation{margin:12px 0 0}
  body .energy-statistics-view .dynamics-balance-card dl{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:600px){
  body .energy-statistics-view .dynamics-map-node{padding:12px}
  body .energy-statistics-view .dynamics-map-node strong{font-size:20px}
  body .energy-statistics-view .dynamics-map-node.node-hub strong{font-size:14px}
  body .energy-statistics-view .dynamics-command-hero{display:grid;grid-template-columns:minmax(0,1fr);padding:18px;gap:16px}
  body .energy-statistics-view .dynamics-command-hero>div:last-child{text-align:left}
  body .energy-statistics-view .dynamics-command-hero h1{font-size:24px}
  body .energy-statistics-view .dynamics-balance-card dl{margin-inline:14px;gap:10px}
}
/* Portal navigation: one active row, scalable symbols and a reachable account area. */
body .sidebar .main-nav.liquid-nav-slider::before{content:none;box-shadow:none;background:none}
body .sidebar .main-nav a>span svg{display:block;width:20px;height:20px;flex:none}
body .suite-settings-button{font:inherit;font-size:14px;font-weight:600;line-height:20px;cursor:pointer}
body .suite-settings-button svg{display:block;width:20px;height:20px;flex:none}
/* Administration must cover the fixed mobile header and bottom navigation. */
body #panelBackdrop{z-index:199}
body #customizePanel{z-index:200}
@media(min-width:1025px){
  body #appView{grid-template-columns:216px minmax(0,1fr)}
  body #appView>.sidebar{box-sizing:border-box;width:216px;height:100dvh;max-height:100dvh;min-height:0;padding:20px 14px 16px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:18px;overflow:hidden}
  body #appView>.sidebar::before{content:none}
  body #appView>.sidebar .brand{min-width:0;min-height:52px;margin:0;gap:10px;align-self:start}
  body #appView>.sidebar .brand-mark{flex:none;width:40px;height:40px;font-size:13px}
  body #appView>.sidebar .brand-mark.custom-logo{width:168px;max-width:100%;height:52px;background-position:left center}
  body #appView>.sidebar .brand>span:last-child{min-width:0}
  body #appView>.sidebar .brand :is(strong,small){overflow-wrap:anywhere}
  body #appView>.sidebar .brand strong{font-size:14px;line-height:1.35}
  body #appView>.sidebar .brand small{font-size:11px;line-height:1.4}
  body #appView>.sidebar .main-nav{min-height:0;margin:0;padding:0;gap:4px;align-content:start;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#697579 transparent;border:0;border-radius:0}
  body #appView>.sidebar .main-nav a{box-sizing:border-box;min-height:44px;height:44px;padding:7px 10px;margin:0;gap:10px;border:1px solid transparent;border-radius:10px;font-size:14px;font-weight:600;line-height:20px;white-space:nowrap;transform:none;color:var(--suite-sidebar-text)}
  body #appView>.sidebar .main-nav a:hover{background:#ffffff09;border-color:transparent}
  body #appView>.sidebar .main-nav a:is(.active,[aria-current=page]){background:var(--suite-sidebar-active);color:#fff;border-color:transparent;box-shadow:inset 3px 0 0 #bdd6cf}
  body #appView>.sidebar .main-nav a>span{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;padding:0;border:0;border-radius:7px;background:transparent;color:#d2d9de;box-shadow:none}
  body #appView>.sidebar .main-nav a:is(.active,[aria-current=page])>span{background:transparent;color:#fff;border:0;box-shadow:none}
  body #appView>.sidebar .sidebar-footer{min-width:0;margin:0;padding:12px 0 0;display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:10px 8px;align-items:center;border-color:#ffffff18}
  body #appView>.sidebar .sidebar-settings{grid-column:1/-1;display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:10px;border:1px solid #ffffff1c;border-radius:10px;color:var(--suite-sidebar-text);background:transparent;box-shadow:none}
  body #appView>.sidebar .sidebar-settings:hover{background:#ffffff09;border-color:#ffffff35}
  body #appView>.sidebar .sidebar-account{min-width:0;gap:8px;transform:none}
  body #appView>.sidebar .sidebar-account .user-avatar{flex:0 0 32px;width:32px;height:32px;font-size:11px;box-shadow:none}
  body #appView>.sidebar .sidebar-account strong{font-size:12px;line-height:1.4}
  body #appView>.sidebar .sidebar-account small{font-size:11px;line-height:1.4;color:#d2d9de}
  body #appView>.sidebar .logout-button{width:36px;height:36px;min-height:36px;margin:0;padding:0;display:grid;place-items:center;border:1px solid #ffffff1c;border-radius:9px;background:transparent;color:#f4f6f7;box-shadow:none;transform:none}
  body #appView>.sidebar .logout-button svg{width:18px;height:18px}
}
@media(max-width:1024px){
  body #mobileNav.liquid-nav-slider{background:var(--suite-surface);color:var(--suite-text);border-color:var(--suite-line);box-shadow:var(--suite-shadow);-webkit-backdrop-filter:none;backdrop-filter:none}
  body #mobileNav.liquid-nav-slider::before{content:none;background:none;box-shadow:none}
  body #mobileNav.liquid-nav-slider :is(a,button){color:var(--suite-muted);background:transparent;border:0;box-shadow:none}
  body #mobileNav.liquid-nav-slider :is(a,button):is(.active,[aria-current=page]){color:var(--suite-text);background:var(--suite-accent-soft);box-shadow:none}
  body #mobileNav.liquid-nav-slider :is(a,button) small{color:inherit}
  body .mobile-account-link{color:var(--suite-text);background:var(--suite-soft);border-color:var(--suite-line);box-shadow:none}
  body .mobile-account-link small{color:var(--suite-muted)}
  :root:not([data-theme=light]) body .mobile-brand .brand-mark.custom-logo{filter:invert(1)}
  body .mobile-header-actions .suite-settings-button{width:42px;height:42px;min-height:42px;padding:0;display:grid;place-items:center;border:1px solid var(--suite-line);border-radius:10px;background:var(--suite-surface);color:var(--suite-text);box-shadow:none}
  body .mobile-header-actions .suite-settings-button:hover{background:var(--suite-soft)}
  body .mobile-brand .brand-mark.custom-logo{width:clamp(86px,25vw,120px);height:36px}
  body .mobile-header-actions{min-width:0;gap:6px}
  body .mobile-account-link{min-width:0}
  body .mobile-account-link strong{max-width:60px}
}
