/*==========================================================================
   1. CSS-Variablen / Design Tokens
==========================================================================*/

/* Farbpalette */
:root
{
  /* Primärfarben (Haupt-Akzente) */
  --color-background: #dadcdd;
  --color-font-main: #454545;
  --color-font-label:#039ee6;

  /* Layout 
  --color-header-background: #001d3b;
  --color-header-font: #ffffff;
  --color-navbar-background: #2076b4;
  --color-navbar-font: #ffffff;
  --color-navbar-link-background: #2076b4;
  --color-navbar-link-font: #ffffff;
  --color-navbar-link-hover-background: #0056b3;
  --color-navbar-link-hover-font: #cce5ff;



  /* Flash-Messages */
  --color-flashmsg-info:     darkgrey;
  --color-flashmsg-success:   green;
  --color-flashmsg-warning:  darkorange;
  --color-flashmsg-error:    red;
  
  /*
  --size-sidebar-width: 220px;
  --size-header-height: 80px;
  --size-navbar-height: 50px;

  /* Tabellen 
  --color-table-outline: #0056b3;
  --color-table-head-background :#2076b4;
  --color-table-head-color :#ffffff;
  --color-table-rows-alternate-odd: white;
  --color-table-rows-alternate-even: #cce5ff;
*/

}


/*==========================================================================
   1. html,body
==========================================================================*/


body
{
  background-color: var(--color-background);
  font-family: 'Inter', sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}




/* Labels: Über dem Feld */
.flat-label {
    display: block;
    font-size: 14px;
    color: var(--color-font-label);
    margin-bottom: 4px;
}

/* Inputs: Text */
.flat-text {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 2px;
}





/* ======================================================================= 
   Flash Messages
   ======================================================================= */

.flashmsg {
    padding: 5px 5px 0 5px; /* OU LR */
    font-size: 14px;
}

.flashmsg-info { color: var(--color-flashmsg-info); }
.flashmsg-success { color: var(--color-flashmsg-success); }
.flashmsg-warning { color: var(--color-flashmsg-warning); }
.flashmsg-error { color: var(--color-flashmsg-error); }



/* =======================================================================
  Login-Formular
========================================================================== */

/* Wrapper: Zentrieren des Formulars auf der Seite (div)*/
#login-wrapper {
    display: flex;
    padding: 0 10%;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Gesamte Box (div)*/
#login-box {
    width: 360px;
    border: 2px solid darkgrey;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2),
                0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    box-sizing: border-box;
}

/* Logo-Bild (img) */
#login-logo {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px auto;
}

/* Titel-Zeile (div) */
#login-main {
    font-size: 24px;
    text-align: center;
    margin-top: 20px;
    color: var(--color-font-main);
}

/* Status-Zeile (div) */
#login-status {
    text-align: center;
    margin: 10px 0;
}

/* Wrapper eigentliches Formular (div) */
.login-form
{
    padding: 15px;
}

/* Flex-Zeile für Passwort-Label + Link */
.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
}




/* Passwort vergessen */
.login-reset-password-link {
    font-size: 12px;
    color: var(--color-font-label);
    text-decoration: none;
}

.login-reset-password-link:hover {
    text-decoration: underline;
}


/* Login-Button */
.login-button {
    width: 100%;
    padding: 10px;
}


/* =======================================================================
   Gemeinsamer Passwortwechsel für Backoffice und Kundenbereich
========================================================================== */

.password-change-wrapper {
    min-height: 100vh;
    height: auto;
    padding: 24px;
}

#login-box.password-change-box {
    width: min(100%, 520px);
    padding: 28px;
    border-color: #b6c5cf;
}

#login-box.password-change-box #login-logo {
    max-width: 280px;
}

.password-change-eyebrow {
    margin: 22px 0 5px;
    color: var(--admin-navbar, #247caf);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-align: center;
    text-transform: uppercase;
}

.password-change-box h1 {
    margin: 0;
    color: #183b53;
    font-size: clamp(1.55rem, 5vw, 2rem);
    line-height: 1.15;
    text-align: center;
}

.password-change-introduction {
    margin: 14px 0;
    color: #4c616f;
    line-height: 1.55;
    text-align: center;
}

.password-change-account {
    margin: 18px 0 22px;
    padding: 11px 13px;
    overflow-wrap: anywhere;
    border: 1px solid #d5e0e7;
    border-radius: 4px;
    color: #36566b;
    background: #f4f8fa;
    font-size: .9rem;
    text-align: center;
}

.password-change-feedback {
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px solid #d7e1e7;
    border-radius: 4px;
    background: #f8fafb;
}

.password-change-feedback .flashmsg {
    padding: 0;
    line-height: 1.45;
}

.password-change-field + .password-change-field {
    margin-top: 4px;
}

.password-change-form .flat-text {
    min-height: 42px;
    margin-bottom: 14px;
}

.password-change-form .flat-text:focus {
    border-color: var(--admin-navbar, #247caf);
    outline: 3px solid rgba(36, 124, 175, .16);
}

.password-change-policy {
    margin: 3px 0 18px;
    padding: 13px 15px;
    border-left: 4px solid var(--admin-navbar, #247caf);
    color: #4b626f;
    background: #edf5f9;
    font-size: .84rem;
    line-height: 1.45;
}

.password-change-policy strong {
    color: #234b64;
}

.password-change-policy ul {
    margin: 7px 0 0;
    padding-left: 19px;
}

.password-change-submit,
.password-change-back,
.password-change-logout {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 3px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.password-change-submit {
    width: 100%;
    border: 1px solid #17618e;
    color: #fff;
    background: var(--admin-navbar, #247caf);
    cursor: pointer;
}

.password-change-submit:hover,
.password-change-submit:focus-visible {
    background: #176a9c;
}

.password-change-secondary-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #dbe3e8;
}

.password-change-secondary-actions form {
    margin: 0;
}

.password-change-back,
.password-change-logout {
    border: 1px solid #aebdc7;
    color: #36566b;
    background: #fff;
    cursor: pointer;
}

.password-change-back:hover,
.password-change-back:focus-visible,
.password-change-logout:hover,
.password-change-logout:focus-visible {
    background: #edf2f5;
}

@media (max-width: 520px) {
    .password-change-wrapper {
        padding: 12px;
    }

    #login-box.password-change-box {
        padding: 22px 18px;
    }

    .password-change-secondary-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .password-change-secondary-actions form,
    .password-change-back,
    .password-change-logout {
        width: 100%;
    }
}


/* =======================================================================
   Responsive Admin-Layout
========================================================================== */

:root {
    --admin-header: #002342;
    --admin-navbar: #247caf;
    --admin-navbar-dark: #155b89;
    --admin-sidebar: #ffffff;
    --admin-sidebar-active: #dfeaf2;
    --admin-text: #164f79;
    --admin-header-height: 82px;
    --admin-toolbar-height: 58px;
    --admin-sidebar-wide: 250px;
    --admin-sidebar-compact: 76px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

button, input {
    font: inherit;
}

.admin-shell {
    min-height: 100vh;
    color: #24323c;
    display: grid;
    grid-template:
        "header header" var(--admin-header-height)
        "toolbar toolbar" var(--admin-toolbar-height)
        "sidebar content" 1fr
        / var(--admin-sidebar-wide) minmax(0, 1fr);
    transition: grid-template-columns 180ms ease;
}

.admin-header {
    grid-area: header;
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    color: #fff;
    background: var(--admin-header);
}

.admin-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: 150px;
    max-height: 58px;
    object-fit: contain;
    transform: translate(-50%, -50%);
}

.header-button,
.menu-button {
    border: 0;
    color: #fff;
    cursor: pointer;
}

.header-button {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #315878;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}

.header-button:hover,
.header-button:focus-visible {
    background: #47708f;
}

.admin-clock {
    margin-left: auto;
    text-align: right;
    line-height: 1.05;
}

.admin-clock time {
    display: block;
    font-size: clamp(1.75rem, 3vw, 2.7rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.admin-clock span {
    display: block;
    margin-top: 4px;
    font-size: .95rem;
}

.admin-toolbar {
    grid-area: toolbar;
    z-index: 30;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 18px 0 0;
    color: #fff;
    background: var(--admin-navbar);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}

.admin-toolbar h1 {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar-context {
    color: rgba(255, 255, 255, .72);
}

/*
 * Kontomenü in der Navigationsleiste. Es ist ein gemeinsamer Layoutbaustein
 * für Backoffice und Kundenportal; die enthaltenen Links werden serverseitig
 * passend zur Rolle ausgewählt.
 */
.toolbar-user-menu {
    position: relative;
    min-width: 0;
    align-self: stretch;
    display: flex;
    margin-left: auto;
}

.toolbar-user-toggle {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.toolbar-user-toggle:hover,
.toolbar-user-toggle:focus-visible,
.toolbar-user-menu.is-expanded .toolbar-user-toggle {
    background: rgba(255, 255, 255, .16);
}

.toolbar-user-toggle .admin-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    filter: brightness(0) invert(1);
}

.toolbar-user-label {
    overflow: hidden;
    max-width: 240px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar-user-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.toolbar-user-menu.is-expanded .toolbar-user-chevron {
    transform: translateY(2px) rotate(225deg);
}

.toolbar-user-dropdown {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    right: 0;
    width: min(310px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #c2d0d8;
    border-radius: 5px;
    color: #183b54;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 42, 59, .24);
}

.toolbar-user-dropdown[hidden] {
    display: none;
}

.toolbar-user-identity {
    padding: 13px 15px;
    border-bottom: 1px solid #dce4e8;
    background: #f3f7f9;
}

.toolbar-user-identity small,
.toolbar-user-identity strong {
    display: block;
}

.toolbar-user-identity small {
    margin-bottom: 3px;
    color: #657985;
    font-size: .7rem;
    text-transform: uppercase;
}

.toolbar-user-identity strong {
    overflow-wrap: anywhere;
    font-size: .88rem;
}

.toolbar-user-dropdown a,
.toolbar-user-dropdown button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 15px;
    border: 0;
    color: #183b54;
    background: #fff;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.toolbar-user-dropdown a:hover,
.toolbar-user-dropdown a:focus-visible,
.toolbar-user-dropdown button:hover,
.toolbar-user-dropdown button:focus-visible {
    background: #e6f0f6;
}

.toolbar-user-dropdown form {
    margin: 0;
    border-top: 1px solid #e1e7ea;
}

.toolbar-user-dropdown .admin-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}

.menu-button {
    width: var(--admin-sidebar-compact);
    align-self: stretch;
    display: flex;
    flex: 0 0 var(--admin-sidebar-compact);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin: 0;
    background: var(--admin-navbar-dark);
    font-size: .72rem;
}

.menu-button:hover,
.menu-button:focus-visible {
    background: rgba(255, 255, 255, .22);
}

.admin-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.admin-sidebar {
    grid-area: sidebar;
    z-index: 35;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--admin-text);
    background: var(--admin-sidebar);
    border-right: 1px solid #cad4db;
    box-shadow: 2px 0 5px rgba(0, 0, 0, .08);
}

.sidebar-link {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
    border: 0;
    color: inherit;
    background: transparent;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link.is-active {
    background: var(--admin-sidebar-active);
}

.sidebar-link .admin-icon {
    color: #126296;
}

/* Der Navigationsbereich darf bei vielen Menüeinträgen scrollen. */
.admin-sidebar > nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
}

/* Eine aufklappbare Gruppe belegt wie ein normaler Menüpunkt die volle Breite. */
.sidebar-group {
    width: 100%;
}

/*
 * Der Gruppenname ist ein Button und kein Link, weil er keine neue Seite
 * öffnet. Er steuert ausschließlich das zugehörige Untermenü.
 */
.sidebar-group-toggle {
    text-align: left;
}

/*
 * Der kleine Pfeil wird nur mit CSS gezeichnet. Seine Drehung zeigt an,
 * ob die Gruppe geschlossen oder geöffnet ist.
 */
.submenu-chevron {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    display: block;
    margin-left: auto;
    border-right: 2px solid #126296;
    border-bottom: 2px solid #126296;
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.sidebar-group.is-expanded .submenu-chevron {
    transform: rotate(225deg);
}

/*
 * Das hidden-Attribut wird durch JavaScript gesetzt und entfernt.
 * Diese Regel stellt sicher, dass ein geschlossenes Untermenü unabhängig
 * von anderen Display-Regeln unsichtbar bleibt.
 */
.sidebar-submenu[hidden] {
    display: none;
}

/*
 * Unterpunkte sind etwas niedriger und weiter eingerückt als Einträge der
 * ersten Ebene. Der dezente Hintergrund verdeutlicht die Gruppierung.
 */
.sidebar-sublink {
    min-height: 52px;
    gap: 16px;
    padding-left: 56px;
    background: #f7f9fa;
    font-size: .92rem;
}

.sidebar-sublink .admin-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}

.admin-content {
    grid-area: content;
    min-width: 0;
    padding: clamp(20px, 4vw, 48px);
    background: #eef1f3;
}

.admin-welcome {
    max-width: 850px;
    padding: clamp(24px, 4vw, 42px);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(26, 48, 63, .12);
}

.admin-welcome h2 {
    margin: 4px 0 18px;
    color: #183b54;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.admin-welcome p {
    line-height: 1.6;
}

.eyebrow {
    margin: 0;
    color: var(--admin-navbar);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/*
 * ==========================================================================
 * Eigenes Rechteprofil
 * ==========================================================================
 */

/*
 * Die Rechteübersicht benötigt etwas mehr Breite als das normale Dashboard,
 * bleibt auf sehr großen Bildschirmen aber weiterhin gut lesbar.
 */
.rights-page {
    max-width: 1050px;
}

.rights-introduction {
    margin-bottom: 24px;
}

/*
 * Die aktuell zugewiesene Rolle und die Gesamtzahl der wirksamen Rechte
 * bilden den Kopf der Übersicht.
 */
.rights-role-summary {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    padding: 20px;
    border: 1px solid #b9cfdd;
    border-left: 4px solid var(--admin-navbar);
    border-radius: 4px;
    background: #f6fafc;
}

.rights-role-details {
    min-width: 0;
}

.rights-role-details > span {
    display: block;
    color: var(--admin-navbar);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rights-role-details > strong {
    display: inline-block;
    margin: 5px 8px 0 0;
    color: #183b54;
    font-size: 1.25rem;
}

.rights-role-details > code {
    color: #29698f;
    font-size: .78rem;
}

.rights-role-details > p {
    margin: 8px 0 0;
    color: #425968;
}

.rights-total {
    min-width: 130px;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 4px;
    color: #fff;
    background: #123c5a;
    text-align: center;
}

.rights-total strong {
    font-size: 1.45rem;
    font-variant-numeric: tabular-nums;
}

.rights-total span {
    color: #cce4f3;
    font-size: .76rem;
}

.rights-groups {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.rights-group {
    overflow: hidden;
    border: 1px solid #d2dde4;
    border-radius: 4px;
}

.rights-group-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    background: #eaf2f7;
}

.rights-group-heading h3 {
    margin: 0;
    color: #183b54;
    font-size: 1.05rem;
}

.rights-group-heading p {
    margin: 4px 0 0;
    color: #4f6879;
    font-size: .88rem;
    line-height: 1.45;
}

.rights-group-count {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 3px;
    color: #164f79;
    background: #d5e8f3;
    font-size: .76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rights-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rights-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    border-top: 1px solid #e1e8ec;
}

.rights-item:first-child {
    border-top: 0;
}

.rights-item.is-denied {
    background: #fafbfc;
}

.rights-permission-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rights-permission-title strong {
    color: #183b54;
}

.rights-technical-badge {
    padding: 3px 6px;
    border-radius: 3px;
    color: #795300;
    background: #fff0c5;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rights-permission-details p {
    margin: 5px 0 7px;
    color: #506674;
    font-size: .88rem;
    line-height: 1.45;
}

.rights-permission-details code {
    color: #29698f;
    font-size: .78rem;
}

/*
 * Der Schalter zeigt nur den Zustand an. Er ist absichtlich kein Button und
 * besitzt deshalb auch keine Hover- oder Fokusdarstellung.
 */
.rights-state {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rights-state-label {
    min-width: 84px;
    color: #697985;
    font-size: .82rem;
    text-align: right;
}

.rights-item.is-allowed .rights-state-label {
    color: #24713e;
    font-weight: 700;
}

.rights-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
    border-radius: 999px;
    background: #aeb9c0;
    box-shadow: inset 0 0 0 1px rgba(24, 59, 84, .16);
}

.rights-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(24, 59, 84, .28);
    content: "";
    transition: transform 160ms ease;
}

.rights-switch.is-on {
    background: #2d8a50;
}

.rights-switch.is-on::after {
    transform: translateX(20px);
}

/*
 * ==========================================================================
 * Kundenliste
 * ==========================================================================
 */

.customer-list-page {
    max-width: 1280px;
}

.customer-list-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.customer-list-title-row .eyebrow {
    margin-top: 0;
}

.customer-list-create,
.customer-list-search button,
.customer-list-empty a,
.customer-list-mobile-sort button {
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid #17618e;
    border-radius: 3px;
    color: #fff;
    background: var(--admin-navbar);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.customer-list-create:hover,
.customer-list-create:focus,
.customer-list-search button:hover,
.customer-list-search button:focus,
.customer-list-empty a:hover,
.customer-list-empty a:focus,
.customer-list-mobile-sort button:hover,
.customer-list-mobile-sort button:focus {
    background: #176a9c;
}

.customer-list-introduction {
    max-width: 800px;
    color: #425968;
}

.customer-list-search {
    margin: 24px 0 20px;
    padding: 18px;
    border: 1px solid #c8d7e0;
    border-radius: 4px;
    background: #f5f9fb;
}

.customer-list-search > label,
.customer-list-mobile-sort label {
    display: block;
    margin-bottom: 7px;
    color: #284b62;
    font-size: .86rem;
    font-weight: 700;
}

.customer-list-search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.customer-list-search input[type="search"] {
    min-width: 220px;
    min-height: 42px;
    flex: 1 1 520px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #aebdc7;
    border-radius: 3px;
    color: #263f4f;
    background: #fff;
    font: inherit;
}

.customer-list-search input[type="search"]:focus,
.customer-list-mobile-sort select:focus {
    border-color: var(--admin-navbar);
    outline: 3px solid rgba(40, 125, 170, .18);
}

.customer-list-search-reset {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: #2b668c;
    font-weight: 700;
}

.customer-list-search > small {
    display: block;
    margin-top: 8px;
    color: #647681;
    font-size: .76rem;
}

.customer-list-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 10px;
    color: #506875;
    font-size: .84rem;
}

.customer-list-result-heading p {
    margin: 0;
}

.customer-list-result-heading strong {
    color: #183b54;
}

.customer-list-table-wrapper {
    overflow: hidden;
    border: 1px solid #c5d2da;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(24, 59, 84, .08);
}

.customer-list-table {
    width: 100%;
    border-collapse: collapse;
    color: #314d5f;
}

.customer-list-table th,
.customer-list-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #dbe4e9;
    text-align: left;
    vertical-align: middle;
}

.customer-list-table th {
    color: #fff;
    background: #1f6f9f;
    font-size: .78rem;
    letter-spacing: .02em;
}

.customer-list-table th:nth-child(3),
.customer-list-table td:nth-child(3) {
    width: 130px;
}

.customer-list-table th:nth-child(4),
.customer-list-table td:nth-child(4) {
    width: 170px;
}

.customer-list-table th:last-child,
.customer-list-table td:last-child {
    width: 90px;
    text-align: right;
}

.customer-list-table tbody tr:last-child td {
    border-bottom: 0;
}

.customer-list-table tbody tr:nth-child(even) {
    background: #f5f9fb;
}

.customer-list-table tbody tr:hover {
    background: #eaf3f8;
}

.customer-list-table td:first-child strong {
    color: #183b54;
}

.customer-name-summary {
    min-width: 0;
}

.customer-official-name {
    display: block;
    margin-top: 4px;
    color: #607480;
    line-height: 1.35;
}

.customer-list-sort {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.customer-list-sort:hover,
.customer-list-sort:focus {
    color: #fff;
    text-decoration: underline;
}

.customer-list-sort [aria-hidden="true"] {
    color: #cae5f4;
    font-size: 1rem;
}

.customer-access-count {
    display: flex;
    align-items: baseline;
    gap: 7px;
    border-radius: 3px;
    color: inherit;
    text-decoration: none;
}

.customer-access-count:hover strong,
.customer-access-count:focus strong {
    color: #fff;
    background: #1c6f9f;
}

.customer-access-count:focus-visible {
    outline: 3px solid rgba(40, 125, 170, .24);
    outline-offset: 3px;
}

.customer-access-count strong {
    min-width: 28px;
    display: inline-flex;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    color: #155a82;
    background: #dceef8;
}

.customer-access-count small {
    color: #647681;
    font-size: .72rem;
}

.customer-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid #8eb1c6;
    border-radius: 3px;
    color: #1c628c;
    background: #fff;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}

.customer-detail-link:hover,
.customer-detail-link:focus {
    border-color: #1c628c;
    background: #e9f3f8;
}

.customer-list-empty {
    padding: 34px 24px;
    border: 1px dashed #b8cbd6;
    border-radius: 4px;
    text-align: center;
    background: #f8fafb;
}

.customer-list-empty strong {
    display: block;
    color: #244a63;
    font-size: 1.05rem;
}

.customer-list-empty p {
    margin: 8px auto 18px;
    color: #5a707d;
}

.customer-list-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    font-size: .84rem;
}

.customer-list-pagination a,
.customer-list-pagination span {
    color: #23678e;
    font-weight: 700;
}

.customer-list-pagination a:last-child,
.customer-list-pagination span:last-child {
    text-align: right;
}

.customer-list-pagination span[aria-disabled="true"] {
    color: #8797a0;
}

.customer-list-pagination strong {
    color: #3e596a;
    text-align: center;
}

.customer-list-mobile-sort {
    display: none;
}

/*
 * ==========================================================================
 * Kundenformular
 * ==========================================================================
 */

.customer-form-page {
    max-width: 1080px;
}

.customer-form-introduction {
    max-width: 780px;
    margin-bottom: 24px;
    color: #425968;
}

.customer-form-help {
    max-width: 780px;
    margin: 0 0 24px;
    border: 1px solid #c8d9e3;
    border-radius: 4px;
    color: #36566b;
    background: #f3f8fb;
}

.customer-form-help summary {
    padding: 13px 16px;
    color: #1f587b;
    font-weight: 700;
    cursor: pointer;
}

.customer-form-help-content {
    padding: 0 16px 15px;
    font-size: .88rem;
    line-height: 1.55;
}

.customer-form-help-content p {
    margin: 0 0 10px;
}

.customer-form-help-content ul {
    margin: 0;
    padding-left: 20px;
}

.customer-form-feedback {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid #b8d7c1;
    border-left: 4px solid #2d8a50;
    border-radius: 4px;
    color: #1f6439;
    background: #f0f8f2;
}

.customer-form-feedback.is-error {
    border-color: #e3b9b9;
    border-left-color: #b93f3f;
    color: #842d2d;
    background: #fff5f5;
}

.customer-form-feedback strong {
    display: block;
    margin-bottom: 6px;
}

.customer-form-feedback ul {
    margin: 0;
    padding-left: 20px;
}

.customer-form-feedback .flashmsg {
    padding: 0;
}

.customer-form {
    display: grid;
    gap: 24px;
}

.customer-form-section {
    min-width: 0;
    margin: 0;
    padding: 22px;
    border: 1px solid #d2dde4;
    border-radius: 4px;
    background: #fbfcfd;
}

.customer-form-section legend {
    padding: 0 8px;
    color: #183b54;
    font-size: 1rem;
    font-weight: 700;
}

.customer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.customer-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.customer-field-wide {
    grid-column: 1 / -1;
}

.customer-field label {
    color: #284b62;
    font-size: .84rem;
    font-weight: 700;
}

.customer-field label span {
    color: #a62f2f;
}

.customer-field input,
.customer-field select,
.customer-field textarea {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #aebdc7;
    border-radius: 3px;
    color: #263f4f;
    background: #fff;
    font: inherit;
}

.customer-field input:focus,
.customer-field select:focus,
.customer-field textarea:focus {
    border-color: var(--admin-navbar);
    outline: 3px solid rgba(40, 125, 170, .18);
    outline-offset: 0;
}

.customer-field textarea {
    min-height: 84px;
    line-height: 1.45;
    resize: vertical;
}

.customer-field-help,
.customer-template-status {
    color: #647681;
    font-size: .76rem;
    line-height: 1.4;
}

.customer-template-status {
    color: #286b91;
    font-weight: 600;
}

.customer-autocomplete {
    position: relative;
}

.customer-autocomplete-results {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #9eb4c2;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(24, 59, 84, .22);
}

.customer-autocomplete-option {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 13px;
    border: 0;
    border-top: 1px solid #e2e9ed;
    color: #24465c;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.customer-autocomplete-option:first-child {
    border-top: 0;
}

.customer-autocomplete-option:hover,
.customer-autocomplete-option:focus,
.customer-autocomplete-option.is-active {
    outline: 0;
    background: #e6f1f7;
}

.customer-autocomplete-option strong {
    color: #164f79;
    font-size: .88rem;
}

.customer-autocomplete-option small {
    color: #617684;
    font-size: .76rem;
}

.customer-autocomplete-message {
    padding: 13px;
    color: #617684;
    font-size: .84rem;
}

.customer-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.customer-form-cancel,
.customer-form-submit {
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 3px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.customer-form-cancel {
    border: 1px solid #aebdc7;
    color: #36566b;
    background: #fff;
}

.customer-form-submit {
    border: 1px solid #17618e;
    color: #fff;
    background: var(--admin-navbar);
    cursor: pointer;
}

.customer-form-cancel:hover,
.customer-form-cancel:focus {
    background: #edf2f5;
}

.customer-form-submit:hover,
.customer-form-submit:focus {
    background: #176a9c;
}

/*
 * ==========================================================================
 * Kundendetail und EBA-Abgleich
 * ==========================================================================
 */

.customer-detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.customer-detail-title-row .eyebrow {
    margin-top: 0;
}

.customer-detail-title-row h2 {
    overflow-wrap: anywhere;
}

.customer-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.customer-detail-actions a {
    min-height: 40px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #8eb1c6;
    border-radius: 3px;
    color: #1c628c;
    background: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.customer-detail-actions a:hover,
.customer-detail-actions a:focus {
    border-color: #1c628c;
    background: #e9f3f8;
}

.customer-detail-readonly {
    margin: 0 0 22px;
    padding: 13px 16px;
    border: 1px solid #c5d3dc;
    border-left: 4px solid #688294;
    border-radius: 4px;
    color: #3f596a;
    background: #f4f7f9;
}

.customer-detail-readonly code,
.customer-form-introduction code {
    color: #174f73;
    font-size: .9em;
}

.customer-eba-status {
    margin: 0 0 26px;
    padding: 19px 20px;
    border: 1px solid #c8d7e0;
    border-left-width: 5px;
    border-radius: 4px;
    color: #365264;
    background: #f5f8fa;
}

.customer-eba-status.is-manual {
    border-left-color: #758997;
}

.customer-eba-status.is-current {
    border-color: #b9d8c2;
    border-left-color: #2d8a50;
    color: #295d3d;
    background: #f2f9f4;
}

.customer-eba-status.is-update {
    border-color: #e1ca93;
    border-left-color: #bc7c13;
    color: #664b1b;
    background: #fffaf0;
}

.customer-eba-status h3 {
    margin: 2px 0 0;
    color: inherit;
    font-size: 1.05rem;
}

.customer-eba-status > p {
    max-width: 820px;
    margin: 12px 0 0;
    line-height: 1.5;
}

.customer-eba-status > small {
    display: block;
    margin-top: 9px;
    color: inherit;
    font-size: .76rem;
    opacity: .82;
}

.customer-eba-kicker {
    margin: 0;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.customer-eba-already-matching {
    padding: 12px 14px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .68);
}

.customer-eba-comparison-wrapper {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid #dbc68f;
    border-radius: 4px;
    background: #fff;
}

.customer-eba-comparison {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    color: #3b5260;
    font-size: .82rem;
}

.customer-eba-comparison th,
.customer-eba-comparison td {
    padding: 12px 13px;
    border-bottom: 1px solid #e6ddd0;
    text-align: left;
    vertical-align: middle;
}

.customer-eba-comparison thead th {
    color: #fff;
    background: #846323;
    font-size: .75rem;
    letter-spacing: .02em;
}

.customer-eba-comparison tbody th {
    width: 22%;
    color: #3a5363;
    background: #fffdf8;
}

.customer-eba-comparison tbody tr:last-child th,
.customer-eba-comparison tbody tr:last-child td {
    border-bottom: 0;
}

.customer-eba-comparison td:nth-child(2),
.customer-eba-comparison td:nth-child(3) {
    max-width: 260px;
    overflow-wrap: anywhere;
}

.customer-eba-adopt-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid #8f681a;
    border-radius: 3px;
    color: #fff;
    background: #9e7016;
    font: inherit;
    font-size: .76rem;
    font-weight: 700;
    cursor: pointer;
}

.customer-eba-adopt-button:hover,
.customer-eba-adopt-button:focus {
    background: #7e5810;
}

.customer-eba-readonly {
    color: #786f60;
    font-size: .75rem;
}

.customer-detail-form .customer-form-section:disabled {
    opacity: .78;
}

.customer-detail-form .customer-form-section:disabled input,
.customer-detail-form .customer-form-section:disabled select,
.customer-detail-form .customer-form-section:disabled textarea {
    color: #3f5664;
    background: #edf2f4;
    -webkit-text-fill-color: #3f5664;
}

/*
 * ==========================================================================
 * Kundenzugänge
 * ==========================================================================
 */

.customer-accounts-page {
    max-width: 1120px;
}

.customer-account-credentials {
    margin: 0 0 24px;
    padding: 18px 20px;
    border: 1px solid #e0bd68;
    border-left: 5px solid #b87908;
    border-radius: 4px;
    color: #5d461b;
    background: #fff9e9;
}

.customer-account-credentials-kicker {
    margin: 0;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.customer-account-credentials h3 {
    margin: 4px 0 8px;
    color: #604718;
}

.customer-account-credentials > p:not(.customer-account-credentials-kicker) {
    margin: 0 0 14px;
}

.customer-account-credentials dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.customer-account-credentials dl > div {
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid rgba(151, 104, 16, .28);
    border-radius: 3px;
    background: #fff;
}

.customer-account-credentials dt,
.customer-account-meta dt {
    color: #697b86;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.customer-account-credentials dd,
.customer-account-meta dd {
    margin: 4px 0 0;
}

.customer-account-credentials code {
    color: #47330e;
    font-size: .96rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    user-select: all;
}

.customer-account-create {
    margin: 0 0 28px;
    padding: 20px;
    border: 1px solid #c8d9e3;
    border-radius: 4px;
    background: #f3f8fb;
}

.customer-account-create h3,
.customer-account-list h3 {
    margin: 0 0 14px;
    color: #183b54;
}

.customer-account-create-form > label,
.customer-account-email-form > label {
    display: block;
    margin-bottom: 7px;
    color: #284b62;
    font-size: .82rem;
    font-weight: 700;
}

.customer-account-create-form > label span {
    color: #a62f2f;
}

.customer-account-create-form > div,
.customer-account-email-form > div {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.customer-account-create-form input,
.customer-account-email-form input[type="email"] {
    min-width: 0;
    min-height: 42px;
    flex: 1 1 auto;
    padding: 9px 11px;
    border: 1px solid #aebdc7;
    border-radius: 3px;
    color: #263f4f;
    background: #fff;
}

.customer-account-create-form input:focus,
.customer-account-email-form input[type="email"]:focus {
    border-color: var(--admin-navbar);
    outline: 3px solid rgba(40, 125, 170, .18);
}

.customer-account-create-form button,
.customer-account-email-form button,
.customer-account-button-row button,
.customer-account-delete button {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #17618e;
    border-radius: 3px;
    color: #fff;
    background: var(--admin-navbar);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.customer-account-create-form button:hover,
.customer-account-create-form button:focus-visible,
.customer-account-email-form button:hover,
.customer-account-email-form button:focus-visible,
.customer-account-button-row button:hover,
.customer-account-button-row button:focus-visible {
    background: #176a9c;
}

.customer-account-list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.customer-account-list-heading h3 {
    margin: 0;
}

.customer-account-list-heading span {
    color: #607480;
    font-size: .82rem;
    font-weight: 700;
}

.customer-account-cards {
    display: grid;
    gap: 16px;
}

.customer-account-card {
    overflow: hidden;
    border: 1px solid #c5d2da;
    border-left: 5px solid #2d8a50;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(24, 59, 84, .08);
}

.customer-account-card.is-disabled {
    border-left-color: #a64a4a;
}

.customer-account-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border-bottom: 1px solid #dbe4e9;
    background: #f8fafb;
}

.customer-account-card-heading h4 {
    margin: 0 0 8px;
    color: #183b54;
    overflow-wrap: anywhere;
}

.customer-account-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
}

.customer-account-status.is-active {
    color: #21663b;
    background: #dff2e5;
}

.customer-account-status.is-disabled {
    color: #8c3030;
    background: #fae1e1;
}

.customer-account-meta {
    min-width: min(100%, 430px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0;
}

.customer-account-meta dd {
    color: #344f60;
    font-size: .8rem;
}

.customer-account-actions {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
}

.customer-account-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.customer-account-button-row form {
    margin: 0;
}

.customer-account-button-row .customer-account-warning-button {
    border-color: #9a6811;
    background: #a97518;
}

.customer-account-button-row .customer-account-warning-button:hover,
.customer-account-button-row .customer-account-warning-button:focus-visible {
    background: #875b0d;
}

.customer-account-delete {
    border-top: 1px solid #e0e7eb;
    padding-top: 12px;
}

.customer-account-delete summary {
    width: fit-content;
    color: #9a3838;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.customer-account-delete form {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 13px;
    border: 1px solid #e4bdbd;
    border-radius: 3px;
    background: #fff5f5;
}

.customer-account-delete label {
    flex: 1 1 auto;
    color: #733737;
    font-size: .8rem;
    line-height: 1.4;
}

.customer-account-delete input {
    margin-right: 6px;
}

.customer-account-delete .customer-account-danger-button {
    border-color: #8f2f2f;
    background: #a83b3b;
}

.customer-account-delete .customer-account-danger-button:hover,
.customer-account-delete .customer-account-danger-button:focus-visible {
    background: #872828;
}

/*
 * ==========================================================================
 * Einstellungen der Terminbuchung
 * ==========================================================================
 */

.booking-settings-page {
    max-width: 980px;
}

.booking-setting-combined-field > div {
    display: grid;
    grid-template-columns: minmax(100px, .55fr) minmax(160px, 1fr);
    gap: 9px;
}

.booking-settings-updated {
    margin-right: auto;
    color: #647681;
    font-size: .76rem;
}

/*
 * ==========================================================================
 * Gemeinsamer Terminkalender für Backoffice und Kundenportal
 * ==========================================================================
 */

.booking-dashboard-page {
    max-width: 1180px;
}

.booking-dashboard-introduction {
    max-width: 760px;
    color: #425968;
}

.booking-calendar-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.booking-calendar-summary > div {
    padding: 13px 15px;
    border: 1px solid #cad9e2;
    border-radius: 4px;
    background: #f5f9fb;
}

.booking-calendar-summary span,
.booking-calendar-summary strong {
    display: block;
}

.booking-calendar-summary span {
    margin-bottom: 4px;
    color: #687b87;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.booking-calendar-summary strong {
    color: #183b54;
}

.booking-calendar {
    overflow: hidden;
    border: 1px solid #c5d2da;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(24, 59, 84, .1);
}

.booking-calendar-toolbar {
    min-height: 62px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    color: #fff;
    background: #1f6f9f;
}

.booking-calendar-toolbar h3 {
    margin: 0;
    text-align: center;
    font-size: 1.18rem;
}

.booking-calendar-toolbar a,
.booking-calendar-toolbar > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    justify-self: center;
}

.booking-calendar-toolbar a {
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
}

.booking-calendar-toolbar a:hover,
.booking-calendar-toolbar a:focus-visible {
    background: rgba(255, 255, 255, .2);
}

.booking-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.booking-calendar-weekdays {
    border-bottom: 1px solid #d5dfe5;
    color: #4c6878;
    background: #edf3f6;
}

.booking-calendar-weekdays span {
    padding: 9px 4px;
    text-align: center;
    font-size: .76rem;
    font-weight: 800;
}

.booking-calendar-day {
    min-width: 0;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    border-right: 1px solid #dfe6ea;
    border-bottom: 1px solid #dfe6ea;
    color: #264b62;
    background: #fff;
    text-decoration: none;
}

.booking-calendar-day:nth-child(7n) {
    border-right: 0;
}

.booking-calendar-day strong {
    align-self: flex-start;
    min-width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
}

.booking-calendar-day small {
    color: #2a7750;
    font-size: .72rem;
    font-weight: 700;
}

a.booking-calendar-day:hover,
a.booking-calendar-day:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(36, 124, 175, .28);
    outline-offset: -3px;
    background: #eef8fd;
}

.booking-calendar-day.is-today strong {
    color: #fff;
    background: #1f6f9f;
}

.booking-calendar-day.is-selected {
    box-shadow: inset 0 0 0 3px #1973a7;
    background: #e7f4fb;
}

.booking-calendar-day.is-full,
.booking-calendar-day.is-outside-range {
    color: #8a989f;
    background: #f1f3f4;
}

.booking-calendar-day.is-outside-range {
    opacity: .68;
}

.booking-calendar-day.is-full small,
.booking-calendar-day.is-outside-range small {
    color: #909da4;
}

.booking-calendar-day.is-empty {
    background: #f8f9fa;
}

.booking-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    padding: 13px 16px;
    color: #607480;
    background: #f7f9fa;
    font-size: .74rem;
}

.booking-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.booking-calendar-legend i {
    width: 13px;
    height: 13px;
    display: inline-block;
    border: 1px solid #aebdc7;
    border-radius: 2px;
    background: #fff;
}

.booking-calendar-legend i.is-full {
    background: #e6e9eb;
}

.booking-calendar-legend i.is-selected {
    border: 3px solid #1973a7;
    background: #e7f4fb;
}

.booking-calendar-legend i.is-free {
    border-color: #80b795;
    background: #e7f5ec;
}

.booking-slots {
    margin-top: 24px;
}

.booking-slots-placeholder {
    padding: 28px 22px;
    border: 1px dashed #b8cbd6;
    border-radius: 4px;
    color: #5a707d;
    text-align: center;
    background: #f8fafb;
}

.booking-slots-placeholder h3 {
    margin: 0 0 7px;
    color: #244a63;
}

.booking-slots-placeholder p {
    margin: 0;
}

.booking-slots-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 13px;
}

.booking-slots-heading .eyebrow,
.booking-slots-heading h3 {
    margin: 0;
}

.booking-slots-heading span {
    color: #2a7750;
    font-size: .82rem;
    font-weight: 800;
}

.booking-slot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.booking-slot-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px;
    border: 1px solid #c7d7e0;
    border-left: 4px solid #3a9660;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(24, 59, 84, .06);
}

.booking-slot-card time,
.booking-slot-card small {
    display: block;
}

.booking-slot-card time {
    color: #183b54;
    font-weight: 800;
}

.booking-slot-card small {
    margin-top: 4px;
    color: #687b87;
    font-size: .72rem;
}

.booking-slot-card button {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid #9bb2bf;
    border-radius: 3px;
    color: #6f7d85;
    background: #edf1f3;
    font-weight: 700;
    cursor: not-allowed;
}

.booking-reservation-note {
    margin: 13px 0 0;
    color: #687b87;
    font-size: .78rem;
}

/*
 * Inhalt bleibt für Screenreader verfügbar, nimmt visuell aber keinen Platz
 * ein. Die Klasse wird für Statusmeldungen des Autocomplete verwendet.
 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/*
 * ==========================================================================
 * EVU-Datamanager
 * ==========================================================================
 */

.evu-update-status {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #b9cfdd;
    border-left: 4px solid var(--admin-navbar);
    border-radius: 4px;
    background: #f6fafc;
}

.evu-update-status-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.evu-update-status-heading h3 {
    margin: 0;
    color: #183b54;
    font-size: 1.05rem;
}

.evu-status-kicker {
    margin: 0 0 4px;
    color: var(--admin-navbar);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.evu-audit-badge {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 3px;
    color: #17622f;
    background: #dff1e4;
    font-size: .76rem;
    font-weight: 700;
}

.evu-update-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 0;
}

.evu-update-facts > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #d3dfe6;
    border-radius: 4px;
    background: #fff;
}

.evu-update-facts dt {
    color: #647681;
    font-size: .75rem;
    line-height: 1.35;
}

.evu-update-facts dd {
    margin: 5px 0 2px;
    color: #183b54;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

.evu-update-facts small {
    color: #647681;
    font-size: .72rem;
    line-height: 1.35;
}

.evu-last-result,
.evu-audit-note {
    margin: 14px 0 0;
    color: #425968;
    font-size: .84rem;
}

.evu-audit-note {
    padding-top: 12px;
    border-top: 1px solid #d3dfe6;
}

.evu-read-only-note {
    margin-top: 28px;
    padding: 14px 16px;
    border: 1px solid #a9ccdf;
    border-left: 4px solid var(--admin-navbar);
    border-radius: 4px;
    color: #164f79;
    background: #eef7fc;
}

.evu-read-only-note > strong {
    display: block;
    margin-bottom: 4px;
}

.evu-read-only-note p {
    margin: 0;
}

.evu-read-only-note code {
    font-size: .82em;
}

.evu-source,
.evu-url-import,
.evu-import-preview {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #d7e0e6;
}

.evu-source h3,
.evu-url-import h3,
.evu-import-preview h3 {
    margin: 0 0 8px;
    color: #183b54;
    font-size: 1.05rem;
}

.evu-source > p,
.evu-url-import > p {
    margin: 0 0 16px;
}

/*
 * Das gesamte EBA-Element ist ein externer Link. Logo und Beschriftung
 * können dadurch gemeinsam angeklickt werden.
 */
.eba-source-link {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid #c7d6df;
    border-radius: 4px;
    color: #164f79;
    background: #f7fafc;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.eba-source-link:hover,
.eba-source-link:focus-visible {
    border-color: var(--admin-navbar);
    background: #eef7fc;
    box-shadow: 0 2px 8px rgba(26, 48, 63, .12);
}

.eba-source-link:focus-visible {
    outline: 3px solid rgba(36, 124, 175, .28);
    outline-offset: 2px;
}

.eba-source-logo {
    width: 150px;
    max-width: 35%;
    height: auto;
    display: block;
}

.eba-source-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eba-source-text strong {
    line-height: 1.35;
}

.eba-source-text small {
    color: #647681;
    line-height: 1.35;
}

.evu-url-form label {
    display: block;
    margin-bottom: 7px;
    color: #183b54;
    font-size: .9rem;
    font-weight: 700;
}

.evu-url-form-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

/*
 * min-width: 0 verhindert, dass eine lange URL den Inhaltsbereich über
 * seine verfügbare Breite hinausschiebt.
 */
.evu-url-input {
    min-width: 0;
    flex: 1 1 auto;
    padding: 11px 12px;
    border: 1px solid #b9c8d2;
    border-radius: 4px;
    color: #24323c;
    background: #fff;
}

.evu-url-input:hover {
    border-color: #829aaa;
}

.evu-url-input:focus {
    border-color: var(--admin-navbar);
    outline: 3px solid rgba(36, 124, 175, .2);
    outline-offset: 1px;
}

.evu-url-submit,
.evu-confirm-button,
.evu-cancel-button {
    border-radius: 4px;
    cursor: pointer;
}

.evu-url-submit,
.evu-confirm-button {
    border: 1px solid var(--admin-navbar-dark);
    color: #fff;
    background: var(--admin-navbar);
}

.evu-url-submit {
    flex: 0 0 auto;
    padding: 11px 20px;
}

.evu-url-submit:hover,
.evu-url-submit:focus-visible,
.evu-confirm-button:hover,
.evu-confirm-button:focus-visible {
    background: var(--admin-navbar-dark);
}

.evu-url-submit:focus-visible,
.evu-confirm-button:focus-visible,
.evu-cancel-button:focus-visible {
    outline: 3px solid rgba(36, 124, 175, .28);
    outline-offset: 2px;
}

.evu-url-help {
    display: block;
    margin-top: 8px;
    color: #647681;
    line-height: 1.45;
}

/*
 * Rückmeldungen stehen direkt am betroffenen URL-Feld. Die bestehenden
 * globalen Flashmessage-Klassen werden nur innerhalb dieser Seite optisch
 * als kompakte Hinweisboxen dargestellt.
 */
.evu-form-feedback {
    margin-top: 10px;
}

.evu-form-feedback .flashmsg {
    display: grid;
    gap: 6px;
    padding: 0;
}

.evu-form-feedback .flashmsg > div {
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 4px;
    line-height: 1.45;
}

.evu-form-feedback .flashmsg-success {
    border-color: #a9d6b6;
    color: #17622f;
    background: #edf8f0;
}

.evu-form-feedback .flashmsg-error {
    border-color: #e2aaaa;
    color: #8b1e1e;
    background: #fff0f0;
}

.evu-form-feedback .flashmsg-info {
    border-color: #a9ccdf;
    color: #164f79;
    background: #eef7fc;
}

.evu-form-feedback .flashmsg-warning {
    border-color: #e4c88e;
    color: #76540b;
    background: #fff8e8;
}

/*
 * Vorschau vor dem tatsächlichen Datenbankimport.
 */
.evu-import-preview {
    padding: 22px;
    border: 1px solid #b9cfdd;
    border-radius: 4px;
    background: #f6fafc;
}

.evu-preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.evu-preview-heading h3 {
    margin-bottom: 0;
}

.evu-preview-kicker {
    margin: 0 0 4px;
    color: var(--admin-navbar);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.evu-preview-status {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 3px;
    color: #76540b;
    background: #fff0c9;
    font-size: .76rem;
    font-weight: 700;
}

.evu-preview-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.evu-preview-stats > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #d3dfe6;
    border-radius: 4px;
    background: #fff;
}

.evu-preview-stats dt {
    color: #647681;
    font-size: .75rem;
}

.evu-preview-stats dd {
    margin: 4px 0 0;
    color: #183b54;
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.evu-preview-stats .is-new {
    border-top: 3px solid #2f9660;
}

.evu-preview-stats .is-changed {
    border-top: 3px solid #d89a28;
}

.evu-preview-stats .is-unchanged {
    border-top: 3px solid #8d9aa3;
}

.evu-preview-file,
.evu-preview-url,
.evu-preview-note {
    margin: 10px 0 0;
}

.evu-preview-url {
    overflow-wrap: anywhere;
}

.evu-preview-url code {
    color: #425968;
    font-size: .78rem;
}

.evu-preview-note {
    padding: 10px 12px;
    border-left: 3px solid var(--admin-navbar);
    background: #eaf4fa;
}

.evu-confirm-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.evu-confirm-button,
.evu-cancel-button {
    padding: 10px 16px;
}

.evu-cancel-button {
    border: 1px solid #aebdc7;
    color: #334c5d;
    background: #fff;
}

.evu-cancel-button:hover,
.evu-cancel-button:focus-visible {
    border-color: #768c9a;
    background: #eef2f4;
}

@media (max-width: 680px) {
    .evu-update-status-heading {
        flex-direction: column;
    }

    .evu-update-facts {
        grid-template-columns: 1fr;
    }

    .eba-source-link {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
    }

    .eba-source-logo {
        width: 140px;
        max-width: 70%;
    }

    .evu-url-form-row {
        align-items: stretch;
        flex-direction: column;
    }

    .evu-url-submit {
        width: 100%;
    }

    .evu-preview-heading {
        flex-direction: column;
    }

    .evu-preview-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .evu-confirm-form {
        flex-direction: column;
    }

    .evu-confirm-button,
    .evu-cancel-button {
        width: 100%;
    }
}

.sidebar-scrim {
    display: none;
}

.viewport-debug {
    position: fixed;
    z-index: 25;
    right: 14px;
    bottom: 14px;
    min-width: 156px;
    display: grid;
    gap: 2px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 4px;
    color: #fff;
    background: rgba(0, 35, 66, .92);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.viewport-debug span {
    color: #8fc6e8;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.viewport-debug strong {
    font-size: .95rem;
}

.viewport-debug small {
    color: #cce4f3;
    font-size: .72rem;
}

/* Desktop: Seitenleiste breit oder kompakt */
@media (min-width: 1220px) {
    .admin-shell.is-compact {
        grid-template-columns: var(--admin-sidebar-compact) minmax(0, 1fr);
    }

    .admin-shell.is-compact .sidebar-link span {
        display: none;
    }

    .admin-shell.is-compact .sidebar-link {
        justify-content: center;
        gap: 0;
        padding: 0;
    }

    .admin-shell.is-compact .sidebar-link .admin-icon {
        margin: 0;
    }
}

/* Tablet: kompakte Leiste; geöffnet als Drawer */
@media (min-width: 870px) and (max-width: 1219px) {
    .admin-shell {
        grid-template:
            "header header" var(--admin-header-height)
            "toolbar toolbar" var(--admin-toolbar-height)
            "sidebar content" 1fr
            / var(--admin-sidebar-compact) minmax(0, 1fr);
    }

    .admin-sidebar {
        position: fixed;
        top: calc(var(--admin-header-height) + var(--admin-toolbar-height));
        bottom: 0;
        left: 0;
        width: var(--admin-sidebar-compact);
        transition: width 180ms ease;
    }

    .admin-sidebar .sidebar-link span {
        display: none;
    }

    .admin-sidebar .sidebar-link {
        justify-content: center;
        gap: 0;
        padding: 0;
    }

    .admin-sidebar .sidebar-link .admin-icon {
        margin: 0;
    }

    .admin-shell.is-open .admin-sidebar {
        width: var(--admin-sidebar-wide);
    }

    .admin-shell.is-open .sidebar-link span {
        display: inline;
    }

    .admin-shell.is-open .sidebar-link {
        justify-content: flex-start;
        gap: 20px;
        padding: 0 24px;
    }

    /*
     * Die allgemeine Tablet-Regel setzt ausgeblendete Beschriftungen beim
     * Öffnen auf inline. Der Pfeil benötigt display:block, damit seine
     * Größe und Drehung zuverlässig erhalten bleiben.
     */
    .admin-shell.is-open .sidebar-group-toggle .submenu-chevron {
        display: block;
    }

    .admin-shell.is-open .sidebar-sublink {
        gap: 16px;
        padding-left: 56px;
    }

    .admin-shell.is-open .sidebar-scrim {
        position: fixed;
        z-index: 34;
        inset: calc(var(--admin-header-height) + var(--admin-toolbar-height)) 0 0 var(--admin-sidebar-compact);
        display: block;
        border: 0;
        background: rgba(0, 0, 0, .48);
    }
}

/* Smartphone: Menü verborgen; geöffnet als Drawer */
@media (max-width: 869px) {
    :root {
        --admin-header-height: 74px;
        --admin-toolbar-height: 56px;
    }

    .admin-shell {
        display: grid;
        grid-template:
            "header" var(--admin-header-height)
            "toolbar" var(--admin-toolbar-height)
            "content" 1fr
            / minmax(0, 1fr);
    }

    .admin-header {
        padding: 0 14px;
    }

    .header-button {
        width: 46px;
        height: 46px;
    }

    .admin-logo {
        display: none;
    }

    .admin-clock time {
        font-size: 1.75rem;
    }

    .admin-clock span {
        font-size: .78rem;
    }

    .admin-toolbar {
        padding-right: 12px;
        gap: 14px;
    }

    .admin-toolbar h1 {
        font-size: 1.1rem;
    }

    .toolbar-context {
        display: none;
    }

    .toolbar-user-label {
        display: none;
    }

    .toolbar-user-toggle {
        padding: 0 10px;
    }

    .admin-sidebar {
        position: fixed;
        z-index: 50;
        top: calc(var(--admin-header-height) + var(--admin-toolbar-height));
        bottom: 0;
        left: 0;
        width: min(82vw, 340px);
        transform: translateX(-105%);
        transition: transform 200ms ease;
    }

    .admin-shell.is-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-shell.is-open .sidebar-scrim {
        position: fixed;
        z-index: 45;
        inset: calc(var(--admin-header-height) + var(--admin-toolbar-height)) 0 0 0;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, .55);
    }

    .admin-content {
        padding: 18px 14px;
    }

    .rights-role-summary,
    .rights-group-heading {
        flex-direction: column;
    }

    .rights-total {
        width: auto;
        min-width: 0;
    }

    .rights-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .rights-state {
        justify-content: space-between;
    }

    .rights-state-label {
        min-width: 0;
        text-align: left;
    }

    .customer-form-section {
        padding: 18px 14px;
    }

    .customer-list-title-row,
    .customer-list-result-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-list-create {
        width: 100%;
    }

    .customer-list-search {
        padding: 15px;
    }

    .customer-list-search-row {
        flex-direction: column;
    }

    .customer-list-search input[type="search"] {
        min-width: 0;
        flex-basis: auto;
    }

    .customer-list-search button,
    .customer-list-search-reset {
        width: 100%;
        justify-content: center;
    }

    .customer-list-mobile-sort {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 9px;
        margin: 0 0 14px;
        padding: 14px;
        border: 1px solid #c8d7e0;
        border-radius: 4px;
        background: #f5f9fb;
    }

    .customer-list-mobile-sort label {
        grid-column: 1 / -1;
        margin: 0;
    }

    .customer-list-mobile-sort select {
        width: 100%;
        min-height: 42px;
        box-sizing: border-box;
        padding: 8px 10px;
        border: 1px solid #aebdc7;
        border-radius: 3px;
        color: #263f4f;
        background: #fff;
        font: inherit;
    }

    .customer-list-mobile-sort button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .customer-list-table-wrapper {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .customer-list-table,
    .customer-list-table tbody,
    .customer-list-table tr,
    .customer-list-table td {
        display: block;
    }

    .customer-list-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .customer-list-table tbody {
        display: grid;
        gap: 12px;
    }

    .customer-list-table tr {
        overflow: hidden;
        border: 1px solid #c5d2da;
        border-radius: 4px;
        background: #fff;
        box-shadow: 0 3px 10px rgba(24, 59, 84, .08);
    }

    .customer-list-table tbody tr:nth-child(even),
    .customer-list-table tbody tr:hover {
        background: #fff;
    }

    .customer-list-table td,
    .customer-list-table td:nth-child(3),
    .customer-list-table td:nth-child(4),
    .customer-list-table td:last-child {
        width: auto;
        display: grid;
        grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
        gap: 12px;
        padding: 11px 13px;
        border-bottom: 1px solid #e0e7eb;
        text-align: left;
    }

    .customer-list-table td::before {
        color: #607480;
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        content: attr(data-label);
    }

    .customer-list-table td:last-child {
        border-bottom: 0;
    }

    .customer-access-count {
        flex-wrap: wrap;
    }

    .customer-detail-link {
        justify-self: start;
    }

    .customer-list-pagination {
        grid-template-columns: 1fr 1fr;
    }

    .customer-list-pagination strong {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .customer-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .customer-field-wide {
        grid-column: auto;
    }

    .customer-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .customer-account-credentials dl,
    .customer-account-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .customer-account-create,
    .customer-account-card-heading,
    .customer-account-actions {
        padding: 16px 14px;
    }

    .customer-account-create-form > div,
    .customer-account-email-form > div,
    .customer-account-card-heading,
    .customer-account-delete form {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-account-create-form button,
    .customer-account-email-form button,
    .customer-account-button-row form,
    .customer-account-button-row button,
    .customer-account-delete button {
        width: 100%;
    }

    .booking-setting-combined-field > div,
    .booking-calendar-summary,
    .booking-slot-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .booking-settings-updated {
        margin-right: 0;
        text-align: center;
    }

    .booking-calendar-toolbar {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
    }

    .booking-calendar-toolbar h3 {
        font-size: 1rem;
    }

    .booking-calendar-day {
        min-height: 70px;
        gap: 5px;
        padding: 7px 5px;
    }

    .booking-calendar-day strong {
        min-width: 23px;
        height: 23px;
        font-size: .78rem;
    }

    .booking-calendar-day small {
        font-size: .6rem;
    }

    .booking-calendar-legend,
    .booking-slots-heading,
    .booking-slot-card {
        align-items: stretch;
        flex-direction: column;
    }

    .booking-slot-card button {
        width: 100%;
    }

    .customer-detail-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-detail-actions {
        justify-content: stretch;
    }

    .customer-detail-actions a {
        flex: 1 1 150px;
    }

    .customer-eba-status {
        padding: 16px 14px;
    }

    .customer-eba-comparison-wrapper {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .customer-eba-comparison,
    .customer-eba-comparison tbody,
    .customer-eba-comparison tr,
    .customer-eba-comparison th,
    .customer-eba-comparison td {
        display: block;
    }

    .customer-eba-comparison {
        min-width: 0;
    }

    .customer-eba-comparison thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .customer-eba-comparison tbody {
        display: grid;
        gap: 12px;
    }

    .customer-eba-comparison tr {
        overflow: hidden;
        border: 1px solid #dbc68f;
        border-radius: 4px;
        background: #fff;
    }

    .customer-eba-comparison tbody th,
    .customer-eba-comparison td,
    .customer-eba-comparison td:nth-child(2),
    .customer-eba-comparison td:nth-child(3) {
        width: auto;
        max-width: none;
        display: grid;
        grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr);
        gap: 10px;
        box-sizing: border-box;
        padding: 11px 12px;
        border-bottom: 1px solid #ece2d4;
    }

    .customer-eba-comparison th::before,
    .customer-eba-comparison td::before {
        color: #7b673e;
        font-size: .69rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
        content: attr(data-label);
    }

    .customer-eba-comparison td:last-child {
        border-bottom: 0;
    }

    .customer-eba-adopt-button {
        width: 100%;
    }

    .customer-form-cancel,
    .customer-form-submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-shell,
    .admin-sidebar,
    .submenu-chevron,
    .rights-switch::after {
        transition: none;
    }
}

/* =======================================================================
   LEK-Portal: Ergänzungen für 2FA und das reduzierte Dashboard
========================================================================== */

.login-form form,
.login-form {
    margin: 0;
}

.login-button {
    border: 1px solid #17618e;
    border-radius: 3px;
    color: #fff;
    background: var(--admin-navbar, #247caf);
    cursor: pointer;
    font-weight: 700;
}

.login-button:hover,
.login-button:focus-visible {
    background: #176a9c;
}

.code-input {
    text-align: center;
    letter-spacing: .3em;
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.login-secondary-form {
    margin: 0 15px 10px;
    text-align: center;
}

.text-button {
    border: 0;
    color: var(--admin-navbar, #247caf);
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.text-button:hover,
.text-button:focus-visible {
    color: var(--admin-navbar-dark, #155b89);
}

.account-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 0;
}

.account-summary > div {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 15px 17px;
    border: 1px solid #d5e0e7;
    border-radius: 4px;
    background: #f4f8fa;
}

.account-summary span {
    color: #657985;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-summary strong {
    overflow-wrap: anywhere;
    color: #183b54;
}

.dashboard-note {
    margin-bottom: 0;
    color: #4c616f;
}

@media (max-width: 680px) {
    .account-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =======================================================================
   Fragen-Datenbank / Frageneditor
========================================================================== */

.questions-page,
.question-editor-page {
    width: min(100%, 1500px);
    margin: 0 auto;
}

.page-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.page-heading-row h2 {
    margin: 4px 0 8px;
    color: #183b54;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.page-introduction {
    max-width: 820px;
    margin: 0;
    color: #536b7a;
    line-height: 1.55;
}

.heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.primary-action,
.secondary-action,
.block-toolbar button,
.inline-add,
.metadata-add-form button,
.metadata-row-form button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 4px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-action {
    border: 1px solid #16699c;
    color: #fff;
    background: var(--admin-navbar);
}

.primary-action:hover,
.primary-action:focus-visible {
    background: #176a9c;
}

.secondary-action {
    border: 1px solid #aebec8;
    color: #234f6c;
    background: #fff;
}

.secondary-action:hover,
.secondary-action:focus-visible {
    background: #eaf2f7;
}

.page-flash,
.form-error {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 54, 68, .08);
}

.form-error {
    border-left: 4px solid #b42318;
    color: #842015;
    background: #fff5f4;
}

.question-list-card,
.editor-panel,
.preview-meta-card,
.exam-question-sheet,
.metadata-admin-card {
    border: 1px solid #d3dde3;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(26, 48, 63, .08);
}

.responsive-table-wrap {
    overflow-x: auto;
}

.question-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.question-table th,
.question-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e0e7eb;
    vertical-align: top;
    text-align: left;
}

.question-table th {
    color: #315b75;
    background: #eef5f8;
    font-size: .76rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.question-table tbody tr:hover {
    background: #f8fbfc;
}

.question-table td small,
.table-meta-line {
    display: block;
}

.question-table td small {
    margin-top: 4px;
    color: #677b87;
}

.question-actions {
    white-space: nowrap;
}

.question-actions a {
    display: block;
    margin: 0 0 5px;
    color: #176d9f;
    font-weight: 700;
    text-decoration: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 999px;
    background: #e8eef2;
    font-size: .72rem;
    font-weight: 800;
}

.status-approved { color: #176b37; background: #e5f5eb; }
.status-reviewed { color: #68520e; background: #fff5cf; }
.status-archived { color: #69747a; background: #edf0f2; }
.status-draft { color: #245d80; background: #e4f1f8; }

.empty-state {
    padding: 50px 28px;
    color: #536b7a;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: #244b64;
    font-size: 1.15rem;
}

.question-editor-form {
    display: grid;
    gap: 22px;
}

.editor-panel {
    padding: clamp(18px, 3vw, 30px);
}

.editor-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 17px;
    border-bottom: 1px solid #dce5e9;
}

.editor-panel-heading > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.editor-panel-heading h3 {
    margin: 0;
    color: #183b54;
    font-size: 1.15rem;
}

.editor-panel-heading p {
    margin: 4px 0 0;
    color: #667a86;
    line-height: 1.45;
}

.editor-panel-heading.compact {
    margin-bottom: 18px;
}

.editor-step {
    width: 30px;
    height: 30px;
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--admin-navbar);
    font-weight: 800;
}

.points-summary {
    min-width: 115px;
    padding: 9px 12px;
    border-radius: 4px;
    color: #fff;
    background: #183b54;
    text-align: center;
}

.points-summary small,
.points-summary strong {
    display: block;
}

.points-summary small {
    color: #cfe1eb;
    font-size: .72rem;
}

.points-summary strong {
    margin-top: 2px;
    font-size: 1.3rem;
}

.form-grid {
    display: grid;
    gap: 15px 18px;
}

.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }
.compact-grid { gap: 10px 14px; }

.field {
    min-width: 0;
    display: block;
}

.field > span,
.field > label > span {
    display: block;
    margin-bottom: 5px;
    color: #315b75;
    font-size: .82rem;
    font-weight: 700;
}

.field > span small {
    color: #82919a;
    font-weight: 500;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="file"],
.field textarea,
.field select,
.metadata-add-form input,
.metadata-row-form input[type="text"] {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #b9c7d0;
    border-radius: 3px;
    color: #283b47;
    background: #fff;
    font: inherit;
}

.field textarea {
    resize: vertical;
    line-height: 1.45;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.metadata-add-form input:focus,
.metadata-row-form input:focus {
    border-color: var(--admin-navbar);
    outline: 3px solid rgba(36, 124, 175, .14);
}

.input-suffix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.input-suffix input {
    border-radius: 3px 0 0 3px !important;
}

.input-suffix > span {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #b9c7d0;
    border-left: 0;
    border-radius: 0 3px 3px 0;
    color: #617682;
    background: #f1f5f7;
    font-size: .82rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.metadata-choice-group {
    min-width: 0;
    margin: 0;
    padding: 13px;
    border: 1px solid #d0dce3;
    border-radius: 4px;
}

.metadata-choice-group legend {
    padding: 0 5px;
    color: #315b75;
    font-size: .8rem;
    font-weight: 800;
}

.check-list {
    max-height: 180px;
    overflow: auto;
}

.check-list label,
.block-rulebooks label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 3px;
    color: #384e5c;
    font-size: .86rem;
    line-height: 1.3;
}

.check-list input,
.block-rulebooks input {
    margin-top: 2px;
}

.metadata-hint {
    margin: 14px 0 0;
    color: #637885;
    font-size: .82rem;
}

.metadata-hint a {
    color: #176d9f;
}

.block-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.block-toolbar button,
.inline-add {
    min-height: 36px;
    border: 1px solid #abc0cd;
    color: #245975;
    background: #f5f9fb;
}

.block-toolbar button:hover,
.inline-add:hover {
    background: #e3eff5;
}

.block-toolbar .signal-add-button {
    border-color: #779ab0;
    color: #fff;
    background: #315f7b;
}

.block-toolbar .signal-add-button:hover {
    background: #244e68;
}

.question-block-list {
    display: grid;
    gap: 18px;
}

.question-block {
    position: relative;
    padding: 18px;
    border: 1px solid #cbd8df;
    border-left: 4px solid #7fa9c1;
    border-radius: 4px;
    background: #fbfcfd;
}

.question-block-signal_single,
.question-block-signal_block {
    border-left-color: #315f7b;
    background: #f8fbfd;
}

.question-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: -18px -18px 17px;
    padding: 11px 14px;
    border-bottom: 1px solid #d9e3e8;
    background: #eef4f7;
}

.block-type-label {
    color: #214b65;
    font-size: .83rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.block-actions {
    display: flex;
    gap: 5px;
}

.block-actions button,
.danger-ghost {
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid #b8c6ce;
    border-radius: 3px;
    color: #405965;
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.danger-ghost {
    color: #8c2e24 !important;
}

.block-rulebooks {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    padding: 5px 8px;
    border: 1px solid #d7e0e5;
    border-radius: 3px;
    background: #fff;
}

.block-rulebook-empty {
    margin: 8px 0;
    color: #82919a;
    font-size: .8rem;
}

.image-editor {
    margin: 10px 0;
}

.existing-image {
    width: min(100%, 360px);
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #d4dfe5;
    border-radius: 3px;
    background: #fff;
}

.existing-image img {
    max-width: 100%;
    max-height: 220px;
    display: block;
    margin: 0 auto 7px;
    object-fit: contain;
}

.existing-image label {
    color: #774b45;
    font-size: .78rem;
}

.answer-layout-grid {
    display: grid;
    grid-template-columns: minmax(230px, .8fr) minmax(260px, 1.2fr);
    gap: 18px;
}

.subeditor-heading,
.signal-row-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 13px 0 8px;
    color: #315b75;
}

.subeditor-heading small {
    color: #87959c;
    font-weight: 500;
}

.choice-option-row,
.criterion-row {
    display: grid;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.choice-option-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.criterion-row {
    grid-template-columns: minmax(0, 1fr) 105px auto;
}

.choice-option-row > input,
.criterion-row > input,
.criterion-row label input {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #bdcbd3;
    border-radius: 3px;
    font: inherit;
}

.choice-correct {
    min-width: 76px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #386277;
    font-size: .78rem;
}

.criterion-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #536b79;
    font-size: .8rem;
}

.signal-single-editor,
.signal-editor-row {
    display: grid;
    grid-template-columns: minmax(180px, 32%) minmax(0, 68%);
    gap: 18px;
    align-items: stretch;
}

.signal-single-editor {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #bcced9;
    background: #fff;
}

.signal-editor-rows {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.signal-editor-row {
    padding: 12px;
    border: 1px solid #c5d4dc;
    border-radius: 3px;
    background: #fff;
}

.signal-editor-image {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px;
    border-right: 1px solid #dae3e8;
}

.signal-editor-answer {
    min-width: 0;
}

.signal-block-note {
    margin: 10px 0;
    padding: 10px 12px;
    border-left: 3px solid #315f7b;
    color: #4a6676;
    background: #eaf3f7;
    font-size: .82rem;
    line-height: 1.45;
}

.history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #dde5e9;
    color: #667984;
    font-size: .8rem;
}

.sticky-savebar {
    position: sticky;
    z-index: 20;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border: 1px solid #aebfca;
    border-radius: 5px;
    color: #264b62;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(19, 43, 57, .18);
    backdrop-filter: blur(6px);
}

.dashboard-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.dashboard-feature-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 16px;
    border: 1px solid #cad8e0;
    border-radius: 4px;
    color: #345363;
    background: #f7fafb;
    text-decoration: none;
}

.dashboard-feature-card:hover {
    border-color: #8fb2c5;
    background: #edf5f8;
}

.dashboard-feature-card .feature-icon {
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #dcecf4;
}

.dashboard-feature-card strong {
    color: #214d67;
}

.dashboard-feature-card > span:last-child {
    font-size: .84rem;
    line-height: 1.4;
}

/* Stammdaten */
.metadata-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.metadata-admin-card {
    padding: 18px;
}

.metadata-admin-card h3 {
    margin: 0 0 14px;
    color: #214d67;
}

.metadata-add-form,
.metadata-row-form {
    display: grid;
    gap: 7px;
}

.metadata-add-form {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 14px;
}

.metadata-add-form button,
.metadata-row-form button {
    min-height: 38px;
    border: 1px solid #8da9ba;
    color: #245975;
    background: #eef5f8;
}

.metadata-admin-list {
    display: grid;
    gap: 7px;
}

.metadata-row-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    padding-top: 7px;
    border-top: 1px solid #e1e7eb;
}

.active-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #526a78;
    font-size: .78rem;
}

/* Fragenvorschau – an das Word-Prüfungsbild angelehnt */
.preview-meta-card {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-bottom: 18px;
    padding: 13px 16px;
    color: #4e6572;
}

.preview-meta-card strong {
    margin-right: auto;
    color: #203f53;
}

.exam-question-sheet {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: 26px 28px 36px;
    color: #111;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

.exam-question-titlebar {
    margin-bottom: 8px;
    padding: 5px 8px;
    background: #e6e6e6;
    font-weight: 700;
    text-decoration: underline;
}

.preview-text-block,
.preview-part,
.preview-standalone-image {
    margin: 12px 0 22px;
}

.preview-part-label,
.preview-prompt strong {
    margin-right: 7px;
}

.preview-prompt {
    margin-bottom: 8px;
    line-height: 1.35;
}

.preview-standalone-image {
    width: 70%;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.preview-standalone-image.preview-width-20 { width: 20%; }
.preview-standalone-image.preview-width-30 { width: 30%; }
.preview-standalone-image.preview-width-40 { width: 40%; }
.preview-standalone-image.preview-width-50 { width: 50%; }
.preview-standalone-image.preview-width-60 { width: 60%; }
.preview-standalone-image.preview-width-70 { width: 70%; }
.preview-standalone-image.preview-width-80 { width: 80%; }
.preview-standalone-image.preview-width-90 { width: 90%; }
.preview-standalone-image.preview-width-100 { width: 100%; }

.preview-standalone-image img,
.preview-inline-image img,
.signal-question-image img,
.signal-table-image img {
    max-width: 100%;
    max-height: 430px;
    object-fit: contain;
}

.preview-image-placeholder {
    min-height: 110px;
    display: grid;
    place-items: center;
    border: 1px dashed #999;
    color: #777;
    background: #fafafa;
    font-size: .8rem;
}

.preview-answer-with-image {
    display: grid;
    gap: 16px;
}

.preview-answer-with-image.image-left {
    grid-template-columns: minmax(150px, 34%) minmax(0, 66%);
}

.preview-answer-with-image.image-right {
    grid-template-columns: minmax(0, 66%) minmax(150px, 34%);
}

.preview-answer-with-image.image-right .preview-inline-image {
    grid-column: 2;
    grid-row: 1;
}

.preview-answer-with-image.image-right .preview-answer-content {
    grid-column: 1;
    grid-row: 1;
}

.preview-answer-with-image.image-top {
    grid-template-columns: 1fr;
}

.preview-inline-image {
    text-align: center;
}

.answer-lines {
    display: grid;
    gap: 11px;
    margin-top: 9px;
}

.answer-lines span {
    display: block;
    height: 17px;
    border-bottom: 1px solid #333;
}

.preview-choice-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.preview-choice {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.choice-box {
    width: 13px;
    height: 13px;
    display: inline-grid;
    place-items: center;
    margin-top: 2px;
    border: 1px solid #333;
    line-height: 1;
}

.exam-question-sheet.is-solution .preview-choice.is-correct,
.solution-answer,
.solution-criteria,
.exam-question-sheet.is-solution .signal-question-answer,
.exam-question-sheet.is-solution .signal-table-answer {
    color: #d71920;
}

.preview-points {
    margin-top: 8px;
    text-align: right;
    font-family: Georgia, serif;
}

.preview-total {
    margin-top: 36px;
    font-weight: 700;
    text-align: right;
}

.signal-question-layout,
.signal-table-row {
    display: grid;
    grid-template-columns: minmax(150px, 30%) minmax(0, 70%);
    border: 1px solid #999;
}

.signal-question-image,
.signal-table-image {
    min-height: 150px;
    display: grid;
    place-items: center;
    padding: 12px;
    border-right: 1px solid #999;
}

.signal-question-answer,
.signal-table-answer {
    min-height: 150px;
    padding: 10px 14px;
}

.signal-question-answer > div,
.signal-table-answer > div {
    margin-bottom: 10px;
    line-height: 1.4;
}

.signal-table-preview {
    border-top: 1px solid #999;
}

.signal-table-row {
    border-top: 0;
}

.signal-table-row + .signal-table-row {
    border-top: 0;
}

.signal-table-answer .answer-lines {
    margin-top: 0;
}

.row-points {
    margin-top: 4px !important;
}

@media (max-width: 980px) {
    .form-grid-3,
    .metadata-grid,
    .metadata-admin-grid {
        grid-template-columns: 1fr 1fr;
    }

    .metadata-grid > :last-child,
    .metadata-admin-grid > :last-child {
        grid-column: 1 / -1;
    }

    .signal-single-editor,
    .signal-editor-row,
    .answer-layout-grid {
        grid-template-columns: 1fr;
    }

    .signal-editor-image {
        border-right: 0;
        border-bottom: 1px solid #dae3e8;
    }
}

@media (max-width: 680px) {
    .page-heading-row,
    .editor-panel-heading,
    .sticky-savebar {
        align-items: stretch;
        flex-direction: column;
    }

    .heading-actions,
    .heading-actions a {
        width: 100%;
    }

    .form-grid-2,
    .form-grid-3,
    .metadata-grid,
    .metadata-admin-grid,
    .dashboard-feature-grid,
    .preview-answer-with-image.image-left,
    .preview-answer-with-image.image-right,
    .signal-question-layout,
    .signal-table-row {
        grid-template-columns: 1fr;
    }

    .field-span-2,
    .metadata-grid > :last-child,
    .metadata-admin-grid > :last-child {
        grid-column: auto;
    }

    .signal-question-image,
    .signal-table-image {
        border-right: 0;
        border-bottom: 1px solid #999;
    }

    .preview-answer-with-image.image-right .preview-inline-image,
    .preview-answer-with-image.image-right .preview-answer-content {
        grid-column: auto;
        grid-row: auto;
    }

    .metadata-row-form {
        grid-template-columns: 1fr auto;
    }

    .metadata-row-form input[type="text"] {
        grid-column: 1 / -1;
    }

    .exam-question-sheet {
        padding: 18px 14px 28px;
    }
}

.signal-question-layout.signal-position-right .signal-question-image {
    grid-column: 2;
    grid-row: 1;
    border-right: 0;
    border-left: 1px solid #999;
}

.signal-question-layout.signal-position-right .signal-question-answer {
    grid-column: 1;
    grid-row: 1;
}

.signal-answer-line {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr);
    gap: 8px;
    align-items: end;
}

.signal-answer-line span {
    display: block;
    height: 19px;
    border-bottom: 1px solid #333;
}

.signal-answer-meaning > strong {
    display: block;
    margin-bottom: 2px;
}

@media (max-width: 680px) {
    .signal-question-layout.signal-position-right .signal-question-image,
    .signal-question-layout.signal-position-right .signal-question-answer {
        grid-column: auto;
        grid-row: auto;
        border-left: 0;
    }

    .signal-question-layout.signal-position-right .signal-question-image {
        border-bottom: 1px solid #999;
    }
}

.history-list {
    display: grid;
}

.history-entry {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 17px 20px;
    border-bottom: 1px solid #e0e7eb;
}

.history-entry:last-child {
    border-bottom: 0;
}

.history-version {
    color: #245d80;
    font-weight: 800;
}

.history-entry strong,
.history-entry span {
    display: block;
}

.history-entry span {
    margin-top: 3px;
    color: #6b7e89;
    font-size: .82rem;
}

.history-entry p {
    margin: 8px 0 0;
    color: #425966;
}

@media (max-width: 520px) {
    .history-entry {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* =======================================================================
   Visueller Frageneditor v2
   Reduziert die technische Bausteinmaske auf eine prüfungsblattartige
   Schritt-für-Schritt-Oberfläche.
========================================================================== */

.visual-question-editor {
    --visual-paper: #ffffff;
    --visual-border: #d7e0e5;
    --visual-soft: #f4f7f9;
    --visual-muted: #657986;
    --visual-text: #1f3645;
    --visual-accent: #196d9f;
    --visual-accent-soft: #e9f4fa;
}

.visual-editor-heading {
    margin-bottom: 16px;
}

.visual-question-form {
    gap: 14px;
}

.visual-editor-tabs {
    display: flex;
    gap: 4px;
    padding: 5px;
    border: 1px solid #d4dee4;
    border-radius: 7px;
    background: #eef3f6;
}

.visual-editor-tabs button {
    min-height: 42px;
    padding: 9px 18px;
    border: 0;
    border-radius: 5px;
    color: #4d6675;
    background: transparent;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.visual-editor-tabs button.is-active {
    color: #173f59;
    background: #fff;
    box-shadow: 0 1px 5px rgba(27, 49, 63, .12);
}

.visual-tab-panel[hidden] {
    display: none !important;
}

.visual-editor-summarybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 4px 0 12px;
    padding: 8px 4px;
    color: #536b79;
}

.visual-editor-summarybar > div:first-child {
    display: grid;
    gap: 2px;
}

.visual-editor-summarybar strong {
    color: #244c65;
}

.visual-editor-summarybar span {
    font-size: .86rem;
}

.visual-summary-values {
    display: flex;
    gap: 14px;
    white-space: nowrap;
}

.visual-question-sheet {
    width: min(100%, 940px);
    min-height: 620px;
    margin: 0 auto;
    padding: 34px 34px 44px;
    border: 1px solid #cbd6dd;
    border-radius: 4px;
    background: var(--visual-paper);
    box-shadow: 0 8px 28px rgba(29, 49, 61, .12);
}

.visual-question-titlebar {
    margin: -8px 0 8px;
    padding: 7px 10px;
    color: #1f2f39;
    background: #e4e4e4;
    font-weight: 800;
    text-decoration: underline;
}

.visual-question-help {
    margin-bottom: 22px;
    padding: 10px 12px;
    border-left: 3px solid #8fb8cf;
    color: #5b707d;
    background: #f7fafb;
    font-size: .83rem;
    line-height: 1.45;
}

.visual-block-list {
    display: block;
}

.visual-editor-block {
    position: relative;
    padding: 12px 10px 14px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.visual-editor-block:hover,
.visual-editor-block:focus-within {
    border-color: #c7d7e1;
    box-shadow: 0 2px 9px rgba(34, 59, 74, .07);
}

.visual-editor-block.is-dragging {
    opacity: .55;
    border-color: #7aaac5;
}

.visual-editor-block.is-task {
    padding: 2px 4px 8px;
    border-color: transparent;
    box-shadow: none;
}

.visual-editor-block.is-task:hover,
.visual-editor-block.is-task:focus-within {
    border-color: transparent;
    box-shadow: none;
}

.visual-editor-block.is-task .visual-text-row textarea {
    padding-left: 4px;
    padding-right: 4px;
}

.visual-block-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
    margin-bottom: 7px;
    color: #6b7c86;
    opacity: .4;
    transition: opacity .15s ease;
}

.visual-editor-block:hover .visual-block-topbar,
.visual-editor-block:focus-within .visual-block-topbar {
    opacity: 1;
}

.visual-block-kind {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.visual-drag-handle {
    font-size: 1rem;
    cursor: grab;
    user-select: none;
}

.is-task .visual-drag-handle {
    display: none;
}

.visual-required-badge {
    font-size: .7rem;
    font-weight: 700;
}

.visual-block-actions {
    display: flex;
    gap: 4px;
}

.visual-block-actions button,
.visual-image-toolbar button,
.visual-inline-controls button,
.visual-row-remove,
.visual-menu-close {
    min-width: 30px;
    min-height: 30px;
    padding: 3px 7px;
    border: 1px solid #cdd8df;
    border-radius: 4px;
    color: #3f5c6d;
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.visual-block-actions button:hover,
.visual-image-toolbar button:hover,
.visual-inline-controls button:hover {
    background: #eef5f8;
}

.visual-text-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.visual-text-row.has-part-label {
    grid-template-columns: 32px minmax(0, 1fr);
}

.visual-part-label {
    padding-top: 10px;
    color: #1f2f39;
    font-size: 1rem;
}

.visual-editor-block textarea,
.visual-editor-block input[type="text"] {
    font: inherit;
}

.visual-text-row textarea,
.visual-optional-prompt {
    width: 100%;
    min-height: 44px;
    padding: 8px 7px;
    overflow: hidden;
    resize: none;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #172b37;
    background: transparent;
    line-height: 1.43;
}

.visual-text-row textarea {
    font-size: 1rem;
}

.visual-text-row textarea:hover,
.visual-optional-prompt:hover {
    border-color: #e1e8ec;
}

.visual-text-row textarea:focus,
.visual-optional-prompt:focus {
    outline: none;
    border-color: #77a9c6;
    background: #fbfdfe;
    box-shadow: 0 0 0 2px rgba(37, 118, 166, .09);
}

.visual-text-row textarea::placeholder,
.visual-optional-prompt::placeholder {
    color: #8a9ba5;
}

.visual-legacy-label {
    margin: 0 0 5px 7px;
    font-weight: 800;
}

.visual-add-zone {
    display: flex;
    justify-content: center;
    min-height: 26px;
    margin: 0;
}

.visual-add-zone-between {
    height: 32px;
    align-items: center;
}

.visual-add-zone-last {
    margin-top: 12px;
    padding: 14px 0;
    border-top: 1px dashed #ccd8df;
}

.visual-add-button {
    min-height: 30px;
    padding: 5px 13px;
    border: 1px dashed #a9bfcc;
    border-radius: 999px;
    color: #42677e;
    background: #fff;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    opacity: .56;
    transition: opacity .15s ease, background .15s ease, border-color .15s ease;
}

.visual-add-zone:hover .visual-add-button,
.visual-add-button:focus-visible,
.visual-add-zone-last .visual-add-button {
    opacity: 1;
}

.visual-add-button:hover {
    border-color: #6d9db8;
    background: #f0f7fa;
}

.visual-block-menu[hidden] {
    display: none;
}

.visual-block-menu {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(24, 42, 53, .48);
}

.visual-menu-open {
    overflow: hidden;
}

.visual-block-menu-card {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(9, 26, 37, .32);
}

.visual-block-menu-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.visual-block-menu-head > div {
    display: grid;
    gap: 4px;
}

.visual-block-menu-head strong {
    color: #1d435b;
    font-size: 1.15rem;
}

.visual-block-menu-head span {
    color: #657986;
    font-size: .84rem;
}

.visual-menu-close {
    font-size: 1.2rem;
}

.visual-block-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.visual-block-menu-grid > button {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 2px 12px;
    min-height: 78px;
    padding: 12px;
    border: 1px solid #d5e0e6;
    border-radius: 6px;
    text-align: left;
    color: #24495f;
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.visual-block-menu-grid > button:hover,
.visual-block-menu-grid > button:focus-visible {
    outline: none;
    border-color: #75a9c5;
    background: #f3f9fc;
}

.visual-block-icon {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    color: #286c94;
    background: #e9f4fa;
    font-size: 1.05rem;
    font-weight: 900;
}

.visual-block-menu-grid strong {
    align-self: end;
}

.visual-block-menu-grid small {
    align-self: start;
    color: #6a7e89;
}

.visual-image-control {
    margin: 3px 0 10px;
}

.visual-image-stage {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px dashed #c7d4dc;
    border-radius: 4px;
    background: #fafcfd;
}

.visual-image-control[data-align="left"] .visual-image-stage {
    justify-content: flex-start;
}

.visual-image-control[data-align="right"] .visual-image-stage {
    justify-content: flex-end;
}

.visual-image-stage img {
    display: block;
    width: 70%;
    max-height: 520px;
    object-fit: contain;
}


.visual-image-width-20 .visual-image-stage img { width: 20%; }
.visual-image-width-30 .visual-image-stage img { width: 30%; }
.visual-image-width-40 .visual-image-stage img { width: 40%; }
.visual-image-width-50 .visual-image-stage img { width: 50%; }
.visual-image-width-60 .visual-image-stage img { width: 60%; }
.visual-image-width-70 .visual-image-stage img { width: 70%; }
.visual-image-width-80 .visual-image-stage img { width: 80%; }
.visual-image-width-90 .visual-image-stage img { width: 90%; }
.visual-image-width-100 .visual-image-stage img { width: 100%; }

.visual-image-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-height: 130px;
    color: #728591;
    text-align: center;
}

.visual-image-placeholder > span {
    font-size: 2rem;
}

.visual-image-placeholder small {
    font-size: .72rem;
}

.visual-image-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
}

.visual-upload-button {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #9fb9c8;
    border-radius: 4px;
    color: #245b7b;
    background: #f4f9fb;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.visual-upload-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.visual-image-size {
    min-width: 42px;
    color: #526b79;
    font-size: .74rem;
    text-align: center;
}

.visual-image-toolbar button.is-active,
.visual-inline-controls button.is-active {
    border-color: #5e98b8;
    color: #155d87;
    background: #e7f3f9;
}

.visual-toolbar-divider {
    width: 1px;
    height: 24px;
    margin: 0 3px;
    background: #d5dfe4;
}

.visual-caption-input {
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid #d9e0e4;
    color: #566c79;
    background: transparent;
    text-align: center;
    font-size: .82rem;
}

.visual-answer-lines {
    display: grid;
    gap: 0;
    margin: 8px 0 4px;
}

.visual-answer-lines > span {
    display: block;
    height: 36px;
    border-bottom: 1px solid #4f5a60;
}

.visual-answer-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 6px;
}

.visual-inline-controls {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #647985;
    font-size: .76rem;
}

.visual-inline-controls button {
    min-width: 28px;
    min-height: 28px;
}

.visual-points-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #516977;
    font-size: .78rem;
    font-weight: 800;
}

.visual-points-control input {
    width: 72px;
    min-height: 32px;
    padding: 4px 6px;
    border: 1px solid #bdccd5;
    border-radius: 4px;
    text-align: right;
}

.visual-solution-details,
.visual-block-details {
    margin-top: 10px;
    border: 1px solid #dae4e9;
    border-radius: 4px;
    background: #f8fbfc;
}

.visual-solution-details > summary,
.visual-block-details > summary {
    padding: 8px 10px;
    color: #456476;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.visual-solution-details[open] > summary,
.visual-block-details[open] > summary {
    border-bottom: 1px solid #e0e7eb;
}

.visual-solution-field {
    display: grid;
    gap: 5px;
    padding: 10px;
    color: #4c6574;
    font-size: .78rem;
    font-weight: 800;
}

.visual-solution-field textarea,
.visual-solution-grid textarea,
.visual-solution-grid input {
    width: 100%;
    padding: 8px;
    border: 1px solid #bdccd5;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-weight: 400;
}

.visual-solution-field textarea,
.visual-solution-grid textarea {
    resize: vertical;
}

.visual-criteria-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px 4px;
    color: #4d6573;
    font-size: .78rem;
}

.visual-criteria-head button,
.visual-inline-add {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #a7bfcd;
    border-radius: 4px;
    color: #285f80;
    background: #f5fafc;
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}

.visual-criterion-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px 34px;
    gap: 7px;
    padding: 5px 10px;
}

.visual-criterion-row input {
    min-height: 32px;
    padding: 5px 7px;
    border: 1px solid #c4d1d8;
    border-radius: 3px;
}

.visual-criterion-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #617581;
    font-size: .75rem;
}

.visual-rulebook-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
}

.visual-rulebook-list label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid #ccd9e0;
    border-radius: 999px;
    color: #506b7a;
    background: #fff;
    font-size: .75rem;
    cursor: pointer;
}

.visual-choice-list {
    display: grid;
    gap: 5px;
    margin-top: 8px;
}

.visual-choice-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto 32px;
    align-items: center;
    gap: 9px;
    min-height: 42px;
}

.visual-choice-box {
    width: 14px;
    height: 14px;
    margin-left: 3px;
    border: 1px solid #4d565c;
    background: #fff;
}

.visual-choice-row input[type="text"] {
    min-height: 36px;
    padding: 6px 7px;
    border: 1px solid transparent;
    border-bottom-color: #d3dce1;
    background: transparent;
}

.visual-choice-row input[type="text"]:focus {
    outline: none;
    border-color: #8eb4ca;
    border-radius: 3px;
    background: #fbfdfe;
}

.visual-correct-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    color: #5e737f;
    background: #eef3f5;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}

.visual-correct-toggle:has(input:checked) {
    color: #1f6339;
    background: #e7f4eb;
}

.visual-choice-hint {
    margin: 7px 0 0;
    color: #71838d;
    font-size: .72rem;
}

.visual-signal-single-layout {
    display: grid;
    grid-template-columns: minmax(170px, 35%) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin: 10px 0;
}

.visual-signal-single-layout.is-right .visual-signal-single-image {
    order: 2;
}

.visual-signal-single-layout.is-right .visual-signal-single-answer {
    order: 1;
}

.visual-signal-single-image .visual-image-stage {
    min-height: 180px;
}

.visual-signal-single-answer {
    display: grid;
    gap: 14px;
}

.visual-signal-answer-line {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr);
    gap: 8px;
    align-items: end;
}

.visual-signal-answer-line span {
    min-height: 24px;
    border-bottom: 1px solid #505a60;
}

.visual-signal-meaning-preview > strong {
    display: block;
    margin-bottom: -3px;
}

.visual-solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
}

.visual-solution-grid label {
    display: grid;
    gap: 4px;
    color: #4f6775;
    font-size: .75rem;
    font-weight: 800;
}

.visual-solution-grid .span-2 {
    grid-column: 1 / -1;
}

.visual-signal-table {
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid #6d7478;
}

.visual-signal-table-row {
    display: grid;
    grid-template-columns: minmax(190px, 32%) minmax(0, 1fr);
    min-height: 240px;
}

.visual-signal-table-row + .visual-signal-table-row {
    border-top: 1px solid #6d7478;
}

.visual-signal-cell {
    padding: 10px;
}

.visual-signal-image-cell {
    border-right: 1px solid #6d7478;
}

.visual-signal-image-cell .visual-image-stage {
    min-height: 165px;
    border-color: #d5dee3;
}

.visual-signal-image-cell .visual-image-toolbar {
    justify-content: center;
}

.visual-signal-answer-cell {
    display: flex;
    flex-direction: column;
}

.visual-signal-answer-cell .visual-answer-lines {
    flex: 1 1 auto;
}

.visual-signal-row-delete {
    align-self: flex-end;
    margin-top: 8px;
    border: 0;
    color: #8b3e36;
    background: transparent;
    font-size: .7rem;
    cursor: pointer;
}

.visual-signal-add-row {
    margin-top: 8px;
}

.metadata-editor-panel {
    margin-top: 0;
}

.metadata-editor-notes {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #dce5e9;
}

.visual-savebar {
    z-index: 50;
}

.visual-save-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #657985;
    font-size: .8rem;
}

.save-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ea27c;
}

.visual-save-status.is-dirty .save-status-dot {
    background: #d28a31;
}

.visual-save-status.is-dirty {
    color: #72511e;
}

.visual-save-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.visual-save-points {
    color: #4b6574;
    font-size: .84rem;
}

/* Neue Bildgrößen werden auch in der separaten Vorschau respektiert. */
.preview-standalone-image.align-left { margin-left: 0; margin-right: auto; }
.preview-standalone-image.align-center { margin-left: auto; margin-right: auto; }
.preview-standalone-image.align-right { margin-left: auto; margin-right: 0; }
.preview-inline-image img,
.signal-question-image img,
.signal-table-image img {
    max-width: 100%;
}

.preview-image-width-20 img { width: 20%; }
.preview-image-width-30 img { width: 30%; }
.preview-image-width-40 img { width: 40%; }
.preview-image-width-50 img { width: 50%; }
.preview-image-width-60 img { width: 60%; }
.preview-image-width-70 img { width: 70%; }
.preview-image-width-80 img { width: 80%; }
.preview-image-width-90 img { width: 90%; }
.preview-image-width-100 img { width: 100%; }

@media (max-width: 760px) {
    .visual-editor-summarybar,
    .visual-savebar,
    .visual-answer-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .visual-summary-values,
    .visual-save-actions {
        justify-content: space-between;
    }

    .visual-question-sheet {
        padding: 20px 14px 30px;
    }

    .visual-block-menu-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .visual-signal-single-layout,
    .visual-signal-table-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .visual-signal-single-layout.is-right .visual-signal-single-image,
    .visual-signal-single-layout.is-right .visual-signal-single-answer {
        order: initial;
    }

    .visual-signal-image-cell {
        border-right: 0;
        border-bottom: 1px solid #6d7478;
    }

    .visual-choice-row {
        grid-template-columns: 22px minmax(0, 1fr) 32px;
    }

    .visual-correct-toggle {
        grid-column: 2 / 3;
        justify-self: start;
    }

    .visual-solution-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .visual-solution-grid .span-2 {
        grid-column: auto;
    }
}
