/* Additive NFHProt adaptation of the documented frontend Soft UI system. */
:root {
  --ui-bg:#f9fafb;
  --ui-surface:#fff;
  --ui-raised:#f3f4f6;
  --ui-text:#111827;
  --ui-text-2:#374151;
  --ui-muted:#6b7280;
  --ui-border:#d1d5db;
  --ui-border-strong:#9ca3af;
  --ui-radius-sm:10px;
  --ui-radius:14px;
  --ui-radius-lg:20px;
  --ui-shadow-sm:0 1px 3px rgb(17 24 39 / 8%),0 1px 2px rgb(17 24 39 / 5%);
  --ui-shadow:0 10px 28px -12px rgb(17 24 39 / 22%);
  --ui-focus:0 0 0 3px color-mix(in srgb,var(--blue) 18%,transparent);
  --ui-transition:160ms cubic-bezier(.4,0,.2,1);
  --ink:var(--ui-text);
  --muted:var(--ui-muted);
  --line:var(--ui-border);
  --surface:var(--ui-surface);
  --canvas:var(--ui-bg);
  --radius:var(--ui-radius-lg);
  --shadow:var(--ui-shadow);
}

html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
body{background:var(--ui-bg);color:var(--ui-text);line-height:1.5}
h1,h2,h3{color:var(--ui-text);line-height:1.25;letter-spacing:-.025em}
p{line-height:1.6}
a,button,input,select,textarea,.panel,.stat-card,.nav-item{transition:background-color var(--ui-transition),border-color var(--ui-transition),box-shadow var(--ui-transition),color var(--ui-transition),transform var(--ui-transition)}
:focus-visible{outline:3px solid color-mix(in srgb,var(--blue) 35%,transparent);outline-offset:2px}

.app-shell{grid-template-columns:268px minmax(0,1fr);background:var(--ui-bg)}
.sidebar{padding:18px 14px;background:#f0f6f9;border-color:#cbdce5;box-shadow:1px 0 0 rgb(17 24 39 / 3%)}
.brand-lockup.compact{padding:0 8px 16px}
.compact .brand-mark{border-radius:12px;box-shadow:0 4px 14px rgb(227 6 19 / 20%)}
.sidebar nav{gap:2px}
.nav-item{min-height:38px;padding:7px 10px;border-radius:9px;color:var(--ui-text-2);font-size:13px;font-weight:600}
.nav-item:hover{background:rgb(255 255 255 / 72%);text-decoration:none;transform:translateX(2px)}
.nav-item.active{background:var(--ui-surface);color:var(--red);box-shadow:var(--ui-shadow-sm)}
.sidebar-foot{background:var(--ui-raised);border:1px solid var(--ui-border);border-radius:var(--ui-radius)}

.workspace{padding:clamp(24px,3vw,42px) clamp(18px,4vw,64px) 64px;background:var(--ui-bg)}
.topbar{min-height:52px;margin-bottom:28px}
.topbar h1,.form-heading h1{font-size:clamp(1.55rem,2.2vw,2rem);font-weight:650}
.eyebrow{color:var(--red);font-size:11px;font-weight:700;letter-spacing:.11em}
.user-menu{gap:10px;padding:5px 6px 5px 8px;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface);box-shadow:var(--ui-shadow-sm)}
.avatar{width:40px;height:40px;border-radius:11px;background:var(--blue);box-shadow:0 4px 12px color-mix(in srgb,var(--blue) 24%,transparent)}
.icon-button,.theme-toggle{width:40px;height:40px;flex-basis:40px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ui-text-2);box-shadow:none}
.icon-button:hover,.theme-toggle:hover{background:var(--ui-raised);border-color:var(--ui-border)}
.user-menu form{margin:0}.logout-button{min-height:40px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid color-mix(in srgb,var(--red) 28%,var(--ui-border));border-radius:10px;background:color-mix(in srgb,var(--red) 7%,var(--ui-surface));color:var(--red);font-size:12px;font-weight:700;cursor:pointer}.logout-button:hover{background:var(--red);color:#fff;border-color:var(--red);box-shadow:0 4px 14px color-mix(in srgb,var(--red) 22%,transparent)}.logout-icon{font-size:17px;line-height:1}

.panel,.stat-card,.protocol-form{background:var(--ui-surface);border:1px solid var(--ui-border);box-shadow:var(--ui-shadow-sm)}
.panel{border-radius:var(--ui-radius-lg)}
.panel+.panel{margin-top:20px}
.panel-head{padding:20px 22px;border-color:var(--ui-border)}
.panel-head h2{font-size:1.1rem;font-weight:650}
.panel-head p{color:var(--ui-muted)}
.app-shell .settings-form,.app-shell .admin-form,.app-shell .admin-card-form{padding:22px}
.app-shell .settings-form>.form-grid,.app-shell .admin-form,.app-shell .admin-card-form{gap:18px}
.app-shell .settings-form h3{margin:26px 0 8px;font-size:1rem}
.app-shell .settings-form>.form-actions{margin:22px -22px -22px;padding:18px 22px;border-top:1px solid var(--ui-border);background:var(--ui-raised)}
.stat-card{min-height:92px;padding:18px;border-radius:var(--ui-radius)}
.stat-card:hover{border-color:var(--ui-border-strong);box-shadow:var(--ui-shadow);transform:translateY(-1px)}
.stat-icon{border-radius:12px}
.empty-state{background:var(--ui-surface)}

.button{min-height:44px;border:1px solid transparent;border-radius:var(--ui-radius-sm);font-weight:650;box-shadow:none}
.button:hover{transform:translateY(-1px);text-decoration:none}
.button.primary{box-shadow:0 4px 14px color-mix(in srgb,var(--red) 20%,transparent)}
.button.secondary{box-shadow:0 4px 14px color-mix(in srgb,var(--blue) 17%,transparent)}
.button.ghost{background:var(--ui-raised);color:var(--ui-text-2);border-color:var(--ui-border)}
.button.ghost:hover{background:color-mix(in srgb,var(--ui-raised) 72%,var(--ui-border))}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea,.searchable-select__summary,.multi-select__summary{min-height:44px;border:1px solid var(--ui-border-strong);border-radius:var(--ui-radius-sm);background:var(--ui-surface);color:var(--ui-text);box-shadow:inset 0 1px 2px rgb(17 24 39 / 3%)}
input:not([type="checkbox"]):not([type="radio"]):focus,select:focus,textarea:focus,.searchable-select[open] .searchable-select__summary,.multi-select__details[open] .multi-select__summary{border-color:var(--blue);box-shadow:var(--ui-focus);outline:0}
label,.admin-form__field{color:var(--ui-text-2)}
.searchable-select__menu,.multi-select__menu{padding:6px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:var(--ui-surface);box-shadow:0 18px 42px rgb(17 24 39 / 18%)}
.searchable-select__options button{border-radius:8px;background:var(--ui-surface)}
.searchable-select__options button:hover,.searchable-select__options button.is-selected{background:color-mix(in srgb,var(--blue) 10%,var(--ui-surface))}
.toggle,.active-check,.measure-toggle{border-radius:var(--ui-radius-sm)}

table{background:var(--ui-surface)}
th{padding:12px 22px;background:var(--ui-raised);color:var(--ui-text-2);font-weight:650;border-color:var(--ui-border)}
td{padding:15px 22px;border-color:var(--ui-border);color:var(--ui-text)}
tbody tr:hover{background:color-mix(in srgb,var(--ui-raised) 65%,transparent)}
.badge{border:1px solid color-mix(in srgb,currentColor 18%,transparent);font-weight:700}
.catalog-row{border-color:var(--ui-border);border-radius:var(--ui-radius);background:var(--ui-surface);box-shadow:var(--ui-shadow-sm)}
.catalog-tabs{gap:8px}
.delete-user-page{max-width:760px;margin:0 auto}.delete-confirm__body{padding:22px}.delete-confirm__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.qm-actions{display:grid;gap:5px;min-width:112px}.qm-action-form{margin:0}.qm-action-form label{min-height:30px;padding:3px 7px;display:flex;align-items:center;gap:7px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-raised);font-size:11px;font-weight:650;cursor:pointer}.qm-action-form input{width:17px;height:17px;margin:0;accent-color:var(--green)}.qm-action-form input:disabled+span{color:var(--green)}.qm-action-form label:has(input:disabled){cursor:default;opacity:.82}

.form-page{background:var(--ui-bg)}
.form-topbar{max-width:1080px}
.protocol-form{max-width:1080px;border-radius:var(--ui-radius-lg);box-shadow:var(--ui-shadow)}
.form-heading{padding:28px 32px;background:var(--ui-surface);border-color:var(--ui-border)}
.form-section{padding:28px 32px;border-color:var(--ui-border)}
.section-number{border-radius:11px}
.section-jump{background:color-mix(in srgb,var(--ui-surface) 94%,transparent);border-color:var(--ui-border);backdrop-filter:blur(12px)}
.section-jump a{border-radius:9px}
.segmented,.check-pills,.nrs{border-radius:var(--ui-radius-sm);border-color:var(--ui-border)}
.segmented span,.check-pills span,.nrs span{border-color:var(--ui-border)}
.measure-block{border-radius:var(--ui-radius);box-shadow:var(--ui-shadow-sm)}
.measure-toggle{background:color-mix(in srgb,var(--ui-surface) 82%,transparent);border-color:color-mix(in srgb,var(--group-color) 22%,var(--ui-border))}
.sticky-actions{background:color-mix(in srgb,var(--ui-surface) 94%,transparent);border-color:var(--ui-border);backdrop-filter:blur(14px)}

.login-page{background:linear-gradient(145deg,#0f3b54 0%,#326b82 48%,#eef2f4 100%)}
.login-card{border-radius:24px;background:color-mix(in srgb,var(--ui-surface) 97%,transparent);box-shadow:0 24px 70px rgb(7 27 43 / 30%)}
.floating-field input{border-radius:12px}
.entity-chip{box-shadow:inset 0 0 0 1px rgb(22 101 52 / 8%)}

html[data-theme="dark"]{
  --ui-bg:#0f1419;
  --ui-surface:#1a1f2b;
  --ui-raised:#242a38;
  --ui-text:#f9fafb;
  --ui-text-2:#e5e7eb;
  --ui-muted:#9ca3af;
  --ui-border:#374151;
  --ui-border-strong:#4b5563;
  --ui-shadow-sm:0 1px 3px rgb(0 0 0 / 30%),0 1px 2px rgb(0 0 0 / 20%);
  --ui-shadow:0 16px 34px -12px rgb(0 0 0 / 55%);
  --ink:var(--ui-text);--muted:var(--ui-muted);--line:var(--ui-border);--surface:var(--ui-surface);--canvas:var(--ui-bg)
}
html[data-theme="dark"] .login-page{background:linear-gradient(145deg,#081f2c 0%,#102d3b 52%,#0f1419 100%)}
html[data-theme="dark"] .sidebar{background:#151e27;border-color:#2f3d49}
html[data-theme="dark"] .nav-item:hover{background:rgb(36 42 56 / 76%)}
html[data-theme="dark"] .nav-item.active{background:#242a38}
html[data-theme="dark"] .logout-button{background:rgb(227 6 19 / 12%);border-color:rgb(248 113 113 / 38%);color:#f87171}html[data-theme="dark"] .logout-button:hover{background:var(--red);color:#fff}
html[data-theme="dark"] .login-card,html[data-theme="dark"] .sidebar,html[data-theme="dark"] .panel,html[data-theme="dark"] .protocol-form,html[data-theme="dark"] .form-heading,html[data-theme="dark"] .form-section,html[data-theme="dark"] .stat-card{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme="dark"] .measure-toggle{background:rgb(26 31 43 / 78%)}
html[data-theme="dark"] .measure-block{background:color-mix(in srgb,var(--group-color) 9%,var(--ui-surface));border-color:color-mix(in srgb,var(--group-color) 48%,var(--ui-border))}
html[data-theme="dark"] .choice-field input+span{filter:saturate(.88) brightness(.78)}
html[data-theme="dark"] .choice-field input:checked+span{filter:none}

@media(max-width:768px){
  button,select,textarea,input:not([type="checkbox"]):not([type="radio"]),[role="button"],a.button,.nav-item{min-height:44px}
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:max(16px,1em)}
  button:has(>svg:only-child),.icon-button,.theme-toggle{min-width:44px}
}
@media(max-width:640px){
  .workspace{padding:20px 14px 76px}.topbar{align-items:center;margin-bottom:20px}.topbar h1{font-size:1.45rem}
  .user-menu{margin-left:auto;padding:3px}.user-menu>div:not(.avatar){display:none}.avatar{width:38px;height:38px}
  .logout-button{width:40px;min-width:40px;height:40px;min-height:40px;padding:0}.logout-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .stats-grid{gap:10px}.stat-card{min-height:82px;padding:13px}.panel{border-radius:16px}.panel-head{padding:18px}
  .form-heading,.form-section{padding:20px 16px}.protocol-form{border-radius:0;box-shadow:none}
  .sidebar{height:68px;padding:5px 6px calc(5px + env(safe-area-inset-bottom));overflow:hidden}
  .sidebar nav{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;overflow:hidden}
  .sidebar nav::-webkit-scrollbar{display:none}
  .sidebar .nav-item,.sidebar .nav-item:not(.active){min-width:0;min-height:54px;height:54px;padding:4px 1px;display:grid;grid-template-rows:19px minmax(0,1fr);gap:1px;place-items:center;border-radius:8px;font-size:7.5px;line-height:1.02;text-align:center;overflow-wrap:anywhere;white-space:normal}
  .sidebar .nav-item span{width:auto;font-size:16px;line-height:19px}.nav-item:hover{transform:none}
  .login-card{padding:30px 22px;border-radius:20px}
}

/* Verwaltung: OIDC und Kataloge nutzen dasselbe ausgerichtete Formularraster. */
.app-shell .settings-form { display:grid; gap:18px; }
.app-shell .settings-form .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.app-shell .settings-form label { display:grid; gap:7px; align-content:start; }
.app-shell .settings-form label > span { min-height:20px; }
.app-shell .admin-grid > .panel { min-height:100%; }
.app-shell .admin-grid > .panel-head { min-height:112px; }
@media (max-width:700px) { .app-shell .settings-form .form-grid { grid-template-columns:1fr; } }

/* Einheitliche Verwaltungsoberfläche für OIDC. */
.oidc-form { padding: 0 !important; gap: 0 !important; }
.oidc-section { padding: 22px; border-bottom: 1px solid var(--ui-border); }
.oidc-section:last-of-type { border-bottom: 0; }
.oidc-section h3 { margin: 0 0 5px !important; font-size: 1rem; }
.oidc-section p { margin: 0 0 16px; color: var(--ui-muted); font-size: .9rem; }
.oidc-section__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 18px; }
.oidc-section__grid label { display:grid; gap:7px; }
.oidc-section__grid label > span { min-height:20px; }
.oidc-mapping { display:flex; flex-wrap:wrap; gap:8px; }
.oidc-mapping span { padding:7px 10px; border:1px solid var(--ui-border); border-radius:999px; background:var(--ui-raised); font-size:.8rem; }
.oidc-form .form-actions { margin:0 !important; padding:18px 22px !important; }
@media (max-width:700px) { .oidc-section__grid { grid-template-columns:1fr; } }


/* Kompakte, wiederkehrende Konfigurationsoberflächen. */
.oidc-form,.appearance-form{padding:0!important;gap:0!important}
.oidc-section,.appearance-section{padding:20px 22px;border-bottom:1px solid var(--ui-border)}
.oidc-section:nth-of-type(odd),.appearance-section:nth-of-type(odd){background:color-mix(in srgb,var(--ui-raised) 56%,var(--ui-surface))}
.oidc-section h3,.appearance-section h3{margin:0 0 4px!important;font-size:1rem;font-weight:700}
.oidc-section p,.appearance-section p{margin:0 0 14px;color:var(--ui-muted);font-size:.86rem}
.oidc-section__grid,.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.appearance-grid--colors{grid-template-columns:repeat(4,minmax(0,1fr))}
.oidc-section__grid label,.appearance-grid label{display:grid;gap:6px;font-size:.85rem}
.oidc-section__grid label>span,.appearance-grid label>span{font-weight:650;color:var(--ui-text-2)}
.appearance-grid input[type=color]{width:100%;height:44px;padding:4px;border:1px solid var(--ui-border-strong);border-radius:10px;background:var(--ui-surface)}
.appearance-upload small{color:var(--ui-muted);font-size:.76rem}
.oidc-form .form-actions,.appearance-form .form-actions{margin:0!important;padding:16px 22px!important;background:var(--ui-surface)}
@media(max-width:760px){.oidc-section__grid,.appearance-grid,.appearance-grid--colors{grid-template-columns:1fr}.oidc-section,.appearance-section{padding:18px}.oidc-form .form-actions,.appearance-form .form-actions{padding:16px 18px!important}}

.profile-link{padding:0 8px;color:var(--ui-text-2);font-size:.8rem;font-weight:650;text-decoration:none}.profile-link:hover{color:var(--blue)}


/* Darstellung: Vorschau und Konfiguration folgen dem ResQDesk-Administrationsmuster. */
.appearance-heading{margin-bottom:26px}.appearance-heading h1{margin:0 0 6px;font-size:clamp(1.65rem,2.3vw,2.1rem)}.appearance-heading>p:last-child{margin:0;color:var(--ui-muted)}
.appearance-config{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(360px,1.1fr);gap:26px;align-items:start;max-width:1120px}.preview-label{margin:0 0 9px;font-size:.78rem;font-weight:750;letter-spacing:.08em;color:var(--ui-text-2)}.appearance-preview__card{display:grid;gap:22px;padding:30px;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-surface);box-shadow:var(--ui-shadow-sm)}.appearance-preview__card .brand-lockup{justify-content:center;text-align:center;flex-direction:column}.appearance-preview__card .brand-mark{width:96px;height:96px;border-radius:22px}.appearance-preview__card .brand-lockup strong{font-size:1.3rem}.appearance-preview__card p{text-align:center;margin:0;color:var(--ui-muted);font-size:.88rem}.appearance-preview__custom{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px;border-radius:10px;background:var(--ui-raised);font-size:.82rem;font-weight:650}.appearance-preview__custom img{width:34px;height:34px;object-fit:contain;border-radius:8px}.appearance-preview__card .button{justify-self:center}.appearance-fields{display:grid;gap:16px}.appearance-fields>label{display:grid;gap:7px}.appearance-fields>label>span,.appearance-fields legend{font-weight:650;color:var(--ui-text-2)}.appearance-fields small{color:var(--ui-muted);font-size:.78rem}.appearance-fields fieldset{margin:2px 0 0;padding:16px;border:1px solid var(--ui-border);border-radius:14px}.appearance-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.appearance-colors label{display:grid;gap:6px;font-size:.85rem}.appearance-colors input[type=color]{width:100%;height:44px;padding:4px;border:1px solid var(--ui-border-strong);border-radius:10px;background:var(--ui-surface)}.appearance-fields .form-actions{margin-top:4px}@media(max-width:760px){.appearance-config{grid-template-columns:1fr;gap:20px}.appearance-preview__card{padding:22px}.appearance-colors{grid-template-columns:1fr}}

/* Originalgetreue Seitenleisten-Vorschau. */
.appearance-preview__sidebar{width:100%;padding:18px;background:#eef6fa;border:1px solid var(--ui-border);border-radius:14px}.appearance-preview__sidebar .brand-lockup{justify-content:flex-start;text-align:left;flex-direction:row}.appearance-preview__sidebar .brand-mark{width:42px;height:42px;border-radius:13px}.appearance-preview__sidebar .brand-lockup strong{font-size:1rem;line-height:1.25}.appearance-preview__sidebar .brand-lockup small{font-size:.78rem;line-height:1.25}.appearance-preview__card>p{margin-top:-8px}

/* ResQDesk-Navigation */
.sidebar{width:264px!important;padding:0!important;background:#fff!important;transition:width .18s ease}.resq-masthead{height:70px;background:#e30613;display:flex;align-items:center;gap:12px;padding:12px 14px;overflow:hidden}.menu-collapse{width:34px;height:34px;flex:0 0 34px;border:1px solid #ff8490;border-radius:8px;background:#ffffff18;color:#fff;font-size:20px;cursor:pointer}.resq-masthead__logo{width:calc(100% - 48px);max-height:42px;object-fit:contain;object-position:left center}.resq-masthead__fallback{width:42px;height:42px;object-fit:contain}.sidebar nav{padding:18px 14px;gap:3px}.sidebar .nav-item{min-height:42px;padding:0 12px;border-radius:8px;font-weight:500}.sidebar .nav-item>span:first-child{width:18px;color:#586a7d}.sidebar .nav-item.active{background:#eef1f6;color:#e30613}.sidebar .nav-item.active>span:first-child{color:#e30613}.sidebar--compact{width:76px!important}.sidebar--compact .resq-masthead{justify-content:center;padding:12px}.sidebar--compact .resq-masthead__logo,.sidebar--compact .resq-masthead__fallback{display:none}.sidebar--compact nav{padding:18px 10px}.sidebar--compact .nav-item{justify-content:center;padding:0}.sidebar--compact .nav-label,.sidebar--compact .sidebar-foot,.sidebar--compact .brand-lockup{display:none}.sidebar--compact .menu-collapse{font-size:0}.sidebar--compact .menu-collapse:after{content:'☰';font-size:20px}.workspace{transition:padding .18s ease}@media(max-width:768px){.sidebar{width:100%!important;height:auto!important;position:relative!important}.resq-masthead{display:none}.sidebar--compact{width:100%!important}.sidebar--compact .nav-label{display:inline}.sidebar--compact .nav-item{justify-content:flex-start;padding:0 12px}.sidebar nav{padding:8px}.sidebar--compact .sidebar-foot{display:flex}}

.resq-masthead__logo--fallback{width:42px!important;height:42px!important;object-fit:contain;background:#fff;border-radius:9px;padding:5px}.sidebar .nav-section{margin:18px 12px 7px;color:#9aa7b8;font-size:12px;font-weight:750;letter-spacing:.02em}.sidebar .nav-section:first-child{margin-top:0}.sidebar--compact .nav-section{display:none}.appearance-preview__sidebar{padding:0!important;background:#e30613!important;overflow:hidden}.appearance-preview__sidebar .resq-masthead{width:100%}.appearance-preview__sidebar .menu-collapse:disabled{opacity:1;cursor:default}.appearance-preview__sidebar .resq-masthead__logo{max-width:calc(100% - 48px)}

/* Feine ResQDesk-Menütypografie und untere Benutzerleiste. */
.sidebar .nav-item{font-size:13.5px;font-weight:430;letter-spacing:.005em}.sidebar .nav-item.active{font-weight:650}.sidebar .nav-section{font-size:11.5px;font-weight:620;letter-spacing:.025em}.resq-sidebar-bottom{margin-top:auto;border-top:1px solid #e3e8ee;padding:14px 12px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.resq-sidebar-theme{grid-column:1/-1;width:100%;min-height:40px;padding:0 12px;display:flex;align-items:center;gap:10px;border:0;border-radius:10px;background:#eef1f6;color:#44566d;font:inherit;font-size:13px;font-weight:500;cursor:pointer}.resq-sidebar-theme:after{content:'Darstellung'}.resq-sidebar-user{display:flex;align-items:center;gap:10px;min-width:0;color:#31445a;text-decoration:none}.resq-sidebar-avatar{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:50%;background:#e30613;color:#fff;font-size:13px;font-weight:750}.resq-sidebar-user strong,.resq-sidebar-user small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resq-sidebar-user strong{font-size:13px;font-weight:600}.resq-sidebar-user small{margin-top:2px;color:#7d8da0;font-size:11px}.resq-sidebar-logout{width:34px;height:34px;border:1px solid #f3c2c6;border-radius:9px;background:#fff5f5;color:#e30613;font-size:17px;cursor:pointer}.sidebar--compact .resq-sidebar-bottom{grid-template-columns:1fr;padding:12px 10px}.sidebar--compact .resq-sidebar-theme{font-size:0;justify-content:center}.sidebar--compact .resq-sidebar-theme:after{content:'☼';font-size:19px}.sidebar--compact .resq-sidebar-user{justify-content:center}.sidebar--compact .resq-sidebar-user>span:last-child,.sidebar--compact .resq-sidebar-logout{display:none}@media(max-width:768px){.resq-sidebar-bottom{display:none}}

/* ResQDesk: kompakte Navigation, eine Benutzerleiste, Dreifach-Farbschema. */
.topbar .user-menu{display:none!important}.sidebar-foot{display:none!important}.sidebar .nav-item{font-size:12px!important;font-weight:400!important;min-height:38px!important;letter-spacing:0}.sidebar .nav-item.active{font-weight:600!important}.sidebar .nav-section{font-size:11px!important;font-weight:600!important;margin-top:15px!important}.resq-sidebar-theme{font-size:12px!important;font-weight:400!important}.resq-sidebar-theme:after{display:none}.resq-sidebar-bottom{padding:12px!important}.resq-sidebar-user strong{font-size:12px!important;font-weight:550!important}.resq-sidebar-user small{font-size:10px!important}
html[data-theme="dark"] .sidebar{background:#1a1f2b!important;border-color:#374151!important}html[data-theme="dark"] .sidebar .nav-item{color:#d1d5db!important}html[data-theme="dark"] .sidebar .nav-item.active{background:rgba(227,6,19,.15)!important;color:#f87171!important}html[data-theme="dark"] .sidebar .nav-section{color:#9ca3af!important}html[data-theme="dark"] .resq-sidebar-bottom{border-color:#374151!important}html[data-theme="dark"] .resq-sidebar-theme{background:#242a38!important;color:#e5e7eb!important}html[data-theme="dark"] .resq-sidebar-user{color:#f9fafb!important}html[data-theme="dark"] .resq-sidebar-user small{color:#9ca3af!important}

.sidebar .nav-item{font-size:10px!important;font-weight:700!important}.sidebar .nav-section{font-size:10px!important;font-weight:700!important}

/* Login bleibt bewusst ohne Farbumschalter und mit ResQDesk-Standardmarke. */
.login-page .brand-mark{background:#fff url('/static/resq-desk.svg') center/contain no-repeat!important}.login-page .brand-mark span{display:none!important}
/* Originalwerte des bestätigten ResQDesk-Mockups. */
.sidebar .nav-item{font-size:14px!important;font-weight:500!important;min-height:42px!important}.sidebar .nav-item.active{font-weight:700!important}.sidebar .nav-section{font-size:12px!important;font-weight:750!important;letter-spacing:0!important;margin-top:18px!important}

/* 1:1 ResQDesk DashboardNavbar-Tokens für Navigation. */
.dashboard-new-protocol-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.layout-toggle-form { margin: 0; }
.layout-toggle-button { align-items: center; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #dbe3ec); border-radius: 999px; color: var(--color-text, #1e293b); cursor: pointer; display: inline-flex; font-size: 0.78rem; font-weight: 600; gap: 6px; min-height: 30px; padding: 2px 4px 2px 9px; }
.layout-toggle-button__state { background: var(--color-surface-subtle, #f8fafc); border-radius: 999px; font-size: 0.72rem; font-weight: 700; padding: 3px 7px; }
.layout-toggle-button--active { background: var(--color-action-soft, #e8f3f8); border-color: var(--color-action, #075985); color: var(--color-action, #075985); }
.layout-toggle-button--active .layout-toggle-button__state { background: var(--color-action, #075985); color: #fff; }
.sidebar nav{gap:4px!important;padding:18px 14px!important}.sidebar .nav-item{gap:12px!important;padding:10px 12px!important;min-height:0!important;border-radius:8px!important;font-size:14px!important;font-weight:500!important;line-height:20px!important;color:#4b5563!important}.sidebar .nav-item.active,.sidebar .nav-item.active:hover{font-weight:500!important;background:rgba(227,6,19,.1)!important;color:#e30613!important}.sidebar .nav-item>span:first-child{width:20px!important;font-size:16px!important;line-height:20px!important}.sidebar .nav-section{margin:18px 12px 6px!important;font-size:12px!important;font-weight:500!important;line-height:18px!important;letter-spacing:0!important;color:#9ca3af!important}.sidebar .nav-section:first-child{margin-top:0!important}

/* Verbindliche ResQDesk-Sidebar: neutralisiert historische globale span-Regeln. */
@media (min-width:769px){
  .app-shell{grid-template-columns:280px minmax(0,1fr)!important}
  .app-shell:has(.sidebar--compact){grid-template-columns:75px minmax(0,1fr)!important}
  .sidebar{width:280px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}
  .sidebar--compact{width:75px!important}
  .sidebar nav{display:flex!important;flex-direction:column!important;gap:4px!important;padding:16px!important;align-items:stretch!important}
  .sidebar .nav-item,.sidebar .nav-item:not(.active){display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;min-width:0!important;min-height:40px!important;padding:10px 12px!important;border-radius:8px!important;color:#4b5563!important;font-size:14px!important;font-weight:500!important;line-height:20px!important;letter-spacing:0!important;white-space:nowrap!important}
  .sidebar .nav-item.active,.sidebar .nav-item.active:hover{background:rgba(227,6,19,.1)!important;color:#e30613!important;font-weight:500!important}
  .sidebar .nav-item>span:first-child{width:20px!important;min-width:20px!important;flex:0 0 20px!important;text-align:center!important;color:#586a7d!important;font-size:16px!important;font-weight:400!important;line-height:20px!important}
  .sidebar .nav-item.active>span:first-child{color:#e30613!important}
  .sidebar .nav-item .nav-label{display:block!important;width:auto!important;min-width:0!important;flex:1 1 auto!important;text-align:left!important;color:inherit!important;font:500 14px/20px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .sidebar .nav-section{margin:20px 12px 8px!important;color:#9ca3af!important;font-size:12px!important;font-weight:600!important;line-height:18px!important;letter-spacing:.04em!important;text-transform:uppercase!important}
  .sidebar .nav-section:first-child{margin-top:0!important}
  .sidebar--compact nav{padding:16px 10px!important}
  .sidebar--compact .nav-item,.sidebar--compact .nav-item:not(.active){justify-content:center!important;padding:10px!important}
  .sidebar--compact .nav-label,.sidebar--compact .nav-section{display:none!important}
}

/* Finaler Icon-only-Modus: gilt auch unterhalb der Desktop-Breakpoints. */
.sidebar.sidebar--compact .nav-label,
.sidebar.sidebar--compact .nav-item .nav-label{display:none!important}
.sidebar.sidebar--compact .nav-item,
.sidebar.sidebar--compact .nav-item:not(.active){width:100%!important;min-width:0!important;justify-content:center!important;padding-inline:10px!important;gap:0!important}
.sidebar.sidebar--compact .nav-item>span:first-child{margin:0!important}
.sidebar.sidebar--compact .resq-sidebar-theme{justify-content:center!important;gap:0!important;font-size:0!important}
.sidebar.sidebar--compact .resq-sidebar-theme::after{display:block!important;content:'☼'!important;font-size:19px!important;line-height:1!important}
.sidebar.sidebar--compact .resq-sidebar-user>span:last-child,
.sidebar.sidebar--compact .resq-sidebar-logout{display:none!important}

/* Darstellung: getrennte Marken- und Farbkarten ohne horizontale Überlappung. */
.appearance-config{display:grid!important;grid-template-columns:minmax(0,1080px)!important;gap:20px!important;max-width:1080px!important}
.appearance-card{min-width:0;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface);box-shadow:var(--ui-shadow-sm);overflow:hidden}
.appearance-card__head{padding:20px 22px 16px;border-bottom:1px solid var(--ui-border)}
.appearance-card__head h2{margin:0 0 4px;font-size:1.05rem}.appearance-card__head p{margin:0;color:var(--ui-muted);font-size:.86rem}
.appearance-brand-card__content{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(320px,1.1fr);gap:24px;padding:22px;align-items:start}
.appearance-brand-card .appearance-preview{min-width:0}.appearance-brand-card .appearance-preview__card{height:100%;min-height:278px;padding:22px;gap:16px}
.appearance-brand-card .appearance-fields{min-width:0;align-content:start;gap:15px}.appearance-brand-card .appearance-fields>label{min-width:0}
.appearance-color-card .appearance-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:22px}.appearance-color-card .appearance-colors label{min-width:0}
.appearance-actions{margin:0!important;padding:4px 0 0!important;background:transparent!important}
.appearance-config{width:100%!important;max-width:none!important;grid-template-columns:minmax(0,1fr)!important}
.catalog-csv-actions{display:flex;flex-direction:column;gap:18px;margin-top:auto}.catalog-csv-actions .button{width:100%}
body[data-license-state="expired"] .app-shell::after{content:"UNLIZENZIERT";position:fixed;z-index:50;left:50%;top:52%;transform:translate(-50%,-50%) rotate(-45deg);color:rgb(220 38 38 / 12%);font-size:clamp(52px,10vw,160px);font-weight:800;letter-spacing:.1em;white-space:nowrap;pointer-events:none;user-select:none}.license-expired-gate{position:fixed;z-index:400;inset:0;display:grid;place-items:center;padding:24px;background:rgb(15 20 25 / 56%)}.license-expired-gate__card{width:min(420px,100%);padding:28px;border:1px solid rgb(239 68 68 / 55%);border-radius:16px;background:#1a1f2b;color:#f9fafb;box-shadow:0 20px 54px rgb(0 0 0 / 32%);text-align:center}.license-expired-gate__card strong{display:block;margin-bottom:9px;color:#f87171;font-size:21px;letter-spacing:.04em}.license-expired-gate__card p{margin:0;color:#cbd5e1;line-height:1.5}.license-expired-gate__card small{display:block;margin-top:14px;color:#94a3b8}
.oidc-section:nth-of-type(3)>p{font-size:0}.oidc-section:nth-of-type(3)>p::after{content:"Gruppen des externen Loginanbieters bestimmen die lokale Rolle bei der Anmeldung.";font-size:.86rem}
@media(max-width:760px){.appearance-brand-card__content{grid-template-columns:1fr;padding:18px;gap:18px}.appearance-card__head{padding:18px 18px 14px}.appearance-color-card .appearance-colors{grid-template-columns:1fr;padding:18px}.appearance-brand-card .appearance-preview__card{min-height:0}}

/* ResQ-Prot: fester Versionsbereich am unteren Rand der Seitenleiste. */
.resq-sidebar-version{display:flex;align-items:center;gap:8px;padding:12px 14px;border-top:1px solid #e3e8ee;color:#9aa7b8;background:#fff}
.resq-sidebar-version img{width:18px;height:18px;object-fit:contain;flex:0 0 18px}.resq-sidebar-version span{min-width:0;white-space:nowrap}.resq-sidebar-version strong,.resq-sidebar-version small{display:inline;line-height:1.2}.resq-sidebar-version strong{font-size:10px;font-weight:600;color:#7d8da0}.resq-sidebar-version small{margin-left:3px;font-size:9px;color:#a3afbc}.resq-sidebar-version .resq-sidebar-license{display:block;margin:3px 0 0;font-size:8px;color:#a3afbc}
.sidebar.sidebar--compact .resq-sidebar-version{display:none!important}
html[data-theme="dark"] .resq-sidebar-version{background:#1a1f2b;border-color:#374151}html[data-theme="dark"] .resq-sidebar-version strong{color:#cbd5e1}html[data-theme="dark"] .resq-sidebar-version small{color:#94a3b8}
.resq-sidebar-version--expiring .resq-sidebar-license,.resq-sidebar-version--expired .resq-sidebar-license,html[data-theme="dark"] .resq-sidebar-version--expiring .resq-sidebar-license,html[data-theme="dark"] .resq-sidebar-version--expired .resq-sidebar-license{color:#ef4444!important;font-weight:700!important}
.license-feature-badge{margin-left:.35em;color:var(--ui-muted);font-size:.42em;font-weight:750;letter-spacing:.08em;vertical-align:super}
@media(max-width:768px){.resq-sidebar-version{display:none!important}}


.nav-item:hover{transform:none!important;background:#eef1f6!important}.admin-grid{gap:24px!important;margin-top:24px!important}.audit-timeline{margin:12px 0 0;padding-left:20px}.audit-timeline li{display:grid;grid-template-columns:180px 1fr auto;gap:8px;padding:7px 0;border-bottom:1px solid var(--ui-border)}.audit-timeline small{grid-column:2/-1;color:var(--ui-text-2)}.audit-detail td{background:var(--ui-raised)}

/* CHG-20260901-110: compact navigation has no residual text. */
.sidebar.sidebar--compact .nav-item{font-size:0!important;line-height:1!important;overflow:hidden!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important}
.sidebar.sidebar--compact .nav-item>*:not(:first-child){display:none!important}
.sidebar.sidebar--compact .nav-item>span:first-child{display:block!important;font-size:16px!important;line-height:20px!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important}
@media(min-width:769px){.sidebar:not(.sidebar--compact) .nav-item,.sidebar:not(.sidebar--compact) .nav-label{writing-mode:horizontal-tb!important;text-orientation:mixed!important}}

.setting-description{display:block;margin-top:6px;color:var(--ui-muted);font-size:.78rem;font-weight:400;line-height:1.35;max-width:34rem}

@media (max-width:1100px) and (min-width:641px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.panel-head{flex-wrap:wrap}.panel-head .button{margin-left:auto;flex-shrink:0}.workspace{padding-left:24px;padding-right:24px}}

@media (max-width:1100px) and (min-width:641px){.app-shell .table-wrap{overflow-x:auto;max-width:100%}.app-shell .table-wrap table{min-width:980px}}
@media (max-width:640px){.app-shell .table-wrap{overflow:visible}.app-shell .table-wrap table,.app-shell .table-wrap tbody,.app-shell .table-wrap tr,.app-shell .table-wrap td{display:block;width:100%}.app-shell .table-wrap thead{display:none}.app-shell .table-wrap tbody tr:not(.audit-detail){margin:12px 0;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-surface);padding:10px}.app-shell .table-wrap tbody tr:not(.audit-detail) td{display:flex;justify-content:space-between;gap:14px;padding:9px 4px;border:0;border-bottom:1px solid var(--ui-border);font-size:13px}.app-shell .table-wrap tbody tr:not(.audit-detail) td:last-child{border-bottom:0}.app-shell .table-wrap tbody tr:not(.audit-detail) td::before{content:attr(data-label);font-weight:700;color:var(--ui-muted)}.app-shell .table-wrap .audit-detail{margin:0 0 12px;border:0}.app-shell .table-wrap .audit-detail td{padding:0;border:0}.app-shell .table-wrap .audit-detail td::before{display:none}.app-shell .qm-actions{width:auto}}

/* Kompakte QM-/Archivtabellen: alle Spalten bleiben vorhanden, die Dichte wird reduziert. */
.admin-qm-table th,.admin-qm-table td{padding:10px 14px;font-size:12px}.admin-qm-table th{font-size:10px}.admin-qm-table .qm-actions{gap:3px}.admin-qm-table .qm-action-form label{min-height:26px;padding:2px 6px;font-size:10px}.admin-qm-table .qm-action-form input{width:14px;height:14px}
@media (max-width:1100px) and (min-width:641px){.admin-qm-table th,.admin-qm-table td{padding-inline:8px;font-size:11px}.admin-qm-table th{font-size:9px}.qm-details-button{font-size:10px!important}}

.stat-cards{display:grid;grid-template-columns:minmax(180px,320px);gap:16px;margin:16px 0}.stat-cards h2{font-size:2rem;margin:0}.stat-bar{position:relative;display:grid;grid-template-columns:1fr auto;gap:8px;padding:8px 0;overflow:hidden}.stat-bar i{grid-column:1/-1;height:8px;border-radius:99px;background:var(--color-action,#075985);opacity:.7}

.statistics-chart__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.statistics-chart__head h2{margin:0}.statistics-chart__head select{min-height:34px;padding:4px 28px 4px 9px;font-size:.82rem}.chart--horizontal .stat-bar{grid-template-columns:minmax(110px,1fr) auto;align-items:center}.chart--horizontal .stat-bar i{grid-column:1/-1}.chart--pie{display:grid;grid-template-columns:180px minmax(0,1fr);gap:8px 18px;align-items:center}.chart--pie .statistics-pie{grid-row:1/20;width:170px;height:170px;border-radius:50%;box-shadow:inset 0 0 0 24px var(--ui-surface)}.chart--pie .stat-bar{padding:3px 0}.chart--pie .stat-bar i{display:none}.chart--bars .stat-bar{min-height:46px}.chart--bars .stat-bar i{height:10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:640px){.chart--pie{grid-template-columns:1fr}.chart--pie .statistics-pie{grid-row:auto;margin:auto}.statistics-chart__head{align-items:flex-start}}

/* CHG-20260901-134: kompakte Einsatzkräftezeile und eindeutig umschaltbare Diagramme. */
.catalog-row--responders{grid-template-columns:minmax(120px,.55fr) minmax(170px,1fr) minmax(120px,.55fr) 100px auto auto auto!important}.catalog-row--responders .catalog-label{min-width:0}.catalog-row--responders .catalog-label input{max-width:100%}.statistics-chart__body.chart--bars{display:flex;align-items:end;gap:10px;min-height:240px;border-bottom:1px solid var(--ui-border);padding:12px 4px}.chart--bars .stat-bar{display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:1fr!important;flex:1;min-width:44px;height:210px;padding:0;align-items:end}.chart--bars .stat-bar span{font-size:.72rem;word-break:break-word;text-align:center;order:3}.chart--bars .stat-bar strong{text-align:center;order:1}.chart--bars .stat-bar i{grid-column:1!important;grid-row:2;width:100%!important;height:var(--chart-value)!important;min-height:8px;align-self:end;order:2}.statistics-chart__body.chart--horizontal{display:grid;gap:8px}.chart--horizontal .stat-bar{display:grid;grid-template-columns:minmax(120px,1fr) auto;align-items:center;padding:4px 0}.chart--horizontal .stat-bar i{grid-column:1/-1;width:var(--chart-value)!important;height:10px}.statistics-chart__body.chart--pie{display:grid;grid-template-columns:180px minmax(0,1fr);gap:6px 18px;align-items:center}.chart--pie .statistics-pie{grid-row:1/30;width:170px;height:170px;border-radius:50%;box-shadow:inset 0 0 0 24px var(--ui-surface)}.chart--pie .stat-bar{padding:3px 0}.chart--pie .stat-bar i{display:none}@media(max-width:900px){.catalog-row--responders{grid-template-columns:1fr 1fr!important}}@media(max-width:640px){.catalog-row--responders{grid-template-columns:1fr!important}.statistics-chart__body.chart--bars{overflow-x:auto}.chart--bars .stat-bar{min-width:62px}.statistics-chart__body.chart--pie{grid-template-columns:1fr}.chart--pie .statistics-pie{grid-row:auto;margin:auto}}

.resq-sidebar-install{margin:8px 14px 10px;width:calc(100% - 28px);min-height:32px;border:1px solid var(--ui-border);border-radius:9px;background:var(--ui-raised);color:var(--ui-text-2);font-size:11px;font-weight:700;cursor:pointer}.resq-sidebar-install:hover{background:color-mix(in srgb,var(--ui-raised) 70%,var(--ui-border))}
/* CHG-20260902-138: install action sits above the user/theme divider on desktop. */
.resq-sidebar-install{display:block;margin:8px 12px 10px;width:calc(100% - 24px)}


/* CHG-20260902-140: compact diagnosis rows and live cluster summary. */
.catalog-row--responders .catalog-label input,.catalog-row--diagnoses .catalog-label input{min-width:0}
.catalog-cluster-summary{margin-bottom:20px!important}
.catalog-cluster-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;padding:16px 22px}
.catalog-cluster-card{display:grid;gap:3px;padding:12px 14px;border:1px solid var(--ui-border);border-radius:var(--ui-radius-sm);background:var(--ui-raised)}
.catalog-cluster-card strong{font-size:1.35rem;color:var(--red)}
.catalog-cluster-card span{font-size:.78rem;color:var(--ui-text-2);line-height:1.25}
@media(max-width:900px){.catalog-row--diagnoses{grid-template-columns:minmax(90px,.5fr) minmax(140px,1fr) minmax(130px,.8fr) 80px auto auto auto!important}}
@media(max-width:640px){.catalog-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.catalog-cluster-card{padding:10px}.catalog-cluster-card span{font-size:.72rem}}


/* CHG-20260902-142: readable pie layout and legend swatches. */
.statistics-chart{overflow:hidden}
.statistics-chart__head{padding:18px 20px 12px;margin:0!important;border-bottom:1px solid var(--ui-border)}
.statistics-chart__body{padding:14px 20px 20px}
.statistics-chart__body.chart--pie{grid-template-columns:220px minmax(0,1fr);gap:8px 24px;min-height:240px}
.chart--pie .statistics-pie{width:210px;height:210px;grid-row:1/30}
.chart--pie .stat-bar{display:grid;grid-template-columns:14px minmax(0,1fr) auto;align-items:center;gap:8px;padding:5px 0}
.chart--pie .stat-bar span{grid-column:2;min-width:0;overflow-wrap:anywhere}
.chart--pie .stat-bar strong{grid-column:3}
.stat-swatch{display:block;width:10px;height:10px;border-radius:3px;grid-column:1}
@media(max-width:640px){.statistics-chart__head{padding:14px 14px 10px}.statistics-chart__body{padding:12px 14px 16px}.statistics-chart__body.chart--pie{grid-template-columns:1fr;gap:12px;min-height:0}.chart--pie .statistics-pie{width:190px;height:190px;grid-row:auto;margin:auto}.chart--pie .stat-bar{padding:4px 0}}


/* CHG-20260902-143: visible pie legend and bounded diagnosis cluster labels. */
.chart--pie .stat-bar .stat-swatch{display:block!important;width:10px!important;height:10px!important;min-width:10px!important;padding:0!important;border:0!important}
.catalog-cluster-card{min-width:0;overflow:hidden}
.catalog-cluster-card span{min-width:0;overflow-wrap:anywhere;word-break:break-word}
@media(max-width:640px){.catalog-cluster-grid{gap:8px}.catalog-cluster-card span{font-size:.68rem;line-height:1.2}}


/* CHG-20260902-144: complete mobile drawer including theme, profile and logout. */
@media(max-width:768px){
  .app-shell>.sidebar .resq-sidebar-bottom{display:grid!important;position:static!important;margin-top:auto!important}
  .app-shell>.sidebar .resq-sidebar-version{display:flex!important}
  .app-shell>.sidebar nav{display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important}
}
/* Compact statistics card: pie and legend use the available height efficiently. */
.statistics-chart__body.chart--pie{min-height:0!important;align-content:start}
.chart--pie .statistics-pie{width:170px;height:170px}
.chart--pie .stat-bar{padding:3px 0}
@media(max-width:640px){.chart--pie .statistics-pie{width:170px;height:170px}.statistics-chart__body.chart--pie{gap:8px}}

/* CHG-20260903-159: unified, coloured statistics charts. */
.statistics-chart__body .stat-value-bar{background:var(--chart-color)!important;opacity:.9}
.statistics-chart__body:not(.chart--pie) .stat-swatch{display:none!important}
.statistics-chart__body.chart--pie{display:grid!important;grid-template-columns:minmax(230px,1fr) minmax(145px,190px)!important;gap:3px 20px!important;min-height:270px!important;align-content:center!important;align-items:center!important}
.chart--pie .statistics-pie{grid-column:1!important;grid-row:1/50!important;width:230px!important;height:230px!important;justify-self:center!important;box-shadow:inset 0 0 0 34px var(--ui-surface)!important}
.chart--pie .stat-bar{grid-column:2!important;display:grid!important;grid-template-columns:8px minmax(0,1fr) auto!important;gap:6px!important;width:100%;padding:2px 0!important;font-size:.72rem;line-height:1.15}
.chart--pie .stat-bar span{grid-column:2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart--pie .stat-bar strong{grid-column:3!important;font-size:.72rem;font-variant-numeric:tabular-nums}
.chart--pie .stat-swatch{grid-column:1!important;width:7px!important;height:7px!important;min-width:7px!important;border-radius:50%!important}
.chart--pie .stat-value-bar{display:none!important}
.statistics-chart__controls{display:flex;align-items:center;gap:8px}.chart-color-toggle{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:4px 9px;border:1px solid var(--ui-border);border-radius:999px;background:var(--ui-raised);color:var(--ui-text-2);font-size:.72rem;font-weight:700;cursor:pointer}.chart-color-toggle:hover{background:var(--ui-border)}.chart-color-toggle__track{display:inline-flex;align-items:center;width:25px;height:14px;padding:2px;border-radius:999px;background:var(--ui-border);transition:background .16s ease}.chart-color-toggle__thumb{width:10px;height:10px;border-radius:50%;background:var(--ui-muted);transition:transform .16s ease,background .16s ease}.chart-color-toggle[aria-pressed="true"] .chart-color-toggle__track{background:var(--color-action,#0e7490)}.chart-color-toggle[aria-pressed="true"] .chart-color-toggle__thumb{transform:translateX(11px);background:#fff}
.statistics-chart__controls .chart-color-toggle{order:1}.statistics-chart__controls>label{order:2}
.chart--mono .stat-value-bar{background:var(--color-action,#0e7490)!important}.chart--mono .statistics-pie{filter:saturate(0)}
.statistics-chart__body.chart--horizontal{display:grid!important;gap:5px!important;min-height:0!important;padding-block:12px 16px!important}
.chart--horizontal .stat-bar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:2px 8px!important;padding:2px 0!important}
.chart--horizontal .stat-bar span,.chart--horizontal .stat-bar strong{font-size:.72rem;line-height:1.15}
.chart--horizontal .stat-bar strong{font-variant-numeric:tabular-nums}
.chart--horizontal .stat-value-bar{grid-column:1/-1!important;width:var(--chart-value)!important;height:6px!important;min-height:6px!important;border-radius:2px!important}
.statistics-chart__body.chart--bars{display:flex!important;align-items:stretch!important;gap:12px!important;min-height:250px!important;padding:18px 12px 12px!important;border-bottom:0!important;background:repeating-linear-gradient(to top,transparent 0,transparent 52px,color-mix(in srgb,var(--ui-border) 55%,transparent) 53px)!important}
.chart--bars .stat-bar{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:20px minmax(150px,1fr) 34px!important;align-items:end!important;justify-items:center!important;flex:1 1 0!important;min-width:54px!important;height:auto!important;padding:0!important;overflow:visible!important}
.chart--bars .stat-bar strong{grid-row:1!important;align-self:start!important;font-size:.72rem;font-variant-numeric:tabular-nums}
.chart--bars .stat-value-bar{grid-column:1!important;grid-row:2!important;width:min(58px,72%)!important;height:var(--chart-value)!important;min-height:5px!important;align-self:end!important;border-radius:0!important}
.chart--bars .stat-bar span{grid-row:3!important;align-self:start!important;width:100%;padding-top:6px;font-size:.67rem;line-height:1.15;text-align:center;overflow-wrap:anywhere}
@media(max-width:700px){.statistics-chart__body.chart--pie{grid-template-columns:1fr!important;gap:10px!important}.chart--pie .statistics-pie{grid-column:1!important;grid-row:auto!important;width:205px!important;height:205px!important}.chart--pie .stat-bar{grid-column:1!important;width:min(100%,230px);justify-self:center}.statistics-chart__body.chart--bars{overflow-x:auto!important}.chart--bars .stat-bar{flex:0 0 68px!important}}

/* CHG-20260903-161: larger pie with compact legend anchored bottom-right. */
.statistics-chart__body.chart--pie{grid-template-columns:minmax(0,1fr) minmax(125px,36%)!important;min-height:300px!important;align-content:stretch!important;min-width:0!important}
.chart--pie .statistics-pie{grid-column:1!important;grid-row:1!important;width:min(270px,100%)!important;height:auto!important;aspect-ratio:1!important;align-self:center!important;justify-self:center!important;box-shadow:inset 0 0 0 38px var(--ui-surface)!important}
.chart--pie .statistics-legend{grid-column:2;grid-row:1;align-self:end;justify-self:end;width:100%;padding-bottom:2px}
.chart--pie .statistics-legend .stat-bar{grid-column:auto!important;width:100%;justify-self:stretch}
@media(max-width:700px){.statistics-chart__body.chart--pie{grid-template-columns:1fr!important;min-height:0!important}.chart--pie .statistics-pie{grid-column:1!important;grid-row:1!important;width:230px!important;height:230px!important}.chart--pie .statistics-legend{grid-column:1;grid-row:2;justify-self:center;width:min(100%,230px);padding-bottom:0}}

/* CHG-20260903-171: Statistikdiagramme bleiben beim Desktop-Zoom innerhalb der Karte. */
.statistics-chart,.statistics-chart__body{min-width:0;max-width:100%;box-sizing:border-box}
.statistics-chart__body.chart--bars{display:flex!important;gap:clamp(4px,1.4vw,12px)!important;overflow:hidden!important;min-width:0!important;max-width:100%!important}
.chart--bars .stat-bar{flex:1 1 0!important;min-width:0!important;max-width:none!important}
.chart--bars .stat-value-bar{width:min(58px,72%)!important;max-width:100%!important}
.chart--bars .stat-bar span{min-width:0;max-width:100%;font-size:clamp(.52rem,.7vw,.67rem)!important;overflow-wrap:anywhere!important;word-break:break-word!important}
.statistics-chart__body.chart--horizontal{min-width:0!important;max-width:100%!important;overflow:hidden!important}
.chart--horizontal .stat-bar{min-width:0!important;max-width:100%!important}
.chart--horizontal .stat-bar span{min-width:0;overflow-wrap:anywhere!important;word-break:break-word!important}
@media(max-width:700px){.statistics-chart__body.chart--bars{gap:clamp(3px,1vw,8px)!important;padding-inline:clamp(4px,2vw,12px)!important}.chart--bars .stat-bar{flex:1 1 0!important;min-width:0!important}}


/* CHG-20260902-145: einheitliches Dashboard-Datum und robuste Diagnosefelder. */
.dashboard-protocol-date{white-space:nowrap}
.dashboard-protocol-time{margin-left:3px;color:var(--ui-muted);font-size:.9em;white-space:nowrap}
.catalog-row--diagnoses{grid-template-columns:minmax(125px,.65fr) minmax(300px,1.7fr) minmax(220px,1.2fr) 90px auto auto auto!important}
.catalog-row--diagnoses>*{min-width:0;max-width:100%}
.catalog-row--diagnoses input{min-width:0;max-width:100%;box-sizing:border-box}
.catalog-cluster-grid{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}
@media(max-width:1100px) and (min-width:641px){
  .catalog-row--diagnoses{grid-template-columns:minmax(110px,.7fr) minmax(220px,1.5fr) minmax(180px,1.1fr) 80px auto auto auto!important}
}
@media(max-width:640px){
  .catalog-list{width:100%;box-sizing:border-box;overflow:hidden}
  .catalog-row--diagnoses,.catalog-row--responders{width:100%!important;max-width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr)!important;box-sizing:border-box}
  .catalog-row--diagnoses>*,.catalog-row--responders>*{width:100%;min-width:0!important;max-width:100%!important;box-sizing:border-box}
  .catalog-row--diagnoses input,.catalog-row--responders input{width:100%!important;min-width:0!important;max-width:100%!important}
  .catalog-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;box-sizing:border-box}
  .catalog-cluster-card{min-width:0;max-width:100%;box-sizing:border-box}
  .dashboard-protocol-time{margin-left:2px}
}


/* CHG-20260902-146: Sidebar-Footer zuverlässig auf allen Layoutseiten; Clusterlabels kompakt zweizeilig. */
.resq-sidebar-bottom,.resq-sidebar-version{flex-shrink:0}
.catalog-cluster-card span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.2}
@media(min-width:641px){.catalog-cluster-card span{min-height:1.2em}}
@media(max-width:768px){.resq-sidebar-bottom{display:grid!important}.resq-sidebar-version{display:flex!important}}


/* CHG-20260902-147: Sidebar-Footer-JavaScriptfehler behoben; Clusterzeilen nach Anzahl. */
.catalog-cluster-card span{white-space:nowrap;text-overflow:ellipsis}
.catalog-cluster-card--multiline span{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}


/* CHG-20260902-148: lange Diagnosecluster nicht mehr durch Einzeilenregel überschreiben. */
.catalog-cluster-card--multiline span{display:block!important;white-space:normal!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.2!important;max-height:2.4em!important;overflow:hidden!important}


/* CHG-20260902-149: Diagnosecluster erhalten ausreichende Breite für vollständige Ein-/Zweizeiler. */
.catalog-cluster-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important}
.catalog-cluster-card span{overflow:visible!important;text-overflow:clip!important}
.catalog-cluster-card--multiline span{display:block!important;white-space:normal!important;max-height:2.4em!important;overflow:hidden!important}
@media(max-width:1100px) and (min-width:641px){.catalog-cluster-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:640px){.catalog-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.catalog-cluster-card span{font-size:.72rem!important}}


/* CHG-20260902-150: Clusterlabels bleiben bei jeder Kartenbreite innerhalb der Box. */
.catalog-cluster-card span{display:block!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;overflow:hidden!important;max-height:2.4em!important;line-height:1.2!important;text-overflow:clip!important}

/* CHG-20260903-183: administrative Speicheraktionen linksbündig und ohne Zusatzbox. */
.oidc-form>.form-actions,.appearance-config>.form-actions{justify-content:flex-start!important}
.settings-form>.form-actions{justify-content:flex-start!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:16px 0 0!important;margin:0!important}
.deadlines-actions{justify-content:flex-start!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:18px 0 0!important;margin:0!important}
.chart-color-toggle[hidden]{display:none!important}
@media(max-width:640px){
  .app-shell .table-wrap td:last-child{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;white-space:nowrap!important}
  .app-shell .table-wrap td:last-child form{display:inline-flex!important;margin:0!important;flex:0 0 auto!important}
  .app-shell .table-wrap td:last-child .button.compact{flex:0 0 auto!important}
  .app-shell .table-wrap td:last-child::before{margin-right:auto}
  .app-shell .panel:has(.role-matrix){border:1px solid var(--ui-border)!important;border-radius:16px!important;overflow:visible!important;padding:12px!important}
  .app-shell .panel:has(.role-matrix)>.panel-head{border:1px solid var(--ui-border)!important;border-radius:14px!important;margin:0 0 12px!important}
  .app-shell .panel:has(.role-matrix) .table-wrap tbody tr:not(.audit-detail){margin:12px 0!important}
  .app-shell .panel:has(.role-matrix) .table-wrap tbody tr:not(.audit-detail){padding:10px 12px!important;background:var(--ui-raised)!important}
  .app-shell .panel:has(.role-matrix) .table-wrap tbody tr:not(.audit-detail) td:last-child{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding-top:12px!important}
  .app-shell .panel:has(.role-matrix) .table-wrap td:last-child form,.app-shell .panel:has(.role-matrix) .table-wrap td:last-child .button.compact{width:100%!important}
  .app-shell .panel:has(.role-matrix) .table-wrap td:last-child form .button.compact{width:100%!important}
  .oidc-form>.form-actions,.appearance-config>.form-actions,.deadlines-actions{width:100%!important;box-sizing:border-box!important}
  .oidc-form>.form-actions .button,.appearance-config>.form-actions .button,.deadlines-actions .button{width:100%!important}
}


/* CHG-20260902-151: mobile Useranzeige im oberen Header entfällt; Sidebar-Profil bleibt erhalten. */
@media(max-width:768px){.mobile-app-header__user{display:none!important}}


/* CHG-20260902-152: mobiles Organisationsicon direkt im roten Header (Rollback: diesen Block entfernen). */
@media(max-width:640px){
  .mobile-app-header{grid-template-columns:44px minmax(0,1fr)!important}
  .mobile-app-header__brand{gap:10px!important}
  .mobile-app-header__brand img{width:38px!important;height:34px!important;padding:0!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important}
  .mobile-app-header__brand strong{font-size:15px!important}
}


/* CHG-20260902-153: mobiles Organisationsicon vergrößert, App-Name rechtsbündig. */
@media(max-width:640px){
  .mobile-app-header__brand{justify-content:flex-end!important;text-align:right!important}
  .mobile-app-header__brand img{width:46px!important;height:40px!important;flex:0 0 46px!important}
  .mobile-app-header__brand strong{flex:1 1 auto!important;text-align:right!important}
}


/* CHG-20260902-154: größeres mobiles Organisationsicon ohne Header-Überlappung. */
@media(max-width:640px){
  .mobile-app-header__brand{min-width:0!important;overflow:hidden!important}
  .mobile-app-header__brand img{width:140px!important;max-width:42vw!important;height:40px!important;flex:0 1 140px!important}
  .mobile-app-header__brand strong{min-width:0!important;flex:1 1 auto!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
}

/* CHG-20260904-246: finaler Override nach allen allgemeinen Tabellenregeln. */
@media (max-width:1100px) and (min-width:641px){
  .app-shell .table-wrap:has(> .admin-qm-table){overflow-x:hidden!important}
  .app-shell .table-wrap > .admin-qm-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
}

/* CHG-20260904-247: QM uses the same panel/table containment as the overview. */
.qm-workspace-panel{overflow:hidden!important}
.qm-workspace-panel .qm-table-wrap{width:100%;max-width:100%;min-width:0;overflow:hidden!important}
.qm-workspace-panel .qm-table-wrap > .admin-qm-table{width:100%!important;max-width:100%;min-width:0!important;table-layout:fixed!important}
.qm-workspace-panel .admin-qm-table th,.qm-workspace-panel .admin-qm-table td{min-width:0!important;overflow-wrap:anywhere;word-break:break-word}
@media(max-width:640px){.qm-workspace-panel .qm-table-wrap{overflow:visible!important}.qm-workspace-panel{overflow:visible!important}}

/* CHG-20260904-249: QM offen hat zwei Aktionsformulare; beide müssen in der
   festen Aktionsspalte bleiben. Alle Kopfzellen bilden einen durchgehenden
   Statusbalken. */
.qm-workspace-panel .admin-qm-table thead th{background:var(--ui-raised)!important}
.qm-workspace-panel .admin-qm-table td:last-child .qm-actions{min-width:0!important;width:100%!important;max-width:100%!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form{min-width:0!important;width:100%!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) minmax(0,132px)!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:first-child{grid-template-columns:minmax(0,132px)!important;width:132px!important;justify-self:end}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form input[name="reason"]{min-width:0!important;max-width:100%!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form .button{width:100%!important;max-width:132px!important;min-width:0!important;padding-inline:6px!important}
.qm-workspace-panel .admin-qm-table th,.qm-workspace-panel .admin-qm-table td{padding-inline:9px!important;font-size:11px!important}
.qm-workspace-panel .admin-qm-table th{font-size:9px!important;letter-spacing:.045em}
@media(max-width:640px){.qm-workspace-panel .admin-qm-table th,.qm-workspace-panel .admin-qm-table td{padding-inline:12px!important;font-size:13px!important}.qm-workspace-panel .admin-qm-table th{font-size:inherit!important}}

/* CHG-20260904-250: QM offen erhält Raum für beide Aktionen; Endzustände
   zeigen einen zentrierten, kompakten Details-Button. */
.qm-workspace-panel .qm-tab-open th:last-child,.qm-workspace-panel .qm-tab-open td:last-child{width:156px!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-actions{align-items:stretch!important;justify-items:stretch!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form{justify-self:stretch!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:first-child{width:100%!important;grid-template-columns:minmax(0,1fr)!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:last-child{width:100%!important;grid-template-columns:minmax(0,1fr) minmax(0,104px)!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form .button{width:100%!important;max-width:104px!important}
.qm-workspace-panel .qm-details-button{display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap!important}
.qm-workspace-panel .qm-tab-open th:last-child,.qm-workspace-panel .qm-tab-open td:last-child{width:240px!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:last-child{grid-template-columns:minmax(0,1fr) minmax(0,104px)!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:last-child .button{max-width:104px!important}
.qm-workspace-panel .admin-qm-table th,.qm-workspace-panel .admin-qm-table td{padding-inline:7px!important;font-size:10px!important;line-height:1.25}
.qm-workspace-panel .admin-qm-table th{font-size:9px!important;font-weight:700!important}
.qm-workspace-panel .qm-tab-rejected th:nth-last-child(2){font-size:0!important}
.qm-workspace-panel .qm-tab-rejected th:nth-last-child(2)::after{content:"Begründung";font-size:9px!important}
.settings-cluster .panel-head,.settings-cluster .settings-table th:first-child,.settings-cluster .settings-table td:first-child{padding-left:22px!important}
.settings-cluster .panel-head,.settings-cluster .settings-table th:last-child,.settings-cluster .settings-table td:last-child{padding-right:22px!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:first-child .button{justify-self:end!important}
.settings-cluster > .table-wrap{width:calc(100% - 44px)!important;margin-inline:22px!important}
.settings-cluster > .table-wrap .settings-table th:first-child,.settings-cluster > .table-wrap .settings-table td:first-child{padding-left:22px!important}
.settings-cluster > .table-wrap .settings-table th:last-child,.settings-cluster > .table-wrap .settings-table td:last-child{padding-right:22px!important}
.qm-workspace-panel .qm-tab-open td:last-child .qm-action-form:first-child{display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-items:end!important}
.settings-cluster > .table-wrap > .settings-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
.qm-workspace-panel .admin-qm-table td{font-size:14px!important;line-height:1.3}
.qm-workspace-panel .admin-qm-table th{font-size:10px!important;line-height:1.2}
@media(max-width:640px){.qm-workspace-panel .admin-qm-table td{font-size:13px!important}}

/* CHG-20260904-248: QM-Aktionen bleiben innerhalb der festen Spalte; Kopfband
   und Tabs füllen den Panelbereich vollständig. Fristen teilen exakt dieselbe
   Textkante zwischen Panelkopf und erster Tabellenspalte. */
.qm-workspace-panel .admin-tabs{width:100%;box-sizing:border-box;min-width:0}
.qm-workspace-panel .admin-qm-table thead,.qm-workspace-panel .admin-qm-table tbody{width:100%;}
.qm-workspace-panel .admin-qm-table td:last-child,.qm-workspace-panel .admin-qm-table td:last-child .qm-actions,.qm-workspace-panel .admin-qm-table td:last-child .qm-action-form{min-width:0!important;max-width:100%;box-sizing:border-box}
.qm-workspace-panel .admin-qm-table td:last-child .qm-actions{overflow:hidden}
.qm-workspace-panel .admin-qm-table td:last-child .button{max-width:100%;overflow-wrap:anywhere;white-space:normal}
.settings-cluster .panel-head{padding-inline:22px!important}
.settings-cluster .settings-table th:first-child,.settings-cluster .settings-table td:first-child{padding-left:22px!important}
.settings-cluster .settings-table th:last-child,.settings-cluster .settings-table td:last-child{padding-right:22px!important}

/* CHG-20260904-257 / DD-20260904-257: Fristen-DeepDive.
   Die allgemeine Desktopregel setzt table min-width:980px. Dieser letzte,
   seitenspezifische Override lässt die Fristentabelle in ihrer Kartenbreite
   schrumpfen; die 22px-Innenkante bleibt genau einmal erhalten. */
@media (min-width:641px){
  .settings-cluster > .table-wrap{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin-inline:0!important;
    overflow-x:hidden!important;
  }
  .settings-cluster > .table-wrap > .settings-table{
    display:table!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }
  .settings-cluster > .table-wrap > .settings-table .setting-value{
    min-width:0!important;
    max-width:100%!important;
  }
  .settings-cluster > .table-wrap > .settings-table .setting-value input{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
}


/* CHG-20260904-258 / DD-20260904-258: Die Seitenüberschrift und der äußere
   Kartenrand der Fristenverwaltung teilen dieselbe Arbeitsbereichskante.
   Die generische settings-form-Regel darf dieses Seitenlayout nicht einrücken. */
.app-shell .settings-form.settings-clusters{
  padding:0!important;
}

/* CHG-20260904-259 / DD-20260904-259: Beide QM-Endzustände verwenden dasselbe
   Grundraster. Verwerfungsgründe dürfen die Zeile bei Bedarf weiter erhöhen. */
@media (min-width:641px){
  .qm-workspace-panel .qm-tab-verified tbody > tr:not(.audit-detail) > td,
  .qm-workspace-panel .qm-tab-rejected tbody > tr:not(.audit-detail) > td{
    height:72px!important;
  }
}

/* CHG-20260904-264 / DD-20260904-264: Read-only-Hinweis erhält dieselbe
   sichere Innenkante wie die Formularinhalte und wird nicht abgeschnitten. */
.protocol-form--shared-readonly > .notice{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  padding-inline:22px!important;
}

/* CHG-20260904-266 / DD-20260904-266: Report-Suche nutzt das bestehende
   Quality-Raster; Dummy-Aktionen bleiben sichtbar, aber unveränderlich. */
.report-filters{grid-template-columns:repeat(3,minmax(0,1fr));}
.admin-report-table{width:100%;table-layout:fixed;}
.admin-report-table th:last-child,.admin-report-table td:last-child{width:150px;}
.report-results .table-wrap{overflow:visible!important;max-width:100%!important;padding:0 22px 22px;box-sizing:border-box}
.report-results .admin-report-table{min-width:0!important;max-width:100%!important}
.report-results .panel-heading{padding:22px!important;margin:0!important}
html[data-theme="dark"] .multi-select__menu{background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important}
html[data-theme="dark"] .multi-select__tools{border-color:var(--ui-border)!important}
html[data-theme="dark"] .multi-select__tools button{background:var(--ui-surface)!important;color:var(--ui-text)!important}
html[data-theme="dark"] .multi-options{background:var(--ui-surface)!important}
html[data-theme="dark"] .multi-options label{background:var(--ui-raised)!important;color:var(--ui-text)!important}
html[data-theme="dark"] .multi-options label:hover{background:var(--ui-border)!important}
html[data-theme="dark"] .multi-options span{background:var(--ui-raised)!important;color:var(--ui-text)!important}
.report-filters .multi-options{max-height:min(520px,65vh)!important}
.report-filters{position:relative}
.report-advanced{grid-column:1/-1;border-top:1px solid var(--ui-border);padding-top:14px}
.report-advanced>summary{cursor:pointer;color:var(--ui-text);font-weight:700}
.report-advanced__fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:14px}
.report-search-panel,.report-search-panel .report-filters,.report-advanced,.report-advanced__fields{overflow:visible!important}
.report-advanced__fields .multi-select__menu{max-height:none!important;overflow:visible!important}
.report-advanced__fields .multi-options{max-height:min(520px,65vh)!important;overflow-y:auto!important}
@media(max-width:640px){.report-advanced__fields{grid-template-columns:1fr}}
.report-filters:has(.multi-select__details[open]){z-index:100}
.report-filters .multi-field:has(.multi-select__details[open]){position:relative;z-index:101}
.report-search-panel:has(.multi-select__details[open]){overflow:visible!important}
@media (max-width:900px){.report-filters{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:640px){.report-filters{grid-template-columns:1fr;}.admin-report-table{table-layout:auto;}}

/* CHG-20260904-261 / DD-20260904-261: Alle QM-Tabellen beanspruchen exakt
   dieselbe Panelbreite; zusätzliche Spalten in QM verworfen dürfen die
   äußere Tabellenfläche nicht schrumpfen lassen. */
@media (min-width:641px){
  .qm-workspace-panel .qm-table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .qm-workspace-panel .qm-table-wrap > .admin-qm-table{
    display:table!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    table-layout:fixed!important;
  }
}

/* CHG-20260904-260 / DD-20260904-260: Die in allen QM-Tabs identische
   Laufnummernspalte verhindert horizontales Springen beim Tabwechsel. */
@media (min-width:641px){
  .qm-workspace-panel .admin-qm-table th:first-child,
  .qm-workspace-panel .admin-qm-table tbody > tr:not(.audit-detail) > td:first-child{
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
  }
}
