:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #17202a;
    --muted: #687382;
    --line: #dde3e9;
    --brand: #e3c489;
    --brand-dark: #8b672c;
    --brand-soft: #fbf6ea;
    --brand-contrast: #101820;
    --brand-ring: rgba(201, 164, 92, .22);
    --good: #18794e;
    --warn: #9a6700;
    --bad: #b42318;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--brand-dark); }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { background: #101820; color: #fff; padding: 22px 16px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; margin: 0 8px 28px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; background: var(--brand); color: var(--brand-contrast); border-radius: 7px; padding: 6px 8px; letter-spacing: .03em; }
.brand-copy { display: grid; min-width: 0; line-height: 1.1; }
.brand-copy strong { font-size: 16px; letter-spacing: .04em; }
.brand-copy small { margin-top: 4px; color: #9eabb6; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { color: #dce3e9; text-decoration: none; border-radius: 8px; padding: 11px 12px; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-label { color: #84919e; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 20px 12px 5px; }
.sidebar-footer { color: #84919e; margin-top: auto; padding: 18px 12px 0; font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 68px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
.topbar-user { color: var(--muted); font-size: 14px; }
.content { padding: 30px; width: 100%; max-width: 1500px; }
.footer { margin-top: auto; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); padding: 18px 30px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.grid > * { min-width: 0; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: 0 4px 18px rgba(16,24,32,.035); }
.card h2, .card h3 { margin-top: 0; }
.metric { font-size: 31px; font-weight: 800; margin: 8px 0 2px; }
.muted { color: var(--muted); }
.notice { border-radius: 9px; padding: 13px 15px; margin-bottom: 18px; border: 1px solid; }
.notice.success { color: var(--good); background: #ecfdf3; border-color: #abefc6; }
.notice.error { color: var(--bad); background: #fef3f2; border-color: #fecdca; }
.notice.warning { color: var(--warn); background: #fffaeb; border-color: #fedf89; }
label { display: block; font-weight: 650; margin-bottom: 7px; }
input, select, textarea { width: 100%; border: 1px solid #cdd5df; border-radius: 8px; padding: 10px 12px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--brand-ring); border-color: var(--brand); }
.form-row { margin-bottom: 17px; }
.form-help { color: var(--muted); font-size: 13px; margin-top: 6px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--brand); color: var(--brand-contrast); padding: 10px 15px; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--brand-dark); }
.button.secondary { background: #eef1f4; color: #24313e; }
.button.danger { background: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--good); } .status.bad { color: var(--bad); } .status.warn { color: var(--warn); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f2f4f7; border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.login-page, .install-page { min-height: 100vh; padding: 35px 20px; display: grid; place-items: center; background: linear-gradient(135deg, #101820, #273746); }
.login-box, .install-box { width: min(100%, 470px); background: #fff; border-radius: 14px; padding: 30px; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.install-box { width: min(100%, 900px); }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-weight: 800; font-size: 20px; }
.requirements { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 18px; margin: 18px 0 26px; }
.requirement { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.requirement.ok { color: var(--good); } .requirement.bad { color: var(--bad); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #101820; color: #e8eef3; padding: 16px; border-radius: 8px; overflow: auto; }
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { min-height: auto; }
    .sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .nav-label { grid-column: 1 / -1; }
    .sidebar-footer { display: none; }
    .topbar { padding: 0 18px; }
    .content { padding: 18px; }
    .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { grid-column: span 12; }
}
@media (max-width: 600px) {
    .requirements { grid-template-columns: 1fr; }
    .footer, .topbar { align-items: flex-start; height: auto; flex-direction: column; padding: 16px 18px; }
    .sidebar nav { grid-template-columns: 1fr; }
}

/* Benutzer- und Rechteverwaltung */
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
.page-heading p { margin: 0; }
.topbar-user { display: flex; align-items: center; gap: 7px; }
.role-chip, .role-badge, .self-label { display: inline-flex; align-items: center; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.role-chip { background: #eef1f4; color: #455462; padding: 4px 8px; font-size: 11px; }
.role-badge { padding: 5px 9px; font-size: 12px; background: #eef1f4; color: #344250; }
.role-superadministrator { background: #f4ead3; color: #7a5a18; border: 1px solid rgba(190, 148, 63, .35); }
.role-administrator { background: var(--brand-soft); color: var(--brand-dark); }
.role-editor { background: #eff8ff; color: #175cd3; }
.role-viewer { background: #f2f4f7; color: #475467; }
.self-label { margin-left: 7px; padding: 2px 7px; font-size: 10px; background: #ecfdf3; color: var(--good); }
.button.small { padding: 7px 10px; font-size: 13px; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 860px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.checkbox-row { padding-top: 29px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.checkbox-label input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.role-grid > div { border: 1px solid var(--line); background: #f8fafb; border-radius: 10px; padding: 16px; }
.role-grid strong, .role-grid span { display: block; }
.role-grid span { color: var(--muted); margin-top: 7px; font-size: 14px; line-height: 1.45; }
.clean-list { margin: 0; padding-left: 20px; }
.clean-list li + li { margin-top: 12px; }

@media (max-width: 760px) {
    .page-heading { flex-direction: column; }
    .form-grid, .role-grid { grid-template-columns: 1fr; }
    .checkbox-row { padding-top: 0; }
    .topbar-user { flex-wrap: wrap; }
}

/* Medienverwaltung */
.button:disabled, .button[disabled] { opacity: .48; cursor: not-allowed; pointer-events: none; }
.media-stats { margin-bottom: 18px; }
.media-size-metric { font-size: clamp(22px, 2.5vw, 31px); }
.media-filter { margin-bottom: 18px; }
.media-filter-grid { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(160px, .8fr) minmax(190px, 1fr) auto; gap: 16px; align-items: end; }
.media-filter-grid .form-row { margin-bottom: 0; }
.media-filter-actions { padding-bottom: 1px; }
.media-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 22px 0 14px; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 18px; }
.media-card { min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 18px rgba(16,24,32,.035); }
.media-preview { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: #e9edf1; text-decoration: none; }
.media-preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.media-card:hover .media-preview img { transform: scale(1.025); }
.media-type-chip { position: absolute; left: 10px; top: 10px; background: rgba(16,24,32,.82); color: #fff; border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 750; backdrop-filter: blur(5px); }
.document-preview { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; color: var(--brand-contrast); background: linear-gradient(145deg, #c9a45c, #9a7332); }
.document-preview strong { font-size: 38px; letter-spacing: .04em; }
.document-preview small { margin-top: 6px; opacity: .82; }
.document-preview.large { min-height: 360px; border-radius: 10px; margin-bottom: 18px; }
.document-preview.large strong { font-size: 68px; }
.media-card-body { padding: 16px; }
.media-card-body h2 { margin: 0 0 7px; font-size: 17px; line-height: 1.25; }
.media-card-body h2 a { color: var(--ink); text-decoration: none; }
.media-card-body h2 a:hover { color: var(--brand-dark); }
.media-card-file { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.media-card-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card-status { min-height: 22px; margin-top: 11px; font-size: 12px; }
.metadata-warning, .metadata-good { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-weight: 700; }
.metadata-warning { color: var(--warn); background: #fffaeb; }
.metadata-good { color: var(--good); background: #ecfdf3; }
.empty-state { text-align: center; padding: 54px 24px; }
.empty-state-icon { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 14px; background: #eef1f4; font-size: 28px; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.pagination a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.pagination a.active, .pagination a:hover { color: var(--brand-contrast); background: var(--brand); border-color: var(--brand); }
.upload-zone { position: relative; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px; border: 2px dashed #b8c2cc; border-radius: 12px; background: #f8fafb; text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--brand); background: var(--brand-soft); }
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 29px; font-weight: 800; }
.upload-zone span:last-of-type { color: var(--muted); font-weight: 400; }
.media-detail-preview > img { display: block; width: 100%; max-height: 560px; object-fit: contain; background: #eef1f4; border-radius: 10px; }
.media-technical-data { margin: 22px 0 0; }
.media-technical-data > div { display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.media-technical-data dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.media-technical-data dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.folder-list { display: grid; gap: 10px; }
.folder-row { display: grid; grid-template-columns: minmax(260px,1fr) auto auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.folder-rename { display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 10px; }
.folder-count { color: var(--muted); font-size: 13px; white-space: nowrap; }

@media (max-width: 1050px) {
    .media-filter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .media-filter-actions { align-self: end; }
}
@media (max-width: 700px) {
    .media-filter-grid { grid-template-columns: 1fr; }
    .media-result-heading { align-items: flex-start; flex-direction: column; }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); }
    .folder-row { grid-template-columns: 1fr; }
    .folder-rename { grid-template-columns: 1fr; }
    .media-technical-data > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Seiten- und Navigationsverwaltung */
.pages-table td:first-child small{display:block;margin-top:5px;color:var(--muted)}.page-status{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:750}.status-draft{background:#f2f4f7;color:#475467}.status-scheduled{background:#fffaeb;color:#9a6700}.status-published{background:#ecfdf3;color:#18794e}.status-hidden{background:#eff8ff;color:#175cd3}.status-archived{background:#fef3f2;color:#b42318}.checkbox-grid{display:flex;flex-wrap:wrap;gap:18px;margin-top:18px}.checkbox-grid label{display:flex;align-items:center;gap:8px}.checkbox-grid input{width:19px;height:19px;accent-color:var(--brand)}.block-list{display:grid;gap:10px}.block-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#f8fafb}.block-row>div:first-child{display:grid;gap:5px}.block-row span{color:var(--muted);font-size:13px}.block-row form{display:flex;gap:6px}.button.danger{background:var(--bad);border-color:var(--bad);color:#fff}.form-actions{margin-top:20px}@media(max-width:800px){.block-row{align-items:flex-start;flex-direction:column}.block-row .actions{width:100%;flex-wrap:wrap}.checkbox-grid{flex-direction:column}}

/* SEO- und KI-Pruefungen */
.audit-list{display:grid;gap:10px}.audit-item{display:grid;gap:5px;padding:14px 16px;border:1px solid var(--line);border-left-width:5px;border-radius:9px;background:#fff}.audit-item span{color:var(--muted);line-height:1.45}.audit-success{border-left-color:var(--good)}.audit-warning{border-left-color:var(--warn);background:#fffcf4}.audit-error{border-left-color:var(--bad);background:#fff8f7}.card textarea[readonly]{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.5;background:#101820;color:#e8eef3}.card code{overflow-wrap:anywhere}.form-help{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.45}

/* Responsive Hauptnavigation */
.sidebar-head { display: block; }
.admin-menu-toggle { display: none; }

@media (max-width: 900px) {
    .sidebar { min-height: auto; padding: 0; }
    .sidebar-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; }
    .brand { min-width: 0; margin: 0; }
    .admin-menu-toggle {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 9px 8px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 6px;
    }
    .js .admin-menu-toggle { display: inline-flex; }
    .admin-menu-toggle span {
        display: block;
        width: 27px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transform-origin: center;
        transition: transform .25s ease, opacity .2s ease;
    }
    .admin-menu-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
    .sidebar nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 0 16px 20px;
    }
    .js .sidebar nav {
        max-height: 0;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: max-height .38s ease, opacity .24s ease, transform .32s ease, padding .32s ease;
    }
    .js .sidebar.is-menu-open nav {
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        padding-bottom: 20px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .sidebar.is-menu-open .admin-menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .sidebar.is-menu-open .admin-menu-toggle span:nth-child(2) { opacity: 0; }
    .sidebar.is-menu-open .admin-menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .nav-label { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-menu-toggle span,
    .js .sidebar nav { transition: none; }
}


/* Gebrandete Upload-Komponente und Systemdialoge */
.section-kicker {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.update-upload-card h2 { margin-top: 0; }
.update-upload-card form { display: grid; gap: 18px; }
.update-file-dropzone {
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    min-height: 186px;
    padding: 30px 34px;
    border: 2px dashed #c4b184;
    border-radius: 16px;
    background: linear-gradient(145deg, #fffdf8, var(--brand-soft));
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.update-file-dropzone:hover,
.update-file-dropzone:focus-within,
.update-file-dropzone.is-dragover {
    border-color: var(--brand-dark);
    background: #fffaf0;
    box-shadow: 0 0 0 5px var(--brand-ring);
}
.update-file-dropzone.is-dragover { transform: translateY(-2px); }
.update-file-dropzone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.update-file-icon {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 24px;
    background: var(--brand);
    color: var(--brand-contrast);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 12px 24px rgba(139, 103, 44, .16);
}
.update-file-copy { display: grid; gap: 8px; min-width: 0; }
.update-file-copy strong { color: var(--ink); font-size: clamp(21px, 2.1vw, 30px); line-height: 1.12; }
.update-file-copy > span:not(.update-file-name) { color: var(--muted); line-height: 1.45; }
.update-file-name {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 4px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(139, 103, 44, .09);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.update-file-dropzone.has-file .update-file-icon { background: var(--brand-dark); color: #fff; }

body.has-admin-modal { overflow: hidden; }
.admin-confirm-layer[hidden] { display: none; }
.admin-confirm-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 24, 32, .64);
    backdrop-filter: blur(5px);
}
.admin-confirm-dialog {
    position: relative;
    width: min(100%, 620px);
    padding: 34px;
    border: 1px solid rgba(139, 103, 44, .25);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}
.admin-confirm-dialog::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    border-radius: 20px 0 0 20px;
    background: var(--brand);
}
.admin-confirm-dialog.tone-danger::before { background: var(--bad); }
.admin-confirm-dialog h2 { margin: 0 42px 12px 0; font-size: clamp(24px, 3vw, 34px); }
.admin-confirm-dialog p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.admin-confirm-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f3f5;
    color: var(--ink);
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.admin-confirm-close:hover { background: #e6e9ed; }
.admin-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 700px) {
    .update-file-dropzone { grid-template-columns: 1fr; gap: 18px; padding: 24px; text-align: center; }
    .update-file-icon { width: 82px; height: 82px; margin: 0 auto; border-radius: 20px; font-size: 22px; }
    .update-file-name { margin-inline: auto; }
    .admin-confirm-layer { padding: 14px; }
    .admin-confirm-dialog { padding: 28px 22px 22px; }
    .admin-confirm-actions { flex-direction: column-reverse; }
    .admin-confirm-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .update-file-dropzone { transition: none; }
}

/* Einklappbare Updatehistorien */
.admin-disclosure {
    padding: 0;
    overflow: clip;
}
.admin-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 112px;
    padding: 24px 28px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .2s ease;
}
.admin-disclosure-summary::-webkit-details-marker { display: none; }
.admin-disclosure-summary:hover,
.admin-disclosure-summary:focus-visible { background: var(--brand-soft); }
.admin-disclosure-summary:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: -3px; }
.admin-disclosure-copy { display: grid; gap: 5px; min-width: 0; }
.admin-disclosure-copy .section-kicker { margin: 0; }
.admin-disclosure-title { color: var(--ink); font-size: clamp(22px, 2.4vw, 32px); font-weight: 800; line-height: 1.1; }
.admin-disclosure-description { color: var(--muted); font-size: 14px; }
.admin-disclosure-controls { display: inline-flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.admin-disclosure-count {
    min-width: 36px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(139, 103, 44, .11);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
.admin-disclosure-chevron {
    width: 14px;
    height: 14px;
    border-right: 2px solid var(--brand-dark);
    border-bottom: 2px solid var(--brand-dark);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .24s ease;
}
.admin-disclosure[open] .admin-disclosure-summary { background: #fffdf8; }
.admin-disclosure[open] .admin-disclosure-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.admin-disclosure-body { padding: 0 28px 28px; border-top: 1px solid var(--line); }
.admin-disclosure-body > .muted { margin: 24px 0 0; }
.table-scroll { width: 100%; overflow-x: auto; padding-top: 12px; }
.table-scroll table { min-width: 860px; }

/* Softwarestand-Seite im Stil der Update-Zentrale */
.export-page-grid { align-items: stretch; }
.export-intro-card,
.export-security-card,
.export-profile-card { display: flex; flex-direction: column; }
.export-intro-card h2,
.export-security-card h2,
.export-profile-card h2 { margin-top: 0; }
.export-feature-list { display: grid; gap: 12px; margin-top: 22px; }
.export-feature-list > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 12px; }
.export-feature-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--brand);
    color: var(--brand-contrast);
    font-weight: 900;
}
.export-security-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }
.export-security-badges span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}
.export-profile-card { gap: 20px; }
.export-profile-head { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 22px; }
.export-profile-head .section-kicker { margin-bottom: 6px; }
.export-profile-head p { margin-bottom: 0; }
.export-profile-icon {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: var(--brand);
    color: var(--brand-contrast);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 12px 24px rgba(139, 103, 44, .16);
}
.export-profile-core .export-profile-icon { background: var(--brand-dark); color: #fff; }
.export-profile-locked .export-profile-icon { background: #d8dde2; color: #5e6872; box-shadow: none; }
.export-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fbfcfd;
}
.export-profile-stats > div { display: grid; gap: 6px; padding: 16px; border-right: 1px solid var(--line); }
.export-profile-stats > div:last-child { border-right: 0; }
.export-profile-stats span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.export-profile-stats strong { overflow-wrap: anywhere; }
.export-profile-list { margin: 0; }
.export-profile-card .notice { margin: 0; }
.export-download-form { margin-top: auto; }
.export-download-form .button { width: 100%; justify-content: center; }
.export-file-name {
    display: grid;
    gap: 7px;
    margin: -8px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f5f7f8;
}
.export-file-name span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.export-file-name code { display: block; }
.export-lock-message {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding: 22px;
    border: 1px dashed #b9c1c8;
    border-radius: 14px;
    background: #f7f8f9;
}
.export-lock-message span { color: var(--muted); line-height: 1.5; }
.export-safety-summary h3 { margin-top: 0; }
.export-safety-summary .notice:last-child { margin-bottom: 0; }

@media (max-width: 780px) {
    .admin-disclosure-summary { min-height: 96px; padding: 20px; }
    .admin-disclosure-body { padding: 0 20px 20px; }
    .admin-disclosure-description { display: none; }
    .export-profile-head { grid-template-columns: 70px minmax(0, 1fr); gap: 16px; }
    .export-profile-icon { width: 70px; height: 70px; border-radius: 18px; font-size: 17px; }
    .export-profile-stats { grid-template-columns: 1fr; }
    .export-profile-stats > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .export-profile-stats > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-disclosure-summary,
    .admin-disclosure-chevron { transition: none; }
}


/* Themes & Templates */
.theme-admin-grid { align-items: start; }
.theme-policy-card {
    display: flex;
    gap: 24px;
    align-items: center;
    border-color: color-mix(in srgb, var(--brand, #e7c57f) 55%, #d8dee7);
    background: linear-gradient(135deg, #fffdf7, #fff);
}
.theme-policy-icon {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 26px 14px;
    border-radius: 22px;
    background: var(--brand, #e7c57f);
    color: #17212d;
    font-weight: 900;
    text-align: center;
    letter-spacing: .08em;
}
.compact-heading { margin-bottom: 18px; }
.theme-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.theme-card {
    border: 1px solid #dce3eb;
    border-radius: 18px;
    padding: 20px;
    background: #fbfcfd;
}
.theme-card.is-active {
    border-color: #d4ad60;
    box-shadow: inset 0 0 0 1px #e7c57f;
    background: #fffdf7;
}
.theme-card-top,
.template-tags,
.theme-card .actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.theme-card-top { justify-content: space-between; }
.theme-card h3 { margin: 14px 0 8px; }
.theme-card p { color: #647184; }
.theme-type,
.template-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf1f5;
    color: #566476;
    font-size: .78rem;
    font-weight: 800;
}
.theme-type.child { background: #fff1cc; color: #815d16; }
.theme-type.parent { background: #e8edf3; color: #394758; }
.theme-meta { margin: 16px 0; }
.theme-meta > div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid #e4e9ef;
}
.theme-meta dt { color: #728094; font-weight: 700; }
.theme-meta dd { margin: 0; min-width: 0; }
.theme-meta code { overflow-wrap: anywhere; }
.template-list { display: grid; gap: 10px; }
.template-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e6ed;
    border-radius: 14px;
    background: #fbfcfd;
}
.template-row > div:first-child { display: grid; gap: 4px; }
.template-row span { color: #677589; }
.button.small { min-height: 34px; padding: 7px 12px; font-size: .86rem; }

@media (max-width: 980px) {
    .theme-card-grid { grid-template-columns: 1fr; }
    .theme-policy-card { align-items: flex-start; }
}
@media (max-width: 680px) {
    .theme-policy-card { display: grid; }
    .theme-policy-icon { width: 92px; }
    .template-row { align-items: flex-start; flex-direction: column; }
}


/* Modulverwaltung */
.module-admin-grid { align-items: start; }
.module-dropzone { display:grid; grid-template-columns:auto 1fr; gap:22px; align-items:center; padding:28px; border:2px dashed rgba(190,145,55,.65); border-radius:18px; background:linear-gradient(135deg,rgba(229,195,128,.13),rgba(255,255,255,.92)); cursor:pointer; margin:20px 0; transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease; position:relative; }
.module-dropzone:hover,.module-dropzone:focus-within,.module-dropzone.is-dragover { border-color:var(--brand,#c89c4d); box-shadow:0 16px 36px rgba(94,67,16,.12); transform:translateY(-1px); }
.module-dropzone input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.module-package-mark,.module-icon { display:grid; place-items:center; background:var(--brand,#e5c380); color:#111827; font-weight:900; border-radius:18px; }
.module-package-mark { width:88px; height:88px; font-size:22px; }
.module-dropzone strong { display:block; font-size:1.28rem; margin-bottom:6px; }
.module-dropzone small { display:block; color:var(--muted); line-height:1.45; }
.module-dropzone em { display:inline-block; margin-top:10px; padding:6px 10px; background:rgba(229,195,128,.2); border-radius:999px; color:#815f20; font-style:normal; font-weight:700; font-size:.82rem; }
.full-width { width:100%; justify-content:center; }
.module-policy-list { display:grid; gap:14px; margin-top:18px; }
.module-policy-list div { padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:#f8fafc; }
.module-policy-list strong,.module-policy-list span { display:block; }
.module-policy-list span { margin-top:4px; color:var(--muted); line-height:1.45; }
.module-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.module-card { border:1px solid var(--line); border-radius:18px; padding:20px; background:#fff; box-shadow:0 10px 28px rgba(15,23,42,.04); }
.module-card.is-enabled { border-color:rgba(37,152,91,.45); box-shadow:0 12px 30px rgba(37,152,91,.08); }
.module-card-head { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:center; }
.module-icon { width:48px; height:48px; border-radius:13px; }
.module-card h3 { margin:0 0 3px; }
.module-card code { font-size:.78rem; color:var(--muted); }
.module-card > p { color:var(--muted); line-height:1.55; min-height:3em; }
.module-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0; }
.module-meta div { padding:10px 12px; border-radius:12px; background:#f5f7fa; }
.module-meta dt { color:var(--muted); text-transform:uppercase; letter-spacing:.06em; font-size:.68rem; font-weight:800; }
.module-meta dd { margin:4px 0 0; font-weight:700; overflow-wrap:anywhere; }
.module-capabilities { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.module-capabilities span { padding:5px 8px; border-radius:999px; background:rgba(229,195,128,.18); color:#77571c; font-size:.72rem; font-weight:700; }
.module-actions { align-items:center; flex-wrap:wrap; }
.empty-state { padding:36px; display:grid; gap:8px; place-items:center; text-align:center; border:1px dashed var(--line); border-radius:16px; color:var(--muted); }
.empty-state strong { color:var(--text); font-size:1.15rem; }
@media (max-width:900px) { .module-card-grid { grid-template-columns:1fr; } }
@media (max-width:620px) { .module-dropzone { grid-template-columns:1fr; text-align:center; } .module-package-mark { margin:auto; } .module-card-head { grid-template-columns:auto 1fr; } .module-card-head .status { grid-column:1 / -1; justify-self:start; } .module-meta { grid-template-columns:1fr; } }

/* Themefähige verwaltete Module */
:root {
    --zelden-module-accent: var(--brand);
    --zelden-module-accent-strong: var(--brand-dark);
    --zelden-module-accent-soft: var(--brand-soft);
    --zelden-module-surface: var(--panel);
    --zelden-module-surface-muted: #f8fafb;
    --zelden-module-text: var(--ink);
    --zelden-module-muted: var(--muted);
    --zelden-module-line: var(--line);
    --zelden-module-good: var(--good);
    --zelden-module-warning: var(--warn);
    --zelden-module-danger: var(--bad);
    --zelden-module-radius: 14px;
    --zelden-module-shadow: 0 10px 30px rgba(16, 24, 32, .06);
    --zelden-module-content-max: 100%;
}
.zelden-module {
    --module-accent: var(--zelden-module-accent);
    --module-accent-strong: var(--zelden-module-accent-strong);
    --module-accent-soft: var(--zelden-module-accent-soft);
    --module-surface: var(--zelden-module-surface);
    --module-surface-muted: var(--zelden-module-surface-muted);
    --module-text: var(--zelden-module-text);
    --module-muted: var(--zelden-module-muted);
    --module-line: var(--zelden-module-line);
    --module-good: var(--zelden-module-good);
    --module-warning: var(--zelden-module-warning);
    --module-danger: var(--zelden-module-danger);
    --module-radius: var(--zelden-module-radius);
    --module-shadow: var(--zelden-module-shadow);
    --module-content-max: var(--zelden-module-content-max);
    color: var(--module-text);
    width: 100%;
    max-width: var(--module-content-max);
}
.module-theme-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; background: var(--brand-soft); color: var(--brand-dark); }
.module-theme-chip.legacy { background: #f2f4f7; color: var(--muted); }

/* ZELDEN Modul-Dienstprofile */
.service-profile-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(232,201,134,.12), rgba(255,255,255,.96));
}
.service-profile-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
}
.service-profile-facts span {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    padding: .35rem .75rem;
    border: 1px solid rgba(193,153,73,.26);
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: var(--text, #18202b);
    font-size: .84rem;
    font-weight: 700;
}
.service-profile-form { display: grid; gap: 1.2rem; }
.service-profile-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.service-profile-form label > span,
.service-profile-form legend {
    display: block;
    margin-bottom: .38rem;
    color: var(--text, #18202b);
    font-size: .84rem;
    font-weight: 800;
}
.service-profile-form small { display: block; margin-top: .35rem; color: var(--muted, #697386); }
.service-module-access {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--line, #e5e8ed);
    border-radius: 14px;
    background: #fafbfc;
}
.service-module-access legend { padding: 0 .35rem; }
.service-module-access .check-card {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin: .55rem 0;
    padding: .75rem;
    border: 1px solid var(--line, #e5e8ed);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.service-module-access .check-card:has(input:checked) {
    border-color: rgba(193,153,73,.58);
    box-shadow: 0 0 0 3px rgba(232,201,134,.16);
}
.service-module-access .check-card input { margin-top: .2rem; }
.service-module-access .check-card span { display: grid; gap: .15rem; }
.service-module-access .check-card small { margin: 0; }
.service-profile-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    background: rgba(232,201,134,.1);
}
.service-profile-options label { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; }
.service-profile-list { display: grid; gap: .8rem; }
.service-profile-list article {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--line, #e5e8ed);
    border-radius: 14px;
    background: #fff;
}
.service-profile-list article > div:first-child { display: grid; gap: .25rem; }
.service-profile-list article strong { font-size: 1rem; }
.service-profile-list article span,
.service-profile-list article small { color: var(--muted, #697386); }
.service-profile-list .actions { align-items: center; }
.service-profile-list .actions form { display: flex; align-items: center; gap: .45rem; margin: 0; }
.service-profile-list .actions input[type="password"] { max-width: 9rem; min-height: 2.2rem; }
@media (max-width: 900px) {
    .service-profile-intro { align-items: flex-start; flex-direction: column; }
    .service-profile-facts { justify-content: flex-start; }
    .service-profile-form .form-grid { grid-template-columns: 1fr; }
}

/* ZELDEN v1.5.01 Multi-Tenant Kernel */
.tenant-switcher{display:flex;align-items:center;gap:.45rem;margin:0;padding:0}.tenant-switcher label{font-size:.72rem;font-weight:750;color:var(--muted,#687382);text-transform:uppercase;letter-spacing:.04em}.tenant-switcher select{max-width:230px;border:1px solid #cbd5df;border-radius:8px;background:#fff;padding:.45rem .65rem;color:#17202a;font:inherit}.tenant-empty{font-size:.82rem;color:#8a5a00;background:#fff6dc;border:1px solid #ead29a;border-radius:999px;padding:.35rem .65rem}.status-badge{display:inline-flex;border-radius:999px;padding:.28rem .55rem;font-size:.78rem;font-weight:750;background:#eef1f4;color:#4c5966}.status-badge.active{background:#eaf8f0;color:#18794e}.status-badge.suspended{background:#fff4df;color:#8a5a00}.status-badge.archived{background:#f2f2f2;color:#69717a}.button.small{padding:.45rem .7rem;font-size:.82rem}@media(max-width:1050px){.topbar-user{flex-wrap:wrap;justify-content:flex-end}.tenant-switcher{width:100%;justify-content:flex-end}.tenant-switcher select{max-width:min(100%,280px)}}

/* Zentrale gruppierte Adminnavigation v1.5.31 */
.sidebar nav { display: grid; gap: 8px; align-content: start; }
.admin-nav-group { min-width: 0; border-radius: 9px; }
.admin-nav-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 8px 12px;
    color: #91a0ad;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}
.admin-nav-group > summary::-webkit-details-marker { display: none; }
.admin-nav-group > summary:hover,
.admin-nav-group > summary:focus-visible,
.admin-nav-group.active > summary { color: #fff; background: rgba(255,255,255,.055); }
.admin-nav-group > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.admin-nav-chevron {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}
.admin-nav-group[open] .admin-nav-chevron { transform: rotate(225deg) translate(-1px,-1px); }
.admin-nav-items { display: grid; gap: 4px; padding: 3px 0 8px; }
.sidebar .admin-nav-items a { position: relative; padding: 10px 12px 10px 18px; }
.sidebar .admin-nav-items a::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #64727f;
    transform: translateY(-50%);
}
.sidebar .admin-nav-items a.active::before { background: var(--brand); box-shadow: 0 0 0 3px rgba(227,196,137,.14); }
.sidebar .admin-nav-items a[aria-current="page"] { font-weight: 750; }

.topbar { min-height: 68px; height: auto; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.topbar-context { display: grid; gap: 5px; min-width: 0; }
.topbar-context > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-context > span { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12px; }
.context-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.context-chip.organization { color: #175cd3; background: #eff8ff; }
.context-chip.platform { color: #7a5a18; background: #f4ead3; }
.context-chip.account { color: #475467; background: #f2f4f7; }
.platform-context-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid rgba(139,103,44,.28);
    border-left: 4px solid var(--brand-dark);
    border-radius: 9px;
    background: var(--brand-soft);
    color: #5f4a21;
}
.platform-context-notice span { color: #766238; }
.tenant-switcher { display: flex; align-items: center; gap: 8px; }
.tenant-switcher label { margin: 0; color: var(--muted); font-size: 12px; }
.tenant-switcher select { width: auto; min-width: 170px; max-width: 260px; padding: 7px 30px 7px 9px; }

.module-subnavigation {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 20px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
    scrollbar-width: thin;
}
.module-subnavigation a {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.module-subnavigation a:hover { color: var(--ink); background: #f2f4f7; }
.module-subnavigation a.active { color: var(--brand-contrast); background: var(--brand); }
.module-subnavigation a:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

@media (max-width: 1100px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar-user { width: 100%; flex-wrap: wrap; }
}

@media (max-width: 900px) {
    .sidebar nav { display: grid; grid-template-columns: 1fr; gap: 6px; }
    .admin-nav-group > summary { min-height: 44px; padding: 10px 12px; }
    .sidebar .admin-nav-items a { min-height: 44px; display: flex; align-items: center; }
    .topbar-context > strong { white-space: normal; }
}

@media (max-width: 600px) {
    .tenant-switcher { width: 100%; align-items: stretch; flex-direction: column; gap: 4px; }
    .tenant-switcher select { width: 100%; max-width: none; }
    .platform-context-notice { flex-direction: column; gap: 5px; }
    .module-subnavigation { margin-inline: -4px; border-radius: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-nav-chevron { transition: none; }
}

/* ZELDEN Admin App Shell v1 */
.admin-shell-navigation-progress {
    position: fixed;
    z-index: 10050;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(.05);
    transform-origin: left center;
    background: var(--brand, #d9b96e);
    transition: opacity .12s ease, transform .32s ease;
}
.admin-body.is-admin-fragment-loading .admin-shell-navigation-progress {
    opacity: 1;
    transform: scaleX(.72);
}
.admin-body.is-admin-fragment-loading [data-zelden-content] {
    cursor: progress;
}
@media (prefers-reduced-motion: reduce) {
    .admin-shell-navigation-progress { transition: none; }
}

/* Core 1.6.68: kompakte Modulverwaltung */
.module-management-heading{align-items:flex-start}.module-orchestrator-entry{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 24px}.module-orchestrator-entry h2{margin:3px 0 5px}.module-orchestrator-entry p{margin:0}.module-import-disclosure{margin-top:16px}.module-management-card{margin-top:16px}.module-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.module-search{flex:1;min-width:220px}.module-search input{width:100%;margin:0}.module-filter-group{display:flex;gap:7px;flex-wrap:wrap}.module-filter-group .is-active{background:var(--brand-soft);border-color:rgba(190,145,55,.55);color:var(--ink)}.module-compact-list{display:grid;gap:8px}.module-compact-item{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;transition:border-color .16s ease,box-shadow .16s ease}.module-compact-item.is-open{border-color:rgba(190,145,55,.48);box-shadow:0 8px 24px rgba(15,23,42,.05)}.module-compact-summary{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;align-items:center;gap:14px;min-height:64px;padding:10px 14px}.module-compact-name{display:flex;align-items:center;gap:12px;min-width:0}.module-compact-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem}.module-compact-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.module-compact-actions form{margin:0}.module-compact-details{padding:18px 18px 20px;border-top:1px solid var(--line);background:#fbfcfe}.module-compact-details[hidden]{display:none!important}.module-detail-header{display:grid;grid-template-columns:minmax(180px,.75fr) minmax(280px,1.6fr);gap:20px;align-items:start;margin-bottom:12px}.module-detail-header h3{margin:0 0 3px}.module-detail-header p{margin:0;color:var(--muted);line-height:1.55}.module-detail-actions{margin-top:16px}.module-feature-panel{margin-top:16px}.module-orchestrator-candidates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 16px}.module-orchestrator-candidates>div{display:grid;gap:3px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}.module-orchestrator-candidates span{font-size:.84rem;color:var(--muted)}.module-recovery-list{display:grid;gap:10px}.module-recovery-item{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff}.module-recovery-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.module-recovery-head>div{display:grid;gap:4px}.module-recovery-item>p{margin:10px 0;color:var(--muted)}.module-recovery-versions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.module-recovery-versions span{padding:5px 8px;border-radius:999px;background:#f4f6f8;font-size:.78rem}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:900px){.module-orchestrator-entry{align-items:flex-start;flex-direction:column}.module-list-toolbar{align-items:stretch;flex-direction:column}.module-compact-summary{grid-template-columns:minmax(0,1fr) auto}.module-compact-actions{grid-column:1/-1;justify-content:flex-start;padding-left:46px}.module-detail-header,.module-orchestrator-candidates{grid-template-columns:1fr}}
@media(max-width:620px){.module-compact-summary{grid-template-columns:1fr}.module-compact-summary>.status{justify-self:start;margin-left:46px}.module-compact-actions{padding-left:46px}.module-filter-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.module-recovery-head{flex-direction:column}}
