/* BFZ_V260_FINISHING_UI_CONTRACT
 * Mobile-only header hardening, unclipped smart-search overlays, personnel cards,
 * cost-table polish, explicit fallback avatars and the final system-theme bridge.
 */

/* Search results are allowed to leave the themed hero and float over module content. */
.bfz-v260-theme .bfz-v250-module-hero{
  overflow:visible;
}
.bfz-v260-theme .bfz-v250-module-hero.bfz-v260-search-open{
  z-index:1200;
}
.bfz-v260-theme .bfz-v250-module-search{
  z-index:40;
}
.bfz-v260-theme .bfz-v250-module-search-results{
  z-index:1220;
  max-height:min(430px,56vh);
  overflow:auto;
  overscroll-behavior:contain;
  box-shadow:0 24px 70px rgba(20,35,55,.25);
}
.bfz-v260-theme .bfz-v250-module-search-results .bfz-v250-search-result{
  min-height:44px;
}

/* Shared fallback avatars. No name-based gender inference: the stored fallback style owns the color. */
.bfz-v260-avatar,
.bfz-v260-personnel-avatar{
  width:42px;
  height:42px;
  flex:0 0 42px;
  border-radius:50%;
  object-fit:cover;
  object-position:center;
  box-sizing:border-box;
}
.bfz-v260-avatar-fallback{
  position:relative;
  display:inline-grid;
  place-items:center;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.9);
  box-shadow:0 0 0 1px rgba(80,96,118,.10),0 5px 14px rgba(42,59,82,.08);
}
.bfz-v260-avatar-fallback::before,
.bfz-v260-avatar-fallback::after{
  content:"";
  position:absolute;
  background:currentColor;
}
.bfz-v260-avatar-fallback::before{
  top:8px;
  width:12px;
  height:12px;
  border-radius:50%;
}
.bfz-v260-avatar-fallback::after{
  bottom:6px;
  width:24px;
  height:14px;
  border-radius:14px 14px 7px 7px;
}
.bfz-v260-avatar-fallback.male,
.bfz-v260-avatar-fallback.female{
  color:transparent;
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}
.bfz-v260-avatar-fallback.male{
  background-color:#e8f3ff;
  background-image:url("../core/icons/brahimi-v3/avatars/v260_male.0a46890a49f1.png");
}
.bfz-v260-avatar-fallback.female{
  background-color:#ffe8f0;
  background-image:url("../core/icons/brahimi-v3/avatars/v260_female.040c9f4c9b82.png");
}
.bfz-v260-avatar-fallback.male::before,
.bfz-v260-avatar-fallback.male::after,
.bfz-v260-avatar-fallback.female::before,
.bfz-v260-avatar-fallback.female::after{display:none}
.bfz-v260-avatar-fallback.neutral{
  color:#71849a;
  background:linear-gradient(145deg,#f8fbfd,#e8eef4);
}

/* Personalstammdaten: name is the only record-opening affordance; list/card is user selectable. */
.bfz-v260-theme .bfz-v0312n-employee{
  min-width:210px;
}
.bfz-v260-theme .bfz-v0312n-employee-main{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
}
.bfz-v260-theme .bfz-v0312n-employee-name{
  color:var(--user-blue)!important;
  font-size:1rem;
  font-weight:800;
  text-decoration:none;
  text-underline-offset:3px;
}
.bfz-v260-theme .bfz-v0312n-employee-name:hover,
.bfz-v260-theme .bfz-v0312n-employee-name:focus-visible{
  text-decoration:underline;
}
.bfz-v260-theme .bfz-v0312n-view-switch{
  display:inline-flex;
  align-items:center;
  padding:3px;
  border:1px solid color-mix(in srgb,var(--user-blue) 22%,#d8e2ee);
  border-radius:13px;
  background:color-mix(in srgb,var(--user-blue) 5%,#fff);
}
.bfz-v260-theme .bfz-v0312n-view-switch button{
  min-height:36px;
  padding:7px 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#52657d;
  font:inherit;
  font-weight:760;
  cursor:pointer;
}
.bfz-v260-theme .bfz-v0312n-view-switch button[aria-pressed="true"]{
  background:var(--user-blue);
  color:#fff;
  box-shadow:0 5px 14px color-mix(in srgb,var(--user-blue) 18%,transparent);
}
.bfz-v260-theme .bfz-v260-personnel-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(275px,1fr));
  gap:14px;
  padding:18px;
}
.bfz-v260-theme .bfz-v260-personnel-card-grid[hidden],
.bfz-v260-theme .bfz-v0312n-table-wrap[hidden]{display:none!important}
.bfz-v260-theme .bfz-v260-personnel-card{
  min-width:0;
  padding:17px;
  border:1px solid color-mix(in srgb,var(--user-blue) 12%,#dce5ef);
  border-radius:20px;
  background:rgba(255,255,255,.91);
  box-shadow:0 12px 30px rgba(28,49,73,.07);
}
.bfz-v260-theme .bfz-v260-personnel-card-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.bfz-v260-theme .bfz-v260-personnel-card-head .bfz-v260-avatar,
.bfz-v260-theme .bfz-v260-personnel-card-head .bfz-v260-avatar-fallback{
  width:54px;
  height:54px;
  flex-basis:54px;
}
.bfz-v260-theme .bfz-v260-personnel-card-values{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px 14px;
  margin:0;
}
.bfz-v260-theme .bfz-v260-personnel-card-values>div{min-width:0}
.bfz-v260-theme .bfz-v260-personnel-card-values dt{
  margin:0 0 2px;
  color:#7a8798;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.bfz-v260-theme .bfz-v260-personnel-card-values dd{
  margin:0;
  color:#24344b;
  font-size:13px;
  line-height:1.3;
  overflow-wrap:anywhere;
}

/* Personalkosten: calm frame, compact avatar/name cell, no separate breakdown column. */
.bfz-v260-theme .bfz-v260-cost-table-shell{
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  border:1px solid color-mix(in srgb,var(--user-blue) 10%,#dce5ee)!important;
  border-radius:24px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(28,48,72,.07)!important;
}
.bfz-v260-theme .bfz-v260-cost-table{
  border:0!important;
  outline:0!important;
}
.bfz-v260-theme .bfz-v260-cost-table :is(th,td){
  border-left:0!important;
  border-right:0!important;
}
.bfz-v260-theme .bfz-v260-cost-name-cell{
  min-width:210px;
}
.bfz-v260-theme .bfz-v260-cost-name-wrap{
  display:flex;
  align-items:center;
  gap:11px;
}
.bfz-v260-theme .bfz-v260-cost-name-wrap>a{
  color:var(--user-blue)!important;
  font-weight:820;
  text-decoration:none;
  text-underline-offset:3px;
}
.bfz-v260-theme .bfz-v260-cost-name-wrap>a:hover,
.bfz-v260-theme .bfz-v260-cost-name-wrap>a:focus-visible{text-decoration:underline}
.bfz-v260-theme .bfz-v260-hidden-column{display:none!important}

/* Extra aliases help old modules inherit the selected system theme without repainting semantic states. */
.bfz-v260-theme{
  --primary:var(--user-blue);
  --primary-color:var(--user-blue);
  --brand-primary:var(--user-blue);
  --accent:var(--user-blue);
  --accent-color:var(--user-blue);
  --link-color:var(--user-blue);
  --bs-primary:var(--user-blue);
}
.bfz-v260-theme :is(.btn-primary,.button-primary,.action-button-primary,.primary,[class*="primary-action"]):not(.success):not(.warning):not(.danger):not(.error){
  background-color:var(--user-blue)!important;
  border-color:var(--user-blue)!important;
  color:#fff!important;
}

/* Desktop is intentionally untouched. Only the handset header becomes two rows. */
@media(max-width:760px){
  body.bfz-v260-theme .bfz-v230-topbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "brand brand"
      "history actions"!important;
    align-items:center!important;
    gap:10px 14px!important;
    padding:12px 14px!important;
  }
  body.bfz-v260-theme .bfz-v230-brand{
    grid-area:brand;
    justify-self:start;
    width:100%;
    max-width:100%;
    min-width:0;
    gap:8px!important;
    overflow:visible!important;
  }
  body.bfz-v260-theme .bfz-v230-history{
    grid-area:history;
    justify-self:start;
    align-self:center;
  }
  body.bfz-v260-theme .bfz-v230-topbar-actions{
    grid-area:actions;
    justify-self:end;
    align-self:center;
  }
  body.bfz-v260-theme .bfz-v230-brand-copy{
    min-width:0!important;
    overflow:visible!important;
  }
  body.bfz-v260-theme .bfz-v230-brand-copy strong{
    display:block!important;
    max-width:100%!important;
    font-size:16px!important;
    line-height:1.15!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere;
  }
  body.bfz-v260-theme .brand-mark-logo{
    max-width:min(58vw,280px)!important;
    max-height:104px!important;
  }
  body.bfz-v260-theme .brand-mark-logo img{
    max-width:100%!important;
    max-height:104px!important;
    object-fit:contain!important;
  }
  body.bfz-v260-theme .bfz-v230-history-button{
    width:38px!important;
    height:40px!important;
  }
  body.bfz-v260-theme .bfz-v230-user-chip{
    min-height:42px!important;
  }
  .bfz-v260-theme .bfz-v260-personnel-card-values{grid-template-columns:1fr}
}

@media(max-width:430px){
  body.bfz-v260-theme .bfz-v230-brand-copy strong{font-size:15px!important}
  body.bfz-v260-theme .brand-mark-logo{max-width:54vw!important;max-height:92px!important}
  .bfz-v260-theme .bfz-v0312n-actions{width:100%}
  .bfz-v260-theme .bfz-v0312n-view-switch{order:-1}
}
