/* Retter-Portal v1.3.39
   Eingeklappte Sidebar exakt zentriert und Whitemode-Kontraste vereinheitlicht.
   Der Themewechsel verändert bewusst keine Geometrie oder Typografie. */

/* --------------------------------------------------------------------------
   SIDEBAR: Symbol und Markenlogo in der eingeklappten Leiste exakt zentrieren
   -------------------------------------------------------------------------- */
@media(min-width:1101px){
  html body.sidebar-collapsed .sidebar .brand,
  html body.sidebar-collapsed .sidebar .brand-logo-wrap{
    display:grid!important;
    place-items:center!important;
    align-content:center!important;
    justify-content:center!important;
    line-height:0!important;
  }
  html body.sidebar-collapsed .sidebar .brand-logo{
    display:block!important;
    object-fit:contain!important;
    object-position:50% 50%!important;
    margin:0!important;
    transform:none!important;
  }

  /* Absolute Zentrierung verhindert alte align-self-/line-height-Regeln. */
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link{
    position:relative!important;
    display:block!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link > .sidebar-nav-icon{
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    display:grid!important;
    place-items:center!important;
    margin:0!important;
    padding:0!important;
    line-height:0!important;
    transform:translate(-50%,-50%)!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link > .sidebar-nav-icon svg{
    display:block!important;
    margin:0!important;
    transform:none!important;
    vertical-align:middle!important;
  }
}

/* --------------------------------------------------------------------------
   WHITEMODE: Lesbarkeit und Kontrast ohne Größenänderungen
   -------------------------------------------------------------------------- */
html body[data-theme="light"]{
  --rp39-light-text:#152238;
  --rp39-light-text-soft:#33445a;
  --rp39-light-muted:#52647b;
  --rp39-light-muted-strong:#43556d;
  --rp39-light-placeholder:#64748b;
  --rp39-light-line:rgba(71,85,105,.22);
  --rp39-light-line-soft:rgba(71,85,105,.14);
}

/* Grundlegende Textfarben im Arbeitsbereich. */
html body[data-theme="light"] .main,
html body[data-theme="light"] .content{
  color:var(--rp39-light-text)!important;
}
html body[data-theme="light"] .content :is(p,li,dd,dt,figcaption){
  color:var(--rp39-light-text-soft)!important;
}
html body[data-theme="light"] .content :is(h1,h2,h3,h4,h5,h6,strong,b,legend,th){
  color:var(--rp39-light-text)!important;
}
html body[data-theme="light"] .content :is(.muted,.subtle,.help-text,.form-hint,.field-hint,.timeline-list small,.rp55-kpi-card small){
  color:var(--rp39-light-muted)!important;
}
html body[data-theme="light"] .content small{
  color:var(--rp39-light-muted)!important;
}

/* Labels müssen auf hellen Karten klar lesbar sein. */
html body[data-theme="light"] .content label,
html body[data-theme="light"] .content .smart-select-field label,
html body[data-theme="light"] .content .rights-assign-form label,
html body[data-theme="light"] .content .rights-department-switch label,
html body[data-theme="light"] .content .form-grid label,
html body[data-theme="light"] .content .inline-form label,
html body[data-theme="light"] .content .toolbar label{
  color:var(--rp39-light-muted-strong)!important;
  opacity:1!important;
  text-shadow:none!important;
}
html body[data-theme="light"] .content .smart-select-field label,
html body[data-theme="light"] .content .rights-assign-form .smart-select-field label{
  color:#34465d!important;
  font-weight:900!important;
}

/* Eingaben, Auswahlfelder und Platzhalter. */
html body[data-theme="light"] .content :is(input,select,textarea){
  color:var(--rp39-light-text)!important;
  caret-color:var(--rp39-light-text)!important;
  border-color:var(--rp39-light-line)!important;
  background:linear-gradient(180deg,#ffffff,#f7f9fc)!important;
  box-shadow:inset 0 1px 0 #fff!important;
}
html body[data-theme="light"] .content :is(input,textarea)::placeholder{
  color:var(--rp39-light-placeholder)!important;
  opacity:1!important;
}
html body[data-theme="light"] .content select option,
html body[data-theme="light"] .content select optgroup{
  color:#172033!important;
  background:#ffffff!important;
}
html body[data-theme="light"] .content :is(input,select,textarea):disabled{
  color:#64748b!important;
  background:#e9eef4!important;
  opacity:1!important;
}

/* Speziell das Rechte-Modul aus dem Screenshot. */
html body[data-theme="light"] .content .rights-workbench-card,
html body[data-theme="light"] .content .rights-assign-form,
html body[data-theme="light"] .content .rights-department-switch,
html body[data-theme="light"] .content .rights-unlinked-details,
html body[data-theme="light"] .content .rights-unlinked-notice{
  color:var(--rp39-light-text)!important;
}
html body[data-theme="light"] .content .rights-assign-form .smart-select-field input[data-smart-select-search]{
  color:var(--rp39-light-text)!important;
  border-color:rgba(71,85,105,.25)!important;
  background:#fff!important;
}
html body[data-theme="light"] .content .rights-assign-form .smart-select-field input[data-smart-select-search]::placeholder{
  color:#68788d!important;
  opacity:1!important;
}

/* Tabellen, Karten und Statusinformationen. */
html body[data-theme="light"] .content table thead th{
  color:#46586f!important;
}
html body[data-theme="light"] .content table tbody td{
  color:#26374d!important;
}
html body[data-theme="light"] .content :is(.pill,.status,.role){
  color:#33445a!important;
  border-color:var(--rp39-light-line-soft)!important;
}
html body[data-theme="light"] .content :is(.card,.entity-card,.department-card,.stat-card,.toolbar,.pagination,.portal-footer) :is(p,small,span):not(.btn):not(.pill):not(.status):not(.role){
  opacity:1!important;
}

/* Links und sekundäre Aktionen dürfen auf hellen Flächen nicht verblassen. */
html body[data-theme="light"] .content a:not(.btn){
  color:#9f1239!important;
}
html body[data-theme="light"] .content .card-head a:not(.btn),
html body[data-theme="light"] .content .page-head a:not(.btn),
html body[data-theme="light"] .content .page-hero a:not(.btn){
  color:#be123c!important;
}

/* Fokuszustände bleiben deutlich sichtbar. */
html body[data-theme="light"] .content :is(input,select,textarea):focus{
  border-color:rgba(190,18,60,.55)!important;
  box-shadow:0 0 0 3px rgba(225,29,72,.10),inset 0 1px 0 #fff!important;
}

/* Mobile und Tablet: dieselben Kontraste ohne zusätzliche Typografieänderung. */
@media(max-width:1100px){
  html body[data-theme="light"] .content label,
  html body[data-theme="light"] .content .smart-select-field label{
    color:var(--rp39-light-muted-strong)!important;
  }
}
