/* Zertifikatsverwaltung – Oberfläche
   Alle Regeln sind über Klassen (.zert-…) und den Container .zert-app / .zert-page eingegrenzt,
   damit das Theme der Website die Darstellung nicht verändert. */

.zert-app, .zert-page, .zert-print-sheet, .zert-standalone {
    --z-bg: #f3f5f7;
    --z-surface: #ffffff;
    --z-text: #16202a;
    --z-muted: #5d6b79;
    --z-line: #e1e6ec;
    --z-line-strong: #c9d1da;
    --z-accent: #0f766e;
    --z-accent-hover: #0b5f59;
    --z-accent-soft: #e2f3f1;
    --z-info: #1d4ed8;
    --z-info-soft: #e8eefc;
    --z-warn: #8f5400;
    --z-warn-soft: #fff1d0;
    --z-ok: #17693a;
    --z-ok-soft: #dff4e7;
    --z-danger: #b42318;
    --z-danger-soft: #fde8e6;
    --z-neutral: #475467;
    --z-neutral-soft: #eceff3;
    --z-radius: 16px;
    --z-radius-sm: 10px;
    --z-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 16px rgba(16, 24, 40, .06);
    --z-ring: 0 0 0 3px rgba(15, 118, 110, .3);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--z-text);
    -webkit-font-smoothing: antialiased;
}

.zert-app, .zert-page,
.zert-app *, .zert-app *::before, .zert-app *::after,
.zert-page *, .zert-page *::before, .zert-page *::after { box-sizing: border-box; }

/* Die App bricht aus schmalen Theme-Inhaltsspalten aus (bis 1120 px, höchstens Fensterbreite minus Rand)
   und bleibt mittig. Block-Themes begrenzen Kindelemente per "max-width" und "margin: auto !important"
   (Layout "constrained"), deshalb hier bewusst !important. Ohne transform, damit fixierte Elemente
   (Toasts) am Fenster haften. */
.zert-app { background: var(--z-bg); border-radius: 18px; padding: 20px; position: relative; }
/* Doppelter Klassenname erhöht die Spezifität über die Theme-Regel "margin-left: auto !important". */
.zert-app.zert-app {
    width: min(1120px, calc(100vw - 32px)); max-width: none !important;
    margin-left: calc((100% - min(1120px, 100vw - 32px)) / 2) !important; margin-right: 0 !important;
}
@media (max-width: 720px) { .zert-app { padding: 12px; } }
.zert-page { max-width: 600px; margin: 0 auto; }

.zert-app h1, .zert-app h2, .zert-app h3, .zert-app h4,
.zert-page h1, .zert-page h2, .zert-page h3 {
    font-family: inherit; font-weight: 700; font-style: normal; text-transform: none; color: var(--z-text);
    line-height: 1.25; margin: 0; padding: 0; border: 0; background: none; letter-spacing: -.01em;
}
.zert-app p, .zert-page p { margin: 0; padding: 0; }
.zert-app a, .zert-page a { color: var(--z-accent); text-decoration: none; }
.zert-app a:hover, .zert-page a:hover { text-decoration: underline; }
.zert-app ul, .zert-app ol, .zert-app li, .zert-app dl, .zert-app dt, .zert-app dd,
.zert-page ul, .zert-page ol, .zert-page li { margin: 0; padding: 0; }
.zert-app img, .zert-app svg { max-width: none; }

.zert-muted { color: var(--z-muted); }
.zert-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfleiste ---------- */
.zert-app .zert-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
    background: var(--z-surface); border: 1px solid var(--z-line); border-radius: var(--z-radius); padding: 10px 16px; box-shadow: var(--z-shadow); }
.zert-app .zert-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--z-text); }
.zert-app .zert-brand:hover { text-decoration: none; }
.zert-app .zert-logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #0f766e, #14907f); color: #fff; display: grid; place-items: center; }
.zert-app .zert-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.zert-app .zert-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--z-muted); font-weight: 600; }
.zert-app .zert-nav a:hover { background: var(--z-neutral-soft); text-decoration: none; color: var(--z-text); }
.zert-app .zert-nav a[aria-current="page"] { background: var(--z-accent-soft); color: var(--z-accent); }
.zert-app .zert-user { display: flex; align-items: center; gap: 10px; }
.zert-app .zert-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--z-accent-soft); color: var(--z-accent); font-weight: 700; font-size: .8rem; display: grid; place-items: center; flex: none; }
.zert-app .zert-user-name { font-weight: 600; }
.zert-app .zert-main { margin-top: 22px; display: grid; gap: 20px; }

/* ---------- Seitenkopf, Brotkrumen ---------- */
.zert-app .zert-pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.zert-app .zert-pagehead h2 { font-size: 1.65rem; }
.zert-app .zert-pagehead p { margin-top: 4px; }
.zert-app .zert-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zert-app .zert-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; color: var(--z-muted); margin-bottom: -6px; }
.zert-app .zert-crumbs a { color: var(--z-muted); font-weight: 600; }
.zert-app .zert-crumbs a:hover { color: var(--z-accent); }

/* ---------- Buttons ---------- */
.zert-app .zert-btn, .zert-page .zert-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px;
    border-radius: var(--z-radius-sm); border: 1px solid transparent; background: var(--z-surface); color: var(--z-text);
    font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.zert-app .zert-btn:hover, .zert-page .zert-btn:hover { text-decoration: none; }
.zert-app .zert-btn:active, .zert-page .zert-btn:active { transform: translateY(1px); }
.zert-app .zert-btn:focus-visible, .zert-page .zert-btn:focus-visible, .zert-app .zert-tab:focus-visible,
.zert-app .zert-input:focus-visible, .zert-page .zert-input:focus-visible { outline: none; box-shadow: var(--z-ring); }
.zert-app .zert-btn[disabled], .zert-page .zert-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.zert-app .zert-btn-primary, .zert-page .zert-btn-primary { background: var(--z-accent); color: #fff; }
.zert-app .zert-btn-primary:hover:not([disabled]), .zert-page .zert-btn-primary:hover:not([disabled]) { background: var(--z-accent-hover); color: #fff; }
.zert-app .zert-btn-secondary { border-color: var(--z-line-strong); background: var(--z-surface); }
.zert-app .zert-btn-secondary:hover:not([disabled]) { background: var(--z-neutral-soft); }
.zert-app .zert-btn-ghost { background: transparent; color: var(--z-muted); }
.zert-app .zert-btn-ghost:hover:not([disabled]) { background: var(--z-neutral-soft); color: var(--z-text); }
.zert-app .zert-btn-danger { background: var(--z-danger); color: #fff; }
.zert-app .zert-btn-danger:hover:not([disabled]) { background: #8f1c12; color: #fff; }
.zert-app .zert-btn-danger-ghost { color: var(--z-danger); border-color: #f3c3be; background: var(--z-surface); }
.zert-app .zert-btn-danger-ghost:hover:not([disabled]) { background: var(--z-danger-soft); }
.zert-app .zert-btn-sm { min-height: 34px; padding: 6px 12px; font-size: .875rem; }
.zert-app .zert-btn-block { width: 100%; }
.zert-app .zert-icon { flex: none; }

/* ---------- Karten, Kennzahlen ---------- */
.zert-app .zert-card, .zert-page .zert-card { background: var(--z-surface); border: 1px solid var(--z-line); border-radius: var(--z-radius); box-shadow: var(--z-shadow); padding: 20px; }
.zert-app .zert-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

.zert-app .zert-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.zert-app .zert-kpi { background: var(--z-surface); border: 1px solid var(--z-line); border-radius: var(--z-radius); padding: 16px 18px; box-shadow: var(--z-shadow); }
.zert-app .zert-kpi-num { font-size: 2rem; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; }
.zert-app .zert-kpi-label { color: var(--z-muted); font-size: .875rem; margin-top: 2px; }
.zert-app .zert-kpi-hot { border-color: #9fd6d0; background: linear-gradient(180deg, var(--z-accent-soft), var(--z-surface)); }
.zert-app .zert-kpi-hot .zert-kpi-num { color: var(--z-accent); }

.zert-app .zert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }

.zert-app .zert-kurs { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.zert-app .zert-kurs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.zert-app .zert-kurs h3 { font-size: 1.1rem; }
.zert-app .zert-kurs h3 a { color: var(--z-text); }
.zert-app .zert-kurs-meta { display: flex; align-items: center; gap: 6px; color: var(--z-muted); font-size: .9rem; margin-top: 4px; }
.zert-app .zert-kurs-archiv { opacity: .8; }
.zert-app .zert-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.zert-app .zert-count { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--z-neutral-soft); color: var(--z-neutral); font-weight: 600; }
.zert-app .zert-count b { font-weight: 750; }
.zert-app .zert-count-info { background: var(--z-info-soft); color: var(--z-info); }
.zert-app .zert-count-warn { background: var(--z-warn-soft); color: var(--z-warn); }
.zert-app .zert-count-ok { background: var(--z-ok-soft); color: var(--z-ok); }
.zert-app .zert-progress { height: 6px; border-radius: 999px; background: var(--z-neutral-soft); overflow: hidden; }
.zert-app .zert-progress > span { display: block; height: 100%; background: var(--z-accent); border-radius: 999px; }
.zert-app .zert-kurs-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.zert-app .zert-leiter { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--z-muted); }

/* ---------- Badges, Tabs ---------- */
.zert-app .zert-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; white-space: nowrap; background: var(--z-neutral-soft); color: var(--z-neutral); }
.zert-app .zert-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.zert-app .zert-badge-info { background: var(--z-info-soft); color: var(--z-info); }
.zert-app .zert-badge-warn { background: var(--z-warn-soft); color: var(--z-warn); }
.zert-app .zert-badge-ok { background: var(--z-ok-soft); color: var(--z-ok); }
.zert-app .zert-badge-danger { background: var(--z-danger-soft); color: var(--z-danger); }
.zert-app .zert-badge-plain::before { display: none; }

.zert-app .zert-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.zert-app .zert-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--z-line-strong); background: var(--z-surface);
    color: var(--z-muted); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.zert-app .zert-tab:hover { background: var(--z-neutral-soft); color: var(--z-text); }
.zert-app .zert-tab[aria-selected="true"] { background: var(--z-accent); border-color: var(--z-accent); color: #fff; }
.zert-app .zert-tab-n { background: rgba(0, 0, 0, .08); border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.zert-app .zert-tab[aria-selected="true"] .zert-tab-n { background: rgba(255, 255, 255, .25); }

/* ---------- Werkzeugleiste, Eingaben ---------- */
.zert-app .zert-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.zert-app .zert-search { position: relative; flex: 1 1 260px; }
.zert-app .zert-search .zert-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--z-muted); pointer-events: none; }
.zert-app .zert-search .zert-input { padding-left: 38px; }

.zert-app .zert-input, .zert-page .zert-input {
    width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--z-line-strong); border-radius: var(--z-radius-sm);
    background: var(--z-surface); color: var(--z-text); font: inherit; line-height: 1.3; box-shadow: none;
}
.zert-app .zert-input:focus, .zert-page .zert-input:focus { border-color: var(--z-accent); outline: none; box-shadow: var(--z-ring); }
.zert-app .zert-input[disabled], .zert-page .zert-input[disabled] { background: var(--z-neutral-soft); color: var(--z-muted); cursor: not-allowed; }
.zert-app .zert-input[aria-invalid="true"], .zert-page .zert-input[aria-invalid="true"] { border-color: var(--z-danger); }
.zert-app textarea.zert-input { min-height: 88px; resize: vertical; }
.zert-app select.zert-input { width: auto; padding-right: 32px; }

.zert-app .zert-field, .zert-page .zert-field { display: grid; gap: 6px; }
.zert-app .zert-label, .zert-page .zert-label { font-weight: 650; font-size: .92rem; }
.zert-app .zert-req, .zert-page .zert-req { color: var(--z-danger); }
.zert-app .zert-hint, .zert-page .zert-hint { color: var(--z-muted); font-size: .85rem; }
.zert-app .zert-error, .zert-page .zert-error { color: var(--z-danger); font-size: .88rem; font-weight: 600; min-height: 0; }
.zert-app .zert-form, .zert-page .zert-form { display: grid; gap: 16px; }
.zert-app .zert-grid-2, .zert-page .zert-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zert-app .zert-check, .zert-page .zert-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.zert-app .zert-check input, .zert-page .zert-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--z-accent); flex: none; }
.zert-app .zert-checklist { display: grid; gap: 6px; max-height: 190px; overflow: auto; border: 1px solid var(--z-line); border-radius: var(--z-radius-sm); padding: 10px 12px; }
.zert-app input[type="checkbox"].zert-box { width: 18px; height: 18px; accent-color: var(--z-accent); cursor: pointer; margin: 0; }

/* ---------- Tabelle / Liste ---------- */
.zert-app .zert-tablewrap { background: var(--z-surface); border: 1px solid var(--z-line); border-radius: var(--z-radius); box-shadow: var(--z-shadow); overflow: hidden; }
.zert-app .zert-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; border: 0; }
.zert-app .zert-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--z-muted); font-weight: 700;
    background: #fafbfc; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--z-line); }
.zert-app .zert-table td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--z-line); vertical-align: middle; background: transparent; }
.zert-app .zert-table tbody tr:last-child td { border-bottom: 0; }
.zert-app .zert-table tbody tr:hover td { background: #f8fafb; }
.zert-app .zert-table tr[data-offen="1"] td:first-child { box-shadow: inset 3px 0 0 var(--z-accent); }
.zert-app .zert-table .zert-col-check { width: 44px; }
.zert-app .zert-table .zert-col-end { text-align: right; width: 60px; }
.zert-app .zert-name { font-weight: 650; color: var(--z-text); }
.zert-app .zert-sub { color: var(--z-muted); font-size: .85rem; overflow-wrap: anywhere; }
.zert-app .zert-col-name { min-width: 0; }

.zert-app .zert-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--z-muted); font-size: .9rem; }
.zert-app .zert-pager-nav { display: flex; gap: 8px; }

/* Sammelaktion */
.zert-app .zert-bulk { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: #16202a; color: #fff; padding: 12px 16px; border-radius: var(--z-radius); box-shadow: 0 10px 30px rgba(16, 24, 40, .35); }
.zert-app .zert-bulk .zert-btn-ghost { color: #cbd5e1; }
.zert-app .zert-bulk .zert-btn-ghost:hover:not([disabled]) { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- Detailseite ---------- */
.zert-app .zert-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.zert-app .zert-stack { display: grid; gap: 20px; }
.zert-app .zert-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: .92rem; }
.zert-app .zert-dl dt { color: var(--z-muted); }
.zert-app .zert-dl dd { font-weight: 600; text-align: right; word-break: break-word; }
.zert-app .zert-side-actions { display: grid; gap: 10px; margin-bottom: 18px; }
.zert-app .zert-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; background: var(--z-neutral-soft); padding: 2px 8px; border-radius: 6px; }

.zert-app .zert-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--z-radius); border: 1px solid transparent; }
.zert-app .zert-banner .zert-icon { margin-top: 2px; }
.zert-app .zert-banner-info { background: var(--z-info-soft); color: #1e3a8a; border-color: #c7d6fb; }
.zert-app .zert-banner-warn { background: var(--z-warn-soft); color: #6b3f00; border-color: #f0d79a; }
.zert-app .zert-banner-ok { background: var(--z-ok-soft); color: #0f4d29; border-color: #b6e3c6; }
.zert-app .zert-banner-danger { background: var(--z-danger-soft); color: #7a1a12; border-color: #f3c3be; }
.zert-app .zert-banner-neutral { background: var(--z-neutral-soft); color: var(--z-neutral); border-color: var(--z-line-strong); }
.zert-app .zert-banner-title { font-weight: 700; }

.zert-app .zert-timeline { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
.zert-app .zert-timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 18px; }
.zert-app .zert-timeline li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--z-line); }
.zert-app .zert-timeline li:last-child { padding-bottom: 0; }
.zert-app .zert-timeline li:last-child::before { display: none; }
.zert-app .zert-tl-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--z-neutral-soft); color: var(--z-neutral); }
.zert-app .zert-tl-ok .zert-tl-icon { background: var(--z-ok-soft); color: var(--z-ok); }
.zert-app .zert-tl-warn .zert-tl-icon { background: var(--z-warn-soft); color: var(--z-warn); }
.zert-app .zert-tl-danger .zert-tl-icon { background: var(--z-danger-soft); color: var(--z-danger); }
.zert-app .zert-tl-info .zert-tl-icon { background: var(--z-info-soft); color: var(--z-info); }
.zert-app .zert-tl-title { font-weight: 650; font-size: .92rem; }
.zert-app .zert-tl-meta { color: var(--z-muted); font-size: .8rem; }
.zert-app .zert-tl-detail { font-size: .88rem; color: var(--z-neutral); margin-top: 2px; word-break: break-word; }

/* ---------- Leer, Laden ---------- */
.zert-app .zert-empty { text-align: center; padding: 44px 20px; color: var(--z-muted); display: grid; gap: 10px; justify-items: center; }
.zert-app .zert-empty-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--z-accent-soft); color: var(--z-accent); display: grid; place-items: center; }
.zert-app .zert-empty h3 { color: var(--z-text); font-size: 1.15rem; }
.zert-app .zert-skel { background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 37%, #eceff3 63%); background-size: 400% 100%; animation: zert-shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes zert-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Dialoge, Toasts ---------- */
.zert-app dialog.zert-dialog { border: 0; padding: 0; border-radius: 18px; width: min(540px, calc(100vw - 28px)); max-height: calc(100vh - 40px); color: var(--z-text);
    background: var(--z-surface); box-shadow: 0 24px 60px rgba(16, 24, 40, .35); overflow: hidden; }
.zert-app dialog.zert-dialog[open] { display: flex; flex-direction: column; }
.zert-app dialog.zert-dialog::backdrop { background: rgba(16, 24, 40, .5); backdrop-filter: blur(2px); }
.zert-app .zert-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 8px; }
.zert-app .zert-dialog-head h3 { font-size: 1.2rem; }
.zert-app .zert-dialog-body { padding: 8px 22px 18px; overflow: auto; display: grid; gap: 14px; }
.zert-app .zert-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--z-line); background: #fafbfc; }
.zert-app .zert-qr { display: grid; justify-items: center; gap: 12px; }
.zert-app .zert-qr-img { width: min(280px, 100%); aspect-ratio: 1; background: #fff; padding: 10px; border: 1px solid var(--z-line); border-radius: 12px; }
.zert-app .zert-qr-img svg { width: 100%; height: 100%; display: block; }
.zert-app .zert-copy { display: flex; gap: 8px; width: 100%; }

.zert-app .zert-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100000; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.zert-app .zert-toast { display: flex; align-items: flex-start; gap: 10px; background: #16202a; color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(16, 24, 40, .35);
    animation: zert-toast-in .2s ease; font-size: .93rem; }
.zert-app .zert-toast-ok .zert-icon { color: #6ee7a8; }
.zert-app .zert-toast-error { background: #7a1a12; }
.zert-app .zert-toast-error .zert-icon { color: #ffb4ab; }
@keyframes zert-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Öffentliches Anmeldeformular, Login ---------- */
.zert-page .zert-card-head { margin-bottom: 18px; display: grid; gap: 4px; }
.zert-page .zert-eyebrow { color: var(--z-accent); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.zert-page .zert-card-head :is(h1, h2) { font-size: 1.6rem; }
.zert-page .zert-datum { display: inline-flex; align-items: center; gap: 6px; color: var(--z-muted); font-size: .95rem; }
.zert-page .zert-alert { background: var(--z-danger-soft); color: #7a1a12; border: 1px solid #f3c3be; border-radius: var(--z-radius-sm); padding: 12px 14px; margin-bottom: 16px; font-weight: 600; }
.zert-page .zert-success { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 18px 8px; }
.zert-page .zert-success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--z-ok-soft); color: var(--z-ok); display: grid; place-items: center; }
.zert-page .zert-success :is(h1, h2) { font-size: 1.5rem; }
.zert-page .zert-btn-block { width: 100%; min-height: 48px; font-size: 1.02rem; }
.zert-page .zert-fine { color: var(--z-muted); font-size: .82rem; line-height: 1.45; }

.zert-page .zert-login p { margin-bottom: 14px; }
.zert-page .zert-login label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
.zert-page .zert-login input[type="text"], .zert-page .zert-login input[type="password"] {
    width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--z-line-strong); border-radius: var(--z-radius-sm); font: inherit; background: #fff; color: var(--z-text); }
.zert-page .zert-login input[type="text"]:focus, .zert-page .zert-login input[type="password"]:focus { outline: none; border-color: var(--z-accent); box-shadow: var(--z-ring); }
.zert-page .zert-login .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.zert-page .zert-login input[type="submit"] { width: 100%; min-height: 46px; border: 0; border-radius: var(--z-radius-sm); background: var(--z-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.zert-page .zert-login input[type="submit"]:hover { background: var(--z-accent-hover); }
.zert-page .zert-login-links { text-align: center; margin-top: 12px; font-size: .9rem; }

/* ---------- Seiten im Theme: doppelte Seitenüberschrift ausblenden ---------- */
body:has(.zert-page, .zert-app) .wp-block-post-title,
body:has(.zert-page, .zert-app) .entry-header .entry-title { display: none; }

/* ---------- Leerzustand (Anmeldeseite ohne QR-Code) ---------- */
.zert-page .zert-empty { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 32px 24px; }
.zert-page .zert-empty h1 { font-size: 1.5rem; }
.zert-page .zert-empty p { max-width: 42ch; }
.zert-page .zert-icon-info { background: var(--z-info-soft); color: var(--z-info); }

/* ---------- Startseite (Landingpage) ---------- */
.zert-site.zert-site {
    width: min(1080px, calc(100vw - 32px)); max-width: none !important;
    margin-left: calc((100% - min(1080px, 100vw - 32px)) / 2) !important; margin-right: 0 !important;
    display: grid; gap: 28px; padding: 8px 0 24px;
}
.zert-site .zert-btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .45); }
.zert-site .zert-btn-light:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.zert-site .zert-hero {
    position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
    padding: 56px 48px; border-radius: 24px; color: #fff;
    background: radial-gradient(1200px 400px at 90% -10%, rgba(255, 255, 255, .16), transparent 60%), linear-gradient(135deg, #0b5f59 0%, #0f766e 55%, #14907f 100%);
    box-shadow: 0 18px 40px rgba(15, 118, 110, .25);
}
.zert-site .zert-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.12; letter-spacing: -.025em; max-width: 18ch; }
.zert-site .zert-hero .zert-eyebrow { color: rgba(255, 255, 255, .8); margin-bottom: 14px; }
.zert-site .zert-lead { margin-top: 16px; font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, .92); max-width: 56ch; }
.zert-site .zert-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.zert-site .zert-hero .zert-btn-primary { background: #fff; color: var(--z-accent-hover); min-height: 48px; padding: 10px 22px; }
.zert-site .zert-hero .zert-btn-primary:hover:not([disabled]) { background: #eafaf7; color: var(--z-accent-hover); }
.zert-site .zert-hero .zert-btn-light { min-height: 48px; padding: 10px 22px; }
.zert-site .zert-hero-badge { width: 150px; height: 150px; border-radius: 36px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .3); transform: rotate(-6deg); }

.zert-site .zert-section h2 { font-size: 1.5rem; letter-spacing: -.015em; margin-bottom: 18px; }
.zert-site .zert-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: none; }
.zert-site .zert-step { position: relative; list-style: none; background: var(--z-surface); border: 1px solid var(--z-line); border-radius: var(--z-radius); box-shadow: var(--z-shadow); padding: 24px 22px; display: grid; gap: 8px; align-content: start; }
.zert-site .zert-step h3 { font-size: 1.1rem; }
.zert-site .zert-step p { color: var(--z-muted); }
.zert-site .zert-step-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--z-accent-soft); color: var(--z-accent); display: grid; place-items: center; margin-bottom: 6px; }
.zert-site .zert-step-num { position: absolute; top: 18px; right: 20px; font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--z-line); }
.zert-site .zert-note { margin-top: 14px; color: var(--z-muted); font-size: .95rem; }

.zert-site .zert-check-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; background: var(--z-surface); border: 1px solid var(--z-line); border-radius: 20px; box-shadow: var(--z-shadow); padding: 32px; }
.zert-site .zert-check-card h2 { margin-bottom: 8px; }
.zert-site .zert-check-card p { color: var(--z-muted); }
.zert-site .zert-check-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.zert-site .zert-check-form .zert-input { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .02em; min-height: 48px; }
.zert-site .zert-check-form .zert-btn { min-height: 48px; }

.zert-site .zert-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.zert-site .zert-trust-item { display: flex; gap: 14px; align-items: flex-start; padding: 4px 6px; }
.zert-site .zert-trust-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--z-ok-soft); color: var(--z-ok); display: grid; place-items: center; }
.zert-site .zert-trust-item strong { display: block; margin-bottom: 2px; }
.zert-site .zert-trust-item p { color: var(--z-muted); font-size: .92rem; }
.zert-site .zert-site-foot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; color: var(--z-muted); font-size: .92rem; padding-top: 8px; border-top: 1px solid var(--z-line); }
html { scroll-behavior: smooth; }

/* ---------- Eigenständiges Startseiten-Template ---------- */
.zert-standalone { margin: 0; background: #f4faf8; min-height: 100vh; display: flex; flex-direction: column; }
.zert-standalone main { flex: 1; padding: 20px 0 36px; }
.zert-standalone .zert-section { scroll-margin-top: 84px; }
.zert-standalone *, .zert-standalone *::before, .zert-standalone *::after { box-sizing: border-box; }
.zert-standalone .zert-site.zert-site { width: min(1080px, 100% - 32px); margin: 0 auto !important; padding: 0; }
.zert-standalone a { color: var(--z-accent); }
.zert-skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--z-text); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.zert-skip:focus { left: 12px; }

.zert-sitehead { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--z-line); }
.zert-sitehead-in { width: min(1080px, 100% - 32px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.zert-sitebrand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; color: var(--z-text) !important; text-decoration: none; letter-spacing: -.01em; min-width: 0; }
.zert-sitebrand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zert-sitelogo { flex: none; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #0f766e, #14907f); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(15, 118, 110, .3); }
.zert-sitenav { display: flex; align-items: center; gap: 4px; }
.zert-nav-link { padding: 8px 14px; border-radius: 999px; color: var(--z-muted) !important; font-weight: 600; text-decoration: none; }
.zert-nav-link:hover { background: var(--z-neutral-soft); color: var(--z-text) !important; }
.zert-nav-btn { white-space: nowrap; margin-left: 6px; padding: 9px 18px; border-radius: 999px; background: var(--z-accent-soft); color: var(--z-accent-hover) !important; font-weight: 700; text-decoration: none; }
.zert-nav-btn:hover { background: #cdebe7; }

.zert-sitefoot { background: #0e2f2c; color: #cfe5e2; padding: 36px 0 28px; }
.zert-sitefoot-in { width: min(1080px, 100% - 32px); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: start; }
.zert-sitefoot strong { color: #fff; font-size: 1.05rem; }
.zert-sitefoot p { margin: 6px 0 0; }
.zert-sitefoot a { color: #fff !important; text-decoration: none; }
.zert-sitefoot a:hover { text-decoration: underline; }
.zert-sitefoot nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.zert-sitefoot .zert-copy { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; color: #9fc3be; }

/* Hero: freundlicher mit weichen Formen */
.zert-site .zert-hero::before, .zert-site .zert-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.zert-site .zert-hero::before { width: 360px; height: 360px; right: -90px; top: -140px; }
.zert-site .zert-hero::after { width: 220px; height: 220px; right: 140px; bottom: -120px; }
.zert-site .zert-hero > * { position: relative; z-index: 1; }

/* Häufige Fragen */
.zert-site .zert-faq { display: grid; gap: 10px; }
.zert-site .zert-faq details { background: var(--z-surface); border: 1px solid var(--z-line); border-radius: var(--z-radius); padding: 0 20px; box-shadow: var(--z-shadow); }
.zert-site .zert-faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zert-site .zert-faq summary::-webkit-details-marker { display: none; }
.zert-site .zert-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--z-accent); flex: none; transition: transform .2s; }
.zert-site .zert-faq details[open] summary::after { transform: rotate(45deg); }
.zert-site .zert-faq details p { padding: 0 0 16px; color: var(--z-muted); max-width: 70ch; }
.zert-site .zert-faq summary:focus-visible { outline: none; box-shadow: var(--z-ring); border-radius: 8px; }

@media (max-width: 720px) {
    .zert-nav-link { display: none; }
    .zert-sitefoot-in { grid-template-columns: 1fr; }
    .zert-sitefoot nav { justify-content: flex-start; }
}

/* ---------- Dashboard-Banner im Stil der Startseite ---------- */
.zert-app .zert-hello {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
    padding: 28px 32px; border-radius: 22px; color: #fff;
    background: radial-gradient(900px 300px at 90% -20%, rgba(255, 255, 255, .16), transparent 60%), linear-gradient(135deg, #0b5f59 0%, #0f766e 55%, #14907f 100%);
    box-shadow: 0 14px 32px rgba(15, 118, 110, .22);
}
.zert-app .zert-hello::after { content: ""; position: absolute; width: 240px; height: 240px; right: -70px; top: -110px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.zert-app .zert-hello > * { position: relative; z-index: 1; }
.zert-app .zert-hello h2 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.02em; margin-top: 2px; }
.zert-app .zert-hello-eyebrow { color: rgba(255, 255, 255, .8); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.zert-app .zert-hello-text { color: rgba(255, 255, 255, .92); margin-top: 6px; font-size: 1.05rem; }
.zert-app .zert-btn-onbanner { background: #fff; color: var(--z-accent-hover); min-height: 46px; padding: 9px 20px; }
.zert-app .zert-btn-onbanner:hover:not([disabled]) { background: #eafaf7; }
@media (max-width: 720px) { .zert-app .zert-hello { padding: 22px 20px; border-radius: 18px; } }

/* ---------- Verwaltung und Anmeldung im eigenständigen Seiten-Design ---------- */
.zert-standalone .zert-app.zert-app { width: min(1120px, 100% - 32px); max-width: none !important; margin: 0 auto !important; background: transparent; padding: 0; border-radius: 0; }
.zert-standalone .zert-app .zert-brand { display: none; }
.zert-standalone .zert-app .zert-top { border-radius: 999px; padding: 8px 10px 8px 14px; }
@media (max-width: 720px) {
    .zert-standalone .zert-app .zert-top { border-radius: 22px; padding: 8px 12px; flex-wrap: nowrap; }
    .zert-standalone .zert-app .zert-nav a { padding: 8px 11px; }
    .zert-standalone .zert-app .zert-avatar { display: none; }
}
.zert-standalone .zert-page:not(.zert-site) { margin-top: 16px; }
.zert-standalone .zert-page:not(.zert-site) .zert-card { border-radius: 22px; padding: 28px; box-shadow: 0 10px 30px rgba(15, 118, 110, .10), 0 1px 2px rgba(16, 24, 40, .05); }
.zert-standalone .zert-page .zert-card-head::before { content: ""; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M10 4h4v6h6v4h-6v6h-4v-6H4v-4h6z'/%3E%3C/svg%3E") center / 24px no-repeat, linear-gradient(135deg, #0f766e, #14907f); }

/* ---------- Druck: nur der QR-Aushang ---------- */
.zert-print-sheet { display: none; }
@media print {
    body > *:not(.zert-print-sheet) { display: none !important; }
    .zert-print-sheet { display: grid !important; place-items: center; gap: 18px; text-align: center; padding: 40px; color: #000; background: #fff; }
    .zert-print-sheet h1 { font-size: 34px; margin: 0; }
    .zert-print-sheet p { font-size: 18px; margin: 0; }
    .zert-print-sheet .zert-print-qr { width: 420px; height: 420px; }
    .zert-print-sheet .zert-print-qr svg { width: 100%; height: 100%; }
    .zert-print-sheet .zert-print-url { font-size: 13px; color: #444; word-break: break-all; }
}

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
    .zert-app .zert-detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .zert-app { padding: 12px; border-radius: 14px; }
    .zert-app .zert-user-name, .zert-app .zert-hide-sm { display: none; }
    .zert-app .zert-pagehead h2 { font-size: 1.4rem; }
    .zert-app .zert-grid-2, .zert-page .zert-grid-2 { grid-template-columns: 1fr; }
    .zert-site .zert-hero { padding: 28px 22px; }
    .zert-site .zert-hero-badge { display: none; }
    .zert-site .zert-check-card { grid-template-columns: 1fr; }
    .zert-site .zert-check-form { grid-template-columns: 1fr; }
    .zert-app .zert-table thead { display: none; }
    .zert-app .zert-table, .zert-app .zert-table tbody, .zert-app .zert-table tr, .zert-app .zert-table td { display: block; width: 100%; }
    .zert-app .zert-table tr { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 8px; padding: 12px 14px; border-bottom: 1px solid var(--z-line); align-items: center; }
    .zert-app .zert-table tbody tr:last-child { border-bottom: 0; }
    .zert-app .zert-table td { padding: 0; border: 0; }
    .zert-app .zert-table .zert-col-check { grid-row: 1 / span 2; width: auto; }
    .zert-app .zert-table .zert-col-name { grid-column: 2; }
    .zert-app .zert-table .zert-col-status { grid-column: 3; grid-row: 1; }
    .zert-app .zert-table .zert-col-date { grid-column: 2 / span 2; color: var(--z-muted); font-size: .85rem; }
    .zert-app .zert-table .zert-col-end { display: none; }
    .zert-app .zert-table tr[data-offen="1"] td:first-child { box-shadow: none; }
    .zert-app .zert-table tr[data-offen="1"] { box-shadow: inset 3px 0 0 var(--z-accent); }
    .zert-app .zert-toasts { left: 16px; right: 16px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    .zert-app *, .zert-page * { animation: none !important; transition: none !important; }
}

.zert-app [hidden] { display: none !important; }
