/* CCH Design System v3.0.2 – Direction A / Premium Dark / unified canvas */
:root {
  color-scheme: dark;
  --cch-v3-bg: #07111b;
  --cch-v3-bg-deep: #050c14;
  --cch-v3-sidebar: #0a1724;
  --cch-v3-surface: #0d1b29;
  --cch-v3-surface-raised: #112334;
  --cch-v3-surface-hover: #152b3e;
  --cch-v3-line: rgba(151, 184, 211, .14);
  --cch-v3-line-strong: rgba(104, 205, 255, .32);
  --cch-v3-text: #f5f9fc;
  --cch-v3-text-soft: #c7d5e1;
  --cch-v3-muted: #8296a9;
  --cch-v3-accent: #25bdf3;
  --cch-v3-accent-soft: rgba(37, 189, 243, .13);
  --cch-v3-success: #45d48a;
  --cch-v3-warning: #ffad45;
  --cch-v3-danger: #ff5f67;
  --cch-v3-info: #4399ff;
  --cch-v3-radius-sm: 10px;
  --cch-v3-radius-md: 14px;
  --cch-v3-radius-lg: 18px;
  --cch-v3-shadow: 0 18px 44px rgba(0, 0, 0, .22);
  --cch-v3-focus: 0 0 0 3px rgba(37, 189, 243, .32);
  --cch-v3-sidebar-width: 214px;
  --cch-v3-content-max: 1320px;
  --cch-shell-gutter-desktop: 5vw;
  --cch-shell-content-width-desktop: 90vw;
  --cch-v3-space-1: 4px;
  --cch-v3-space-2: 8px;
  --cch-v3-space-3: 12px;
  --cch-v3-space-4: 16px;
  --cch-v3-space-5: 20px;
  --cch-v3-space-6: 24px;
  --cch-v3-space-8: 32px;
}
* { box-sizing: border-box; }
html { background: var(--cch-v3-bg); }
body.cch-design-v3 {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at 68% -20%, rgba(31, 105, 151, .16), transparent 36rem), var(--cch-v3-bg);
  color: var(--cch-v3-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.cch-design-v3 #cchTopnavMount {
  background: var(--cch-v3-bg);
}
body.cch-design-v3 :where(button, input, select, textarea) { font: inherit; }
body.cch-design-v3 :where(a) { color: inherit; }
body.cch-design-v3 :where(button, a, input, select, textarea):focus-visible { outline: none; box-shadow: var(--cch-v3-focus); }
.cch-v3-skip-link { position: fixed; top: 8px; left: 8px; z-index: 10000; transform: translateY(-150%); padding: 10px 14px; border-radius: var(--cch-v3-radius-sm); background: var(--cch-v3-accent); color: #03121b; font-weight: 800; }
.cch-v3-skip-link:focus { transform: none; }
.cch-v3-card { min-width: 0; border: 1px solid var(--cch-v3-line); border-radius: var(--cch-v3-radius-lg); background: linear-gradient(180deg, rgba(16, 35, 52, .9), rgba(11, 25, 38, .96)); box-shadow: 0 1px 0 rgba(255, 255, 255, .02); }
.cch-v3-button { min-height: 42px; padding: 9px 14px; border: 1px solid var(--cch-v3-line); border-radius: var(--cch-v3-radius-sm); background: var(--cch-v3-surface-raised); color: var(--cch-v3-text); font-weight: 750; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.cch-v3-button:hover { border-color: var(--cch-v3-line-strong); background: var(--cch-v3-surface-hover); }
.cch-v3-button:active { transform: translateY(1px); }
.cch-v3-button--primary { border-color: transparent; background: var(--cch-v3-accent); color: #04131d; }
.cch-v3-input { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--cch-v3-line); border-radius: var(--cch-v3-radius-sm); background: rgba(5, 15, 24, .72); color: var(--cch-v3-text); }
.cch-v3-input::placeholder { color: var(--cch-v3-muted); }
.cch-v3-status { display: inline-flex; align-items: center; gap: 7px; color: var(--cch-v3-text-soft); font-size: 12px; font-weight: 700; }
.cch-v3-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cch-v3-info); }
.cch-v3-status--success::before { background: var(--cch-v3-success); }
.cch-v3-status--warning::before { background: var(--cch-v3-warning); }
.cch-v3-status--danger::before { background: var(--cch-v3-danger); }
.cch-v3-empty, .cch-v3-error, .cch-v3-loading { display: grid; place-items: center; min-height: 150px; padding: var(--cch-v3-space-6); color: var(--cch-v3-muted); text-align: center; }
.cch-v3-error { color: #ffadb2; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media print { .cch-v3-screen-only { display: none !important; } }

/* === CCH NATIVE V3 MIGRATION === */
/* Single visual source of truth. Module CSS now contains layout/state only. */
body.cch-design-v3:not(.cch-dashboard-page){--cch-ui-surface:var(--cch-v3-surface);--cch-ui-surface-strong:var(--cch-v3-surface-raised);--cch-ui-surface-soft:var(--cch-v3-accent-soft);--cch-ui-border:var(--cch-v3-line);--cch-ui-border-soft:var(--cch-v3-line);--cch-ui-text:var(--cch-v3-text);--cch-ui-muted:var(--cch-v3-muted);--cch-page-bg:var(--cch-v3-bg);--cch-surface:var(--cch-v3-surface);--cch-surface-strong:var(--cch-v3-surface-raised);--cch-border:var(--cch-v3-line);--cch-text-main:var(--cch-v3-text);--cch-text-muted:var(--cch-v3-muted);--cch-accent:var(--cch-v3-accent);--cch-success:var(--cch-v3-success);--cch-warning:var(--cch-v3-warning);--cch-danger:var(--cch-v3-danger);}
@media(min-width:1081px){body.cch-design-v3:not(.cch-dashboard-page)>:is(.admin-shell,.akta-center-shell,.beta-plan-shell,.bf-wrap,.cal-wrap,.contactbook-wrap,.dashboard-app-shell,.dc-shell,.hm-shell,.lm-wrap,.login-shell,.materialcenter-shell,.module-center-shell,.module-wrap,.motion-beta-shell,.motion-shell,.nc-wrap,.np-wrap,.ordercenter-shell,.pa-shell,.rm-wrap,.rn-shell,.user-admin-wrap,.variablen-shell,.wp-shell,.wrap),body.cch-design-v3:not(.cch-dashboard-page)>[data-cch-guard-root]>:is(.admin-shell,.akta-center-shell,.beta-plan-shell,.bf-wrap,.cal-wrap,.contactbook-wrap,.dashboard-app-shell,.dc-shell,.hm-shell,.lm-wrap,.login-shell,.materialcenter-shell,.module-center-shell,.module-wrap,.motion-beta-shell,.motion-shell,.nc-wrap,.np-wrap,.ordercenter-shell,.pa-shell,.rm-wrap,.rn-shell,.user-admin-wrap,.variablen-shell,.wp-shell,.wrap){width:90vw;max-width:90vw;margin-left:auto;margin-right:auto;padding-top:24px;padding-bottom:40px;}}
@media(max-width:1080px){body.cch-design-v3:not(.cch-dashboard-page)>:is(.admin-shell,.akta-center-shell,.beta-plan-shell,.bf-wrap,.cal-wrap,.contactbook-wrap,.dashboard-app-shell,.dc-shell,.hm-shell,.lm-wrap,.login-shell,.materialcenter-shell,.module-center-shell,.module-wrap,.motion-beta-shell,.motion-shell,.nc-wrap,.np-wrap,.ordercenter-shell,.pa-shell,.rm-wrap,.rn-shell,.user-admin-wrap,.variablen-shell,.wp-shell,.wrap),body.cch-design-v3:not(.cch-dashboard-page)>[data-cch-guard-root]>:is(.admin-shell,.akta-center-shell,.beta-plan-shell,.bf-wrap,.cal-wrap,.contactbook-wrap,.dashboard-app-shell,.dc-shell,.hm-shell,.lm-wrap,.login-shell,.materialcenter-shell,.module-center-shell,.module-wrap,.motion-beta-shell,.motion-shell,.nc-wrap,.np-wrap,.ordercenter-shell,.pa-shell,.rm-wrap,.rn-shell,.user-admin-wrap,.variablen-shell,.wp-shell,.wrap){width:calc(100vw - 24px);max-width:calc(100vw - 24px);margin-left:auto;margin-right:auto;padding-top:16px;}}
body.cch-design-v3:not(.cch-dashboard-page) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),select,textarea){min-height:44px;padding:10px 13px;border:1px solid var(--cch-v3-line);border-radius:var(--cch-v3-radius-sm);background:rgba(5,15,24,.72);color:var(--cch-v3-text);box-shadow:none;outline:0;}
body.cch-design-v3:not(.cch-dashboard-page) :where(input,select,textarea):focus{border-color:var(--cch-v3-line-strong);box-shadow:var(--cch-v3-focus);}
body.cch-design-v3:not(.cch-dashboard-page) :where(input,textarea)::placeholder{color:var(--cch-v3-muted);}
body.cch-design-v3:not(.cch-dashboard-page) :where(label){color:var(--cch-v3-text-soft);}
body.cch-design-v3:not(.cch-dashboard-page) :where(button,.btn,[class*="btn-"]){min-height:40px;border:1px solid var(--cch-v3-line);border-radius:var(--cch-v3-radius-sm);background:var(--cch-v3-surface-raised);color:var(--cch-v3-text);box-shadow:none;cursor:pointer;}
body.cch-design-v3:not(.cch-dashboard-page) :where(button,.btn,[class*="btn-"]):hover{border-color:var(--cch-v3-line-strong);background:var(--cch-v3-surface-hover);}
body.cch-design-v3:not(.cch-dashboard-page) :where(.primary,.btn-primary,.btn-ok,button.primary){border-color:transparent;background:var(--cch-v3-accent);color:#04131d;}
body.cch-design-v3:not(.cch-dashboard-page) :where(.danger,.btn-danger,button.danger){border-color:rgba(255,95,103,.30);background:rgba(255,95,103,.12);color:#ffadb2;}
body.cch-design-v3:not(.cch-dashboard-page) :where(table){color:var(--cch-v3-text);border-color:var(--cch-v3-line);}
body.cch-design-v3:not(.cch-dashboard-page) :where(th){color:var(--cch-v3-text-soft);background:rgba(17,35,52,.92);border-color:var(--cch-v3-line);}
body.cch-design-v3:not(.cch-dashboard-page) :where(td){border-color:var(--cch-v3-line);}
body.cch-design-v3:not(.cch-dashboard-page) tbody tr:hover td{background:rgba(37,189,243,.035);}

body.cch-design-v3:not(.cch-dashboard-page) :is(
  .action-hub-card,
  .active-order-summary,
  .admin-card,
  .admin-map-canvas,
  .akta-center-module-card,
  .assignment-context-card,
  .attendance-card,
  .attendance-metric-card,
  .attendance-week-card,
  .aw-tree-card,
  .bestand-area-template-preview,
  .bestand-grunddaten-summary,
  .bestand-report-preview,
  .bestand-setup-card,
  .beta-filter-card,
  .bf-detail-card,
  .bf-filter-panel,
  .bf-floor-card,
  .bf-list-panel,
  .bf-panel,
  .builder-choice-panel,
  .builder-library-panel,
  .cal-day-detail-card,
  .cal-order-summary,
  .card,
  .carton-price-context,
  .cch-gallery-picker__card,
  .cch-header-form-card,
  .cch-task-panel,
  .cch-v3-card,
  .chain-print-sheet,
  .chain-print-summary,
  .checkpoint-admin-summary,
  .checkpoint-card,
  .color-preview,
  .compact-launcher,
  .completion-summary,
  .csv-import-preview,
  .csv-import-summary,
  .daily-panel,
  .daily-preview-card,
  .daily-print-sheet,
  .dashboard-activity-panel,
  .dashboard-panel,
  .dashboard-view-panel,
  .dc-list-panel,
  .dc-preview,
  .dc-workspace,
  .defect-entry-summary,
  .developer-code-panel,
  .developer-runs-panel,
  .eakte-audio-preview,
  .eakte-document-preview,
  .eakte-result-summary,
  .eakte-storage-card,
  .eakte-workspace,
  .editor-card,
  .editor-form-card,
  .editor-map-card,
  .editor-preview,
  .employee-dashboard-card,
  .employee-launcher-card,
  .employee-library-panel,
  .employee-panel,
  .employee-result-summary,
  .employee-selection-summary,
  .employee-status-card,
  .empty-panel,
  .filter-card,
  .focus-toolbar-card,
  .gallery-card,
  .gallery-upload-card,
  .handover-machine-card,
  .hm-canvas-panel,
  .hm-photo-source-card,
  .hm-quick-card,
  .hm-workspace,
  .identity-summary,
  .inspector-formula-preview,
  .inventar-filter-card,
  .inventar-image-preview,
  .inventar-table-card,
  .kpi-card,
  .kw-card,
  .lm-answer-card,
  .lm-faq-panel,
  .lm-filter-panel,
  .lm-panel,
  .lm-topic-panel,
  .machine-gallery-preview,
  .machine-photo-preview,
  .machine-timeline,
  .map-canvas,
  .map-create-card,
  .map-list-card,
  .map-summary,
  .map-workspace-card,
  .marker-image-preview,
  .marker-selection-summary,
  .marker-side-card,
  .material-image-preview,
  .material-image-viewer-card,
  .material-info-card,
  .material-linked-panel,
  .material-list-card,
  .material-machine-panel,
  .material-reference-card,
  .material-reference-preview,
  .material-sheet-disclosure-summary,
  .materialcenter-module-card,
  .measure-card,
  .measure-tool-source-card,
  .measure-tools-card,
  .meeting-history-preview,
  .meeting-image-preview,
  .meta-card,
  .metric-card,
  .module-center-card,
  .module-permissions-summary,
  .month-overview-card,
  .mpd-panel,
  .nc-card,
  .need-context-card,
  .need-material-preview,
  .need-print-card,
  .next-card,
  .np-card,
  .np-filter-panel,
  .np-guidance-panel,
  .np-panel,
  .np-protocol-panel,
  .oidc-panel,
  .order-card,
  .order-context-panel,
  .order-mobile-card,
  .order-print-sheet,
  .order-print-summary,
  .order-receiving-panel,
  .order-save-panel,
  .order-summary-card,
  .ordercenter-context,
  .orders-wide-card,
  .pa-panel,
  .pa-print-sheet,
  .panel,
  .payroll-card,
  .performance-meta-card,
  .performance-meta-summary,
  .performance-note-card,
  .performance-print-sheet,
  .performance-print-summary,
  .performance-print-summary-card,
  .performance-table-card,
  .photo-source-card,
  .plan-card,
  .plan-image-assignment-card,
  .plan-image-summary,
  .plan-note-preview,
  .planner-status-card,
  .planning-aw-card,
  .planning-formula-preview,
  .planning-launcher-card,
  .planning-overview-card,
  .plausibility-card,
  .preview-material-card,
  .print-choice-card,
  .print-sheet,
  .procurement-gallery-panel,
  .procurement-gallery-preview,
  .progress-card,
  .qr-preview,
  .quick-template-panel,
  .record-card,
  .right-panel,
  .rm-agent-card,
  .rm-archive-card,
  .rm-check-card,
  .rm-detail-panel,
  .rm-disclosure-summary,
  .rm-filter-panel,
  .rm-list-panel,
  .rm-material-card,
  .rm-panel,
  .rm-ph-scale-sheet,
  .rm-print-sheet,
  .rm-product-image-card,
  .rm-product-image-sheet,
  .rm-sheet-card,
  .rm-sheet-safety-card,
  .rm-symbol-card,
  .rm-unlinked-panel,
  .rn-picker-card,
  .rn-proof-card,
  .room-cleaning-card,
  .room-inventory-card,
  .room-work-steps-card,
  .route-map-card,
  .route-map-preview,
  .route-preview,
  .row-gallery-summary,
  .row-resource-summary,
  .sensor-summary,
  .shared-data-summary,
  .sheet,
  .sheet-day-summary,
  .sheet-detail-card,
  .shift-rule-card,
  .shift-summary,
  .side-panel,
  .sr-material-panel,
  .sr-output-card,
  .stat-card,
  .sticky-action-card,
  .summary,
  .summary-card,
  .summary-panel,
  .table-card,
  .table-section-card,
  .timeline,
  .timeline-card,
  .today-route-card,
  .todo-card,
  .todo-form-panel,
  .tracking-card,
  .ua-card,
  .ua-form-card,
  .ua-identity-card,
  .ua-linked-summary,
  .ua-list-card,
  .ua-provider-card,
  .ua-qr-card,
  .upload-card,
  .vac-card,
  .vac-doc-card,
  .vac-doc-preview,
  .vac-list-card,
  .vac-module-summary,
  .vac-row-summary,
  .vac-toolbar-card,
  .validation-panel,
  .variablen-card,
  .variablen-main-panel,
  .variablen-side-panel,
  .variablen-workspace,
  .variant-card,
  .variant-preview,
  .week-card,
  .workspace-card,
  .wp-workspace
){min-width:0;color:var(--cch-v3-text);background:linear-gradient(180deg,rgba(16,35,52,.90),rgba(11,25,38,.96));border:1px solid var(--cch-v3-line);border-radius:var(--cch-v3-radius-lg);box-shadow:0 1px 0 rgba(255,255,255,.02);}

body.cch-design-v3:not(.cch-dashboard-page) :is(
  .akta-category-modal,
  .akta-center-dialog,
  .akta-center-modal,
  .akta-detail-modal,
  .akta-modal-card,
  .attendance-modal-card,
  .barcode-scanner-modal-card,
  .bestand-area-modal-card,
  .bestand-editor-modal,
  .bestand-editor-modal-card,
  .bestand-load-modal-card,
  .bestand-report-modal-card,
  .beta-group-modal-card,
  .bf-modal,
  .bf-modal-card,
  .cal-day-modal-card,
  .cal-modal-card,
  .cch-admin-modal,
  .cch-admin-modal__dialog,
  .cch-header-modal-card,
  .chain-modal,
  .chain-modal-card,
  .checkpoint-qr-modal,
  .completion-modal-card,
  .csv-import-modal-card,
  .daily-modal-card,
  .dash-modal,
  .dash-modal__dialog,
  .dc-dialog,
  .defect-modal-card,
  .developer-modal,
  .developer-run-modal,
  .eakte-history-modal,
  .eakte-modal,
  .editor-modal-card,
  .employee-modal-card,
  .filter-grid-modal,
  .fullscreen-modal-card,
  .gallery-batch-dialog,
  .gallery-batch-modal,
  .gallery-meta-modal,
  .handover-history-modal-card,
  .history-modal-card,
  .hm-dialog,
  .inventar-modal-card,
  .item-modal-card,
  .lageplan-modal-card,
  .library-list--modal,
  .lm-image-lightbox,
  .lm-image-lightbox__dialog,
  .lm-modal,
  .lm-modal-card,
  .machine-editor-modal-card,
  .machine-record-modal-card,
  .marker-info-modal,
  .material-editor-modal-card,
  .material-info-modal-card,
  .material-sheet-modal-card,
  .materialcenter-picker-dialog,
  .measure-modal-card,
  .meeting-modal-card,
  .modal,
  .modal-card,
  .mp-output-modal-card,
  .mp-print-modal-card,
  .mp-view-modal-card,
  .need-area-modal,
  .need-modal,
  .need-modal-card,
  .need-print-modal,
  .np-modal,
  .np-modal-card,
  .objektakte-category-modal,
  .objektakte-detail-modal,
  .order-modal-card,
  .pa-modal,
  .parts-modal-card,
  .performance-modal-card,
  .photo-source-modal,
  .plan-modal-card,
  .planning-modal-card,
  .preview-modal-card,
  .print-choice-modal,
  .proof-modal-card,
  .report-editor-modal-card,
  .report-modal-card,
  .rm-modal,
  .rm-modal-card,
  .saved-list--modal,
  .saved-orders-modal-card,
  .shift-settings-modal-card,
  .sr-output-dialog,
  .sr-output-modal,
  .sr-output-modal-card,
  .todo-form-modal,
  .transfer-modal-card,
  .ua-modal,
  .upload-modal-card,
  .variablen-dialog,
  .variablen-dialog-shell,
  .variablen-help-dialog,
  .visit-detail-modal,
  .week-issue-modal-card,
  .wp-dialog
){color:var(--cch-v3-text);background:linear-gradient(180deg,rgba(17,35,52,.99),rgba(8,20,32,.995));border:1px solid var(--cch-v3-line);border-radius:var(--cch-v3-radius-lg);box-shadow:var(--cch-v3-shadow);}

body.cch-design-v3:not(.cch-dashboard-page) :is(
  .bf-modal-backdrop,
  .cch-admin-modal__backdrop,
  .checkpoint-qr-backdrop,
  .dash-modal__backdrop,
  .developer-modal-backdrop,
  .eakte-modal-backdrop,
  .editor-modal-backdrop,
  .inventar-modal-backdrop,
  .lageplan-modal-backdrop,
  .lm-image-lightbox__backdrop,
  .marker-info-modal-backdrop,
  .modal-backdrop,
  .pa-overlay,
  .ua-modal-backdrop
){background:rgba(1,7,12,.76);backdrop-filter:blur(8px);}

body.cch-design-v3:not(.cch-dashboard-page) :is(.akta-center-hero,.bestand-page-hero,.beta-plan-hero,.bf-hero,.cal-hero,.cch-stunden-page-hero,.contactbook-header,.dashboard-head,.dc-header,.dienstplan-hero,.eakte-topbar,.errorlog-hero,.hero,.hm-head,.inventar-hero,.lageplan-page-header,.lm-hero,.marker-detail-hero,.material-module-head,.materialcenter-hero,.module-center-hero,.module-hero,.motion-beta-hero,.motion-head,.mp-page-hero,.mpd-hero,.nc-hero,.need-head,.np-hero,.ordercenter-hero,.pa-hero,.page-head,.performance-hero,.rm-hero,.rn-hero,.sr-command-center,.todo-hero,.ua-hero,.vac-hero,.variablen-hero,.wp-header){color:var(--cch-v3-text);background:transparent;border:0;border-radius:0;box-shadow:none;}
body.cch-design-v3:not(.cch-dashboard-page) :is(.akta-center-hero,.bestand-page-hero,.beta-plan-hero,.bf-hero,.cal-hero,.cch-stunden-page-hero,.contactbook-header,.dashboard-head,.dc-header,.dienstplan-hero,.eakte-topbar,.errorlog-hero,.hero,.hm-head,.inventar-hero,.lageplan-page-header,.lm-hero,.marker-detail-hero,.material-module-head,.materialcenter-hero,.module-center-hero,.module-hero,.motion-beta-hero,.motion-head,.mp-page-hero,.mpd-hero,.nc-hero,.need-head,.np-hero,.ordercenter-hero,.pa-hero,.page-head,.performance-hero,.rm-hero,.rn-hero,.sr-command-center,.todo-hero,.ua-hero,.vac-hero,.variablen-hero,.wp-header) :where(h1){margin:0;color:var(--cch-v3-text);font-size:clamp(30px,3.2vw,42px);line-height:1.04;letter-spacing:-.035em;font-weight:800;}

body.cch-design-v3:not(.cch-dashboard-page) :is(.area-kind-chip,.attendance-chip,.auto-load-status,.bestand-photo-status,.beta-parent-category-chip,.beta-safety-badge,.bf-badge,.bf-cleaner-chip,.bf-status,.cch-chip,.cch-modal-status,.chip,.contactbook-status,.csv-import-status,.dashboard-data-status,.dashboard-status,.db-library-status,.dc-status,.defect-voice-status,.eakte-system-status,.eakte-tag,.editor-modal-status,.file-chip,.gallery-badge,.hm-status,.hours-badge,.inactive-badge,.inventar-modal-status,.kw-badge,.lageplan-header-status,.library-chip,.lm-chip,.lm-status,.material-canonical-badge,.material-duplicate-badge,.material-stock-reference-badge,.meeting-html-status,.meta-tag,.mode-chip,.module-permissions-chip,.module-tag,.mpd-badge,.mpd-status,.nc-badge,.nc-status,.need-area-chip,.note-save-status,.np-chip,.np-status,.objektakte-badge,.order-status-chip,.pa-badge,.pause-badge,.photo-chip,.plan-auto-status,.plan-cell-status,.plan-type-badge,.plan-type-chip,.print-sheet-tag,.rm-chip,.rm-status,.run-status,.shift-color-chip,.shift-rule-badge,.sr-command-status,.sr-mode-chip,.status,.status-badge,.status-chip,.status-tag,.sum-badge,.summary-chip,.symbol-choice-status,.sync-badge,.td-gallery-status,.template-chip,.th-section-photo-status,.todo-chip,.todo-status,.type-badge,.ua-chip,.vac-badge,.vac-mode-chip,.validation-badge,.validation-debug-chip,.validation-rule-chip,.variablen-badge,.variablen-system-status,.week-complete-badge,.week-validation-badge,.workspace-status,.wp-status,.zoom-chip){border-color:var(--cch-v3-line);background:var(--cch-v3-accent-soft);color:var(--cch-v3-text-soft);}

body.cch-design-v3:not(.cch-dashboard-page) :is(.contactbook-tab,.dashboard-view-tab,.materialcenter-tab,.module-center-tab,.mpd-tab,.ua-tab,.view-tab){border-color:var(--cch-v3-line);color:var(--cch-v3-muted);}

body.cch-design-v3:not(.cch-dashboard-page) :is(.data-table-wrap,.eakte-table-wrap,.history-table-wrap,.inventar-table-card,.inventar-table-wrap,.nc-table-wrap,.pa-table-wrap,.parts-table-wrap,.performance-table-card,.performance-table-wrap,.rm-table-wrap,.rn-table-wrap,.saved-orders-table-wrap,.shift-settings-table-wrap,.table-card,.table-section-card,.table-wrap,.tableWrap,.variablen-table-wrap){border-color:var(--cch-v3-line);background:rgba(5,15,24,.54);}

body.cch-design-v3:not(.cch-dashboard-page) :is(.btn-ok,.completed-work-input,.done,.eakte-button-success,.is-done,.is-success,.ok){color:#a7f3d0;}

body.cch-design-v3:not(.cch-dashboard-page) :is(.bestand-photo-pending,.developer-device-warning,.employee-warning-note,.is-warning,.machine-record-warning,.nc-worker-warning,.np-inline-warning,.oidc-panel--status-warning,.pending-list,.shift-warning-note,.warn,.warn-pill,.wp-warning){color:#fde68a;}

body.cch-design-v3:not(.cch-dashboard-page) :is(.bf-danger,.btn-danger,.cch-module-error-log,.cch-page-error-log,.critical,.danger,.defect-audio-error,.eakte-button-danger,.is-danger,.lm-danger,.mini-danger,.nc-error,.np-danger,.pa-btn-danger,.rm-danger,.sync-error,.variablen-button-danger){color:#ffadb2;}

/* Native V3 modal anatomy */
body.cch-design-v3:not(.cch-dashboard-page) :is(.akta-center-dialog-head,.bestand-modal-subtitle,.bestand-modal-title,.bf-modal-head,.cal-day-modal-head,.cch-admin-modal__header,.cch-modal-subtitle,.cch-modal-title,.dash-modal__header,.eakte-modal-head,.editor-modal-head,.inventar-modal-head,.lageplan-modal-head,.lm-modal-head,.material-editor-modal-head,.measure-modal-head,.modal-head,.modal-subtitle,.modal-title,.mp-view-modal-head,.need-modal-head,.np-modal-head,.rm-modal-head,.ua-modal-head,.wp-dialog-head){color:var(--cch-v3-text);border-bottom:1px solid var(--cch-v3-line);background:transparent;}
body.cch-design-v3:not(.cch-dashboard-page) :is(.bestand-modal-actions,.bf-modal-actions,.cal-modal-actions,.cch-modal-actions,.chain-modal-actions,.daily-modal-actions,.eakte-modal-actions,.editor-modal-actions,.inventar-modal-actions,.lm-modal-actions,.measure-modal-footer,.modal-actions,.modal-head-actions,.np-modal-actions,.rm-modal-actions,.rm-modal-head-actions,.wp-dialog-actions){border-top:1px solid var(--cch-v3-line);background:transparent;}

/* Embedded center modules render inside an existing center shell and therefore never reserve standalone topnav space. */
body.cch-design-v3.cch-embedded-module :is(.admin-shell,.akta-center-shell,.beta-plan-shell,.bf-wrap,.cal-wrap,.contactbook-wrap,.dashboard-app-shell,.dc-shell,.hm-shell,.lm-wrap,.materialcenter-shell,.module-wrap,.motion-beta-shell,.motion-shell,.nc-wrap,.np-wrap,.ordercenter-shell,.pa-shell,.rm-wrap,.rn-shell,.user-admin-wrap,.variablen-shell,.wp-shell,.wrap){
  margin-top:0;
  padding-top:0;
}

/* =========================================================
   CCH V3 – globaler Viewport-Modal-Standard
   Modale Dialoge bleiben am Browser-Viewport zentriert und
   liegen oberhalb der festen Hauptnavigation. Nur CSS.
   ========================================================= */
body.cch-design-v3:not(.cch-dashboard-page) {
  --cch-v3-modal-z: 300000;
  --cch-v3-modal-gap: clamp(10px, 1.5vw, 24px);
}

body.cch-design-v3:not(.cch-dashboard-page) :is(
  .modal-backdrop,
  .inventar-modal-backdrop,
  .editor-modal-backdrop,
  .eakte-modal-backdrop,
  .lageplan-modal-backdrop,
  .marker-info-modal-backdrop,
  .developer-modal-backdrop,
  .checkpoint-qr-backdrop,
  .bf-modal-backdrop,
  .ua-modal-backdrop,
  .cch-admin-modal__backdrop,
  .dash-modal__backdrop
) {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--cch-v3-modal-z) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--cch-v3-modal-gap) !important;
  box-sizing: border-box !important;
}

body.cch-design-v3:not(.cch-dashboard-page) :is(
  .modal-card,
  .inventar-modal-card,
  .editor-modal-card,
  .material-editor-modal-card,
  .material-info-modal-card,
  .material-sheet-modal-card,
  .item-modal-card
) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  max-width: calc(100vw - (var(--cch-v3-modal-gap) * 2));
  max-height: calc(100dvh - (var(--cch-v3-modal-gap) * 2));
}

/*
   backdrop-filter/transform/contain auf einer Elternkarte erzeugt fuer
   position:fixed einen eigenen Containing-/Stacking-Context. Sobald ein
   Dialog in dieser Karte offen ist, wird nur fuer diese Ahnen der Effekt
   neutralisiert. Dadurch bleibt das restliche V3-Layout unangetastet.
*/
@supports selector(.card:has(.modal-backdrop.show)) {
  body.cch-design-v3:not(.cch-dashboard-page) :is(
    .card,
    .cch-v3-card,
    .module-shell,
    .page-shell,
    .materialcenter-module-card,
    .materialcenter-module-host,
    [data-cch-guard-root]
  ):has(:is(.modal-backdrop,.inventar-modal-backdrop,.editor-modal-backdrop,.eakte-modal-backdrop,.lageplan-modal-backdrop,.marker-info-modal-backdrop,.developer-modal-backdrop,.checkpoint-qr-backdrop,.bf-modal-backdrop,.ua-modal-backdrop,.cch-admin-modal__backdrop,.dash-modal__backdrop):is(.show,[aria-hidden="false"])) {
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    perspective: none !important;
    contain: none !important;
    overflow: visible !important;
  }
}
