/* BRAHIMI V5.4.0 */
/* BFZ_V540_PRECISE_DARK_BLUE_TO_SYSTEM_COLOR */
:root{
  --bfz-v540-system:var(--user-blue,#00a3d7);
  --bfz-v540-popup-duration:200ms;
  --bfz-v540-popup-blur:12px;
}

/* Nur ehemals dunkelblau gefuellte Primaer-/Aktivflaechen werden umgefaerbt. */
body.bfz-v540-theme .dp-shell :is(.dp-btn.primary,.dp-segment a.active,.dp-resource-palette-tabs button.is-active,.dp-optimize-open,.dp-disposition-apply,.dp-optimizer-submit,.dp-turbo-live-result),
body.bfz-v540-theme .om-v450-period-tabs a.is-active,
body.bfz-v540-theme .om-v450-period-tabs a.is-active:visited,
body.bfz-v540-theme .om-v450-period-tabs a.is-active:hover,
body.bfz-v540-theme .om-v450-saved-views a.is-active,
body.bfz-v540-theme .module-order-button.active,
body.bfz-v540-theme .primary-button,
body.bfz-v540-theme .action-button-primary,
body.bfz-v540-theme .cm-btn.primary,
body.bfz-v540-theme .om-btn.primary,
body.bfz-v540-theme .om-recurrence-switch button.active,
body.bfz-v540-theme .om-weekdays ul label:has(input:checked),
body.bfz-v540-theme .wf-card button,
body.bfz-v540-theme .wf-form button,
body.bfz-v540-theme .module-order-button:not(.danger):not(.warning):not(.success),
body.bfz-v540-theme .personnel-incidents-panel .incident-action,
body.bfz-v540-theme .salary-advance-create-button,
body.bfz-v540-theme .bfz-cost-button.primary,
body.bfz-v540-theme .bfz-v0312-button.primary,
body.bfz-v540-theme .bfz-personnel-action.primary,
body.bfz-v540-theme .bfz-v0312n-button.primary,
body.bfz-v540-theme .bfz-v0312-detail-button:not(.secondary),
body.bfz-v540-theme .bfz-v0312-info-understood,
body.bfz-v540-theme .crm-followup-all-button,
body.bfz-v540-theme .crm-followup-filter-form button,
body.bfz-v540-theme .crm-followup-open-cell a{
  background:var(--bfz-v540-system)!important;
  background-color:var(--bfz-v540-system)!important;
  border-color:var(--bfz-v540-system)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
body.bfz-v540-theme .action-button-primary:hover,
body.bfz-v540-theme .module-order-button:hover:not(.danger):not(.warning):not(.success),
body.bfz-v540-theme .personnel-incidents-panel .incident-action:hover,
body.bfz-v540-theme .bfz-v0312n-button.primary:hover,
body.bfz-v540-theme .bfz-v0312n-button.primary:focus-visible,
body.bfz-v540-theme .bfz-v0312-info-button:hover,
body.bfz-v540-theme .bfz-v0312-info-close:hover,
body.bfz-v540-theme .bfz-v0312-info-close:focus-visible{
  background:color-mix(in srgb,var(--bfz-v540-system) 86%,#000)!important;
  border-color:color-mix(in srgb,var(--bfz-v540-system) 86%,#000)!important;
}
/* Semantische Statusfarben und weisse Schalterflaechen bleiben unberuehrt. */
body.bfz-v540-theme .bfz-v350-filter-switch,
body.bfz-v540-theme .bfz-v350-filter-switch.is-active,
body.bfz-v540-theme .bfz-v350-filter-switch[aria-checked="true"]{
  background:transparent!important;background-color:transparent!important;background-image:none!important;
  border:0!important;box-shadow:none!important;color:#285a78!important;-webkit-text-fill-color:currentColor!important;
}
body.bfz-v540-theme .bfz-v350-filter-switch>i{background:var(--bfz-v270-switch-off,#e5e7eb)!important;border:1px solid rgba(0,0,0,.04)!important}
body.bfz-v540-theme .bfz-v350-filter-switch.is-active>i,
body.bfz-v540-theme .bfz-v350-filter-switch[aria-checked="true"]>i{background:var(--bfz-v270-green,#34c759)!important}
body.bfz-v540-theme .bfz-v350-filter-switch>i::after{background:#fff!important}

/* BFZ_V540_EMPLOYEE_FIRST_ROW_CLEAR_OF_AXIS
 * V5.3 uses the browser page for vertical scrolling. A sticky inner axis would
 * otherwise paint over the first employee row while the page is scrolled. */
body.bfz-v540-theme .dp-workspace[data-mode="employees"] .dp-board-head,
body.bfz-v540-theme .dp-workspace[data-mode="employees"] .dp-time-axis{
  position:relative!important;
  top:auto!important;
}
body.bfz-v540-theme .dp-workspace[data-mode="employees"] .dp-employee-timeline{
  padding-top:1px!important;
}
body.bfz-v540-theme .dp-workspace[data-mode="employees"] .dp-employee-row:first-child{
  margin-top:0!important;
  transform:none!important;
}

/* BFZ_V540_HERO_SEARCH_TRUE_TOP_LAYER */
#bfz-v540-overlay-root{
  position:fixed!important;inset:0!important;z-index:2147483600!important;
  pointer-events:none!important;isolation:isolate!important;overflow:visible!important;
}
#bfz-v540-overlay-root .bfz-v540-search-overlay{
  position:fixed!important;z-index:1!important;pointer-events:auto!important;
  display:block!important;max-height:min(560px,62dvh)!important;overflow:auto!important;
  background:#fff!important;color:#18324a!important;border:1px solid rgba(30,76,108,.16)!important;
  border-radius:18px!important;box-shadow:0 24px 70px rgba(15,38,55,.28)!important;
}
#bfz-v540-overlay-root .bfz-v540-search-overlay[hidden]{display:none!important}
/* Das alte Panel bleibt nach dem Portaling dasselbe DOM-Element; es verschiebt niemals den Hero. */
.bfz-v240-hero [data-bfz-global-results]{position:absolute}

/* BFZ_V540_GLOBAL_POPUP_MOTION */
body.bfz-v540-popup-motion dialog[open].bfz-v540-dialog-opening{
  animation:bfz-v540-dialog-open var(--bfz-v540-popup-duration) cubic-bezier(.2,.82,.2,1) both;
  transform-origin:var(--bfz-v540-origin-x,50%) var(--bfz-v540-origin-y,50%);
}
@keyframes bfz-v540-dialog-open{
  from{opacity:0;transform:translate(var(--bfz-v540-from-x,0px),var(--bfz-v540-from-y,0px)) scale(.92)}
  to{opacity:1;transform:translate(0,0) scale(1)}
}
body.bfz-v540-popup-blur dialog[open]::backdrop{
  backdrop-filter:blur(var(--bfz-v540-popup-blur))!important;
  -webkit-backdrop-filter:blur(var(--bfz-v540-popup-blur))!important;
}
@media(prefers-reduced-motion:reduce){body.bfz-v540-popup-motion dialog[open].bfz-v540-dialog-opening{animation-duration:1ms!important;transform:none!important}}

/* Darstellungen -> Animationen & Popups */
.bfz-v540-popup-settings-body{display:grid;gap:16px;padding-top:4px}
.bfz-v540-popup-number-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bfz-v540-number-field{display:grid;gap:6px;padding:13px 14px;border:1px solid #dbe6ed;border-radius:14px;background:#fbfdfe;color:#294b62;font-weight:800}
.bfz-v540-number-field>span{font-size:12px}.bfz-v540-number-wrap{display:flex;align-items:center;gap:8px}
.bfz-v540-number-wrap input{width:120px;min-height:40px;border:1px solid #cbdce7;border-radius:10px;background:#fff;padding:7px 10px;color:#173b55;font:inherit;font-weight:850}
.bfz-v540-number-wrap b{color:#6c8190;font-size:12px}.bfz-v540-number-field small{color:#718797;font-weight:500;line-height:1.35}
.bfz-v540-apps-box{border:1px solid #dbe6ed;border-radius:16px;background:#fff;overflow:hidden}
.bfz-v540-apps-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid #e6edf2}
.bfz-v540-apps-head>span{display:grid;gap:2px;color:#284e68}.bfz-v540-apps-head small{color:#748999;font-size:10px;font-weight:500}
.bfz-v540-apps-actions{display:flex;gap:7px}.bfz-v540-apps-actions button,.bfz-v540-preview-button{border:1px solid color-mix(in srgb,var(--bfz-v540-system) 25%,#dbe6ed);border-radius:10px;background:#fff;color:var(--bfz-v540-system);padding:8px 10px;font-weight:850;cursor:pointer}
.bfz-v540-app-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:7px 12px 12px}
.bfz-v540-app-checks label{display:flex;align-items:center;gap:8px;min-height:38px;padding:5px 7px;color:#31556d;font-size:11px;font-weight:750}
.bfz-v540-app-checks input{accent-color:var(--bfz-v540-system)}
.bfz-v540-popup-preview{width:min(520px,calc(100vw - 28px));border:0;border-radius:22px;padding:0;background:#fff;box-shadow:0 28px 90px rgba(10,35,52,.28)}
.bfz-v540-popup-preview>div{padding:24px}.bfz-v540-popup-preview h2{margin:0 0 7px;color:#173b55}.bfz-v540-popup-preview p{margin:0 0 18px;color:#6b8191}.bfz-v540-popup-preview footer{display:flex;justify-content:flex-end}
@media(max-width:850px){.bfz-v540-app-checks{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.bfz-v540-popup-number-grid,.bfz-v540-app-checks{grid-template-columns:1fr}.bfz-v540-apps-head{align-items:flex-start;flex-direction:column}}

/* BFZ_V598_V540_STICKY_HEADER_OVERRIDE
 * V5.9.8 intentionally restores viewport-sticky employee planning controls.
 * This selector is deliberately more specific than the legacy V5.4 rule above,
 * which forced employee board headers to position:relative!important. */
body.bfz-v540-theme .dp-workspace[data-mode="employees"]>.dp-resources>.dp-panel-title,
body.bfz-v540-theme .dp-workspace[data-mode="employees"]>.dp-board>.dp-employee-board-head{
  position:sticky!important;
  top:0!important;
  z-index:43!important;
  height:56px!important;
  min-height:56px!important;
  box-sizing:border-box!important;
}
body.bfz-v540-theme .dp-workspace[data-mode="employees"]>.dp-board>.dp-timeline-axis-sticky{
  position:sticky!important;
  top:56px!important;
  z-index:42!important;
}
body.bfz-v540-theme .dp-workspace[data-mode="employees"]>.dp-board>.dp-timeline-axis-sticky .dp-time-axis{
  position:static!important;
  top:auto!important;
}
