/* MiniCMS – Backend-Styles */
:root {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --text: #1d2327;
    --muted: #646970;
    --border: #dcdcde;
    --side: #1d2327;
    --side-text: #c3c4c7;
    --accent: #2c6ecb;
    --accent-dark: #1f56a3;
    --ok: #1a7f37;
    --warn: #9a6700;
    --err: #cf222e;
    --radius: 6px;
    --topbar-h: 48px;  /* wird bei großem Logo automatisch höher */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 1.2rem; font-weight: 600; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }

/* Topbar */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
    padding: 0 16px; background: #101517; color: #fff; z-index: 20; }
.topbar .brand { color: #fff; text-decoration: none; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .who { font-size: .9rem; color: #dcdcde; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }

/* Sidebar mit Untermenüs (wie WordPress) */
.sidebar { position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: 210px; background: var(--side);
    color: var(--side-text); padding: 12px 0 40px; z-index: 10; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: flex; gap: 10px; align-items: center; padding: 9px 18px; color: var(--side-text); text-decoration: none; }
.sidebar a:hover, .sidebar a:focus-visible { color: #72aee6; }
.sidebar .ico { width: 18px; text-align: center; opacity: .85; }
.sidebar .version { position: absolute; bottom: 10px; left: 18px; font-size: .75rem; opacity: .5; }

.menu-item { position: relative; }
.menu-item.open > .menu-top { background: var(--accent); color: #fff; }
.submenu { display: none; }
.submenu a { padding: 6px 18px 6px 46px; font-size: .9rem; }
.submenu li.current a { color: #fff; font-weight: 600; }
.submenu-head { display: none; }

/* Aktives Menü: Unterpunkte darunter aufgeklappt (nur noch auf dem Handy – am Desktop immer als Flyout rechts) */
.menu-item.open .submenu { display: block; background: #2c3338; padding: 6px 0; }

/* Desktop: Unterpunkte NIE darunter, sondern nur beim Überfahren als Flyout rechts – auch beim aktiven Menü */
@media (min-width: 783px) {
    .menu-item.open .submenu { display: none; }
    .menu-item:not(.open):hover > .menu-top,
    .menu-item:not(.open):focus-within > .menu-top { background: #2c3338; color: #72aee6; }
    .menu-item:hover .submenu,
    .menu-item:focus-within .submenu {
        display: block; position: absolute; left: 100%; top: 0; min-width: 210px; background: #2c3338;
        padding: 6px 0; box-shadow: 0 3px 5px rgba(0,0,0,.2); z-index: 30; }
    .menu-item .submenu a { padding-left: 16px; }
    .menu-item .submenu-head { display: block; padding: 6px 16px; color: #fff; font-weight: 600; font-size: .9rem; }
}

.content { margin: var(--topbar-h) 0 0 210px; padding: 28px 32px; max-width: 1100px; }

/* Panels, Tabellen, Formulare */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.empty-state { border: 2px dashed var(--border); border-radius: var(--radius); padding: 48px 20px; text-align: center; color: var(--muted); }
table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list th { background: #f6f7f7; font-weight: 600; font-size: .9rem; }
table.list tr:last-child td { border-bottom: 0; }
table.list .muted, .muted { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; }

label { display: block; font-weight: 600; margin: 0 0 4px; }
.field { margin-bottom: 14px; }
.field small { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid #8c8f94; border-radius: 4px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { width: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }

.btn { display: inline-block; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent);
    color: #fff; font: inherit; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary { background: #fff; color: var(--accent); }
.btn-secondary:hover { background: #f0f6fc; color: var(--accent-dark); }
.btn-danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: not-allowed; background: var(--accent); border-color: var(--accent); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.topbar .btn { background: transparent; border-color: #50575e; }
.topbar .btn:hover { background: #2c3338; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #e6eef9; color: var(--accent-dark); font-size: .78rem; font-weight: 600; }
.topbar .badge { background: #2c3338; color: #dcdcde; }
.status-active { color: var(--ok); font-weight: 600; }
.status-warning { color: #b26200; font-weight: 600; }
.maintenance-notice { margin: 0 0 16px; }

.notice { padding: 10px 14px; border-left: 4px solid var(--accent); background: #fff; margin: 0 0 16px; border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.notice-success { border-color: var(--ok); }
.notice-error   { border-color: var(--err); }
.notice-warning { border-color: var(--warn); }

/* Login / Auth */
body.auth { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
.auth-box { width: 100%; max-width: 360px; }
.auth-title { text-align: center; margin-bottom: 20px; }
.auth-title a { color: var(--text); text-decoration: none; }
.auth-box form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.auth-box input { max-width: none; }
.auth-box .btn { width: 100%; }
.auth-links { text-align: center; margin-top: 14px; font-size: .9rem; }

/* Mobil */
@media (max-width: 782px) {
    .menu-toggle { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .2s; overflow-y: auto; }
    body.nav-open .sidebar { transform: none; }
    .content { margin-left: 0; padding: 20px 16px; }
    .topbar .who { display: none; }
}

/* Zusätze: Filterleiste, Zeilenaktionen, Statuskarten */
.subsubsub { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .9rem; }
.subsubsub a { text-decoration: none; } .subsubsub .current { font-weight: 600; color: var(--text); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar input[type=search] { width: 220px; padding: 6px 10px; border: 1px solid #8c8f94; border-radius: 4px; font: inherit; }
.row-actions { font-size: .82rem; margin-top: 2px; }
.row-actions a, .row-actions button.link { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: none; }
.row-actions .delete, .row-actions button.link.delete { color: var(--err); }
.row-actions form { display: inline; }
.page-title-action { margin-left: 10px; vertical-align: middle; font-size: .85rem; }
.health-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.health-summary .pill { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: .9rem; }
.health-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-left-width: 4px; border-radius: 4px; margin-bottom: 8px; }
.health-item.good { border-left-color: var(--ok); } .health-item.recommended { border-left-color: var(--warn); } .health-item.critical { border-left-color: var(--err); }
.health-item .label { font-weight: 600; } .health-item .badge { margin-left: auto; white-space: nowrap; }
.health-item.critical .badge { background: #fce8e8; color: var(--err); } .health-item.recommended .badge { background: #fcf4e3; color: var(--warn); } .health-item.good .badge { background: #e6f4ea; color: var(--ok); }
dl.info { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 6px 16px; margin: 0; }
dl.info dt { color: var(--muted); } dl.info dd { margin: 0; word-break: break-word; }
.tool-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.tool-card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.danger-zone { border-color: #f1aeb5; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: none; }
button.link:hover { text-decoration: underline; }
button.link.delete { color: var(--err); }
/* Willkommensseite */
.welcome-text { color: var(--muted); line-height: 1.6; }
/* Rollen-Matrix */
.roles-matrix input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.roles-matrix input[type=checkbox]:disabled { cursor: not-allowed; }
.roles-matrix tbody tr:hover td { background: #f6f7f7; }
/* Obere Leiste: Plugins · Werkzeuge · Einstellungen */
.topnav { display: flex; align-items: center; gap: 2px; margin-left: 12px; height: 100%; }
.topnav-item { position: relative; height: 100%; }
.topnav-item > summary { list-style: none; display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px;
    color: #c3c4c7; cursor: pointer; font-size: .92rem; user-select: none; }
.topnav-item > summary::-webkit-details-marker { display: none; }
.topnav-item > summary::after { content: "▾"; font-size: .7rem; opacity: .7; }
.topnav-item > summary:hover, .topnav-item[open] > summary { background: #2c3338; color: #72aee6; }
.topnav-item.active > summary { color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.topnav-item ul { position: absolute; top: 100%; left: 0; min-width: 240px; margin: 0; padding: 6px 0; list-style: none;
    background: #2c3338; box-shadow: 0 6px 14px rgba(0,0,0,.25); border-radius: 0 0 var(--radius) var(--radius); z-index: 40; }
.topnav-item ul a { display: block; padding: 8px 16px; color: #c3c4c7; text-decoration: none; font-size: .9rem; }
.topnav-item ul a:hover, .topnav-item ul a:focus-visible { color: #72aee6; background: rgba(255,255,255,.04); }
.topnav-item ul a[aria-current="page"] { color: #fff; font-weight: 600; }
.sidebar .mobile-only { display: none; }
@media (max-width: 782px) {
    .topnav { display: none; }
    .sidebar .mobile-only { display: block; }
}
.badge-err { background: #fde7e9; color: var(--err); margin-left: 6px; }
/* E-Mail-Layouts */
.mail-layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mail-preview { position: sticky; top: calc(var(--topbar-h) + 16px); }
.mail-preview-frame { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 8px; background: #fff; }
.color-input { width: 64px; height: 36px; padding: 2px; border: 1px solid #8c8f94; border-radius: 4px; background: #fff; cursor: pointer; }
.logo-thumb { max-width: 220px; max-height: 80px; padding: 8px; border-radius: 4px; vertical-align: middle; }
.link-row { margin-bottom: 6px; }
@media (max-width: 1100px) { .mail-layout-grid { grid-template-columns: 1fr; } .mail-preview { position: static; } }
.font-table select { width: 100%; max-width: 220px; }
.font-table input[type=number] { width: 80px; }
/* Logo der Website */
.topbar .brand { display: flex; align-items: center; }
.brand-logo { display: block; height: var(--logo-h, 32px); width: auto; max-width: 60vw; object-fit: contain; object-position: left center; }
.auth-logo { display: inline-block; max-height: 80px; max-width: 100%; }
/* Dashboard: Aktivitätsprotokoll */
.activity-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.activity-day { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.activity-item { display: grid; grid-template-columns: 48px 24px 1fr; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 4px; }
.activity-item + .activity-item { border-top: 1px solid #f0f0f1; }
.activity-item.is-new { background: #f0f6fc; }
.activity-time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.activity-icon { color: var(--muted); text-align: center; }
.activity-text { word-break: break-word; }
.badge-new { background: var(--accent); color: #fff; margin-left: 6px; font-size: .7rem; }
.activity-pages { display: flex; gap: 16px; align-items: center; margin: 16px 0 0; }
.activity-legend { padding: 12px 20px; }
.activity-legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .9rem; }
.activity-legend li { display: flex; align-items: center; gap: 6px; }
.activity-legend .badge-new { margin-left: 0; }
.activity-legend a { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.activity-legend a.current { font-weight: 600; color: var(--text); }

/* Editor (Rundmail) – ohne Drittanbieter */
.editor { border: 1px solid #c3c4c7; border-radius: var(--radius); background: #fff; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border-bottom: 1px solid #dcdcde; background: #f6f7f7;
    border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: 0; z-index: 5; }
.editor-toolbar button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: transparent;
    cursor: pointer; font-size: .95rem; color: #1d2327; line-height: 1; }
.editor-toolbar button:hover, .editor-toolbar button:focus-visible { border-color: #c3c4c7; background: #fff; }
.editor-toolbar button.is-active { background: #dcdcde; border-color: #c3c4c7; }
.editor-toolbar select { width: auto; max-width: 160px; height: 32px; padding: 0 6px; }
.editor-toolbar .sep { width: 1px; height: 22px; background: #dcdcde; margin: 0 4px; }
.editor-toolbar .colors { display: inline-flex; gap: 3px; align-items: center; }
.editor-toolbar .swatch { min-width: 22px; width: 22px; height: 22px; padding: 0; border: 1px solid #c3c4c7; }
.editor-toolbar input[type="color"] { width: 28px; height: 26px; padding: 0; border: 1px solid #c3c4c7; background: #fff; cursor: pointer; }
.editor-linkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid #dcdcde; background: #fcf9e8; }
.editor-linkbar input[type="url"] { flex: 1 1 260px; min-width: 0; }
.editor-linkbar[hidden], .editor-toolbar[hidden], .editor-linkbar [hidden] { display: none; }
.editor-area { min-height: 320px; max-height: 70vh; overflow-y: auto; padding: 16px 20px; line-height: 1.6; outline: none; }
.editor-area:focus { box-shadow: inset 0 0 0 2px #72aee6; }
.editor-area:empty::before { content: attr(data-placeholder); color: #8c8f94; }
.editor-area p { margin: 0 0 12px; }
.editor-area h2 { font-size: 1.35rem; margin: 18px 0 10px; }
.editor-area h3 { font-size: 1.12rem; margin: 16px 0 8px; }
.editor-area blockquote { margin: 0 0 12px; padding: 8px 16px; border-left: 4px solid var(--accent); background: #f6f7f7; }
.editor-area a { color: #2271b1; }
.editor-area a[data-button="1"] { display: inline-block; padding: 8px 18px; background: #2271b1; color: #fff; border-radius: 6px; text-decoration: none; font-weight: 600; }
.editor-area hr { border: 0; border-top: 1px solid #dcdcde; margin: 18px 0; }
.editor textarea.editor-source { width: 100%; min-height: 320px; border: 0; border-radius: var(--radius); padding: 12px; font-family: monospace; }


/* „hidden“ gilt immer – auch für Elemente mit eigener display-Angabe (z. B. .btn) */
[hidden] { display: none !important; }


/* ════════════════════════════════════════════════════════════════════
   Gothic-Theme (Blutrot, passend zu den Seitenbildern) – rote Leisten, Pergament-Inhalt, Ornamente, Siegel
   Hintergrundbild: img/bg_backend.png (eine Ebene über dem CMS-Ordner),
   wird in admin_header() automatisch gesucht und als --bg-bild gesetzt.
   ════════════════════════════════════════════════════════════════════ */
:root {
    --bg: #120202;
    --panel: rgba(255,248,230,.38);
    --text: #2a1709;
    --muted: #6e5238;
    --border: rgba(110,70,30,.30);
    --side: rgba(36,5,4,.90);
    --side-text: #f1dfb4;
    --accent: #7a100e;
    --accent-dark: #5c0f13;
    --gold: #d8b36a;
    --gold-dim: #a8803f;
    --pergament: #ecdcb4;
    --ok: #3d6b1f;
    --warn: #9a6a00;
    --err: #9b1b1f;
    --radius: 4px;
    --topbar-h: 56px;
    --serif: 'Junicode', Georgia, 'Times New Roman', serif;
    --serif-sc: 'Junicode', Georgia, 'Times New Roman', serif;   /* zusammen mit font-variant-caps: small-caps */
}
body.admin {
    background-color: #120202;
    background-image: var(--bg-bild, none), radial-gradient(ellipse at 50% 40%, rgba(110,12,10,.55), rgba(9,2,1,.95) 75%), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27500%27%20height%3D%27500%27%3E%3Cfilter%20id%3D%27f%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.012%27%20numOctaves%3D%274%27%20seed%3D%277%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%20.34%20%200%200%200%200%20.01%20%200%200%200%200%20.01%20%200%200%200%201.4%20-.45%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23f%29%27%2F%3E%3C%2Fsvg%3E");
    background-size: cover, cover, 500px 500px;
    background-position: center, center, 0 0;
    background-attachment: fixed;
    color: var(--text);
}
body.admin a { color: #8a1210; }

/* ---------- obere Leiste ---------- */
body.admin .topbar {
    left: 0; gap: 4px; padding: 0 18px 0 0;
    background: linear-gradient(to bottom, #4a0807 0%, #2d0504 55%, #1c0302 100%);
    border-bottom: 1px solid var(--gold-dim);
    box-shadow: 0 1px 0 rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.55);
    font-family: var(--serif);
}
body.admin .topbar::after {   /* feine Goldlinie über der Unterkante */
    content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: rgba(216,179,106,.25); pointer-events: none;
}
.topbar-crest {
    position: relative; z-index: 2; flex: 0 0 210px; align-self: flex-start; display: flex; align-items: center; gap: 12px;
    height: calc(var(--topbar-h) + 22px); padding: 0 16px 14px; text-decoration: none;
    background: linear-gradient(to bottom, #5c0c0a, #330605);
    clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
    isolation: isolate;
}
/* Goldkante rundherum – auch entlang der Spitze unten: außen Gold, innen das Rot 1px kleiner */
body.admin .topbar-crest { background: var(--gold-dim); }
body.admin .topbar-crest::before {
    content: ""; position: absolute; inset: 0 1px 1.5px 1px; z-index: -1; pointer-events: none;
    background: linear-gradient(to bottom, #5c0c0a, #330605);
    clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
}
.topbar-crest { justify-content: center; padding-top: 6px; }
.topbar-crest .crest-shield { width: 38px; height: 44px; flex: 0 0 auto; background: none; }
.topbar-crest img.crest-logo { display: block; max-width: 170px; max-height: calc(var(--topbar-h) - 2px); width: auto; height: auto;
    object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
body.admin .topbar .brand { display: none; }   /* Logo steht jetzt im Wappen-Banner */
body.admin .topnav { margin-left: 18px; gap: 6px; }
body.admin .topnav-item > summary { color: #f1dfb4; font-size: 1rem; padding: 0 14px; text-shadow: 0 1px 2px #000; }
body.admin .topnav-item > summary .ico { color: var(--gold); }
body.admin .topnav-item > summary:hover, body.admin .topnav-item[open] > summary { background: rgba(216,179,106,.08); color: #ffe7b0; }
body.admin .topnav-item.active > summary { color: #fff3d2; box-shadow: inset 0 -2px 0 var(--gold); }
body.admin .topnav-item ul { background: linear-gradient(#2d0504, #1c0302); border: 1px solid var(--gold-dim); border-top: 0; }
body.admin .topnav-item ul a { color: #f1dfb4; font-family: var(--serif); font-size: .98rem; }
body.admin .topnav-item ul a:hover, body.admin .topnav-item ul a:focus-visible { color: #ffe7b0; background: rgba(216,179,106,.08); }
body.admin .topbar .who { color: #f1dfb4; font-size: .95rem; text-shadow: 0 1px 2px #000; }
body.admin .topbar .who::before { content: "\2654"; color: var(--gold); margin-right: 6px; }
body.admin .topbar .badge { background: none; color: #f1dfb4; font-weight: 400; font-size: .9rem; margin-left: 10px; }
body.admin .topbar .btn {
    background: linear-gradient(#8a1210, #560806); border: 1px solid var(--gold-dim); color: #fbe9c0; border-radius: 3px;
    font-family: var(--serif); font-size: .95rem; padding: 6px 16px; box-shadow: inset 0 1px 0 rgba(255,220,160,.25), 0 2px 4px rgba(0,0,0,.5);
}
body.admin .topbar .btn:hover { background: linear-gradient(#a3181a, #660a08); }
body.admin .menu-toggle { color: var(--gold); margin-left: 12px; }

/* ---------- Seitenleiste ---------- */
body.admin .sidebar {
    background: linear-gradient(to right, rgba(44,6,5,.94), rgba(28,4,3,.94));
    border-right: 1px solid var(--gold-dim);
    box-shadow: 4px 0 18px rgba(0,0,0,.5);
    padding-top: 34px; font-family: var(--serif);
    font-variant-caps: small-caps; letter-spacing: .02em;   /* linkes Menü samt Untermenüs in Kapitälchen */
}
body.admin .sidebar a { color: #f1dfb4; font-size: 1.05rem; padding: 10px 16px; margin: 3px 8px; border: 1px solid transparent; border-radius: 3px; text-shadow: 0 1px 2px #000; }
body.admin .sidebar .ico { color: var(--gold); opacity: 1; width: 22px; }
body.admin .sidebar a:hover, body.admin .sidebar a:focus-visible { color: #ffe7b0; background: rgba(216,179,106,.07); }
body.admin .menu-item.open > .menu-top {
    background: linear-gradient(#8a1210, #560806); color: #fff3d2; border-color: var(--gold-dim);
    box-shadow: inset 0 1px 0 rgba(255,220,160,.25), 0 2px 6px rgba(0,0,0,.5);
}
body.admin .menu-item.open .submenu, body.admin .menu-item:not(.open):hover .submenu, body.admin .menu-item:not(.open):focus-within .submenu {
    background: rgba(22,3,2,.92);
}
@media (min-width: 783px) {
    body.admin .menu-item:not(.open):hover > .menu-top, body.admin .menu-item:not(.open):focus-within > .menu-top { background: rgba(216,179,106,.08); color: #ffe7b0; }
    body.admin .menu-item:hover .submenu, body.admin .menu-item:focus-within .submenu { border: 1px solid var(--gold-dim); }
    body.admin .menu-item .submenu-head { color: var(--gold); }
}
body.admin .submenu a { font-size: .95rem; margin: 0 8px; padding: 6px 12px 6px 42px; }
body.admin .submenu li.current a { color: #fff3d2; }
@media (min-width: 783px) { body.admin .menu-item .submenu a { margin: 0 6px; padding-left: 12px; } }   /* im Flyout bündig zur Überschrift */
body.admin .sidebar .version { color: rgba(216,179,106,.6); opacity: 1; left: 18px; right: 18px; padding-top: 8px;
    border-top: 1px solid var(--gold-dim); }   /* goldene Linie über der CMS-Version */

/* ---------- Pergament (Inhaltsbereich) ---------- */
body.admin .content {
    position: relative; isolation: isolate; max-width: none;
    margin: calc(var(--topbar-h) + 18px) 22px 22px 232px; padding: 30px 40px 36px;
    min-height: calc(100vh - var(--topbar-h) - 40px);
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255,250,232,.55), rgba(255,250,232,0) 65%),
        radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 60%, rgba(110,62,20,.28) 100%),
        url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27700%27%20height%3D%27700%27%3E%3Cfilter%20id%3D%27f%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.006%27%20numOctaves%3D%275%27%20seed%3D%2711%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%20.48%20%200%200%200%200%20.30%20%200%200%200%200%20.10%20%200%200%200%202.2%20-1.05%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23f%29%27%2F%3E%3C%2Fsvg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27400%27%20height%3D%27400%27%3E%3Cfilter%20id%3D%27f%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.004%20.28%27%20numOctaves%3D%272%27%20seed%3D%273%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%20.42%20%200%200%200%200%20.27%20%200%200%200%200%20.10%20%200%200%200%201.1%20-.55%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23f%29%27%2F%3E%3C%2Fsvg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27240%27%20height%3D%27240%27%3E%3Cfilter%20id%3D%27f%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.85%27%20numOctaves%3D%273%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%20.30%20%200%200%200%200%20.18%20%200%200%200%200%20.06%20%200%200%200%20.9%20-.32%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23f%29%27%2F%3E%3C%2Fsvg%3E"), var(--pergament);
    background-size: auto, auto, 1400px 1400px, 400px 400px, 240px 240px, auto;
    border: 1px solid #5a3414; outline: 3px double rgba(120,78,36,.7); outline-offset: -9px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.6), inset 0 0 60px rgba(110,62,20,.35);
    border-radius: 3px;
}
body.admin .content::before {   /* Eckornamente */
    content: ""; position: absolute; inset: 14px; z-index: -1; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2070%2070%27%3E%3Cg%20transform%3D%27%27%20fill%3D%27none%27%20stroke%3D%27%236b3f1c%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2066%20V14%20Q4%204%2014%204%20H66%27%2F%3E%3Cpath%20d%3D%27M10%2066%20V18%20Q10%2010%2018%2010%20H66%27%20stroke-width%3D%27.8%27%2F%3E%3Cpath%20d%3D%27M14%2030%20Q14%2014%2030%2014%27%2F%3E%3Cpath%20d%3D%27M22%2022%20q-8%20-2%20-10%20-10%20q8%202%2010%2010z%27%20fill%3D%27%236b3f1c%27%20opacity%3D%27.6%27%2F%3E%3Ccircle%20cx%3D%2726%27%20cy%3D%2726%27%20r%3D%272%27%20fill%3D%27%236b3f1c%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") top left / 64px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2070%2070%27%3E%3Cg%20transform%3D%27translate%2870%200%29%20scale%28-1%201%29%27%20fill%3D%27none%27%20stroke%3D%27%236b3f1c%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2066%20V14%20Q4%204%2014%204%20H66%27%2F%3E%3Cpath%20d%3D%27M10%2066%20V18%20Q10%2010%2018%2010%20H66%27%20stroke-width%3D%27.8%27%2F%3E%3Cpath%20d%3D%27M14%2030%20Q14%2014%2030%2014%27%2F%3E%3Cpath%20d%3D%27M22%2022%20q-8%20-2%20-10%20-10%20q8%202%2010%2010z%27%20fill%3D%27%236b3f1c%27%20opacity%3D%27.6%27%2F%3E%3Ccircle%20cx%3D%2726%27%20cy%3D%2726%27%20r%3D%272%27%20fill%3D%27%236b3f1c%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") top right / 64px no-repeat,
                url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2070%2070%27%3E%3Cg%20transform%3D%27translate%280%2070%29%20scale%281%20-1%29%27%20fill%3D%27none%27%20stroke%3D%27%236b3f1c%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2066%20V14%20Q4%204%2014%204%20H66%27%2F%3E%3Cpath%20d%3D%27M10%2066%20V18%20Q10%2010%2018%2010%20H66%27%20stroke-width%3D%27.8%27%2F%3E%3Cpath%20d%3D%27M14%2030%20Q14%2014%2030%2014%27%2F%3E%3Cpath%20d%3D%27M22%2022%20q-8%20-2%20-10%20-10%20q8%202%2010%2010z%27%20fill%3D%27%236b3f1c%27%20opacity%3D%27.6%27%2F%3E%3Ccircle%20cx%3D%2726%27%20cy%3D%2726%27%20r%3D%272%27%20fill%3D%27%236b3f1c%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") bottom left / 64px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2070%2070%27%3E%3Cg%20transform%3D%27translate%2870%2070%29%20scale%28-1%20-1%29%27%20fill%3D%27none%27%20stroke%3D%27%236b3f1c%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2066%20V14%20Q4%204%2014%204%20H66%27%2F%3E%3Cpath%20d%3D%27M10%2066%20V18%20Q10%2010%2018%2010%20H66%27%20stroke-width%3D%27.8%27%2F%3E%3Cpath%20d%3D%27M14%2030%20Q14%2014%2030%2014%27%2F%3E%3Cpath%20d%3D%27M22%2022%20q-8%20-2%20-10%20-10%20q8%202%2010%2010z%27%20fill%3D%27%236b3f1c%27%20opacity%3D%27.6%27%2F%3E%3Ccircle%20cx%3D%2726%27%20cy%3D%2726%27%20r%3D%272%27%20fill%3D%27%236b3f1c%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") bottom right / 64px no-repeat;
}
body.admin .content::after {    /* Wachssiegel */
    content: ""; position: absolute; top: 58px; right: 26px; width: 66px; height: 66px; z-index: 1; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20100%20100%27%3E%3Cdefs%3E%3CradialGradient%20id%3D%27g%27%20cx%3D%2740%25%27%20cy%3D%2735%25%27%20r%3D%2770%25%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23c0302c%27%2F%3E%3Cstop%20offset%3D%27.55%27%20stop-color%3D%27%238a1210%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%23420605%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%27M50%204%20C60%203%2064%209%2072%2010%20C81%2012%2084%2019%2089%2026%20C95%2034%2093%2041%2096%2050%20C98%2060%2092%2065%2090%2073%20C86%2082%2079%2085%2071%2090%20C62%2095%2057%2093%2050%2096%20C41%2098%2036%2092%2028%2090%20C19%2087%2015%2080%2010%2072%20C5%2064%207%2057%204%2050%20C2%2040%208%2035%2011%2027%20C15%2018%2022%2015%2030%2010%20C38%206%2043%205%2050%204Z%27%20fill%3D%27url%28%23g%29%27%2F%3E%3Ccircle%20cx%3D%2750%27%20cy%3D%2750%27%20r%3D%2730%27%20fill%3D%27none%27%20stroke%3D%27%234c0807%27%20stroke-width%3D%273%27%20opacity%3D%27.7%27%2F%3E%3Ccircle%20cx%3D%2750%27%20cy%3D%2750%27%20r%3D%2730%27%20fill%3D%27none%27%20stroke%3D%27%23f08a80%27%20stroke-width%3D%271%27%20opacity%3D%27.35%27%20transform%3D%27translate%28-1%20-1%29%27%2F%3E%3Cpath%20d%3D%27M50%2030%20L54.5%2044%20L69%2044%20L57.5%2052.5%20L62%2066.5%20L50%2058%20L38%2066.5%20L42.5%2052.5%20L31%2044%20L45.5%2044Z%27%20fill%3D%27%23500807%27%20opacity%3D%27.85%27%2F%3E%3Cellipse%20cx%3D%2736%27%20cy%3D%2726%27%20rx%3D%2712%27%20ry%3D%275%27%20fill%3D%27%23fff%27%20opacity%3D%27.12%27%20transform%3D%27rotate%28-30%2036%2026%29%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; filter: drop-shadow(0 3px 3px rgba(40,5,5,.55)); transform: rotate(-8deg);
}
body.admin .content h1 {
    display: flex; align-items: center; gap: 18px; margin: 0 90px 1.1rem 0;
    font-family: var(--serif); font-weight: 400; font-size: 2.1rem; color: #701210; text-shadow: 0 1px 0 rgba(255,240,200,.5);
}
body.admin .content h1::after {
    content: ""; flex: 1 1 auto; max-width: 520px; height: 22px;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20240%2024%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23701210%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M4%2012%20C40%2012%2070%206%20100%2012%27%2F%3E%3Cpath%20d%3D%27M236%2012%20C200%2012%20170%206%20140%2012%27%2F%3E%3Cpath%20d%3D%27M120%203%20L129%2012%20L120%2021%20L111%2012%20Z%27%2F%3E%3Cpath%20d%3D%27M100%2012%20q6%20-7%2011%200%20M140%2012%20q-6%20-7%20-11%200%27%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%27120%27%20cy%3D%2712%27%20r%3D%272.6%27%20fill%3D%27%23701210%27%2F%3E%3C%2Fsvg%3E") center / 120px 22px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20400%2024%27%20preserveAspectRatio%3D%27none%27%3E%3Cpath%20d%3D%27M0%2012%20H400%27%20stroke%3D%27%23701210%27%20stroke-width%3D%271%27%20opacity%3D%27.6%27%2F%3E%3C%2Fsvg%3E") center / 100% 22px no-repeat;
}
body.admin .content h2, body.admin .content h3 { font-family: var(--serif); font-weight: 400; color: #701210; }
body.admin .content h2 { font-size: 1.5rem; }
body.admin .muted, body.admin table.list .muted { color: var(--muted); }

/* Panels, Karten, Tabellen auf dem Pergament */
body.admin .panel, body.admin .tool-card, body.admin .health-item, body.admin .health-summary .pill {
    background: rgba(255,250,235,.30); border: 1px solid rgba(110,70,30,.35); box-shadow: inset 0 0 18px rgba(150,95,40,.12);
}
body.admin .health-item { border-left-width: 4px; }
body.admin .danger-zone { border-color: rgba(155,27,31,.5); }
body.admin .empty-state { border-color: rgba(110,70,30,.4); color: var(--muted); }
body.admin table.list { background: rgba(255,250,235,.28); border: 1px solid rgba(110,70,30,.35); }
body.admin table.list th { background: rgba(130,18,16,.10); color: #520b09; font-family: var(--serif-sc); font-variant-caps: small-caps; font-weight: 400; font-size: .95rem; letter-spacing: .02em; }
body.admin table.list th, body.admin table.list td { border-bottom: 1px solid rgba(110,70,30,.22); }
body.admin .roles-matrix tbody tr:hover td { background: rgba(130,18,16,.06); }

/* Dashboard: Filterleiste und Protokoll */
body.admin .activity-legend { padding: 10px 14px; }
body.admin .activity-legend ul { gap: 4px 6px; align-items: center; font-size: .82rem; }
body.admin .activity-legend a { color: var(--text); padding: 3px 10px; border: 1px solid transparent; border-radius: 99px; font-size: .82rem; }
body.admin .activity-legend a:hover { border-color: rgba(130,18,16,.35); background: rgba(130,18,16,.06); }
body.admin .activity-legend a.current { background: linear-gradient(#8a1210, #560806); color: #fff3d2; border-color: #3a0605; font-weight: 400;
    box-shadow: inset 0 1px 0 rgba(255,220,160,.25), 0 1px 3px rgba(0,0,0,.35); }
body.admin .activity-legend a.current .activity-icon { color: #fbe2a8; }
body.admin .activity-legend .activity-icon { color: #3b2412; }
body.admin .activity { background: transparent; border: 0; box-shadow: none; padding-left: 4px; padding-right: 4px; }
body.admin .activity h2 { font-size: 1.6rem; }
body.admin .activity-day { color: #8a1210; font-weight: 700; border-bottom: 1px solid rgba(110,70,30,.35); font-size: .8rem; }
body.admin .activity-item { border-radius: 0; }
body.admin .activity-item + .activity-item { border-top: 1px solid rgba(110,70,30,.20); }
body.admin .activity-item.is-new { background: rgba(130,18,16,.06); }
body.admin .activity-time { color: #4a3220; }
body.admin .activity-icon { color: #7a100e; }
body.admin .badge.badge-new { background: #2c5fb3; color: #fff; }

/* Formulare */
body.admin label { color: #3b2412; }
body.admin input[type=text], body.admin input[type=email], body.admin input[type=password], body.admin input[type=number],
body.admin input[type=url], body.admin input[type=search], body.admin select, body.admin textarea {
    background: rgba(255,252,240,.78); border: 1px solid #9b7a55; color: var(--text);
}
body.admin input:focus, body.admin select:focus, body.admin textarea:focus { outline: 2px solid rgba(130,18,16,.55); border-color: #7a100e; }
body.admin input[type=checkbox], body.admin input[type=radio] { accent-color: #7a100e; }

/* Buttons */
body.admin .btn { background: linear-gradient(#8a1210, #560806); border: 1px solid #3a0605; color: #fbe9c0; border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255,220,160,.25), 0 1px 3px rgba(0,0,0,.35); }
body.admin .btn:hover { background: linear-gradient(#a3181a, #660a08); border-color: #3a0605; }
body.admin .btn-secondary { background: rgba(255,250,235,.6); color: #560806; border-color: #9b7a55; box-shadow: none; }
body.admin .btn-secondary:hover { background: rgba(255,250,235,.9); color: #560806; }
body.admin .btn-danger { background: rgba(255,250,235,.6); color: var(--err); border-color: var(--err); box-shadow: none; }
body.admin .btn-danger:hover { background: var(--err); color: #fff; }
body.admin .btn:disabled, body.admin .btn:disabled:hover { background: linear-gradient(#8a1210, #560806); }
body.admin .row-actions a, body.admin button.link { color: #8a1210; }

/* Hinweise und Abzeichen */
body.admin .notice { background: rgba(255,250,235,.62); border-left-color: #7a100e; box-shadow: 0 1px 2px rgba(60,30,10,.15); }
body.admin .notice-success { border-left-color: var(--ok); }
body.admin .notice-error { border-left-color: var(--err); }
body.admin .notice-warning { border-left-color: var(--warn); }
body.admin .badge { background: rgba(130,18,16,.12); color: #560806; }
body.admin .subsubsub .current { color: #560806; }
body.admin .badge.badge-new { background: #2c5fb3; color: #fff; }

/* Editor & Vorschau bleiben hell, auf Pergament abgestimmt */
body.admin .editor { background: #fffaf0; border-color: #9b7a55; }
body.admin .editor-toolbar { background: #f3e6c8; border-color: #c9ad84; }

/* Freie Streifen links und rechts (je 210px) – die Oberfläche steht dazwischen.
   Dort scheint der Hintergrund durch (z. B. für ein Bild). Erst ab 1400px Breite, sonst wird der Inhalt zu schmal. */
:root { --frei-links: 0px; --frei-rechts: 0px; }
@media (min-width: 1400px) { :root { --frei-links: 210px; --frei-rechts: 210px; } }
body.admin .topbar  { left: var(--frei-links); right: var(--frei-rechts); border-left: 1px solid var(--gold-dim); border-right: 1px solid var(--gold-dim); }
body.admin .sidebar { left: var(--frei-links); border-left: 1px solid var(--gold-dim); }
body.admin .content { margin-left: calc(var(--frei-links) + 232px); margin-right: calc(var(--frei-rechts) + 22px); }
@media (max-width: 782px) { body.admin .content { margin-left: 8px; margin-right: 8px; } }
/* Bilder in den freien Streifen: links_backend.png und rechts_backend.png aus ../img/ */
body.admin::before, body.admin::after {
    content: ""; position: fixed; top: 0; bottom: 0; z-index: 0; pointer-events: none;
    background-position: center; background-size: cover; background-repeat: no-repeat;
}
body.admin::before { left: 0;  width: var(--frei-links);  background-image: var(--bild-links, none); }
body.admin::after  { right: 0; width: var(--frei-rechts); background-image: var(--bild-rechts, none); }
/* Goldene Abgrenzung zum rechten Streifen über die ganze Höhe (links übernimmt das die Seitenleiste) */
@media (min-width: 1400px) {
    body.admin::after { border-left: 1px solid var(--gold-dim); box-shadow: -4px 0 18px rgba(0,0,0,.5); z-index: 15; }
}

/* Mobil */
@media (max-width: 782px) {
    .topbar-crest { flex-basis: auto; height: var(--topbar-h); padding: 0 12px; clip-path: none; border: 0; box-shadow: none; background: none; }
    body.admin .topbar-crest { background: none; }
    body.admin .topbar-crest::before { display: none; }
    .topbar-crest img.crest-logo { max-width: 120px; max-height: calc(var(--topbar-h) - 10px); }
    body.admin .content { margin: calc(var(--topbar-h) + 10px) 8px 8px; padding: 22px 18px 26px; }
    body.admin .content::after { width: 48px; height: 48px; top: 18px; right: 14px; }
    body.admin .content h1 { font-size: 1.6rem; margin-right: 56px; }
    body.admin .content h1::after { display: none; }
    body.admin .sidebar { padding-top: 12px; }
}

/* ---------- Willkommensseite (Aussehen: Einstellungen › Willkommensseite) ---------- */
.welcome-page { color: var(--w-text); font-family: var(--w-font); font-size: var(--w-size); line-height: var(--w-lh); text-align: var(--w-align); }
.welcome-page.has-box { background: var(--w-bg); border: 1px solid rgba(110,70,30,.35); border-radius: 4px; padding: 24px 28px;
    box-shadow: inset 0 0 18px rgba(150,95,40,.12); }
body.admin .content .welcome-page .welcome-title { font-family: var(--w-font); font-size: var(--w-title); color: var(--w-head); margin: 0 0 .8em; line-height: 1.25; }
body.admin .content .welcome-page h2, body.admin .content .welcome-page h3 { font-family: var(--w-font); color: var(--w-head); line-height: 1.3; }
body.admin .content .welcome-page h2 { font-size: 1.45em; }
body.admin .content .welcome-page h3 { font-size: 1.2em; }
.welcome-page p { margin: 0 0 1em; }
.welcome-page a { color: var(--w-link); }
.welcome-page a[data-button] { display: inline-block; padding: .55em 1.3em; border-radius: 4px; background: var(--w-link); color: #fff; text-decoration: none; font-weight: bold; }
.welcome-page blockquote { margin: 1em 0; padding: .4em 1em; border-left: 4px solid var(--w-head); background: rgba(130,18,16,.05); }
.welcome-page hr { border: 0; border-top: 1px solid rgba(110,70,30,.35); margin: 1.5em 0; }
.welcome-page ul, .welcome-page ol { text-align: left; }

/* ---------- Großes Wappen-Banner (hängt von der Kopfleiste über die Seitenleiste) ----------
   Größe nur hier ändern: --crest-w = Breite des Wappens. Die Kopfleiste bleibt dabei schmal;
   die Seitenleiste rückt automatisch so weit nach unten, dass kein Menüpunkt verdeckt wird. */
@media (min-width: 783px) {
    body.admin { --crest-w: 196px; --crest-h: calc(var(--crest-w) * 1.02 + 46px); }
    .topbar-crest {
        height: var(--crest-h); padding: 10px 7px 34px; align-items: flex-start;
        clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
        filter: drop-shadow(0 8px 14px rgba(0,0,0,.6));
    }
    body.admin .topbar-crest::before { clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
        background: radial-gradient(circle at 50% 45%, rgba(216,179,106,.22), rgba(216,179,106,0) 62%), linear-gradient(to bottom, #5c0c0a, #2a0504); }
    .topbar-crest img.crest-logo { width: var(--crest-w); max-width: var(--crest-w); max-height: none; height: auto;
        filter: drop-shadow(0 3px 4px rgba(0,0,0,.7)) drop-shadow(0 0 10px rgba(216,179,106,.25)); transition: transform .2s; }
    .topbar-crest:hover img.crest-logo, .topbar-crest:focus-visible img.crest-logo { transform: scale(1.03); }
    body.admin .sidebar { padding-top: calc(var(--crest-h) - var(--topbar-h) + 14px); }
}
/* Niedrige Bildschirme (z. B. Laptop mit 768px Höhe): etwas kleiner, damit das Menü Platz hat */
@media (min-width: 783px) and (max-height: 760px) { body.admin { --crest-w: 150px; } }
