/* CCH Module Center – native V3 layout. No compatibility/patch layer required. */
.module-center-shell{width:var(--cch-shell-content-width-desktop,90vw);max-width:var(--cch-shell-content-width-desktop,90vw);margin:calc(var(--cch-topnav-height,72px) + 26px) auto 40px;display:grid;gap:14px;min-width:0}
.module-center-hero{display:none}
.module-center-tabs{display:flex;gap:6px;padding:8px;overflow-x:auto;border:1px solid var(--cch-v3-line);border-radius:var(--cch-v3-radius-md);background:rgba(13,27,41,.86)}
.module-center-tab{flex:0 0 auto;min-width:150px;min-height:42px;padding:9px 14px;border:1px solid transparent;border-radius:var(--cch-v3-radius-sm);background:transparent;color:var(--cch-v3-muted);font-weight:750;cursor:pointer;box-shadow:none}
.module-center-tab:hover{border-color:var(--cch-v3-line);background:var(--cch-v3-surface-hover);color:var(--cch-v3-text-soft)}
.module-center-tab.active,.module-center-tab.is-active{border-color:var(--cch-v3-line-strong);background:var(--cch-v3-accent-soft);color:var(--cch-v3-accent)}
.module-center-card{min-width:0;background:transparent;border:0;box-shadow:none}
.module-center-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:8px 2px 15px}
.module-center-head .module-kicker{display:none}.module-center-head h2{margin:0;color:var(--cch-v3-text);font-size:clamp(28px,2.6vw,40px);line-height:1.04;letter-spacing:-.035em;font-weight:800}
.module-center-toolbar{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.module-center-toolbar:empty{display:none}
.module-center-host{min-width:0;padding:0}.module-center-host>:is(.wrap,.cal-wrap,.bf-wrap,.rm-wrap,.rn-shell,.daily-shell,.performance-shell,.beta-plan-shell,.materialcenter-shell,main){width:100%;max-width:none;margin-left:0;margin-right:0;padding-left:0;padding-right:0}
.module-center-empty{display:grid;place-items:center;gap:8px;min-height:220px;padding:28px;border:1px solid var(--cch-v3-line);border-radius:var(--cch-v3-radius-lg);background:var(--cch-v3-surface);color:var(--cch-v3-muted);text-align:center}
@media(max-width:1080px){.module-center-shell{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}}
@media(max-width:760px){.module-center-shell{width:100%;max-width:100%;margin-top:calc(var(--cch-topnav-height,72px) + 12px)}.module-center-tabs{border-radius:0;border-left:0;border-right:0}.module-center-tab{min-width:120px}.module-center-head{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:8px 12px 12px}.module-center-toolbar{justify-content:stretch}.module-center-toolbar button{flex:1 1 140px}.module-center-host{padding:0 10px 20px}}


/* 2026-09-20 · Reinigungscenter V3: gezielte Center-Politur ohne Modul-Logik umzubauen. */
body.cch-module-reinigungscenter .module-center-tabs {
  gap: 8px;
  padding: 8px;
  border-color: var(--cch-v3-line);
  background: linear-gradient(180deg, rgba(16, 35, 52, .88), rgba(9, 22, 34, .94));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .02);
}

body.cch-module-reinigungscenter .module-center-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 14px;
  color: var(--cch-v3-muted);
  border-radius: var(--cch-v3-radius-sm);
}

body.cch-module-reinigungscenter .module-center-tab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: .8;
}

body.cch-module-reinigungscenter .module-center-tab:hover {
  color: var(--cch-v3-text-soft);
}

body.cch-module-reinigungscenter .module-center-tab.active,
body.cch-module-reinigungscenter .module-center-tab.is-active {
  color: var(--cch-v3-accent);
  border-color: var(--cch-v3-line-strong);
  background: var(--cch-v3-accent-soft);
}

body.cch-module-reinigungscenter .module-center-tab.active svg,
body.cch-module-reinigungscenter .module-center-tab.is-active svg {
  opacity: 1;
}

body.cch-module-reinigungscenter .module-center-head {
  min-height: 0;
  margin: 0 0 18px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--cch-v3-line) 74%, transparent);
}

body.cch-module-reinigungscenter .module-center-head h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  margin: 0;
  padding: 2px 0 3px 16px;
  border-left: 3px solid var(--cch-v3-accent);
  color: var(--cch-v3-accent);
  font-size: clamp(24px, 1.55vw, 30px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -.035em;
}

body.cch-module-reinigungscenter .module-center-head h2::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cch-v3-accent) 58%, transparent), transparent 82%);
  pointer-events: none;
}

body.cch-module-reinigungscenter .module-center-toolbar {
  gap: 6px;
  align-items: center;
}

body.cch-module-reinigungscenter .module-center-toolbar button,
body.cch-module-reinigungscenter .module-center-toolbar .btn,
body.cch-module-reinigungscenter .module-center-toolbar .btn-soft {
  min-height: 36px;
  padding: 7px 11px;
}

body.cch-module-reinigungscenter .module-center-empty {
  border-color: var(--cch-v3-line);
  background: linear-gradient(180deg, rgba(16, 35, 52, .82), rgba(9, 22, 34, .9));
}

@media (max-width: 760px) {
  body.cch-module-reinigungscenter .module-center-tabs {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  body.cch-module-reinigungscenter .module-center-head {
    gap: 8px;
    padding: 6px 10px 12px;
  }

  body.cch-module-reinigungscenter .module-center-head h2 {
    font-size: 22px;
  }
}


/* 2026-09-18 · Qualitätscenter: compact active module title aligned with Einsatzplan */
body.cch-module-qualitaetscenter .module-center-card {
  margin: 0;
  padding: 0;
}

body.cch-module-qualitaetscenter .module-center-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 0;
  margin: 0 0 18px;
  padding: 8px 6px 14px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cch-v3-line, #18344a) 74%, transparent);
  background: transparent;
}

body.cch-module-qualitaetscenter .module-center-head > div:first-child {
  min-width: 0;
}

body.cch-module-qualitaetscenter .module-center-head .module-kicker {
  display: none !important;
}

body.cch-module-qualitaetscenter .module-center-head h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  margin: 0;
  padding: 2px 0 3px 16px;
  border-left: 3px solid var(--cch-v3-accent, #25bdf3);
  color: var(--cch-v3-text, #f4f8fc);
  font-size: clamp(24px, 1.55vw, 30px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -.035em;
}

body.cch-module-qualitaetscenter .module-center-head h2::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--cch-v3-accent, #25bdf3) 58%, transparent),
    transparent 82%);
  pointer-events: none;
}

body.cch-module-qualitaetscenter .module-center-toolbar {
  gap: 6px;
  align-items: center;
}

body.cch-module-qualitaetscenter .module-center-toolbar button,
body.cch-module-qualitaetscenter .module-center-toolbar .btn,
body.cch-module-qualitaetscenter .module-center-toolbar .btn-soft {
  min-height: 36px;
  padding: 7px 11px;
}

body.cch-module-qualitaetscenter .module-center-host {
  min-width: 0;
  margin: 0;
  padding: 0 0 16px;
}

/* Defensive cleanup: standalone module heroes must never render inside the center. */
body.cch-module-qualitaetscenter #moduleHost > :is(
  .module-hero,
  .maengel-hero,
  .maengelliste-hero,
  .beta-maengel-hero,
  .quality-hero,
  .quality-module-hero,
  [data-module-hero]
) {
  display: none !important;
}

@media (max-width: 760px) {
  body.cch-module-qualitaetscenter .module-center-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 6px 10px 12px;
  }

  body.cch-module-qualitaetscenter .module-center-head h2 {
    font-size: 22px;
  }
}

/* 2026-09-20 · Reinigungscenter V3.2: zentrale visuelle Vereinheitlichung + Modal-Layer. */
body.cch-module-reinigungscenter {
  --rc-v3-accent: var(--cch-v3-accent, #25bdf3);
  --rc-v3-line: var(--cch-v3-line, rgba(79, 209, 255, .16));
  --rc-v3-line-strong: var(--cch-v3-line-strong, rgba(79, 209, 255, .30));
  --rc-v3-surface: var(--cch-v3-surface, rgba(13, 27, 41, .92));
  --rc-v3-surface-2: var(--cch-v3-surface-strong, rgba(16, 35, 52, .96));
  --rc-v3-text: var(--cch-v3-text, #f2f8fc);
  --rc-v3-muted: var(--cch-v3-muted, #9fb4c8);
}

body.cch-module-reinigungscenter .module-center-shell {
  width: min(90vw, 1780px);
  max-width: min(90vw, 1780px);
}

body.cch-module-reinigungscenter .module-center-tabs {
  border: 1px solid var(--rc-v3-line);
  background: color-mix(in srgb, var(--rc-v3-surface) 94%, transparent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

body.cch-module-reinigungscenter .module-center-tab {
  border: 1px solid transparent;
  color: var(--rc-v3-muted);
}

body.cch-module-reinigungscenter .module-center-tab:hover {
  border-color: var(--rc-v3-line);
  color: var(--rc-v3-text);
  background: color-mix(in srgb, var(--rc-v3-accent) 8%, transparent);
}

body.cch-module-reinigungscenter .module-center-tab.active,
body.cch-module-reinigungscenter .module-center-tab.is-active {
  border-color: color-mix(in srgb, var(--rc-v3-accent) 48%, var(--rc-v3-line));
  color: var(--rc-v3-accent);
  background: color-mix(in srgb, var(--rc-v3-accent) 13%, var(--rc-v3-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-v3-accent) 10%, transparent);
}

body.cch-module-reinigungscenter .module-center-head h2 {
  border-left-color: var(--rc-v3-accent);
  color: var(--rc-v3-accent);
  text-shadow: 0 0 24px color-mix(in srgb, var(--rc-v3-accent) 13%, transparent);
}

body.cch-module-reinigungscenter #moduleHost :is(
  .rn-picker-card,
  .rn-proof-card,
  .rn-saved,
  .card,
  .stat,
  .bf-panel,
  .bf-stats article,
  .rm-panel,
  .rm-stats article,
  .rm-unlinked-panel
) {
  border-color: var(--rc-v3-line) !important;
  background: var(--rc-v3-surface) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .12);
}

body.cch-module-reinigungscenter #moduleHost :is(
  .rn-section-head h2,
  .rn-proof-heading h2,
  .card-head h2,
  .compact-head h3,
  .bf-panel h2,
  .bf-panel h3,
  .rm-section-head h2,
  .rm-section-head h3
) {
  color: var(--rc-v3-accent);
}

body.cch-module-reinigungscenter #moduleHost :is(input, select, textarea) {
  border-color: var(--rc-v3-line) !important;
  background: color-mix(in srgb, var(--rc-v3-surface-2) 92%, #000 8%) !important;
  color: var(--rc-v3-text) !important;
  border-radius: var(--cch-v3-radius-sm, 10px);
}

body.cch-module-reinigungscenter #moduleHost :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--rc-v3-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-v3-accent) 18%, transparent) !important;
}

/* Modale im eingebetteten Center müssen über Topnav und Host liegen. */
body.cch-module-reinigungscenter #moduleHost :is(.modal-backdrop, .bf-modal, .rm-modal) {
  z-index: 130000 !important;
  background: rgba(2, 9, 16, .58);
}

body.cch-module-reinigungscenter #moduleHost :is(.modal-card, .bf-modal-card, .rm-modal-card) {
  border: 1px solid var(--rc-v3-line-strong) !important;
  border-radius: var(--cch-v3-radius-lg, 18px) !important;
  background: var(--rc-v3-surface-2) !important;
  color: var(--rc-v3-text) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52) !important;
}

/* Fallback gegen alte Templates: aria-hidden=false/show darf nicht durch hidden blockiert werden. */
body.cch-module-reinigungscenter #moduleHost :is(.modal-backdrop, .bf-modal, .rm-modal).show[hidden],
body.cch-module-reinigungscenter #moduleHost :is(.modal-backdrop, .bf-modal, .rm-modal)[aria-hidden="false"][hidden] {
  display: flex !important;
}

@media (max-width: 1080px) {
  body.cch-module-reinigungscenter .module-center-shell {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 760px) {
  body.cch-module-reinigungscenter .module-center-shell {
    width: 100%;
    max-width: 100%;
  }

  body.cch-module-reinigungscenter #moduleHost :is(.modal-card, .bf-modal-card, .rm-modal-card) {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 16px !important;
  }
}


/* 2026-09-21 · Einsatzportal + Mitarbeitercenter V3.2
   Gemeinsame Portal-Optik: blauer Schriftzug, kompakte Tabs, eingebettete Arbeitsbereiche ohne Standalone-Abstände. */
:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) {
  --portal-v3-accent: var(--cch-v3-accent, #25bdf3);
  --portal-v3-line: var(--cch-v3-line, rgba(79, 209, 255, .16));
  --portal-v3-line-strong: var(--cch-v3-line-strong, rgba(79, 209, 255, .30));
  --portal-v3-surface: var(--cch-v3-surface, rgba(13, 27, 41, .92));
  --portal-v3-text: var(--cch-v3-text, #f2f8fc);
  --portal-v3-muted: var(--cch-v3-muted, #9fb4c8);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-shell {
  width: min(90vw, 1780px);
  max-width: min(90vw, 1780px);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-tabs {
  gap: 8px;
  padding: 8px;
  border-color: var(--portal-v3-line);
  background: color-mix(in srgb, var(--portal-v3-surface) 94%, transparent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid transparent;
  color: var(--portal-v3-muted);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-tab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: .82;
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-tab:hover {
  border-color: var(--portal-v3-line);
  color: var(--portal-v3-text);
  background: color-mix(in srgb, var(--portal-v3-accent) 8%, transparent);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-tab.active,
:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-tab.is-active {
  border-color: color-mix(in srgb, var(--portal-v3-accent) 48%, var(--portal-v3-line));
  color: var(--portal-v3-accent);
  background: color-mix(in srgb, var(--portal-v3-accent) 13%, var(--portal-v3-surface));
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-head {
  min-height: 0;
  margin: 0 0 18px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--portal-v3-line) 78%, transparent);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-head h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  margin: 0;
  padding: 2px 0 3px 16px;
  border-left: 3px solid var(--portal-v3-accent);
  color: var(--portal-v3-accent);
  font-size: clamp(24px, 1.55vw, 30px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-shadow: 0 0 24px color-mix(in srgb, var(--portal-v3-accent) 13%, transparent);
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-head h2::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--portal-v3-accent) 58%, transparent), transparent 82%);
  pointer-events: none;
}

:is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter).cch-embedded-module #moduleHost > :is(.mpd-wrap, .wrap, .daily-shell, .performance-shell, main) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.cch-module-mitarbeitercenter.cch-embedded-module {
  --mpd-accent: var(--portal-v3-accent);
  --mpd-line: var(--portal-v3-line);
  --mpd-line-strong: var(--portal-v3-line-strong);
  --mpd-soft: color-mix(in srgb, var(--portal-v3-accent) 12%, transparent);
}

@media (max-width: 760px) {
  :is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-shell {
    width: 100%;
    max-width: 100%;
  }
  :is(body.cch-module-einsatzportal, body.cch-module-mitarbeitercenter) .module-center-head h2 {
    font-size: 22px;
  }
}
