/* Globale Interaktionssprache: VENTZ AI, Auswahlfelder und Aktionsbuttons */
[hidden]{display:none!important}

.ventz-ai-mark{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:52px;height:52px;border:0;border-radius:15px;background:transparent;box-shadow:0 10px 24px rgba(48,8,18,.2);overflow:visible;isolation:isolate}
.ventz-ai-mark:before{content:"";position:absolute;z-index:-1;inset:-4px;border:1px solid rgba(239,35,64,.36);border-radius:19px;animation:ventz-ai-pulse 2.8s ease-in-out infinite;pointer-events:none}
.ventz-ai-mark:after{content:none}
.ventz-ai-mark img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
.ventz-ai-mark--sm{width:38px;height:38px;border-radius:11px}
.ventz-ai-mark--lg{width:58px;height:58px;border-radius:17px}
.ventz-ai-mark--static:before{animation:none}
@keyframes ventz-ai-pulse{0%,100%{transform:scale(.92);opacity:.18}48%{transform:scale(1.08);opacity:.75}78%{transform:scale(1.14);opacity:0}}
@media(prefers-reduced-motion:reduce){.ventz-ai-mark:before{animation:none}}

/* Globale Leerlauf-Performance:
   Navigation, Markenlogo und AI-Einstiege sind auf jeder Portalseite statisch.
   Arbeitsanimationen bleiben ausschließlich in expliziten Lade-/Denkzuständen
   erlaubt und werden zusätzlich zentral durch idle-animation-guard.js geprüft. */
body.ventz-body.portal-modern .ventz-brand-logo,
body.ventz-body.portal-modern .mobile-brand img,
body.ventz-body.portal-modern .portal-command-ai,
body.ventz-body.portal-modern .portal-command-ai::before,
body.ventz-body.portal-modern .portal-command-ai::after,
body.ventz-body.portal-modern .portal-command-ai img,
body.ventz-body.portal-modern .portal-command-ai > strong,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab::before,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab::after,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab-logo::after {
  animation:none!important;
  animation-iteration-count:1!important;
  will-change:auto!important;
}

body.ventz-body.portal-modern .ventz-brand-glow {
  display:none!important;
  animation:none!important;
  filter:none!important;
}

body.ventz-body.portal-modern .portal-command-ai::before,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab::before,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab::after,
body.ventz-body.portal-modern .ventz-ai-widget:not(.is-thinking) .ventz-ai-fab-logo::after {
  display:none!important;
}

.ventz-ai-identity{display:inline-flex;align-items:center;gap:10px;min-width:0;color:inherit;text-align:left}
.ventz-ai-identity__logo{display:grid;place-items:center;flex:0 0 26px;width:26px;height:26px;overflow:hidden;border-radius:8px;background:var(--ui-on-brand,#fff);box-shadow:0 3px 10px rgba(30,34,48,.12)}
.ventz-ai-identity__logo img{display:block;width:24px;height:24px;object-fit:contain}
.ventz-ai-identity__copy{display:grid;min-width:0;gap:2px;line-height:1.15}
.ventz-ai-identity__copy strong{color:inherit;font-size:.8rem;font-weight:900;letter-spacing:.025em}
.ventz-ai-identity__copy small{color:inherit;font-size:.68rem;font-weight:700;opacity:.72}
.ventz-ai-identity__copy small:empty{display:none}
.ventz-ai-identity.is-action{gap:9px}
.ventz-ai-identity.is-action .ventz-ai-identity__logo{flex-basis:28px;width:28px;height:28px}
.ventz-ai-identity.is-action .ventz-ai-identity__logo img{width:26px;height:26px}
.ventz-ai-identity.is-compact{gap:7px}
.ventz-ai-identity.is-compact .ventz-ai-identity__logo{flex-basis:22px;width:22px;height:22px;border-radius:7px;box-shadow:none}
.ventz-ai-identity.is-compact .ventz-ai-identity__logo img{width:20px;height:20px}
.ventz-ai-identity.is-compact .ventz-ai-identity__copy strong{font-size:.72rem}
.ventz-ai-identity.is-compact .ventz-ai-identity__copy small{font-size:.64rem}
.ventz-ai-identity.is-chip{gap:6px}
.ventz-ai-identity.is-chip .ventz-ai-identity__logo{flex-basis:18px;width:18px;height:18px;border-radius:6px;box-shadow:none}
.ventz-ai-identity.is-chip .ventz-ai-identity__logo img{width:17px;height:17px}
.ventz-ai-identity.is-chip .ventz-ai-identity__copy strong{font-size:.66rem}
.ventz-ai-identity.is-chip .ventz-ai-identity__copy small{display:none}

/* Wiederverwendbares Suite-Raster: auch zwei Entscheidungen behalten die Dreierspalten-Geometrie. */
body.portal-modern .shell > main .portal-unified-tile-grid.portal-unified-tile-grid--suite-columns:has(> .section-tile:nth-child(2):last-child){
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  justify-content:start!important;
  width:100%!important;
  max-width:1360px!important;
}
body.portal-modern .shell > main .portal-unified-tile-grid.portal-unified-tile-grid--suite-columns:has(> .section-tile:nth-child(2):last-child) > .portal-unified-tile{
  min-height:140px!important;
  height:auto!important;
  max-height:none!important;
  padding:17px 18px!important;
}
@media(max-width:1180px){
  body.portal-modern .shell > main .portal-unified-tile-grid.portal-unified-tile-grid--suite-columns:has(> .section-tile:nth-child(2):last-child){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:900px){
  body.portal-modern .shell > main .portal-unified-tile-grid.portal-unified-tile-grid--suite-columns:has(> .section-tile:nth-child(2):last-child){
    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;
  }
  body.portal-modern .shell > main .portal-unified-tile-grid.portal-unified-tile-grid--suite-columns:has(> .section-tile:nth-child(2):last-child) > .portal-unified-tile{
    min-height:108px!important;
    padding:14px 15px!important;
  }
}

.portal-modern .btn,.portal-modern button.btn{min-height:44px;padding:0 18px;border:1px solid #d8dde5;border-radius:12px;background:#fff;color:#171a22;font-weight:800;box-shadow:0 3px 10px rgba(23,26,34,.04);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}
.portal-modern .btn:hover,.portal-modern button.btn:hover{transform:translateY(-1px);border-color:#bec5cf;box-shadow:0 8px 20px rgba(23,26,34,.09)}
.portal-modern .btn.primary,.portal-modern button.btn.primary{border-color:#d80e25;background:linear-gradient(135deg,#ee0925,#bd081d);color:#fff;box-shadow:0 9px 22px rgba(216,14,37,.19)}
.portal-modern .btn.primary:hover,.portal-modern button.btn.primary:hover{background:linear-gradient(135deg,#f30a28,#aa0719);box-shadow:0 12px 28px rgba(216,14,37,.27)}
.portal-modern .btn.danger,.portal-modern button.btn.danger{border-color:#efc4ca;background:#fff;color:#a80c20;box-shadow:none}
.portal-modern .btn.danger:hover,.portal-modern button.btn.danger:hover{border-color:#d80e25;background:#fff5f6}
.portal-modern .btn:focus-visible,.portal-modern button.btn:focus-visible{outline:3px solid rgba(223,16,37,.2);outline-offset:3px}

.portal-modern label.check,.portal-modern label.toggle-line{display:flex;align-items:center;gap:10px;min-width:0;min-height:42px;padding:9px 12px;border:1px solid #e0e4ea;border-radius:12px;background:#f8f9fb;color:#292e37;font-weight:750;cursor:pointer}
.portal-modern label.check input[type=checkbox],.portal-modern label.toggle-line input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 auto;width:42px!important;height:24px!important;margin:0;border:1px solid #c8ced7!important;border-radius:999px!important;background:#dfe3e9!important;box-shadow:inset 0 1px 2px rgba(23,26,34,.08);cursor:pointer;transition:.2s ease}
.portal-modern label.check input[type=checkbox]:before,.portal-modern label.toggle-line input[type=checkbox]:before{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(23,26,34,.18);transition:transform .2s ease}
.portal-modern label.check input[type=checkbox]:checked,.portal-modern label.toggle-line input[type=checkbox]:checked{border-color:#d80e25!important;background:#d80e25!important}
.portal-modern label.check input[type=checkbox]:checked:before,.portal-modern label.toggle-line input[type=checkbox]:checked:before{transform:translateX(18px)}
.portal-modern label.check:has(input:checked),.portal-modern label.toggle-line:has(input:checked){border-color:#f0b9c1;background:#fff7f8}

.choice-chip-grid{display:flex;flex-wrap:wrap;gap:9px}
.choice-chip{position:relative;display:inline-flex!important;align-items:center!important;min-height:42px;margin:0!important;padding:9px 14px!important;border:1px solid #dce1e8!important;border-radius:999px!important;background:#fff!important;color:#444c59!important;font-size:13px!important;font-weight:800!important;cursor:pointer;transition:.18s ease}
.choice-chip input{position:absolute;opacity:0;pointer-events:none}
.choice-chip:hover{transform:translateY(-1px);border-color:#e5a2ad!important;box-shadow:0 7px 16px rgba(49,24,31,.07)}
.choice-chip:has(input:checked){border-color:#b70d21!important;background:#481120!important;color:#fff!important;box-shadow:0 8px 19px rgba(86,17,33,.16)}
.choice-chip:has(input:checked):before{content:"✓";margin-right:7px;color:#ff9eaa}

.question-ai-studio{display:grid;grid-template-columns:58px minmax(0,1fr);gap:18px;margin-bottom:18px;padding:22px;border:1px solid #ecc7ce;border-radius:18px;background:linear-gradient(128deg,#fff 0%,#fff9fa 58%,#fcecef 100%);box-shadow:0 12px 30px rgba(54,33,39,.06)}
.question-ai-studio__head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.question-ai-studio__head h2{margin:3px 0 6px}
.question-ai-studio__head p:last-child{margin:0;color:#687284;line-height:1.5}
.question-ai-studio__form{grid-column:2;display:grid;gap:14px}
.question-ai-studio__custom{display:grid;gap:7px;font-weight:800}
.question-ai-studio__custom textarea{min-height:90px}
.question-ai-preview{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.question-ai-preview>section{padding:15px;border:1px solid #e2e6ec;border-radius:13px;background:#fff}
.question-ai-preview h3{margin:0 0 10px;font-size:15px}
.question-ai-preview ol{display:grid;gap:8px;margin:0;padding-left:21px;color:#4e5868;font-size:13px;line-height:1.45}
.question-ai-studio__actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.question-ai-studio__status{color:#697386;font-size:13px}

.questionnaire-stack{display:grid;gap:16px}
.questionnaire-panel{padding:0!important;overflow:hidden}
.questionnaire-panel__head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid #e2e6ec}
.questionnaire-panel__head h2{margin:3px 0 4px}
.questionnaire-panel__head p:last-child{margin:0;color:#687284}
.questionnaire-count{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.questionnaire-count span{padding:6px 9px;border-radius:999px;background:#f0f2f5;color:#626c7b;font-size:11px;font-weight:800}
.question-editor-list{display:grid;gap:10px;padding:16px}
.question-editor-card{border:1px solid #e0e4ea;border-radius:14px;background:#fff;overflow:hidden}
.question-editor-card[open]{border-color:#e9b5bd;box-shadow:0 9px 24px rgba(44,29,34,.07)}
.question-editor-summary{display:grid;grid-template-columns:38px minmax(0,1fr) auto auto;gap:13px;align-items:center;padding:15px 17px;cursor:pointer;list-style:none}
.question-editor-summary::-webkit-details-marker{display:none}
.question-order{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:#f0f2f5;color:#667080;font-size:11px;font-weight:850}
.question-editor-summary b{min-width:0;line-height:1.35}
.question-meta,.question-state{padding:5px 8px;border-radius:999px;background:#f1f3f6;color:#657080;font-size:10.5px;font-style:normal;font-weight:800;white-space:nowrap}
.question-state.is-draft{background:#fff0d9;color:#965b00}
.question-state.is-active{background:#e7f6ee;color:#18754c}
.question-editor-body{padding:18px;border-top:1px solid #e2e6ec;background:#fafbfc}
.question-editor-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.question-editor-form label{display:grid!important;gap:7px!important;min-width:0!important;font-weight:800!important}
.question-editor-form .wide{grid-column:1/-1}
.question-editor-form input,.question-editor-form select,.question-editor-form textarea{width:100%!important;max-width:none!important;box-sizing:border-box!important}
.question-editor-form textarea{min-height:108px}
.question-editor-options{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.question-editor-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:5px}
.question-create{margin:0 16px 16px;border:1px dashed #d6a9b1;border-radius:14px;background:#fff9fa}
.question-create>summary{padding:15px 17px;color:#a20d20;font-weight:850;cursor:pointer}
.question-create .question-editor-body{border-top:1px dashed #dfc1c6}

.notification-card-list{display:grid;gap:10px}
.notification-card{border:1px solid #e0e4ea;border-radius:14px;background:#fff;overflow:hidden}
.notification-card[open]{border-color:#e7b5bd;box-shadow:0 9px 24px rgba(42,29,34,.07)}
.notification-card>summary{display:grid;grid-template-columns:minmax(0,1fr) auto 28px;gap:13px;align-items:center;padding:16px 18px;cursor:pointer;list-style:none}
.notification-card>summary::-webkit-details-marker{display:none}
.notification-card>summary h3{margin:0 0 4px}
.notification-card>summary p{margin:0;color:#6b7585;font-size:12.5px}
.notification-card>summary:after{content:"+";display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:8px;background:#f1f3f6;color:#5f6877;font-size:18px;font-weight:500}
.notification-card[open]>summary:after{content:"−";background:#531322;color:#fff}
.notification-card-body{display:grid;gap:15px;padding:18px;border-top:1px solid #e2e6ec;background:#fafbfc}
.notification-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.notification-card-grid label{display:grid;gap:7px;font-weight:800}
.notification-card-grid .span-2{grid-column:1/-1}
.notification-card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:10px;align-items:center}

@media(max-width:760px){
 .question-ai-studio{grid-template-columns:44px minmax(0,1fr);padding:18px}
 .question-ai-studio .ventz-ai-mark{width:44px;height:44px}
 .question-ai-studio__head{display:block}
 .question-ai-studio__form{grid-column:1/-1}
 .question-ai-preview,.question-editor-form,.question-editor-options,.notification-card-grid{grid-template-columns:1fr}
 .question-editor-form .wide,.notification-card-grid .span-2{grid-column:auto}
 .question-editor-summary{grid-template-columns:34px minmax(0,1fr)}
 .question-editor-summary .question-meta,.question-editor-summary .question-state{grid-column:2}
 .question-editor-actions,.question-ai-studio__actions{align-items:stretch;flex-direction:column}
 .question-editor-actions .btn,.question-ai-studio__actions .btn{width:100%}
 .notification-card>summary{grid-template-columns:minmax(0,1fr) auto}
 .notification-card>summary:after{grid-row:1/3;grid-column:2}
 .notification-card>summary .status-pill{grid-column:1}
 .notification-card-actions{grid-template-columns:1fr}
 .notification-card-actions .btn{width:100%}
}


/* Geführtes Leistungsjahr: eindeutige Aktionen und erreichbarer Footer */
body.workspace-performance .cycle-ai-actions{
  position:sticky;
  bottom:-24px;
  z-index:8;
  margin:18px -25px -24px;
  padding:14px 25px 16px;
  border-top:1px solid #e0e4ea;
  background:rgba(245,247,250,.97);
  box-shadow:0 -8px 24px rgba(23,26,34,.06);
  backdrop-filter:blur(10px)
}
body.workspace-performance [data-cycle-ai-apply][hidden],
body.workspace-performance [data-cycle-ai-next][hidden],
body.workspace-performance [data-cycle-ai-back][hidden],
body.workspace-performance [data-cycle-ai-discard][hidden]{display:none!important}
body.workspace-performance .cycle-ai-focus{display:grid;gap:12px;margin-top:24px}
body.workspace-performance .cycle-ai-focus h4{margin:0;font-size:16px}
body.workspace-performance .cycle-ai-focus>p{margin:0;color:#687284;font-size:13px}
body.workspace-performance .cycle-ai-focus>label{display:grid;gap:7px;margin-top:2px;font-weight:800}
body.workspace-performance .cycle-ai-focus textarea{min-height:92px}
body.workspace-performance .cycle-ai-result{min-height:0}
@media(max-width:760px){
 body.workspace-performance .cycle-ai-actions{bottom:-14px;margin:16px -14px -14px;padding:12px 14px 14px}
 body.workspace-performance .cycle-ai-actions [data-cycle-ai-status]{order:3;flex-basis:100%}
 body.workspace-performance .cycle-ai-actions .btn{flex:1}
}


/* Verbindliche globale Auswahlkomponenten: keine alten roten Punkt-Buttons mehr */
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip,.aueg-scope-chip,.checkbox-row,.inline-check,.multi-options label,.required-check,.walkin-toggle,.nl-company-chip,.check-list label)>input:is([type="checkbox"],[type="radio"]){
  appearance:none!important;
  -webkit-appearance:none!important;
  position:relative!important;
  display:grid!important;
  place-content:center!important;
  flex:0 0 22px!important;
  width:22px!important;
  min-width:22px!important;
  height:22px!important;
  margin:0!important;
  padding:0!important;
  border:1.5px solid #bfc7d2!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(23,26,34,.04)!important;
  transform:none!important;
  cursor:pointer!important
}
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip,.aueg-scope-chip,.checkbox-row,.inline-check,.multi-options label,.required-check,.walkin-toggle,.nl-company-chip,.check-list label)>input:is([type="checkbox"],[type="radio"])::before{
  content:"✓"!important;
  display:block!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1!important;
  opacity:0!important;
  transform:scale(.55)!important;
  transition:opacity .14s ease,transform .14s ease!important
}
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip,.aueg-scope-chip,.checkbox-row,.inline-check,.multi-options label,.required-check,.walkin-toggle,.nl-company-chip,.check-list label)>input:is([type="checkbox"],[type="radio"]):checked{
  border-color:#d80e25!important;
  background:#d80e25!important;
  box-shadow:0 0 0 4px rgba(216,14,37,.09)!important
}
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip,.aueg-scope-chip,.checkbox-row,.inline-check,.multi-options label,.required-check,.walkin-toggle,.nl-company-chip,.check-list label)>input:is([type="checkbox"],[type="radio"]):checked::before{
  opacity:1!important;
  transform:scale(1)!important
}
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip):has(>input:checked){
  border-color:#efb5be!important;
  background:#fff7f8!important
}
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip)>input:disabled{cursor:not-allowed!important}
body.portal-modern :is(.role-option,.scope-area-check,.scope-option,.scope-chip):has(>input:disabled){opacity:.68}

/* Ein Schieberegler für Konto- und Datenbereichsregeln */
body.portal-modern label.switch-line{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  min-width:0!important;
  min-height:68px!important;
  margin:0!important;
  padding:13px 15px!important;
  border:1px solid #dfe4ea!important;
  border-radius:14px!important;
  background:#fff!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  cursor:pointer!important
}
body.portal-modern label.switch-line>input{
  position:absolute!important;
  inline-size:1px!important;
  block-size:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important
}
body.portal-modern label.switch-line>span{
  position:relative!important;
  display:block!important;
  flex:0 0 44px!important;
  width:44px!important;
  height:26px!important;
  border:0!important;
  border-radius:999px!important;
  background:#dce2e9!important;
  box-shadow:inset 0 1px 2px rgba(23,26,34,.09)!important;
  transition:background .18s ease!important
}
body.portal-modern label.switch-line>span::after{
  content:""!important;
  position:absolute!important;
  top:3px!important;
  left:3px!important;
  width:20px!important;
  height:20px!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 2px 6px rgba(23,26,34,.22)!important;
  transform:translateX(0)!important;
  transition:transform .18s ease!important
}
body.portal-modern label.switch-line:has(>input:checked){
  border-color:#efb5be!important;
  background:#fff8f9!important
}
body.portal-modern label.switch-line:has(>input:checked)>span{background:#d80e25!important}
body.portal-modern label.switch-line:has(>input:checked)>span::after{transform:translateX(18px)!important}
body.portal-modern label.switch-line:focus-within{outline:3px solid rgba(216,14,37,.13)!important;outline-offset:2px!important}
body.portal-modern label.switch-line>div{min-width:0!important}
body.portal-modern label.switch-line>div b,
body.portal-modern label.switch-line>div small{display:block!important}
body.portal-modern label.switch-line>div small{margin-top:3px!important;color:#657083!important;line-height:1.4!important}

/* Performance-Fragebögen folgen immer derselben globalen Flucht */
body.workspace-performance .shell>main>.questionnaire-stack{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  justify-items:stretch!important;
  align-items:stretch!important;
  width:min(100%,var(--workspace-max))!important;
  max-width:var(--workspace-max)!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important
}
body.workspace-performance .questionnaire-stack>.questionnaire-panel{
  justify-self:stretch!important;
  align-self:stretch!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important
}


/* Responsive signature capture: finger, pen, mouse and file upload use one secure form. */
.portal-modern .signature-capture {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe4eb;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #fafbfc 100%);
  box-shadow: 0 10px 28px rgba(20, 25, 35, .055);
  box-sizing: border-box;
}

.portal-modern .signature-capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.portal-modern .signature-capture-head > div:first-child {
  min-width: 0;
}

.portal-modern .signature-capture-head b,
.portal-modern .signature-capture-head small {
  display: block;
}

.portal-modern .signature-capture-head b {
  color: #171a22;
  font-size: 17px;
}

.portal-modern .signature-capture-head small {
  max-width: 650px;
  margin-top: 5px;
  color: #687386;
  line-height: 1.45;
}

.portal-modern .signature-source-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e0e4ea;
  border-radius: 13px;
  background: #f1f3f6;
}

.portal-modern .signature-source-switch button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5d6675;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.portal-modern .signature-source-switch button[aria-selected="true"] {
  background: #fff;
  color: #171a22;
  box-shadow: 0 4px 13px rgba(20, 25, 35, .09);
}

.portal-modern .signature-source-switch button:focus-visible {
  outline: 3px solid rgba(216, 14, 37, .16);
  outline-offset: 2px;
}

.portal-modern .signature-capture-panel {
  min-width: 0;
}

.portal-modern .signature-capture-panel[hidden] {
  display: none !important;
}

.portal-modern .signature-pad-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1.5px solid #cfd6e0;
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, .96), rgba(255, 255, 255, .96)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(103, 115, 134, .06) 31px 32px);
  box-shadow: inset 0 1px 4px rgba(20, 25, 35, .035);
}

.portal-modern .signature-pad-frame:focus-within {
  border-color: #d80e25;
  box-shadow: 0 0 0 4px rgba(216, 14, 37, .09);
}

.portal-modern .signature-pad-canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: clamp(190px, 23vw, 260px);
  min-height: 190px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.portal-modern .signature-pad-baseline {
  position: absolute;
  z-index: 1;
  right: 8%;
  bottom: 28%;
  left: 8%;
  height: 1px;
  background: #dfe3e9;
  pointer-events: none;
}

.portal-modern .signature-pad-hint {
  position: absolute;
  z-index: 1;
  left: 8%;
  bottom: calc(28% + 10px);
  color: #a1a8b3;
  font-size: 12px;
  font-weight: 750;
  pointer-events: none;
}

.portal-modern .signature-pad-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
}

.portal-modern .signature-pad-toolbar small {
  color: #687386;
  line-height: 1.45;
}

.portal-modern .signature-capture-status {
  min-height: 20px;
  margin: 0;
  color: #4f5a6b;
  font-size: 12.5px;
  font-weight: 750;
}

.portal-modern .signature-capture-status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #29b67a;
  box-shadow: 0 0 0 4px rgba(41, 182, 122, .1);
}

.portal-modern .signature-capture.has-error {
  border-color: #e5a5af;
  background: #fffafb;
}

.portal-modern .signature-capture .field-error {
  margin: -6px 0 0;
  color: #a90d20;
  font-size: 13px;
  font-weight: 800;
}

.portal-modern .signature-capture .settings-upload-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

.portal-modern .signature-setup-grid > .span-2 {
  min-width: 0;
}

@media (max-width: 760px) {
  .portal-modern .signature-capture {
    gap: 14px;
    padding: 14px;
    border-radius: 15px;
  }

  .portal-modern .signature-capture-head {
    display: grid;
  }

  .portal-modern .signature-source-switch {
    width: 100%;
  }

  .portal-modern .signature-source-switch button {
    min-width: 0;
    min-height: 46px;
    padding-inline: 9px;
    white-space: normal;
  }

  .portal-modern .signature-pad-canvas {
    height: 210px;
    min-height: 210px;
  }

  .portal-modern .signature-pad-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-modern .signature-pad-toolbar .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-modern .signature-capture {
    scroll-behavior: auto;
  }
}

/* Settings detail pages are work forms, not tile grids.
   This terminal override protects them from the global .settings-grid tile rules. */
.portal-modern .settings-grid.settings-detail-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1040px) !important;
  justify-content: start !important;
  justify-items: stretch !important;
  width: 100% !important;
  max-width: var(--ui-content, 1480px) !important;
  min-width: 0 !important;
}

.portal-modern .settings-grid.settings-detail-grid > .settings-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 1040px !important;
  min-width: 0 !important;
}

.portal-modern .settings-signature-card .signature-options-grid {
  grid-template-columns: minmax(280px, .65fr) minmax(520px, 1.35fr) !important;
  align-items: start !important;
}

.portal-modern .settings-signature-card .signature-option-panel {
  min-width: 0 !important;
}

@media (max-width: 960px) {
  .portal-modern .settings-grid.settings-detail-grid,
  .portal-modern .settings-signature-card .signature-options-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Academy Phase 1A: der Ebenenrueckweg ist auch auf Genehmigungsseiten ein
   vollwertiges Tastatur- und Touch-Ziel. */
.portal-modern .page-back-slot .global-back {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
}
.portal-modern.workspace-academy .academy-v1a .page-head::after {
  display: none !important;
}
.portal-modern.workspace-academy .academy-catalog-panel table.academy-catalog-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}
.portal-modern.workspace-academy .training-head::after {
  display: none !important;
}
.portal-modern.workspace-academy .course-hero {
  color: #182230 !important;
}
.portal-modern.workspace-academy .course-hero .course-facts > div {
  background: #f4f7fa !important;
}
.portal-modern.workspace-academy .course-hero .course-facts span {
  color: #5d6b7e !important;
}
.portal-modern.workspace-academy .attendee-row details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}
.portal-modern.workspace-academy .cancel-box > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
}
.portal-modern.workspace-academy :is(h1, h2, h3, p) {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.portal-modern.workspace-academy .academy-text-scale-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid #cfd8e2;
  border-radius: 12px;
  background: #fff;
  color: #253346;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.portal-modern.workspace-academy .academy-text-scale-toggle:hover { border-color: #8097a8; background: #f5f9fb; }
.portal-modern.workspace-academy .academy-text-scale-toggle:focus-visible { outline: 3px solid #1676a3; outline-offset: 3px; }
.portal-modern.workspace-academy .academy-text-scale-toggle[aria-pressed="true"] { border-color: #245a78; background: #eaf3f6; color: #173e56; }

html.academy-text-200 body.portal-modern.workspace-academy { font-size: 32px; }
html.academy-text-200 body.portal-modern.workspace-academy :is(p, li, dd, label, input, select, textarea, button, a, summary, th, td) { font-size: 2rem !important; line-height: 1.5 !important; white-space: normal; }
html.academy-text-200 body.portal-modern.workspace-academy :is(small, dt, .eyebrow, .academy-kicker, .academy-chip, .academy-status, .academy-availability) { font-size: 1.5rem !important; line-height: 1.45 !important; white-space: normal; }
html.academy-text-200 body.portal-modern.workspace-academy h1 { font-size: 4.5rem !important; line-height: 1.08 !important; }
html.academy-text-200 body.portal-modern.workspace-academy h2 { font-size: 3.5rem !important; line-height: 1.12 !important; }
html.academy-text-200 body.portal-modern.workspace-academy h3 { font-size: 2.75rem !important; line-height: 1.18 !important; }
html.academy-text-200 body.portal-modern.workspace-academy :is(p, li, dd, a, button, summary, th, td, h1, h2, h3, small, dt, label) { overflow-wrap: break-word; word-break: normal; hyphens: none; }
body.portal-modern.workspace-academy .shell .sidebar .profile.profile-card-v2 .profile-shortcuts > a,
body.portal-modern.workspace-academy .shell .sidebar .profile.profile-card-v2 .profile-logout-button {
  min-height: 44px !important;
}
@media (max-width: 760px) {
  html.academy-text-200 body.portal-modern.workspace-academy h1 { font-size: clamp(2.5rem, 12vw, 3rem) !important; }
  html.academy-text-200 body.portal-modern.workspace-academy h2 { font-size: 2.5rem !important; }
  html.academy-text-200 body.portal-modern.workspace-academy h3 { font-size: 2.25rem !important; }
  html.academy-text-200 body.portal-modern.workspace-academy :is(h1, h2, h3) { overflow-wrap: normal; }
}
.portal-modern.workspace-academy .attendee-row details[open] {
  grid-column: 1 / -1;
  width: 100%;
}
.portal-modern.workspace-academy .attendee-row details[open] .inline-edit {
  width: 100%;
  margin-top: 10px;
}
.portal-modern.workspace-academy .attendee-row details[open] .btn.small {
  min-height: 44px !important;
}

/* Gemeinsame dunkle Portaloberflaechen. Die Light-Mode-Werte bleiben unveraendert. */
html body.ventz-body.theme-dark {
  background: var(--ui-page) !important;
}

body.portal-modern.theme-dark {
  --portal-ink: var(--ui-text);
  --portal-muted: var(--ui-text-secondary);
  --portal-canvas: var(--ui-page);
  --portal-surface: var(--ui-surface);
  --portal-soft: var(--ui-surface-soft);
  --portal-line: var(--ui-border);
  --portal-shadow: var(--ui-shadow);
  --portal-shadow-soft: var(--ui-shadow-sm);
  background: var(--ui-page) !important;
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell {
  background:
    radial-gradient(circle at 92% 2%, color-mix(in srgb, var(--ui-brand) 8%, transparent), transparent 29rem),
    var(--ui-page) !important;
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell > main {
  background: var(--ui-page) !important;
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell > main > .page-head {
  border-color: var(--ui-border) !important;
  background:
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--ui-brand) 10%, transparent), transparent 22rem),
    linear-gradient(120deg, var(--ui-surface) 0%, var(--ui-surface) 70%, color-mix(in srgb, var(--ui-brand) 5%, var(--ui-surface)) 100%) !important;
  box-shadow: var(--ui-shadow-sm) !important;
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell > main > .page-head > h1 {
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell > main > .page-head > p:not(.eyebrow) {
  color: var(--ui-text-secondary) !important;
}

body.portal-modern.theme-dark .shell > main :is(
  .section-tile,
  .dashboard-tile,
  .feature,
  .subtile,
  .settings-tile,
  .portal-card,
  .template-card,
  .candidate-card,
  .training-card,
  .perf-hub-card,
  .doc-action-card,
  .my-doc-tile,
  .ventz-app-card,
  .legal-card,
  .admin-card,
  .module-card,
  .module-card-v56,
  .one-action-card
) {
  border-color: var(--ui-border) !important;
  background: linear-gradient(180deg, var(--ui-surface), var(--ui-surface-soft)) !important;
  box-shadow: var(--ui-shadow-sm) !important;
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell > main :is(
  .section-tile,
  .dashboard-tile,
  .feature,
  .subtile,
  .settings-tile,
  .portal-card,
  .template-card,
  .candidate-card,
  .training-card,
  .perf-hub-card,
  .doc-action-card,
  .my-doc-tile,
  .ventz-app-card,
  .legal-card,
  .admin-card,
  .module-card,
  .module-card-v56,
  .one-action-card
) :is(h2, h3) {
  color: var(--ui-text) !important;
}

body.portal-modern.theme-dark .shell > main :is(
  .section-tile,
  .dashboard-tile,
  .feature,
  .subtile,
  .settings-tile,
  .portal-card,
  .template-card,
  .candidate-card,
  .training-card,
  .perf-hub-card,
  .doc-action-card,
  .my-doc-tile,
  .ventz-app-card,
  .legal-card,
  .admin-card,
  .module-card,
  .module-card-v56,
  .one-action-card
) p:not(.eyebrow) {
  color: var(--ui-text-secondary) !important;
}

body.portal-modern.theme-dark .shell > main :is(
  .section-tile-icon,
  .dashboard-tile-icon,
  .feature-icon,
  .subtile-icon,
  .settings-tile-icon,
  .portal-card-icon,
  .template-card-icon,
  .candidate-card-icon,
  .training-card-icon,
  .perf-hub-icon,
  .doc-action-icon,
  .my-doc-icon,
  .ventz-app-icon,
  .admin-card-icon,
  .module-card-icon,
  .module-icon-v56,
  .one-action-icon
) {
  background: color-mix(in srgb, currentColor 14%, var(--ui-surface-soft)) !important;
}

body.portal-modern.theme-dark .shell > main :is(
  .section-tile-arrow,
  .dashboard-tile-arrow,
  .feature-arrow,
  .subtile-arrow,
  .settings-tile-arrow,
  .portal-card-arrow,
  .template-card-arrow,
  .candidate-card-arrow,
  .training-card-arrow,
  .perf-hub-arrow,
  .doc-action-arrow,
  .my-doc-arrow,
  .ventz-app-arrow,
  .admin-card-arrow,
  .module-card-arrow
) {
  background: var(--ui-surface-soft) !important;
  color: var(--ui-text) !important;
}

@media (prefers-color-scheme: dark) {
  html body.ventz-body.theme-system {
    background: var(--ui-page) !important;
  }

  body.portal-modern.theme-system {
    --portal-ink: var(--ui-text);
    --portal-muted: var(--ui-text-secondary);
    --portal-canvas: var(--ui-page);
    --portal-surface: var(--ui-surface);
    --portal-soft: var(--ui-surface-soft);
    --portal-line: var(--ui-border);
    --portal-shadow: var(--ui-shadow);
    --portal-shadow-soft: var(--ui-shadow-sm);
    background: var(--ui-page) !important;
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell {
    background:
      radial-gradient(circle at 92% 2%, color-mix(in srgb, var(--ui-brand) 8%, transparent), transparent 29rem),
      var(--ui-page) !important;
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell > main {
    background: var(--ui-page) !important;
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell > main > .page-head {
    border-color: var(--ui-border) !important;
    background:
      radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--ui-brand) 10%, transparent), transparent 22rem),
      linear-gradient(120deg, var(--ui-surface) 0%, var(--ui-surface) 70%, color-mix(in srgb, var(--ui-brand) 5%, var(--ui-surface)) 100%) !important;
    box-shadow: var(--ui-shadow-sm) !important;
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell > main > .page-head > h1 {
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell > main > .page-head > p:not(.eyebrow) {
    color: var(--ui-text-secondary) !important;
  }

  body.portal-modern.theme-system .shell > main :is(
    .section-tile,
    .dashboard-tile,
    .feature,
    .subtile,
    .settings-tile,
    .portal-card,
    .template-card,
    .candidate-card,
    .training-card,
    .perf-hub-card,
    .doc-action-card,
    .my-doc-tile,
    .ventz-app-card,
    .legal-card,
    .admin-card,
    .module-card,
    .module-card-v56,
    .one-action-card
  ) {
    border-color: var(--ui-border) !important;
    background: linear-gradient(180deg, var(--ui-surface), var(--ui-surface-soft)) !important;
    box-shadow: var(--ui-shadow-sm) !important;
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell > main :is(
    .section-tile,
    .dashboard-tile,
    .feature,
    .subtile,
    .settings-tile,
    .portal-card,
    .template-card,
    .candidate-card,
    .training-card,
    .perf-hub-card,
    .doc-action-card,
    .my-doc-tile,
    .ventz-app-card,
    .legal-card,
    .admin-card,
    .module-card,
    .module-card-v56,
    .one-action-card
  ) :is(h2, h3) {
    color: var(--ui-text) !important;
  }

  body.portal-modern.theme-system .shell > main :is(
    .section-tile,
    .dashboard-tile,
    .feature,
    .subtile,
    .settings-tile,
    .portal-card,
    .template-card,
    .candidate-card,
    .training-card,
    .perf-hub-card,
    .doc-action-card,
    .my-doc-tile,
    .ventz-app-card,
    .legal-card,
    .admin-card,
    .module-card,
    .module-card-v56,
    .one-action-card
  ) p:not(.eyebrow) {
    color: var(--ui-text-secondary) !important;
  }

  body.portal-modern.theme-system .shell > main :is(
    .section-tile-icon,
    .dashboard-tile-icon,
    .feature-icon,
    .subtile-icon,
    .settings-tile-icon,
    .portal-card-icon,
    .template-card-icon,
    .candidate-card-icon,
    .training-card-icon,
    .perf-hub-icon,
    .doc-action-icon,
    .my-doc-icon,
    .ventz-app-icon,
    .admin-card-icon,
    .module-card-icon,
    .module-icon-v56,
    .one-action-icon
  ) {
    background: color-mix(in srgb, currentColor 14%, var(--ui-surface-soft)) !important;
  }

  body.portal-modern.theme-system .shell > main :is(
    .section-tile-arrow,
    .dashboard-tile-arrow,
    .feature-arrow,
    .subtile-arrow,
    .settings-tile-arrow,
    .portal-card-arrow,
    .template-card-arrow,
    .candidate-card-arrow,
    .training-card-arrow,
    .perf-hub-arrow,
    .doc-action-arrow,
    .my-doc-arrow,
    .ventz-app-arrow,
    .admin-card-arrow,
    .module-card-arrow
  ) {
    background: var(--ui-surface-soft) !important;
    color: var(--ui-text) !important;
  }
}
